Smaller technical fixes.
[fa-stable.git] / sales / includes / db / sales_credit_db.inc
index 1018f28af7f7a29df21ca8b8c8f98adda8686b86..40e67191f4fab17faa6a904595e923a79672fea7 100644 (file)
@@ -13,7 +13,7 @@
 // if ($writeoff_acc==0) return goods into $cart->Location
 // if src_docs!=0 => credit invoice else credit note
 //
-function write_credit_note($credit_note, $write_off_acc)
+function write_credit_note(&$credit_note, $write_off_acc)
 {
        global $Refs;
 
@@ -176,7 +176,6 @@ function write_credit_note($credit_note, $write_off_acc)
        if ($trans_no == 0) {
                $Refs->save(ST_CUSTCREDIT, $credit_no, $credit_note->reference);
        }
-
        commit_transaction();
 
        return $credit_no;