In the receiving Item table, there are two significant rows, quantity purchased and quantity receive. Is there any way, for the value in these two rows to varies? I mean when a PO is raised, a request for e.g 10 items but the supplier could only supply 5 items. I have discovered that the quantity requested has always been lost at the submission of the transaction. Is there any workaround to have in record the initial quantity request (quantity_purchase)?
Thank you Sir, In suspended receivings items, quantity purchase is set to e.g. 10 items once suspended, the quantity received is 0. However, if unsuspended, Item quantity is 10, but if change to e.g 8 and finished. Quantity_purchased and quantity received is 8 in the receiving Items table.
Please confirm how to save the first item 10 quantity and the final Item 8 quantity.
There is a section quantity received that appears after you unsuspend. Then you can re-suspend. Once the recv. is complete ALL quantity is considered received.
Thank you for your response Sir, We understand as that presently, once the recv. is complete both quantity_purchased and quantity_received are same, However, We actually looking for a record of requested quantity before the final quantity was supplied. How can we have the final record as a request for 10 batteries was made thru PO, but the suppliers was able to deliver 8 batteries. How do we have both quantity capture for reference?
We have tried to create a
function get_quantity_purchased_for_item_po($receiving_id)
We can't provide code-level support for customizations; just general directions on where to look. You are using a pretty old version of php point of sale also and are outside 1 year of support. I would recommend upgrading and you will find the code is a lot cleaner. We do customizations for hire but require you to get on the latest version to start.
Comments
11 comments
You would go to price rules and do Buy X get Y free (BOGO) and set it up like this screenshot
I mean (Goods Receive). when i receive item 20 and one is free.
We don’t have a feature for this
In the receiving Item table, there are two significant rows, quantity purchased and quantity receive. Is there any way, for the value in these two rows to varies? I mean when a PO is raised, a request for e.g 10 items but the supplier could only supply 5 items. I have discovered that the quantity requested has always been lost at the submission of the transaction. Is there any workaround to have in record the initial quantity request (quantity_purchase)?
If you suspended a receiving and then unsuspend you can then set the receive field and then re-suspend.
Thank you Sir, In suspended receivings items, quantity purchase is set to e.g. 10 items once suspended, the quantity received is 0. However, if unsuspended, Item quantity is 10, but if change to e.g 8 and finished. Quantity_purchased and quantity received is 8 in the receiving Items table.
Please confirm how to save the first item 10 quantity and the final Item 8 quantity.
Thanks
There is a section quantity received that appears after you unsuspend. Then you can re-suspend. Once the recv. is complete ALL quantity is considered received.
See screenshot
Thank you for your response Sir, We understand as that presently, once the recv. is complete both quantity_purchased and quantity_received are same, However, We actually looking for a record of requested quantity before the final quantity was supplied. How can we have the final record as a request for 10 batteries was made thru PO, but the suppliers was able to deliver 8 batteries. How do we have both quantity capture for reference?
We have tried to create a
function get_quantity_purchased_for_item_po($receiving_id)
{
$item_quantity = array();
$this->db->select('quantity_purchased');
$this->db->from('receivings_items');
$this->db->join('receivings', 'receivings.receiving_id = receivings_items.receiving_id');
$this->db->where('receivings_items.receiving_id', $receiving_id);
foreach($this->db->get()->result_array() as $row)
{
$item_quantity[] = $row['quantity_purchased'];
}
$query = $item_quantity;
return $query;
}
Then save and call the above function
function save ($items,$supplier_id,$employee_id,$comment,$payments,$receiving_id=false, $suspended = 0, $mode='receive',$change_receiving_date = false, $is_po = 0, $location_id=-1, $balance = 0,$store_account_payment = 0)
{
if(count($items)==0)
return -1;
//we need to check the receving library for deleted taxes during receving
$this->load->library('receiving_lib');
if ($receiving_id)
{
$before_save_receiving_info = $this->get_info($receiving_id)->row();
}
else
{
$before_save_receiving_info = FALSE;
}
$deleted_taxes = $this->receiving_lib->get_deleted_taxes();
$payment_types='';
foreach($payments as $payment_id=>$payment)
{
$payment_types=$payment_types.$payment['payment_type'].': '.to_currency($payment['payment_amount']).'<br />';
}
$total_quantity_received = 0;
$recv_total_qty = $this->receiving_lib->get_total_quantity();
$recv_subtotal = $this->receiving_lib->get_subtotal();
$recv_total = $this->receiving_lib->get_total();
$recv_tax = $recv_total - $recv_subtotal;
$receivings_data = array(
'supplier_id'=> $supplier_id > 0 ? $supplier_id : null,
'employee_id'=>$employee_id,
'payment_type'=>$payment_types,
'comment'=>$comment,
'suspended' => $suspended,
'location_id' => $this->Employee->get_logged_in_employee_current_location_id(),
'transfer_to_location_id' => $location_id > 0 ? $location_id : NULL,
'deleted' => 0,
'deleted_by' => NULL,
'deleted_taxes' => $deleted_taxes? serialize($deleted_taxes) : NULL,
'is_po' => $is_po,
'store_account_payment' => $store_account_payment,
'total_quantity_purchased' => $recv_total_qty,
'subtotal' => $recv_subtotal,
'total' => $recv_total,
'tax' => $recv_tax,
'profit' =>0,//Will update when recv complete
);
$recv_profit = 0;
//Run these queries as a transaction, we want to make sure we do all or nothing
$this->db->trans_start();
if($change_receiving_date)
{
$receiving_time = strtotime($change_receiving_date);
if($receiving_time !== FALSE)
{
$receivings_data['receiving_time']=date('Y-m-d H:i:s', strtotime($change_receiving_date));
}
}
else
{
$receivings_data['receiving_time'] = date('Y-m-d H:i:s');
}
$store_account_payment_amount = 0;
if ($store_account_payment)
{
$store_account_payment_amount = $this->receiving_lib->get_total();
}
Unfortunate not working, please where have we got it wrong?
Thank you Sir.
We can't provide code-level support for customizations; just general directions on where to look. You are using a pretty old version of php point of sale also and are outside 1 year of support. I would recommend upgrading and you will find the code is a lot cleaner. We do customizations for hire but require you to get on the latest version to start.
You can open a support ticket at:
http://support.phppointofsale.com/hc/en-us/requests/new
and put in exact details and I will give quote
Okay Thank you Sir
The easiest way to add free goods is to divide the total invoice amount by the quantity received.
Ordered 20 @ $1.00. = $20 or 100 @ 125.00 = $12500
Rec'd 1 @ $0 = $0 + 5 @ $0 = $0
Enter ($20 / qty 21) 21 @ .95238095 enter qty 105 @ 119.047619
Please sign in to leave a comment.