Update for Items receiving_quantity

This commit is contained in:
odiea
2017-06-17 06:42:48 -06:00
committed by FrancescoUK
parent e61e409bfe
commit e2e0ade259
4 changed files with 5 additions and 4 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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
View File

@@ -0,0 +1 @@
UPDATE ospos_items SET receiving_quantity = 1 WHERE receiving_quantity = 0;