?
Current Path : /home1/savoy/public_html/savoyglobal.net/rms/application/views/inventory/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/rms/application/views/inventory/edit_vendor_purchase.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $this->load->view('documentreadyfunctions'); $vendor=$this->mastermodel->getdatas('vendor','vendor_id','','vendor_id'); $inventory=$this->mastermodel->getdatas('inventory','inventory_id','','inventory_id'); $inventory_id=''; $inventory_qty=''; $limit=''; ?> <div class="icons_main"> <div class="icons"> <img src="<?=base_url()?>assets/images/back.png" title="Back" class="clickimage" onclick="viewdata('inventory','viewininventorysearch','search_vendor_purchase','view_vendor_purchase','<?=$_SESSION['pagenum'];?>')" alt="Back" align = "center" width="32" height="32" /> </div> <div class="icons_caption"> <h4>Updating Vendor Purchase</h4> </div> </div> <?php $attributes=array('id'=>'validateform','class'=>'validate'); echo form_open('inventory/addininventory/update_vendor_purchase/view_vendor_purchase/1',$attributes); ?> <div class="grid_6"> <div class="box"> <div class="header"> <span></span> </div> <div class="content no-padding"> <div class="section _100"> <label> Vendor Name </label> <div> <select name="vendor_id" class="required"> <option>Select</option> <?php foreach($vendor as $row) { ?> <option value="<?=$row['vendor_id']?>" <?php if($row['vendor_id']==$viewinfo->vendor_id) {echo 'selected'; }?>><?=$row['vendor_name']?></option> <?php } ?> </select> </div> </div> <div class="section _100"> <label> Date </label> <div> <input name="vendor_purchase_date" id="date" type="dateonly" class="required" value="<?=$this->mastermodel->convertdatenormalformat($viewinfo->vendor_purchase_date)?>"> </div> </div> </div> </div> </div> <div class="grid_6"> <div class="box"> <div class="header"> <span></span> </div> <div class="content no-padding"> <div class="section _100"> <label> Invoice Number</label> <div> <input type="text" name="vendor_purchase_invoice_no" id="vendor_purchase_invoice_no" value="<?=$viewinfo->vendor_purchase_invoice_no?>" class="required"> </div> </div> <div class="section _100"> <label> Remarks</label> <div> <textarea name="vendor_purchase_remarks" id="vendor_purchase_remarks"><?=$viewinfo->vendor_purchase_remarks?></textarea> </div> </div> </div> </div> </div> <div class="grid_12"> <div class="box"> <div class="content no-padding"> <div class="header main"> Purchase Details </div> <table class="table"> <tr> <th style="width: 20%;">Item </th> <th>Quantity</th> <th>Amount</th> <th>Discount</th> <th>Total</th> <th><input type="button" id="button2" value="Add More" class="addRow" title="Add Row" style="width:75px;"/></th> </tr> <?php $limit=0; foreach($details as $row) { $inventory_id.=$row['vendor_purchase_inventory_id'].','; $inventory_qty.=$row['vendor_purchase_inventory_qty'].','; $total=($row['vendor_purchase_inventory_qty']*$row['vendor_purchase_inventory_amount'])-$row['vendor_purchase_discount']; ?> <tr> <td> <select style="margin-top: 10;" name="vendor_purchase_inventory_id" id="vendor_purchase_inventory_id" class="required chzn-done" > <option value="">Select</option> <?php $i=1; foreach ($inventory as $list) { ?> <option value="<?=$list['inventory_id']?>" <?php if($list['inventory_id']==$row['vendor_purchase_inventory_id']){ echo 'selected'; } ?>><?=$list['inventory_type']?></option> <?php } ?> </select> </td> <td> <input class="required number w_90" type="text" name="vendor_purchase_inventory_qty" id="vendor_purchase_inventory_qty" value="<?=$row['vendor_purchase_inventory_qty']?>"/> <input class="w_90" type="hidden" name="vendor_purchase_act_inventory_qty" id="vendor_purchase_act_inventory_qty" value="<?=$row['vendor_purchase_inventory_qty']?>"/> </td> <td><input class="required number w_90 auto" type="text" name="vendor_purchase_inventory_amount" id="vendor_purchase_inventory_amount" value="<?=$row['vendor_purchase_inventory_amount']?>"/></td> <td><input class="medium required number" type="text" name="vendor_purchase_discount" id="<?=$i?>" onblur="calculatetotal(this.id)" value="<?=$row['vendor_purchase_discount']?>"/></td> <td><input readonly type="text" class="w_90 required number" name="total" id="total" value="<?=$total?>"></td> <td> <img style="float: right; vertical-align: top;"src="<?=base_url()?>assets/images/icons/close.png" alt="Delete Row" class="delRow clickimage" title="Delete Row"/> </td> </tr> <?php $i++; $limit++; } ?> <tr> <td> <select style="margin-top: 10;" name="vendor_purchase_inventory_id" id="vendor_purchase_inventory_id" class="chzn-done" > <option value="">Select</option> <?php foreach ($inventory as $list) { ?> <option value="<?=$list['inventory_id']?>"><?=$list['inventory_type']?></option> <?php } ?> </select> </td> <td><input class="w_90 number" type="text" name="vendor_purchase_inventory_qty" id="vendor_purchase_inventory_qty"/></td> <td><input class="w_90 number auto" type="text" name="vendor_purchase_inventory_amount" id="vendor_purchase_inventory_amount" /></td> <td><input class="medium required number" value="0" type="text" name="vendor_purchase_discount" id="vendor_purchase_discount"/></td> <td><input readonly type="text" class="w_90 number auto" name="total" id="1" onclick="calculatetotal(this.id)"></td> <td> <img style="float: right; vertical-align: top;"src="<?=base_url()?>assets/images/icons/close.png" alt="Delete Row" class="delRow clickimage" title="Delete Row"/> </td> </tr> </table> </div> </div> </div> <?php ?> <div class="grid_12"> <div class="box"> <div class="actions"> <div class="actions-left"> <input type="reset"> <input type="hidden" name="vendor_purchase_id" value="<?=$viewinfo->vendor_purchase_id?>"/> <input type="hidden" name="inventory_id" value="<?=$inventory_id?>"/> <input type="hidden" name="inventory_qty" value="<?=$inventory_qty?>"/> <input type="hidden" name="limit" value="<?=$limit?>"/> </div> <div class="actions-right"> <button type="submit" id="submit" class="clickimage" onclick="addformdata('validateform')">Update</button> </div> </div> </div> </div> <?php echo form_close();?>