Renamed the new Sales Summary Report, Detailed to Item Sales Summary Report.
[fa-stable.git] / purchasing / po_entry_items.php
index f7968337a1e1b7a18b8c6cfd5e6081557e4f994a..1f0bfedd7cd416db42b2e84e95b938e0c50f617c 100644 (file)
@@ -437,7 +437,8 @@ function handle_commit_order()
                        //Direct GRN
                        if ($cart->trans_type == ST_SUPPRECEIVE)
                                $cart->reference = $ref;
-                       $cart->Comments = $cart->reference; //grn does not hold supp_ref
+                       if ($cart->trans_type != ST_SUPPINVOICE)        
+                               $cart->Comments = $cart->reference; //grn does not hold supp_ref
                        foreach($cart->line_items as $key => $line)
                                $cart->line_items[$key]->receive_qty = $line->quantity;
                        $grn_no = add_grn($cart);
@@ -457,7 +458,6 @@ function handle_commit_order()
                        $inv->tax_included = $cart->tax_included;
                        $supp = get_supplier($cart->supplier_id);
                        $inv->tax_group_id = $supp['tax_group_id'];
-                       $inv->ov_discount = 0; // ov-discount set to zero to avoid DB error on insert
 
                        $inv->ov_amount = $inv->ov_gst = $inv->ov_discount = 0;