Rev 20092 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Inventory Management::Create Purchase Order</title><script type="text/javascript" src="/inventory/js/jquery-1.4.2.js"></script><script type="text/javascript" src="/inventory/js/purchase-order-common.js"></script><script type="text/javascript" src="/inventory/js/purchase-order-events.js"></script><link rel="stylesheet" href="/inventory/css/common.css" type="text/css" /></head><body><a href="/inventory">Go to Home page</a><br /><div class="error">#set($messages = $action.getActionErrors())#if($messages && $messages.size() != 0)<label >Please fix below errors first to see accurate requirements</label> <br/>#foreach($message in $messages)$message <br/>#end#end<br /></div><table id="suppliers"><thead ><tr ><th >Supplier</th><th >Total Quantity</th><th >Net Quantity</th><th >COD/Prepaid</th><th >Amount</th><th ></th></tr></thead><tbody >#foreach($supplier in $action.getSuppliers().values())<tr ><td >$supplier.getName()</td><td id="net-totals-quantity-$supplier.getId()">$action.getNetQuantityString($supplier.getId())</td><td id="total-quantity-$supplier.getId()">$action.getQuantityString($supplier.getId())</td><td >$action.getCODPrepaidString($supplier.getId())</td><td id="total-amount-$supplier.getId()" supplierId="$supplier.getId()">$action.getAmount($supplier.getId())</td><td ><a class="show-details" supplierId="$supplier.getId()" href="javascript:void(0)">Show details</a></td></tr>#end</tbody></table>#foreach($supplierId in $action.getSuppliers().keySet())<div id="lineitems-$supplierId" class="lineitems hidden" supplierId="$supplierId"><br /><form class="create-purchase-order"><label>CForm Billing Required : </label><input type="checkbox" name="cForm" id="cForm" class="cForm-class"><label> Shipping Warehouse : </label><select name = "shippingWarehouseId" ><option value = "0">Select</option><!--<option value = "16">Amazon-Mumbai(Bhiwandi)</option><option value = "1771"> Amazon-Bangalore </option><option value = "2854"> HR-FK/Gurgaon </option><option value = "3295"> HR-AMZ/Mewat </option><option value = "4699"> DL-FK/Mahipalpur-Delhi </option><option value = "5314">DL-SD/Samalkha-Delhi</option><option value = "5623">DL-AMZ/Amazon-Delhi</option>--></select><br/><div id="cstCostTypeDiv" class="cstCostTypeDiv-class" hidden><label> CST Cost Borne : </label><select id="cstCostType" name="cstCostType" class="cstCostType-class"><option value="vendor">Vendor</option><option value="ours" selected="selected">Ours</option><option value="custom">Custom</option></select><br/><div id="extraCstInputs" class="extraCstInputs-class" hidden><label>CST Borne By Us: (Between 0.00 to 2.00) </label><input type="text" class="cstBorneByUs-class" name="cstBorneByUs" id="cstBorneByUs"></div></div><br><table class="lineitems"><thead ><tr ><th >Item Id</th><th >Product Name</th><th >Quantity</th><th >COD/Prepaid</th><th >Transfer price</th><th style="display:none;">Mrp</th><th style="display:none;">Nlc</th><th >Total amount</th><th style="display:none;">Available</th><th style="display:none;">Reserved</th><th >Net Pending Order Qty</th><th >previously Ordered Qty</th><th style="display:none;">Last XDays Sale</th><th >AverageSale </th><th style="display:none;">Average Sales </th><th style="display:none;">InStock Days</th><th >Pending RTOs</th><th >NumDays Stock</th><th >MinStock Req</th><th >Additional Qty</th><th style="display:none;">Suggested Qty</th><th ></th></tr></thead><tbody><tr id="sample-lineitem" class="hidden"><td><input type="text" class="required digits" name="itemId" supplierId="$supplierId" style="width:80px" disabled /></td><td><div id="modelName"></div></td><td ><input type="text" class="required digits" name="quantity" style="width:80px" disabled /> </td><td >0/0</td><td id="transferPrice"><input type="text" class="required number" name="unitPrice" style="width:80px" disabled readonly /> </td><td id="mrp" style="display:none;"><input name="mrp" readonly/></td><td id="nlc" style="display:none;"><input name="nlc" readonly /> </td><td ><div id="amount">0</div></td><td id="availableQuantity" style="display:none;" ><div name="availableQuantity" readonly /> </td><td id="reservedQuantity" style="display:none;" ><div name="reservedQuantity" readonly /> </td><td id="netPendingOrderQty"><div name="netPendingOrderQty" readonly /> </td><td id="previouslyOrderedQty"><div name="previouslyOrderedQty" readonly /> </td><td id="lastXdaysSale" style="display:none;"><div name="lastXdaysSale" readonly /> </td><td id="avgSale"><div name="avgSale" readonly /> </td><td id="avgSales" style="display:none;"><div name="avgSales" readonly /> </td><td id="numberOfDaysInStock" style="display:none;"><div name="numberOfDaysInStock" readonly /> </td><td id="pendingRTOs"></td><td id="numberOfDaysStock"><div name="numberOfDaysStock" readonly /> </td><td id="minStockLevel"><div name="minStockLevel" readonly /> </td><td id="additionalQuantity"><div name="additionalQuantity" readonly /> </td><td id="suggestedQuantity" style="display:none;"><div name="suggestedQuantity" readonly /> </td><td ><a id="remove-lineitem" href="javascript:void(0)">remove</a></td></tr>#foreach($lineItem in $action.getLineItemsBySupplier().get($supplierId))<tr ><td><input type="text" class="required digits" name="itemId" value="$lineItem.getItemId()" style="width:80px" /></td><td><div id="modelName">$action.getName($lineItem)</div></td>#set($prepaidCount = $lineItem.getQuantity() - $lineItem.getCodCount())<td ><input type="text" class="required digits" name="quantity" value="$lineItem.getSuggestedQuantity()" style="width:80px" /> </td><td >$lineItem.getCodCount()/$prepaidCount</td><td id="transferPrice"><input type="text" class="required number" name="unitPrice" value="$lineItem.getUnitPrice()" style="width:80px" readonly /> </td><td style="display:none;"><input type="hidden" name="mrp" value = "$lineItem.getMrp()" readonly /></td><td style="display:none;"><input type="hidden" name="nlc" value = "$lineItem.getNlc()" readonly /></td>#set($amount = $lineItem.getSuggestedQuantity() * $lineItem.getUnitPrice())<td ><div id="amount">$amount</div></td><td style="display:none;"><input type="hidden" name="availableQuantity" value = "$lineItem.getAvailableQuantity()" readonly /></td><td style="display:none;"><input type="hidden" name="reservedQuantity" value = "$lineItem.getReservedQuantity()" readonly /></td>#set($netPendingReq = $lineItem.getReservedQuantity() - $lineItem.getAvailableQuantity())<td ><div id="netPendingOrderQty" style="width:80px" readonly />$lineItem.getReservedQuantity() - $lineItem.getAvailableQuantity() = $netPendingReq</td><td ><input type="text" name="previouslyOrderedQty" value = "$lineItem.getPreviouslyOrderedQty()" style="width:80px" readonly /></td><td style="display:none;"><input type="hidden" name="lastXdaysSale" value = "$lineItem.getLastXdaysSale()" readonly /></td><td ><div id="avgSale" style="width:80px" readonly />$lineItem.getLastXdaysSale() ($lineItem.getAvgSales())</td><td style="display:none;"><input type="text" name="avgSales" value = "$lineItem.getAvgSales()" style="width:80px" readonly /></td><td style="display:none;"><input type="text" name="numberOfDaysInStock" value = "$lineItem.getNumberOfDaysInStock()" style="width:80px" readonly /></td><td ><input type="text" name="rtoOrders" value = "$lineItem.getRtoOrders()" style="width:80px" readonly /></td><td ><input type="text" name="numberOfDaysStock" value = "$lineItem.getNumberOfDaysStock()" style="width:80px" readonly /></td><td ><input type="text" name="minStockLevel" value = "$lineItem.getMinStockLevel()" style="width:80px" readonly /></td>#set($stockThroughAvgSales = $lineItem.getAvgSales() * $lineItem.getNumberOfDaysStock())#if($stockThroughAvgSales > $lineItem.getMinStockLevel())#set($additionalQty = $stockThroughAvgSales)#else#set($additionalQty = $lineItem.getMinStockLevel())#end#if($lineItem.getRtoOrders() >1)#set($additionalQty =$additionalQty -($lineItem.getRtoOrders()/2))#end#if($additionalQty<0)#set($additionalQty = 0)#end<td ><input type="text" name="additionalQuantity" value = "$additionalQty" style="width:80px" readonly /></td><td style="display:none;"><input type="hidden" name="suggestedQuantity" value = "$lineItem.getSuggestedQuantity()" readonly /></td><td ><a id="remove-lineitem" href="javascript:void(0)">remove</a></td></tr>#end</tbody></table><div ><input id="add-lineitem" type="button" value="Add New Item"/> <br /> <br /><input type="hidden" name="supplierId" value="$supplierId"/><input type="hidden" name="warehouseId" value="$warehouseId"/><input type="submit" value="Create Purchase Order"/><input id="cancel" type="button" value="Cancel"/></div></form></div>#end</body></html>