From 7446d8f4332ae17a290f232546ede7a021c8ecdc Mon Sep 17 00:00:00 2001 From: Hideaki Hagiwara Date: Thu, 5 May 2016 19:30:26 -0700 Subject: [PATCH] IDEMPIERE-2392 Posted status incorrect when reposting on a period closed / add logic for C_Invoice.C_DocTypeTarget_ID --- org.adempiere.base/src/org/compiere/model/MPeriod.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/model/MPeriod.java b/org.adempiere.base/src/org/compiere/model/MPeriod.java index bd636a89ce..9497281ad4 100644 --- a/org.adempiere.base/src/org/compiere/model/MPeriod.java +++ b/org.adempiere.base/src/org/compiere/model/MPeriod.java @@ -346,7 +346,7 @@ public class MPeriod extends X_C_Period s_log.warning("Could not find C_DocType_ID (null or not Integer) for " + table.getTableName()); return true; } - if (doctypeID == 0 && tableID == MOrder.Table_ID) { + if (doctypeID == 0 && (tableID == MOrder.Table_ID || tableID == MInvoice.Table_ID)) { idxdoctype = po.get_ColumnIndex("C_DocTypeTarget_ID"); objint = po.get_Value(idxdoctype); if (objint != null && objint instanceof Integer) {