Exemple #1
0
        $count += $rqt->qty;
    }
    ?>
			<tr <?php 
    echo $filtered === true ? 'class="success"' : '';
    ?>
 id="record<?php 
    echo $product->id;
    ?>
">
				<td><?php 
    echo $product->id;
    ?>
</td>
				<td><?php 
    echo getSupplier($product->sid);
    ?>
</td>
				<td><?php 
    echo $product->name;
    ?>
</td>
				<td><?php 
    echo getiType($product->type);
    ?>
</td>
				<td><?php 
    echo $product->price;
    ?>
</td>
				<td><?php 
Exemple #2
0
             $warna = "#EAF0F7";
         } else {
             $warna = "#FFFFFF";
         }
         echo "<tr bgcolor={$warna}>";
         echo "\n\t\t\t<td class=td align=center> {$no} </td>\n\t\t\t<td class=td> " . $x['barcode'] . " </td>\n\t\t\t<td class=td> " . $x['namaBarang'] . " </td>\n\t\t\t<td class=td align=right> " . number_format($x['nilaiStok'], 0, ',', '.') . " </td>\n\t\t\t<td class=td align=right> " . number_format($x['umurStok'], 0, ',', '.') . " </td>\n\t\t\t<td class=td align=right> <center>" . number_format($x['jmlStokIni'], 0, ',', '.') . " </td>\n\t\t\t<td class=td align=right> <center>" . number_format($x['jmlStokSemua'], 0, ',', '.') . " </td>\n\t\t\t<td class=td align=right> " . number_format($x['avgSales'], 6, ',', '.') . " </td>\n\t\t\t</tr>";
         $nilai = $nilai + $x['nilaiStok'] / $x['jmlStokIni'] * $x['jmlStokSemua'];
     }
     echo "</table> Nilai Stok : Rp " . number_format($nilai, 0, ',', '.');
     // bersihkan temporary table
     $hasil = mysql_query("DELETE FROM tmp_lap_aging");
     exit;
 case "po":
     // =======================================================================================================================
     echo "<h2>Purchase Order</h2>\n            <form method=POST action='?module=laporan&act=po&action=pesanbarang'>\n                Supplier :\n                <select name=supplierId>";
     $supplier = getSupplier();
     while ($dataSupplier = mysql_fetch_array($supplier)) {
         echo "<option value={$dataSupplier['idSupplier']}>{$dataSupplier['namaSupplier']}::{$dataSupplier['alamatSupplier']}</option>";
     }
     echo "</select>\n\t\t<br />\n\t\tTampilkan hanya barang dengan jumlah lebih kecil dari : <input type=text name=jumlahmin value=0 size=3>\n\t\t<br />\n            &nbsp;&nbsp;&nbsp;&nbsp;\n            <input type=submit value=Pilih>\n            </form>";
     if ($_GET[action] == 'pesanbarang') {
         $supplier = getDetailSupplier($_POST[supplierId]);
         $detailSupplier = mysql_fetch_array($supplier);
         echo "<h2>Pesan Barang di Supplier {$detailSupplier['namaSupplier']}</h2>\n            <br/>Alamat Supplier : {$detailSupplier['alamatSupplier']}<br/><br/>\n            <form method=POST action='modul/js_cetak_PO.php'   onSubmit=\"popupform(this, 'Purchase_Order')\">\n            <table width=500>\n                <tr><th>#</th><th>No</th><th>Barcode</th><th>Nama Barang</th><th>Stok<br />Saat Ini</th><th>Harga<br />Beli</th></tr>";
         $no = 0;
         $queryBarang = getDaftarBarangSupplier($_POST[supplierId], $_POST[jumlahmin]);
         while ($barangSupplier = mysql_fetch_array($queryBarang)) {
             if ($no % 2 == 0) {
                 $warna = "#EAF0F7";
             } else {
                 $warna = "#FFFFFF";
Exemple #3
0
            var url = "aksi.php?module=barang&act=diskonupdate";
            $.ajax({
               type: "POST",
               url: url,
               data: data,
               success: function () {
                  //location.reload()
               },
            });
         });

      </script>
      <?php 
        break;
    case 'pindahsupplier':
        $sqlSupplier = getSupplier();
        ?>
      <h2>Pindah Supplier</h2>
      <form method="POST">
         <label for="supplierasal">Pilih Supplier Asal</label><br />
         <select name="idSupplier" id="supplierasal" style="width:30%">
            <?php 
        while ($data = mysql_fetch_array($sqlSupplier)) {
            ?>
               <option value="<?php 
            echo $data['idSupplier'];
            ?>
" <?php 
            echo $data['idSupplier'] == $_POST['idSupplier'] ? 'selected' : '';
            ?>
>
<?php

include_once "field_const.php";
if (isset($_POST[ordNo], $_POST["className"])) {
    include_once "Order.php";
    include_once "User.php";
    include_once "Product.php";
    $orderLine = getOrderLinesByOrdNo($_POST[ordNo]);
    if (!isset($orderLine)) {
        echo "No result found";
        return;
    }
    $retTable = "<table class='" . $_POST["className"] . "'>\n\t\t\t<caption>Ordered Products of " . $_POST[ordNo] . "</caption>\n\t\t\t\t<thead>\t\t\n\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t<th>Product No</th>\n\t\t\t\t\t<th>Product Name</th>\n\t\t\t\t\t<th>Supplier Name</th>\n\t\t\t\t\t<th>Qty</th>\n\t\t\t\t\t<th>Price</th>\n\t\t\t\t\t<th>Total</th></tr>\n\t\t\t\t</thead><tbody>";
    $format = "<tr><td align='center'>%s</td><td align='center'>%s</td>\n\t\t<td align='center'>%s</td><td align='center'>%d</td><td align='center'>\$%5.2f</td><td align='center'>\$%5.2f</tr>";
    $total = 0;
    while ($row = $orderLine->fetch_assoc()) {
        $product = getProduct($row[prodNo]);
        $name = $product[prodName];
        $supplier = getSupplier($product[suppNo]);
        $supName = $supplier[suppName];
        $total += $row[actualPrice] * $row[qty];
        $retTable .= sprintf($format, $row[prodNo], $name, $supName, $row[qty], $row[actualPrice], $row[qty] * $row[actualPrice]);
    }
    $retTable .= "</tbody><tfoot><tr><td colspan='4'/><td>Total Amount</td><td align='center'>\${$total}</td></tfoot></table>";
    echo $retTable;
    return;
}
Exemple #5
0
    $priceMax = null;
}
if ($catNo == "") {
    $catNo = null;
}
$prods = getProducts($prodName, $priceMin, $priceMax, null, null, $catNo, null);
//$prods = getAllProducts();
?>

	<div class="row prod_C">
		<?php 
if ($prods == null) {
    echo '<div class="noProducts"> No products found. </div>';
}
foreach ($prods as $p) {
    $s = getSupplier($p[suppNo]);
    $prodName = $p[prodName];
    $outOfStock = $p[stockQty] <= 0;
    if (strlen($prodName) > 23) {
        $prodName = substr($prodName, 0, 20) . '...';
    }
    echo '<div id="' . $p[prodNo] . '" class="prodItem_C col-32 col-m-100">
						<div class="prodItem_inContent">
							<div class="imgContainer prodImg">
								<img onload="cropImg(this);" src="product_image/' . $p[prodPhoto] . '"/>;
							</div>
							<div class="prodInfo_C">
								<h2 alt="' . $p[prodName] . '">' . $prodName . '</h2>
								<div class="prodInfoTable_C">
									<table>
										<tr>
Exemple #6
0
						</td>						
						<td style="min-width:250px" class="dt-center">%s</td>
						<td style="min-width:150px" class="dt-center">%s</td>
						<td style="min-width:125px"  class="dt-center">HKD$%.2f</td>
						<td style="min-width:50px"  class="dt-center">%d</td>
						<td style="min-width:125px" class="dt-center">HKD$%.2f</td>
				<td class="dt-center"><input type="image" src="image\\cart\\ic_clear_black_48dp_1x.png "onclick="removeItem(\'%s\',this)"></input> </td>
					</tr>
				';
include_once "Brain/Product.php";
include_once "Brain/User.php";
$products = $cart->getProducts();
foreach ($products as $p) {
    $productInfo = getProduct($p[prodNo]);
    $row = $productInfo;
    $supplier = getSupplier($row[suppNo]);
    $supplier = $supplier[suppName];
    printf($format, "product_image/" . $row[prodPhoto], $row[prodName], $supplier, $p[actualPrice], $p[qty], $cart->getTotalAmount($p[prodNo]), $p[prodNo]);
}
?>
	</tbody>
	<tfoot>
		<tr><td/><td/><td/><td/>
		<td class="dt-right">Total Amount: </td><td style="border-left:none" class="dt-center">HKD$ <span id="totalAmount"><?php 
printf("%.2f", $cart->getTotalAmount());
?>
</span></td>
		<td class="dt-center"><input class="btn_ftyStyle" type="button" onclick="location.replace('checkout.php')" value="CHECK OUT"/></td></tr>
	</tfoot>
	</table>
	
Exemple #7
0
function supp2custInfo($suppNo)
{
    $user = getSupplier($suppNo);
    $retArr = array("ID" => $user[suppNo], "Name" => $user[suppName], "Contact" => $user[suppTel], "Address" => $user[suppAddr]);
    return $retArr;
}
Exemple #8
0
</head>
<body>
	<form id="suppDetailsForm" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
" method="get">
		<input type="hidden" name="suppNo" value=""/>
	</form>

	<table>
		<?php 
include_once "Brain/User.php";
include_once "Brain/functions.php";
regGet('suppNo');
if (isset($suppNo)) {
    $supp = getSupplier($suppNo);
    echo '<tr>
						<th>Supplier ID</th>
						<td>' . $supp[suppNo] . '</td>
					</tr>
					<tr>
						<th>Supplier Name</th>
						<td>' . $supp[suppName] . '</td>
					</tr>
					<tr>
						<th>Tel.</th>
						<td>' . $supp[suppTel] . '</td>
					<tr>
						<th>Address</th>
						<td>' . $supp[suppAddr] . '</td>
					</tr>';
Exemple #9
0
<?php

require_once "ApiLibrary.php";
session_start();
//Checks if this is running from a request
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'GET') {
    //This checks to see if anything was passed into the parameter userName
    if (!isset($_GET['supplierName'])) {
        $good = false;
        if (isset($_SESSION)) {
            if ($_SESSION['username'] != null && $_SESSION['supplier']) {
                $_userName = $_SESSION['username'];
                echo getSupplier($_userName);
                $good = true;
            }
        }
        if (!$good) {
            echo json_encode(array("error" => "Session expired or not logged in."));
        }
    } else {
        $_userName = $_GET['supplierName'];
        echo getSupplier($_userName);
    }
}