Upload
iqbal-muhammad-farisi
View
218
Download
0
Embed Size (px)
Citation preview
49 } 50 51 if ($kode=="C03"){ 52 $nama="Hardisk"; 53 $harga=750000; 54 } 55 56 if ($kode=="D04"){ 57 $nama="Mouse Pad"; 58 $harga=5000; 59 } 60 61 $subtotal=$harga*$jumlah; 62 if ($subtotal>=100000){ 63 $diskon=0.15*$subtotal; 64 } 65 else 66 if ($subtotal>=50000){ 67 $diskon=0.1*$subtotal; 68 } 69 else 70 if ($subtotal>=25000){ 71 $diskon=0.05*$subtotal; 72 } 73 else 74 $diskon=0; 75 $totalbayar=$subtotal-$diskon; 76 ?> 77 78 79 80 81 82 Nama Barang 83 84 85 86 Harga Satuan 87 Rp. ; 88 89 90 Jumlah Beli 91 ; 92 93 94 Sub Total 95 Rp. ; 96 97 C:\wamp\www\atol\Pertemuan 2\penjualan-2a.php: 2/3
98 Diskon 99 Rp. ;100 101 102 Total Bayar103 Rp. ;104 105 106 107 108 109
C:\wamp\www\atol\Pertemuan 2\penjualan-2a.php: 3/3