1. Void If No Internal

2. Unrealized set Client for Currency System

--HG--
branch : EDII
This commit is contained in:
hodianto 2018-12-13 23:09:02 +07:00
parent 2d568de240
commit 50b7552e27
3 changed files with 11 additions and 4 deletions

View File

@ -35,7 +35,7 @@ public class MID_PPO extends X_ps_ppo implements DocAction, DocOptions{
*/
private static final long serialVersionUID = -8492664206425966288L;
String processMsg = "";
@Override
public boolean processIt(String action) throws Exception {
log.warning("Processing Action=" + action + " - DocStatus=" + getDocStatus() + " - DocAction=" + getDocAction());
@ -134,6 +134,14 @@ public class MID_PPO extends X_ps_ppo implements DocAction, DocOptions{
@Override
public boolean voidIt() {
int count = new Query(getCtx(), MInventory.Table_Name, " ps_ppo_ID =? AND DocStatus NOT IN ('RE','VO')", get_TrxName())
.setOnlyActiveRecords(true)
.count();
if(count>0){
processMsg = "Reverse All Inventory Issue and Receipt before Void !!!";
return false;
}
setProcessed(true);
return true;
}
@ -177,7 +185,7 @@ public class MID_PPO extends X_ps_ppo implements DocAction, DocOptions{
@Override
public String getProcessMsg() {
return null;
return processMsg;
}
@Override

View File

@ -37,6 +37,7 @@ public class MID_ProcessUnrealizedGainLoss extends SvrProcess{
List<MInvoice> Invoices = new Query(getCtx(), MInvoice.Table_Name, "InvoiceOpen(C_Invoice.C_Invoice_ID, 0)>0 AND C_Invoice.C_Currency_ID != ? AND DocStatus IN (?)", get_TrxName())
.setParameters(new Object[] { ass[0].getC_Currency_ID(), DocAction.STATUS_Completed })
.setOnlyActiveRecords(true)
.setClient_ID(true)
.list();
if(Invoices.size()>0){

View File

@ -98,8 +98,6 @@ public class MID_UploadTPB extends SvrProcess{
rowBarangNum++;
continue;
}
String noAjuBarang = rowBarang.getCell(0).getStringCellValue();
String noAju = row.getCell(0).getStringCellValue();
if(rowBarang.getCell(0).getStringCellValue().equals(row.getCell(0).getStringCellValue()))
createOrderLine(order, rowBarang, AJU_DocType_Value);