Fixed upgrade procedures for manufacturing transactions, additional checks for voiding.
[fa-stable.git] / admin / db / voiding_db.inc
index c87fe17fa07bc95b82de12a8d0d4d462b292c951..55ff9fb9079a587c4c9205248581fb34ad2b6d65 100644 (file)
@@ -26,6 +26,8 @@ function void_transaction($type, $type_no, $date_, $memo_)
                case ST_JOURNAL : // it's a journal entry
                        if (!exists_gl_trans($type, $type_no))
                                return _('Selected transaction does not exists.');
+                       if ($wo = check_wo_costing($type, $type_no))
+                               return sprintf(_('This transaction cannot be voided because it is part of Work Order %s costs.'), $wo);
                        void_journal_trans($type, $type_no);
                        break;