mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-09 01:18:25 -04:00
Update for Items receiving_quantity
This commit is contained in:
@@ -194,7 +194,7 @@ class Items extends Secure_Controller
|
||||
$data['default_tax_2_rate'] = $this->config->item('default_tax_2_rate');
|
||||
|
||||
$item_info->receiving_quantity = 0;
|
||||
$item_info->reorder_level = 0;
|
||||
$item_info->reorder_level = 1;
|
||||
$item_info->item_type = '0'; // standard
|
||||
$item_info->stock_type = '0'; // stock
|
||||
$item_info->tax_category_id = 0;
|
||||
|
||||
@@ -218,7 +218,7 @@ class Receiving_lib
|
||||
'in_stock' => $this->CI->Item_quantity->get_item_quantity($item_id, $item_location)->quantity,
|
||||
'price' => $price,
|
||||
'receiving_quantity' => $receiving_quantity!=NULL ? $receiving_quantity : $item_info->receiving_quantity,
|
||||
'total' => $this->get_item_total($quantity, $price, $discount)
|
||||
'total' => $this->get_item_total($quantity, $price, $discount, $receiving_quantity)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -338,7 +338,7 @@ class Receiving_lib
|
||||
$total = 0;
|
||||
foreach($this->get_cart() as $item)
|
||||
{
|
||||
$total = bcadd($total, $this->get_item_total($item['quantity'], $item['price'], $item['discount']));
|
||||
$total = bcadd($total, $this->get_item_total(($item['quantity']* $item['receiving_quantity']), $item['price'], $item['discount']));
|
||||
}
|
||||
|
||||
return $total;
|
||||
|
||||
@@ -187,7 +187,7 @@ if (isset($success))
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<td><?php echo to_currency($item['price']*$item['quantity']-$item['price']*$item['quantity']*$item['discount']/100); ?></td>
|
||||
<td><?php echo to_currency($item['price']*$item['quantity']*$item['receiving_quantity']-$item['price']*$item['quantity']*$item['receiving_quantity']*$item['discount']/100); ?></td>
|
||||
<td><a href="javascript:$('#<?php echo 'cart_'.$line ?>').submit();" title=<?php echo $this->lang->line('receivings_update')?> ><span class="glyphicon glyphicon-refresh"></span></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
1
database/receiving.sql
Normal file
1
database/receiving.sql
Normal file
@@ -0,0 +1 @@
|
||||
UPDATE ospos_items SET receiving_quantity = 1 WHERE receiving_quantity = 0;
|
||||
Reference in New Issue
Block a user