Void a Transaction: fixed GRN voiding.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Sat, 29 Aug 2015 09:42:42 +0000 (11:42 +0200)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Sat, 29 Aug 2015 09:42:42 +0000 (11:42 +0200)
admin/db/voiding_db.inc
admin/void_transaction.php

index 70878ad40281d98b79446826d8e782165411e678..8323c0d164d7c3a16880ef47801e96754f6cdf4b 100644 (file)
@@ -77,6 +77,10 @@ function void_transaction($type, $type_no, $date_, $memo_)
                case ST_SUPPRECEIVE : // it's a GRN
                        if (exists_grn_on_invoices($type_no))
                                return _('This GRN cannot be voided because it was already invoiced.');
+                       if (!post_void_supp_trans($type, $type_no))
+                               return _('Error encountered when voiding transaction.');
+                       break;
+
                case ST_SUPPINVOICE : // it's a suppler invoice
                case ST_SUPPCREDIT : // it's a supplier credit note
                case ST_SUPPAYMENT : // it's a supplier payment
index af44b391851207ef62e7c19792141c12f1e65b5f..41ff2f77cbb7386503975fb4ae40fe33f5add323 100644 (file)
@@ -73,7 +73,7 @@ function exist_transaction($type, $type_no)
                        return false;
 
                case ST_SUPPRECEIVE : // it's a GRN
-                       if (exists_grn_on_invoices($type_no))
+                       if (exists_grn($type_no))
                                return false;
                        break;