inoerp / inoERP

inoERP is an OneApp [ Go back-end & Flutter front-end ] based enterprise management system
http://docs.inoerp.com/
Mozilla Public License 2.0
767 stars 675 forks source link

Total amount AR transaction #29

Closed kchizi closed 8 years ago

kchizi commented 8 years ago

if the SO has many item lines, AR transaction complete only picks the last one

changed line 182 code in AR transaction line to

Public static function find_sumAmounts($ar_transaction_header_id) { $sql = " SELECT SUM(inv_line_price) as total_line_amount, SUM(tax_amount) as total_tax_amount, ar_transaction_line_id FROM ar_transaction_line WHERE ar_transaction_header_id = '{$ar_transaction_header_id}' GROUP BY ar_transaction_header_id "; //echo $sql; $result = self::find_by_sql($sql); return !empty($result) ? array_pop($result) : null; }

inoerp commented 8 years ago

Thank you Samuel. I will update it.