- } elseif ($credit_type == "WriteOff") {
-
- $reference = "WriteOff ";
- if ($credited_invoice)
- $reference .= "Ex Inv: " . $credited_invoice;
-
- add_stock_move_customer(ST_CUSTCREDIT, $credit_line->stock_id,
- key($credit_note->trans_no), $credit_note->Location,
- $credit_note->document_date, $reference, -$credit_line->qty_dispatched,
- $curr_std_cost, 0, $price,
- $credit_line->discount_percent);
-
- }
- add_stock_move_customer(ST_CUSTCREDIT, $credit_line->stock_id,
- key($credit_note->trans_no), $credit_note->Location,
- $credit_note->document_date, $reference, $credit_line->qty_dispatched,
- $curr_std_cost, 0, $price,
- $credit_line->discount_percent);