var $fixed_asset;
- function items_cart($type, $trans_no=0)
+ function __construct($type, $trans_no=0)
{
$this->trans_type = $type;
$this->order_id = $trans_no;
foreach($cust_trans as $branch_id => $amount)
if (floatcmp($amount, 0))
write_cust_journal($this->trans_type, $this->order_id, $branch_id, $this->tran_date,
- $this->reference, -$amount, $this->rate);
+ $this->reference, $amount, $this->rate);
// update AP
foreach($supp_trans as $supp_id => $amount)
if (floatcmp($amount, 0))
var $price;
var $standard_cost;
- function line_item ($stock_id, $qty, $standard_cost=null, $description=null)
+ function __construct($stock_id, $qty, $standard_cost=null, $description=null)
{
$item_row = get_item($stock_id);