Closed (outdated)
Project:
erp
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Mar 2011 at 17:13 UTC
Updated:
9 Apr 2017 at 23:50 UTC
Jump to comment: Most recent
from function erp_item_update (erp_item.module)
if (!$node->tax_ex) {
// Convert prices back to ex tax
$node->buy_price = round(array_pop(module_invoke_all('erp_tax_ex_amount', $node->buy_price)), 2);
$node->rrp_price = round(array_pop(module_invoke_all('erp_tax_ex_amount', $node->rrp_price)), 2);
$node->sell_price = round(array_pop(module_invoke_all('erp_tax_ex_amount', $node->sell_price)), 2);
}
this code causes the buy_price of an item node to decrease EVERY time an item node is edited and saved
if (!$node->tax_ex) {
// Convert prices back to ex tax
//$node->buy_price = round(array_pop(module_invoke_all('erp_tax_ex_amount', $node->buy_price)), 2);
$node->rrp_price = round(array_pop(module_invoke_all('erp_tax_ex_amount', $node->rrp_price)), 2);
$node->sell_price = round(array_pop(module_invoke_all('erp_tax_ex_amount', $node->sell_price)), 2);
}
commenting out the line about buy_price line stops it but is this right?
Comments
Comment #1
singularo