IDEMPIERE-1904 Incorrect document status when void a document with completed document status
This commit is contained in:
parent
80f1cafe49
commit
1e2cf53d61
|
@ -0,0 +1,16 @@
|
||||||
|
-- Apr 18, 2014 12:41:00 PM SGT
|
||||||
|
-- IDEMPIERE-1904 Incorrect document status when void a document with completed document status
|
||||||
|
|
||||||
|
UPDATE C_AllocationHdr SET DocStatus = 'RE' WHERE DocStatus = 'VO' AND Reversal_ID > 0;
|
||||||
|
UPDATE C_Invoice SET DocStatus = 'RE' WHERE DocStatus = 'VO' AND Reversal_ID > 0;
|
||||||
|
UPDATE C_Payment SET DocStatus = 'RE' WHERE DocStatus = 'VO' AND Reversal_ID > 0;
|
||||||
|
UPDATE GL_Journal SET DocStatus = 'RE' WHERE DocStatus = 'VO' AND Reversal_ID > 0;
|
||||||
|
UPDATE GL_JournalBatch SET DocStatus = 'RE' WHERE DocStatus = 'VO' AND Reversal_ID > 0;
|
||||||
|
UPDATE HR_Process SET DocStatus = 'RE' WHERE DocStatus = 'VO' AND Reversal_ID > 0;
|
||||||
|
UPDATE M_InOut SET DocStatus = 'RE' WHERE DocStatus = 'VO' AND Reversal_ID > 0;
|
||||||
|
UPDATE M_Inventory SET DocStatus = 'RE' WHERE DocStatus = 'VO' AND Reversal_ID > 0;
|
||||||
|
UPDATE M_Movement SET DocStatus = 'RE' WHERE DocStatus = 'VO' AND Reversal_ID > 0;
|
||||||
|
UPDATE PP_Cost_Collector SET DocStatus = 'RE' WHERE DocStatus = 'VO' AND Reversal_ID > 0;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201404181241_IDEMPIERE-1904.sql') FROM dual
|
||||||
|
;
|
|
@ -0,0 +1,16 @@
|
||||||
|
-- Apr 18, 2014 12:41:00 PM SGT
|
||||||
|
-- IDEMPIERE-1904 Incorrect document status when void a document with completed document status
|
||||||
|
|
||||||
|
UPDATE C_AllocationHdr SET DocStatus = 'RE' WHERE DocStatus = 'VO' AND Reversal_ID > 0;
|
||||||
|
UPDATE C_Invoice SET DocStatus = 'RE' WHERE DocStatus = 'VO' AND Reversal_ID > 0;
|
||||||
|
UPDATE C_Payment SET DocStatus = 'RE' WHERE DocStatus = 'VO' AND Reversal_ID > 0;
|
||||||
|
UPDATE GL_Journal SET DocStatus = 'RE' WHERE DocStatus = 'VO' AND Reversal_ID > 0;
|
||||||
|
UPDATE GL_JournalBatch SET DocStatus = 'RE' WHERE DocStatus = 'VO' AND Reversal_ID > 0;
|
||||||
|
UPDATE HR_Process SET DocStatus = 'RE' WHERE DocStatus = 'VO' AND Reversal_ID > 0;
|
||||||
|
UPDATE M_InOut SET DocStatus = 'RE' WHERE DocStatus = 'VO' AND Reversal_ID > 0;
|
||||||
|
UPDATE M_Inventory SET DocStatus = 'RE' WHERE DocStatus = 'VO' AND Reversal_ID > 0;
|
||||||
|
UPDATE M_Movement SET DocStatus = 'RE' WHERE DocStatus = 'VO' AND Reversal_ID > 0;
|
||||||
|
UPDATE PP_Cost_Collector SET DocStatus = 'RE' WHERE DocStatus = 'VO' AND Reversal_ID > 0;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201404181241_IDEMPIERE-1904.sql') FROM dual
|
||||||
|
;
|
|
@ -532,7 +532,8 @@ public class DocumentEngine implements DocAction
|
||||||
if (m_document.voidIt())
|
if (m_document.voidIt())
|
||||||
{
|
{
|
||||||
m_status = STATUS_Voided;
|
m_status = STATUS_Voided;
|
||||||
m_document.setDocStatus(m_status);
|
if (!m_document.getDocStatus().equals(STATUS_Reversed))
|
||||||
|
m_document.setDocStatus(m_status);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue