Compare commits
2 Commits
51fc670fdc
...
a5ac3831fa
| Author | SHA1 | Date |
|---|---|---|
|
|
a5ac3831fa | |
|
|
3ee96629d7 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,5 +0,0 @@
|
||||||
package andromedia.midsuit.model;
|
|
||||||
|
|
||||||
public class X_C_Location {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +1,23 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry exported="true" kind="lib" path="META-INF/bcprov-ext-jdk15on-160.jar"/>
|
<classpathentry exported="true" kind="lib" path="META-INF/bcprov-ext-jdk15on-160.jar"/>
|
||||||
<classpathentry exported="true" kind="lib" path="META-INF/hsqldb.jar"/>
|
<classpathentry exported="true" kind="lib" path="META-INF/hsqldb.jar"/>
|
||||||
<classpathentry exported="true" kind="lib" path="META-INF/jackcess-encrypt-2.1.4.jar"/>
|
<classpathentry exported="true" kind="lib" path="META-INF/jackcess-encrypt-2.1.4.jar"/>
|
||||||
<classpathentry exported="true" kind="lib" path="META-INF/poi-ooxml-3.9.jar"/>
|
<classpathentry exported="true" kind="lib" path="META-INF/poi-ooxml-3.9.jar"/>
|
||||||
<classpathentry exported="true" kind="lib" path="META-INF/dom4j-1.6.1.jar"/>
|
<classpathentry exported="true" kind="lib" path="META-INF/dom4j-1.6.1.jar"/>
|
||||||
<classpathentry exported="true" kind="lib" path="META-INF/poi-3.9.jar"/>
|
<classpathentry exported="true" kind="lib" path="META-INF/poi-3.9.jar"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="module" value="true"/>
|
<attribute name="module" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="lib" path="META-INF/xmlbeans-2.3.0.jar"/>
|
<classpathentry kind="lib" path="META-INF/xmlbeans-2.3.0.jar"/>
|
||||||
<classpathentry kind="lib" path="META-INF/poi-ooxml-schemas-3.9.jar"/>
|
<classpathentry kind="lib" path="META-INF/poi-ooxml-schemas-3.9.jar"/>
|
||||||
<classpathentry kind="lib" path="META-INF/jackcess-2.1.3.jar"/>
|
<classpathentry kind="lib" path="META-INF/jackcess-2.1.3.jar"/>
|
||||||
<classpathentry kind="lib" path="META-INF/ucanaccess-3.0.7.jar"/>
|
<classpathentry kind="lib" path="META-INF/ucanaccess-3.0.7.jar"/>
|
||||||
<classpathentry kind="lib" path="META-INF/commons-lang-2.6.jar"/>
|
<classpathentry kind="lib" path="META-INF/commons-lang-2.6.jar"/>
|
||||||
<classpathentry kind="lib" path="META-INF/commons-logging-1.1.1.jar"/>
|
<classpathentry kind="lib" path="META-INF/commons-logging-1.1.1.jar"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<projectDescription>
|
<projectDescription>
|
||||||
<name>andromedia.midsuit.project</name>
|
<name>balinusa.midsuit.project</name>
|
||||||
<comment></comment>
|
<comment></comment>
|
||||||
<projects>
|
<projects>
|
||||||
</projects>
|
</projects>
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
Manifest-Version: 1.0
|
Manifest-Version: 1.0
|
||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: Andromedia Midsuit
|
Bundle-Name: Balinusa
|
||||||
Bundle-SymbolicName: andromedia.midsuit.project
|
Bundle-SymbolicName: balinusa.midsuit.project
|
||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 1.0.0.qualifier
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Require-Bundle: org.adempiere.base;bundle-version="5.1.0",
|
Require-Bundle: org.adempiere.base;bundle-version="5.1.0",
|
||||||
|
|
@ -20,7 +20,7 @@ Import-Package: org.compiere.apps,
|
||||||
org.compiere.minigrid,
|
org.compiere.minigrid,
|
||||||
org.compiere.process,
|
org.compiere.process,
|
||||||
org.osgi.framework;version="1.8.0"
|
org.osgi.framework;version="1.8.0"
|
||||||
Bundle-Activator: andromedia.midsuit.activator.Activator
|
Bundle-Activator: balinusa.midsuit.activator.Activator
|
||||||
Bundle-ClassPath: .,
|
Bundle-ClassPath: .,
|
||||||
META-INF/poi-3.9.jar,
|
META-INF/poi-3.9.jar,
|
||||||
META-INF/bcprov-ext-jdk15on-160.jar,
|
META-INF/bcprov-ext-jdk15on-160.jar,
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
/.DS_Store
|
||||||
|
/balinusa/
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.activator;
|
package balinusa.midsuit.activator;
|
||||||
|
|
||||||
import org.osgi.framework.BundleActivator;
|
import org.osgi.framework.BundleActivator;
|
||||||
|
|
||||||
|
|
@ -1,66 +1,66 @@
|
||||||
package andromedia.midsuit.callout;
|
package balinusa.midsuit.callout;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.adempiere.base.IColumnCallout;
|
import org.adempiere.base.IColumnCallout;
|
||||||
import org.compiere.model.CalloutEngine;
|
import org.compiere.model.CalloutEngine;
|
||||||
import org.compiere.model.GridField;
|
import org.compiere.model.GridField;
|
||||||
import org.compiere.model.GridTab;
|
import org.compiere.model.GridTab;
|
||||||
import org.compiere.model.MProduction;
|
import org.compiere.model.MProduction;
|
||||||
import org.compiere.model.MProductionLine;
|
import org.compiere.model.MProductionLine;
|
||||||
import org.compiere.model.Query;
|
import org.compiere.model.Query;
|
||||||
|
|
||||||
import andromedia.midsuit.model.MID_Analysis;
|
import balinusa.midsuit.model.MID_Analysis;
|
||||||
import andromedia.midsuit.model.MID_AnalysisPro;
|
import balinusa.midsuit.model.MID_AnalysisPro;
|
||||||
|
|
||||||
public class MID_CalloutAnalysisQC extends CalloutEngine implements IColumnCallout{
|
public class MID_CalloutAnalysisQC extends CalloutEngine implements IColumnCallout{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
if(value == null) return null;
|
if(value == null) return null;
|
||||||
|
|
||||||
if(mField.getColumnName().equals(MProduction.COLUMNNAME_M_Production_ID)) {
|
if(mField.getColumnName().equals(MProduction.COLUMNNAME_M_Production_ID)) {
|
||||||
setProductQuantity(ctx, WindowNo, mTab, mField, value, oldValue);
|
setProductQuantity(ctx, WindowNo, mTab, mField, value, oldValue);
|
||||||
return setRawMaterial(ctx, WindowNo, mTab, mField, value, oldValue);
|
return setRawMaterial(ctx, WindowNo, mTab, mField, value, oldValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String setProductQuantity(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue){
|
public String setProductQuantity(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue){
|
||||||
|
|
||||||
String valueReturn = "";
|
String valueReturn = "";
|
||||||
MProduction prod = new MProduction(ctx, (int) value, null);
|
MProduction prod = new MProduction(ctx, (int) value, null);
|
||||||
|
|
||||||
if (prod != null) {
|
if (prod != null) {
|
||||||
mTab.setValue(MID_AnalysisPro.COLUMNNAME_M_Product_ID, prod.getM_Product_ID());
|
mTab.setValue(MID_AnalysisPro.COLUMNNAME_M_Product_ID, prod.getM_Product_ID());
|
||||||
mTab.setValue(MID_AnalysisPro.COLUMNNAME_Qty, prod.getProductionQty());
|
mTab.setValue(MID_AnalysisPro.COLUMNNAME_Qty, prod.getProductionQty());
|
||||||
}
|
}
|
||||||
mTab.setValue(MID_Analysis.COLUMNNAME_JumlahRM, valueReturn);
|
mTab.setValue(MID_Analysis.COLUMNNAME_JumlahRM, valueReturn);
|
||||||
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String setRawMaterial(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue){
|
public String setRawMaterial(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue){
|
||||||
|
|
||||||
String valueReturn = "";
|
String valueReturn = "";
|
||||||
List<MProductionLine> productionLines = new Query(ctx, MProductionLine.Table_Name, "M_Production_ID = ? and isEndProduct='N'", null)
|
List<MProductionLine> productionLines = new Query(ctx, MProductionLine.Table_Name, "M_Production_ID = ? and isEndProduct='N'", null)
|
||||||
.setParameters(new Object[] {(int) value})
|
.setParameters(new Object[] {(int) value})
|
||||||
.list();
|
.list();
|
||||||
|
|
||||||
for(MProductionLine productionLine : productionLines) {
|
for(MProductionLine productionLine : productionLines) {
|
||||||
if(productionLine != null) {
|
if(productionLine != null) {
|
||||||
valueReturn += productionLine.getQtyUsed().toString() == null ? "0;" : productionLine.getQtyUsed().toString() + ";";
|
valueReturn += productionLine.getQtyUsed().toString() == null ? "0;" : productionLine.getQtyUsed().toString() + ";";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mTab.setValue(MID_Analysis.COLUMNNAME_JumlahRM, valueReturn);
|
mTab.setValue(MID_Analysis.COLUMNNAME_JumlahRM, valueReturn);
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.callout;
|
package balinusa.midsuit.callout;
|
||||||
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
|
|
@ -7,7 +7,7 @@ import org.compiere.model.CalloutEngine;
|
||||||
import org.compiere.model.GridField;
|
import org.compiere.model.GridField;
|
||||||
import org.compiere.model.GridTab;
|
import org.compiere.model.GridTab;
|
||||||
|
|
||||||
import andromedia.midsuit.model.X_mid_ceisa_upload;
|
import balinusa.midsuit.model.X_mid_ceisa_upload;
|
||||||
|
|
||||||
public class MID_CalloutCeisaUpload extends CalloutEngine implements IColumnCallout {
|
public class MID_CalloutCeisaUpload extends CalloutEngine implements IColumnCallout {
|
||||||
|
|
||||||
|
|
@ -1,42 +1,42 @@
|
||||||
package andromedia.midsuit.callout;
|
package balinusa.midsuit.callout;
|
||||||
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.adempiere.base.IColumnCallout;
|
import org.adempiere.base.IColumnCallout;
|
||||||
import org.compiere.model.CalloutEngine;
|
import org.compiere.model.CalloutEngine;
|
||||||
import org.compiere.model.GridField;
|
import org.compiere.model.GridField;
|
||||||
import org.compiere.model.GridTab;
|
import org.compiere.model.GridTab;
|
||||||
import org.compiere.model.MInOut;
|
import org.compiere.model.MInOut;
|
||||||
import org.compiere.model.MOrder;
|
import org.compiere.model.MOrder;
|
||||||
|
|
||||||
public class MID_CalloutInOut extends CalloutEngine implements IColumnCallout{
|
public class MID_CalloutInOut extends CalloutEngine implements IColumnCallout{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
if(value == null) return null;
|
if(value == null) return null;
|
||||||
|
|
||||||
if(mField.getColumnName().equals(MInOut.COLUMNNAME_MovementDate)) {
|
if(mField.getColumnName().equals(MInOut.COLUMNNAME_MovementDate)) {
|
||||||
mTab.setValue(MInOut.COLUMNNAME_DateAcct, value);
|
mTab.setValue(MInOut.COLUMNNAME_DateAcct, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if(mField.getColumnName().equals(MInOut.COLUMNNAME_C_Order_ID)) {
|
// if(mField.getColumnName().equals(MInOut.COLUMNNAME_C_Order_ID)) {
|
||||||
// setAJU(ctx, WindowNo, mTab, mField, value, oldValue);
|
// setAJU(ctx, WindowNo, mTab, mField, value, oldValue);
|
||||||
// }
|
// }
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String setAJU(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
public String setAJU(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
||||||
MOrder order = new MOrder(ctx, (int)value, null);
|
MOrder order = new MOrder(ctx, (int)value, null);
|
||||||
|
|
||||||
if(order != null) {
|
if(order != null) {
|
||||||
mTab.setValue("noaju1", order.get_ValueAsString("noaju1") == null ? null : order.get_ValueAsString("noaju1"));
|
mTab.setValue("noaju1", order.get_ValueAsString("noaju1") == null ? null : order.get_ValueAsString("noaju1"));
|
||||||
mTab.setValue("noaju2", order.get_ValueAsString("noaju2") == null ? null : order.get_ValueAsString("noaju2"));
|
mTab.setValue("noaju2", order.get_ValueAsString("noaju2") == null ? null : order.get_ValueAsString("noaju2"));
|
||||||
mTab.setValue("noaju3", order.get_ValueAsString("noaju3") == null ? null : order.get_ValueAsString("noaju3"));
|
mTab.setValue("noaju3", order.get_ValueAsString("noaju3") == null ? null : order.get_ValueAsString("noaju3"));
|
||||||
mTab.setValue("noaju4", order.get_ValueAsString("noaju4") == null ? null : order.get_ValueAsString("noaju4"));
|
mTab.setValue("noaju4", order.get_ValueAsString("noaju4") == null ? null : order.get_ValueAsString("noaju4"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,34 +1,34 @@
|
||||||
package andromedia.midsuit.callout;
|
package balinusa.midsuit.callout;
|
||||||
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.adempiere.base.IColumnCallout;
|
import org.adempiere.base.IColumnCallout;
|
||||||
import org.compiere.model.CalloutEngine;
|
import org.compiere.model.CalloutEngine;
|
||||||
import org.compiere.model.GridField;
|
import org.compiere.model.GridField;
|
||||||
import org.compiere.model.GridTab;
|
import org.compiere.model.GridTab;
|
||||||
import org.compiere.model.MInOutLine;
|
import org.compiere.model.MInOutLine;
|
||||||
import org.compiere.model.MOrderLine;
|
import org.compiere.model.MOrderLine;
|
||||||
|
|
||||||
public class MID_CalloutInOutLine extends CalloutEngine implements IColumnCallout{
|
public class MID_CalloutInOutLine extends CalloutEngine implements IColumnCallout{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
if(value == null) return null;
|
if(value == null) return null;
|
||||||
|
|
||||||
if(mField.getColumnName().equals(MInOutLine.COLUMNNAME_C_OrderLine_ID)) {
|
if(mField.getColumnName().equals(MInOutLine.COLUMNNAME_C_OrderLine_ID)) {
|
||||||
this.setDescription(ctx, WindowNo, mTab, mField, value, oldValue);
|
this.setDescription(ctx, WindowNo, mTab, mField, value, oldValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String setDescription(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
public String setDescription(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
||||||
MOrderLine ol = new MOrderLine(ctx, (int)value, null);
|
MOrderLine ol = new MOrderLine(ctx, (int)value, null);
|
||||||
|
|
||||||
mTab.setValue(MInOutLine.COLUMNNAME_Description, ol.getDescription() != null ? ol.getDescription() : null);
|
mTab.setValue(MInOutLine.COLUMNNAME_Description, ol.getDescription() != null ? ol.getDescription() : null);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.callout;
|
package balinusa.midsuit.callout;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.callout;
|
package balinusa.midsuit.callout;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.callout;
|
package balinusa.midsuit.callout;
|
||||||
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
|
|
@ -7,7 +7,7 @@ import org.compiere.model.CalloutEngine;
|
||||||
import org.compiere.model.GridField;
|
import org.compiere.model.GridField;
|
||||||
import org.compiere.model.GridTab;
|
import org.compiere.model.GridTab;
|
||||||
|
|
||||||
import andromedia.midsuit.model.X_mid_ceisa_order;
|
import balinusa.midsuit.model.X_mid_ceisa_order;
|
||||||
|
|
||||||
public class MID_CalloutIsReturnCeisa extends CalloutEngine implements IColumnCallout {
|
public class MID_CalloutIsReturnCeisa extends CalloutEngine implements IColumnCallout {
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.callout;
|
package balinusa.midsuit.callout;
|
||||||
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.callout;
|
package balinusa.midsuit.callout;
|
||||||
|
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
@ -1,55 +1,55 @@
|
||||||
package andromedia.midsuit.callout;
|
package balinusa.midsuit.callout;
|
||||||
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.adempiere.base.IColumnCallout;
|
import org.adempiere.base.IColumnCallout;
|
||||||
import org.compiere.model.CalloutEngine;
|
import org.compiere.model.CalloutEngine;
|
||||||
import org.compiere.model.GridField;
|
import org.compiere.model.GridField;
|
||||||
import org.compiere.model.GridTab;
|
import org.compiere.model.GridTab;
|
||||||
import org.compiere.model.MOrder;
|
import org.compiere.model.MOrder;
|
||||||
import org.compiere.model.MPriceList;
|
import org.compiere.model.MPriceList;
|
||||||
import org.compiere.model.Query;
|
import org.compiere.model.Query;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
|
|
||||||
public class MID_CalloutOrder extends CalloutEngine implements IColumnCallout {
|
public class MID_CalloutOrder extends CalloutEngine implements IColumnCallout {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
if(value == null) return null;
|
if(value == null) return null;
|
||||||
|
|
||||||
if(mField.getColumnName().equals(MOrder.COLUMNNAME_AD_Org_ID)) {
|
if(mField.getColumnName().equals(MOrder.COLUMNNAME_AD_Org_ID)) {
|
||||||
return setPricelistByOrg(ctx, WindowNo, mTab, mField, value, oldValue);
|
return setPricelistByOrg(ctx, WindowNo, mTab, mField, value, oldValue);
|
||||||
}
|
}
|
||||||
if(mField.getColumnName().equals(MOrder.COLUMNNAME_DateOrdered)) {
|
if(mField.getColumnName().equals(MOrder.COLUMNNAME_DateOrdered)) {
|
||||||
mTab.setValue(MOrder.COLUMNNAME_DatePromised, value);
|
mTab.setValue(MOrder.COLUMNNAME_DatePromised, value);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String setPricelistByOrg(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
public String setPricelistByOrg(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
||||||
|
|
||||||
int org = (int) value;
|
int org = (int) value;
|
||||||
int AD_Client_ID = (int) mTab.getValue(MOrder.COLUMNNAME_AD_Client_ID);
|
int AD_Client_ID = (int) mTab.getValue(MOrder.COLUMNNAME_AD_Client_ID);
|
||||||
boolean isSOTrx = (boolean) mTab.getValue(MOrder.COLUMNNAME_IsSOTrx);
|
boolean isSOTrx = (boolean) mTab.getValue(MOrder.COLUMNNAME_IsSOTrx);
|
||||||
|
|
||||||
int priceList = new Query(ctx, MPriceList.Table_Name, "AD_Org_ID =? AND IsSOPriceList =?", null)
|
int priceList = new Query(ctx, MPriceList.Table_Name, "AD_Org_ID =? AND IsSOPriceList =?", null)
|
||||||
.setParameters(new Object[] { org, isSOTrx })
|
.setParameters(new Object[] { org, isSOTrx })
|
||||||
.setOnlyActiveRecords(true)
|
.setOnlyActiveRecords(true)
|
||||||
.firstId();
|
.firstId();
|
||||||
|
|
||||||
if(priceList>0)
|
if(priceList>0)
|
||||||
mTab.setValue(MOrder.COLUMNNAME_M_PriceList_ID, priceList);
|
mTab.setValue(MOrder.COLUMNNAME_M_PriceList_ID, priceList);
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
priceList = new Query(ctx, MPriceList.Table_Name, "AD_Client_ID =? AND AD_Org_ID =? AND IsSOPriceList =?", null)
|
priceList = new Query(ctx, MPriceList.Table_Name, "AD_Client_ID =? AND AD_Org_ID =? AND IsSOPriceList =?", null)
|
||||||
.setParameters(new Object[] {AD_Client_ID, 0, isSOTrx })
|
.setParameters(new Object[] {AD_Client_ID, 0, isSOTrx })
|
||||||
.setOnlyActiveRecords(true)
|
.setOnlyActiveRecords(true)
|
||||||
.firstId();
|
.firstId();
|
||||||
mTab.setValue(MOrder.COLUMNNAME_M_PriceList_ID, priceList);
|
mTab.setValue(MOrder.COLUMNNAME_M_PriceList_ID, priceList);
|
||||||
}
|
}
|
||||||
Env.setContext(ctx, "#M_PriceList_ID", priceList);
|
Env.setContext(ctx, "#M_PriceList_ID", priceList);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.callout;
|
package balinusa.midsuit.callout;
|
||||||
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
|
|
@ -10,7 +10,7 @@ import org.compiere.model.MOrder;
|
||||||
import org.compiere.model.MRMA;
|
import org.compiere.model.MRMA;
|
||||||
import org.compiere.model.MRequisition;
|
import org.compiere.model.MRequisition;
|
||||||
|
|
||||||
import andromedia.midsuit.model.X_mid_ceisa_order;
|
import balinusa.midsuit.model.X_mid_ceisa_order;
|
||||||
|
|
||||||
public class MID_CalloutOrderCeisa extends CalloutEngine implements IColumnCallout {
|
public class MID_CalloutOrderCeisa extends CalloutEngine implements IColumnCallout {
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.callout;
|
package balinusa.midsuit.callout;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.callout;
|
package balinusa.midsuit.callout;
|
||||||
|
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
@ -8,7 +8,8 @@ import org.compiere.model.CalloutEngine;
|
||||||
import org.compiere.model.GridField;
|
import org.compiere.model.GridField;
|
||||||
import org.compiere.model.GridTab;
|
import org.compiere.model.GridTab;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
import andromedia.midsuit.model.X_C_OrderLineMA;
|
|
||||||
|
import balinusa.midsuit.model.X_C_OrderLineMA;
|
||||||
|
|
||||||
public class MID_CalloutOrderLineMA extends CalloutEngine implements IColumnCallout {
|
public class MID_CalloutOrderLineMA extends CalloutEngine implements IColumnCallout {
|
||||||
|
|
||||||
|
|
@ -1,31 +1,31 @@
|
||||||
package andromedia.midsuit.callout;
|
package balinusa.midsuit.callout;
|
||||||
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.adempiere.base.IColumnCallout;
|
import org.adempiere.base.IColumnCallout;
|
||||||
import org.compiere.model.CalloutEngine;
|
import org.compiere.model.CalloutEngine;
|
||||||
import org.compiere.model.GridField;
|
import org.compiere.model.GridField;
|
||||||
import org.compiere.model.GridTab;
|
import org.compiere.model.GridTab;
|
||||||
import org.compiere.model.MProduct;
|
import org.compiere.model.MProduct;
|
||||||
|
|
||||||
import andromedia.midsuit.model.X_ps_ppo;
|
import balinusa.midsuit.model.X_ps_ppo;
|
||||||
|
|
||||||
public class MID_CalloutPPO extends CalloutEngine implements IColumnCallout{
|
public class MID_CalloutPPO extends CalloutEngine implements IColumnCallout{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
||||||
if(mField.getColumnName().equals(X_ps_ppo.COLUMNNAME_M_Product_ID)){
|
if(mField.getColumnName().equals(X_ps_ppo.COLUMNNAME_M_Product_ID)){
|
||||||
return product(ctx, WindowNo, mTab, mField, value, oldValue);
|
return product(ctx, WindowNo, mTab, mField, value, oldValue);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String product(Properties ctx, int windowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
private String product(Properties ctx, int windowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
||||||
if (value==null) return "";
|
if (value==null) return "";
|
||||||
|
|
||||||
MProduct product = new MProduct(ctx, (int)value, null);
|
MProduct product = new MProduct(ctx, (int)value, null);
|
||||||
mTab.setValue("C_UOM_ID", product.getC_UOM_ID());
|
mTab.setValue("C_UOM_ID", product.getC_UOM_ID());
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,34 +1,35 @@
|
||||||
package andromedia.midsuit.callout;
|
package balinusa.midsuit.callout;
|
||||||
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.adempiere.base.IColumnCallout;
|
import org.adempiere.base.IColumnCallout;
|
||||||
import org.compiere.model.CalloutEngine;
|
import org.compiere.model.CalloutEngine;
|
||||||
import org.compiere.model.GridField;
|
import org.compiere.model.GridField;
|
||||||
import org.compiere.model.GridTab;
|
import org.compiere.model.GridTab;
|
||||||
import org.compiere.model.MProduction;
|
import org.compiere.model.MProduction;
|
||||||
import andromedia.midsuit.model.MID_PPO;
|
|
||||||
import andromedia.midsuit.model.X_M_Production;
|
import balinusa.midsuit.model.MID_PPO;
|
||||||
|
import balinusa.midsuit.model.X_M_Production;
|
||||||
public class MID_CalloutProduction extends CalloutEngine implements IColumnCallout {
|
|
||||||
|
public class MID_CalloutProduction extends CalloutEngine implements IColumnCallout {
|
||||||
@Override
|
|
||||||
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
@Override
|
||||||
// TODO Auto-generated method stub
|
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
||||||
if(mField.getColumnName().equals(X_M_Production.COLUMNNAME_ps_ppo_ID)) {
|
// TODO Auto-generated method stub
|
||||||
if(value == null) return null;
|
if(mField.getColumnName().equals(X_M_Production.COLUMNNAME_ps_ppo_ID)) {
|
||||||
setProductByPPO(ctx, WindowNo, mTab, mField, value, oldValue);
|
if(value == null) return null;
|
||||||
}
|
setProductByPPO(ctx, WindowNo, mTab, mField, value, oldValue);
|
||||||
return null;
|
}
|
||||||
}
|
return null;
|
||||||
|
}
|
||||||
public String setProductByPPO(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
|
||||||
MID_PPO ppo = new MID_PPO(ctx,(int)value, null);
|
public String setProductByPPO(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
||||||
|
MID_PPO ppo = new MID_PPO(ctx,(int)value, null);
|
||||||
if(ppo != null && ppo.getM_Product_ID() > 0) {
|
|
||||||
mTab.setValue(MProduction.COLUMNNAME_M_Product_ID, ppo.getM_Product_ID());
|
if(ppo != null && ppo.getM_Product_ID() > 0) {
|
||||||
mTab.setValue(MProduction.COLUMNNAME_ProductionQty, ppo.getQtyOrdered());
|
mTab.setValue(MProduction.COLUMNNAME_M_Product_ID, ppo.getM_Product_ID());
|
||||||
}
|
mTab.setValue(MProduction.COLUMNNAME_ProductionQty, ppo.getQtyOrdered());
|
||||||
return null;
|
}
|
||||||
}
|
return null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,57 +1,57 @@
|
||||||
package andromedia.midsuit.callout;
|
package balinusa.midsuit.callout;
|
||||||
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import org.adempiere.base.IColumnCallout;
|
import org.adempiere.base.IColumnCallout;
|
||||||
import org.compiere.model.CalloutEngine;
|
import org.compiere.model.CalloutEngine;
|
||||||
import org.compiere.model.GridField;
|
import org.compiere.model.GridField;
|
||||||
import org.compiere.model.GridTab;
|
import org.compiere.model.GridTab;
|
||||||
import org.compiere.model.MProduct;
|
import org.compiere.model.MProduct;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
|
|
||||||
public class MID_CalloutProductionLine extends CalloutEngine implements IColumnCallout {
|
public class MID_CalloutProductionLine extends CalloutEngine implements IColumnCallout {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
||||||
|
|
||||||
if (mField.getColumnName().equals("isConvertUOM"))
|
if (mField.getColumnName().equals("isConvertUOM"))
|
||||||
return setUOM(ctx, WindowNo, mTab, mField, value, oldValue);
|
return setUOM(ctx, WindowNo, mTab, mField, value, oldValue);
|
||||||
if (mField.getColumnName().equals("QtyEntered"))
|
if (mField.getColumnName().equals("QtyEntered"))
|
||||||
return setConversion(ctx, WindowNo, mTab, mField, value, oldValue);
|
return setConversion(ctx, WindowNo, mTab, mField, value, oldValue);
|
||||||
if (mField.getColumnName().equals("M_Product_ID"))
|
if (mField.getColumnName().equals("M_Product_ID"))
|
||||||
{
|
{
|
||||||
if(value==null) return "";
|
if(value==null) return "";
|
||||||
MProduct pro = new MProduct(ctx, (int)value, null);
|
MProduct pro = new MProduct(ctx, (int)value, null);
|
||||||
mTab.setValue("C_UOM_ID", pro.getC_UOM_ID());
|
mTab.setValue("C_UOM_ID", pro.getC_UOM_ID());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String setConversion(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value,
|
public String setConversion(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value,
|
||||||
Object oldValue) {
|
Object oldValue) {
|
||||||
if (value == null || mTab.getValue("M_Product_ID") == null) {
|
if (value == null || mTab.getValue("M_Product_ID") == null) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
// BigDecimal QtyOrdered = MUOMConversion.convertProductFrom(Env.getCtx(), (int) mTab.getValue("M_Product_ID"),
|
// BigDecimal QtyOrdered = MUOMConversion.convertProductFrom(Env.getCtx(), (int) mTab.getValue("M_Product_ID"),
|
||||||
// (int) mTab.getValue("C_UOM_To_ID"), (BigDecimal) mTab.getValue("QtyEntered"));
|
// (int) mTab.getValue("C_UOM_To_ID"), (BigDecimal) mTab.getValue("QtyEntered"));
|
||||||
// if (QtyOrdered == null)
|
// if (QtyOrdered == null)
|
||||||
// QtyOrdered = (BigDecimal) mTab.getValue("QtyEntered");
|
// QtyOrdered = (BigDecimal) mTab.getValue("QtyEntered");
|
||||||
//
|
//
|
||||||
// mTab.setValue("QtyUsed", QtyOrdered);
|
// mTab.setValue("QtyUsed", QtyOrdered);
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String setUOM(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
public String setUOM(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
||||||
if (value == null)
|
if (value == null)
|
||||||
return "";
|
return "";
|
||||||
if (mTab.getValue("M_Product_ID") == null)
|
if (mTab.getValue("M_Product_ID") == null)
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
MProduct product = new MProduct(Env.getCtx(), (int) mTab.getValue("M_Product_ID"), null);
|
MProduct product = new MProduct(Env.getCtx(), (int) mTab.getValue("M_Product_ID"), null);
|
||||||
mTab.setValue("QtyEntered", mTab.getValue("QtyUsed"));
|
mTab.setValue("QtyEntered", mTab.getValue("QtyUsed"));
|
||||||
mTab.setValue("C_UOM_ID", product.getC_UOM_ID());
|
mTab.setValue("C_UOM_ID", product.getC_UOM_ID());
|
||||||
mTab.setValue("C_UOM_To_ID", product.getC_UOM_ID());
|
mTab.setValue("C_UOM_To_ID", product.getC_UOM_ID());
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,34 +1,35 @@
|
||||||
package andromedia.midsuit.callout;
|
package balinusa.midsuit.callout;
|
||||||
|
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.adempiere.base.IColumnCallout;
|
import org.adempiere.base.IColumnCallout;
|
||||||
import org.compiere.model.CalloutEngine;
|
import org.compiere.model.CalloutEngine;
|
||||||
import org.compiere.model.GridField;
|
import org.compiere.model.GridField;
|
||||||
import org.compiere.model.GridTab;
|
import org.compiere.model.GridTab;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
import andromedia.midsuit.model.X_C_OrderLineMA;
|
|
||||||
|
import balinusa.midsuit.model.X_C_OrderLineMA;
|
||||||
public class MID_CalloutRMALineMA extends CalloutEngine implements IColumnCallout {
|
|
||||||
|
public class MID_CalloutRMALineMA extends CalloutEngine implements IColumnCallout {
|
||||||
@Override
|
|
||||||
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
@Override
|
||||||
// TODO Auto-generated method stub
|
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
||||||
if(value == null) return null;
|
// TODO Auto-generated method stub
|
||||||
if(mField.getColumnName().equals(X_C_OrderLineMA.COLUMNNAME_M_AttributeSetInstance_ID)) {
|
if(value == null) return null;
|
||||||
return setDateMaterialPolicy(ctx, WindowNo, mTab, mField, value, oldValue);
|
if(mField.getColumnName().equals(X_C_OrderLineMA.COLUMNNAME_M_AttributeSetInstance_ID)) {
|
||||||
}
|
return setDateMaterialPolicy(ctx, WindowNo, mTab, mField, value, oldValue);
|
||||||
return null;
|
}
|
||||||
}
|
return null;
|
||||||
|
}
|
||||||
private String setDateMaterialPolicy(Properties ctx, int windowNo, GridTab mTab, GridField mField, Object value,
|
|
||||||
Object oldValue) {
|
private String setDateMaterialPolicy(Properties ctx, int windowNo, GridTab mTab, GridField mField, Object value,
|
||||||
if(value==null) return "";
|
Object oldValue) {
|
||||||
Timestamp retValue = DB.getSQLValueTSEx(null, "SELECT DateMaterialPolicy FROM M_Storage WHERE M_AttributeSetInstance_ID =? ", new Object[] { (int)value });
|
if(value==null) return "";
|
||||||
if(retValue!=null)
|
Timestamp retValue = DB.getSQLValueTSEx(null, "SELECT DateMaterialPolicy FROM M_Storage WHERE M_AttributeSetInstance_ID =? ", new Object[] { (int)value });
|
||||||
mTab.setValue(X_C_OrderLineMA.COLUMNNAME_DateMaterialPolicy, retValue);
|
if(retValue!=null)
|
||||||
return "";
|
mTab.setValue(X_C_OrderLineMA.COLUMNNAME_DateMaterialPolicy, retValue);
|
||||||
}
|
return "";
|
||||||
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.callout;
|
package balinusa.midsuit.callout;
|
||||||
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.callout;
|
package balinusa.midsuit.callout;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.callout;
|
package balinusa.midsuit.callout;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
@ -8,7 +8,7 @@ import org.compiere.model.CalloutEngine;
|
||||||
import org.compiere.model.GridField;
|
import org.compiere.model.GridField;
|
||||||
import org.compiere.model.GridTab;
|
import org.compiere.model.GridTab;
|
||||||
|
|
||||||
import andromedia.midsuit.model.X_MID_RequisitionLine;
|
import balinusa.midsuit.model.X_MID_RequisitionLine;
|
||||||
|
|
||||||
public class MID_CalloutRequisitionTrxLine extends CalloutEngine implements IColumnCallout{
|
public class MID_CalloutRequisitionTrxLine extends CalloutEngine implements IColumnCallout{
|
||||||
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.doc;
|
package balinusa.midsuit.doc;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
|
|
@ -1,35 +1,35 @@
|
||||||
package andromedia.midsuit.doc;
|
package balinusa.midsuit.doc;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import org.compiere.acct.Doc;
|
import org.compiere.acct.Doc;
|
||||||
import org.compiere.acct.Fact;
|
import org.compiere.acct.Fact;
|
||||||
import org.compiere.model.MAcctSchema;
|
import org.compiere.model.MAcctSchema;
|
||||||
|
|
||||||
import andromedia.midsuit.model.MID_Analysis;
|
import balinusa.midsuit.model.MID_Analysis;
|
||||||
|
|
||||||
public class MID_DocAnalysis extends Doc {
|
public class MID_DocAnalysis extends Doc {
|
||||||
|
|
||||||
public MID_DocAnalysis (MAcctSchema as, ResultSet rs, String trxName)
|
public MID_DocAnalysis (MAcctSchema as, ResultSet rs, String trxName)
|
||||||
{
|
{
|
||||||
super (as, MID_Analysis.class, rs, null, trxName);
|
super (as, MID_Analysis.class, rs, null, trxName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String loadDocumentDetails() {
|
protected String loadDocumentDetails() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BigDecimal getBalance() {
|
public BigDecimal getBalance() {
|
||||||
return BigDecimal.ZERO;
|
return BigDecimal.ZERO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ArrayList<Fact> createFacts(MAcctSchema as) {
|
public ArrayList<Fact> createFacts(MAcctSchema as) {
|
||||||
ArrayList<Fact> facts = new ArrayList<Fact>();
|
ArrayList<Fact> facts = new ArrayList<Fact>();
|
||||||
return facts;
|
return facts;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.doc;
|
package balinusa.midsuit.doc;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.doc;
|
package balinusa.midsuit.doc;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
|
|
@ -1,34 +1,35 @@
|
||||||
package andromedia.midsuit.doc;
|
package balinusa.midsuit.doc;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import org.compiere.acct.Doc;
|
import org.compiere.acct.Doc;
|
||||||
import org.compiere.acct.Fact;
|
import org.compiere.acct.Fact;
|
||||||
import org.compiere.model.MAcctSchema;
|
import org.compiere.model.MAcctSchema;
|
||||||
import andromedia.midsuit.model.MID_PPO;;
|
|
||||||
|
import balinusa.midsuit.model.MID_PPO;;
|
||||||
public class MID_DocMRPPPO extends Doc{
|
|
||||||
|
public class MID_DocMRPPPO extends Doc{
|
||||||
public MID_DocMRPPPO (MAcctSchema as, ResultSet rs, String trxName)
|
|
||||||
{
|
public MID_DocMRPPPO (MAcctSchema as, ResultSet rs, String trxName)
|
||||||
super (as, MID_PPO.class, rs, null, trxName);
|
{
|
||||||
}
|
super (as, MID_PPO.class, rs, null, trxName);
|
||||||
|
}
|
||||||
@Override
|
|
||||||
protected String loadDocumentDetails() {
|
@Override
|
||||||
return null;
|
protected String loadDocumentDetails() {
|
||||||
}
|
return null;
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public BigDecimal getBalance() {
|
@Override
|
||||||
return BigDecimal.ZERO;
|
public BigDecimal getBalance() {
|
||||||
}
|
return BigDecimal.ZERO;
|
||||||
|
}
|
||||||
@Override
|
|
||||||
public ArrayList<Fact> createFacts(MAcctSchema as) {
|
@Override
|
||||||
ArrayList<Fact> facts = new ArrayList<Fact>();
|
public ArrayList<Fact> createFacts(MAcctSchema as) {
|
||||||
return facts;
|
ArrayList<Fact> facts = new ArrayList<Fact>();
|
||||||
}
|
return facts;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.doc;
|
package balinusa.midsuit.doc;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
|
|
@ -9,7 +9,7 @@ import org.compiere.acct.Fact;
|
||||||
import org.compiere.model.MAcctSchema;
|
import org.compiere.model.MAcctSchema;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
|
|
||||||
import andromedia.midsuit.model.MID_MRequisitionTrx;
|
import balinusa.midsuit.model.MID_MRequisitionTrx;
|
||||||
|
|
||||||
public class MID_DocMidRequsiition extends Doc {
|
public class MID_DocMidRequsiition extends Doc {
|
||||||
|
|
||||||
|
|
@ -1,272 +1,272 @@
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* This program is free software; you can redistribute it and/or modify it *
|
||||||
* under the terms version 2 of the GNU General Public License as published *
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
* by the Free Software Foundation. This program is distributed in the hope *
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
* See the GNU General Public License for more details. *
|
* See the GNU General Public License for more details. *
|
||||||
* You should have received a copy of the GNU General Public License along *
|
* You should have received a copy of the GNU General Public License along *
|
||||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
* For the text or an alternative of this public license, you may reach us *
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.doc;
|
package balinusa.midsuit.doc;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.compiere.acct.Doc;
|
import org.compiere.acct.Doc;
|
||||||
import org.compiere.acct.DocLine;
|
import org.compiere.acct.DocLine;
|
||||||
import org.compiere.acct.Fact;
|
import org.compiere.acct.Fact;
|
||||||
import org.compiere.acct.FactLine;
|
import org.compiere.acct.FactLine;
|
||||||
import org.compiere.model.MAcctSchema;
|
import org.compiere.model.MAcctSchema;
|
||||||
import org.compiere.model.MCostDetail;
|
import org.compiere.model.MCostDetail;
|
||||||
import org.compiere.model.MMovement;
|
import org.compiere.model.MMovement;
|
||||||
import org.compiere.model.MMovementLine;
|
import org.compiere.model.MMovementLine;
|
||||||
import org.compiere.model.MMovementLineMA;
|
import org.compiere.model.MMovementLineMA;
|
||||||
import org.compiere.model.MProduct;
|
import org.compiere.model.MProduct;
|
||||||
import org.compiere.model.ProductCost;
|
import org.compiere.model.ProductCost;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Post Invoice Documents.
|
* Post Invoice Documents.
|
||||||
* <pre>
|
* <pre>
|
||||||
* Table: M_Movement (323)
|
* Table: M_Movement (323)
|
||||||
* Document Types: MMM
|
* Document Types: MMM
|
||||||
* </pre>
|
* </pre>
|
||||||
* @author Jorg Janke
|
* @author Jorg Janke
|
||||||
* @author Armen Rizal, Goodwill Consulting
|
* @author Armen Rizal, Goodwill Consulting
|
||||||
* <li>BF [ 1745154 ] Cost in Reversing Material Related Docs
|
* <li>BF [ 1745154 ] Cost in Reversing Material Related Docs
|
||||||
* @version $Id: Doc_Movement.java,v 1.3 2006/07/30 00:53:33 jjanke Exp $
|
* @version $Id: Doc_Movement.java,v 1.3 2006/07/30 00:53:33 jjanke Exp $
|
||||||
*/
|
*/
|
||||||
public class MID_DocMovement extends Doc
|
public class MID_DocMovement extends Doc
|
||||||
{
|
{
|
||||||
private int m_Reversal_ID = 0;
|
private int m_Reversal_ID = 0;
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
private String m_DocStatus = "";
|
private String m_DocStatus = "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
* @param as accounting schema
|
* @param as accounting schema
|
||||||
* @param rs record
|
* @param rs record
|
||||||
* @param trxName trx
|
* @param trxName trx
|
||||||
*/
|
*/
|
||||||
public MID_DocMovement (MAcctSchema as, ResultSet rs, String trxName)
|
public MID_DocMovement (MAcctSchema as, ResultSet rs, String trxName)
|
||||||
{
|
{
|
||||||
super (as, MMovement.class, rs, DOCTYPE_MatMovement, trxName);
|
super (as, MMovement.class, rs, DOCTYPE_MatMovement, trxName);
|
||||||
} // Doc_Movement
|
} // Doc_Movement
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load Document Details
|
* Load Document Details
|
||||||
* @return error message or null
|
* @return error message or null
|
||||||
*/
|
*/
|
||||||
protected String loadDocumentDetails()
|
protected String loadDocumentDetails()
|
||||||
{
|
{
|
||||||
setC_Currency_ID(NO_CURRENCY);
|
setC_Currency_ID(NO_CURRENCY);
|
||||||
MMovement move = (MMovement)getPO();
|
MMovement move = (MMovement)getPO();
|
||||||
setDateDoc (move.getMovementDate());
|
setDateDoc (move.getMovementDate());
|
||||||
setDateAcct(move.getMovementDate());
|
setDateAcct(move.getMovementDate());
|
||||||
m_Reversal_ID = move.getReversal_ID();//store original (voided/reversed) document
|
m_Reversal_ID = move.getReversal_ID();//store original (voided/reversed) document
|
||||||
m_DocStatus = move.getDocStatus();
|
m_DocStatus = move.getDocStatus();
|
||||||
// Contained Objects
|
// Contained Objects
|
||||||
p_lines = loadLines(move);
|
p_lines = loadLines(move);
|
||||||
if (log.isLoggable(Level.FINE)) log.fine("Lines=" + p_lines.length);
|
if (log.isLoggable(Level.FINE)) log.fine("Lines=" + p_lines.length);
|
||||||
return null;
|
return null;
|
||||||
} // loadDocumentDetails
|
} // loadDocumentDetails
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load Invoice Line
|
* Load Invoice Line
|
||||||
* @param move move
|
* @param move move
|
||||||
* @return document lines (DocLine_Material)
|
* @return document lines (DocLine_Material)
|
||||||
*/
|
*/
|
||||||
private DocLine[] loadLines(MMovement move)
|
private DocLine[] loadLines(MMovement move)
|
||||||
{
|
{
|
||||||
ArrayList<DocLine> list = new ArrayList<DocLine>();
|
ArrayList<DocLine> list = new ArrayList<DocLine>();
|
||||||
MMovementLine[] lines = move.getLines(false);
|
MMovementLine[] lines = move.getLines(false);
|
||||||
if(move.get_ValueAsBoolean("IsAsset"))
|
if(move.get_ValueAsBoolean("IsAsset"))
|
||||||
return new DocLine[0];
|
return new DocLine[0];
|
||||||
for (int i = 0; i < lines.length; i++)
|
for (int i = 0; i < lines.length; i++)
|
||||||
{
|
{
|
||||||
MMovementLine line = lines[i];
|
MMovementLine line = lines[i];
|
||||||
DocLine docLine = new DocLine (line, this);
|
DocLine docLine = new DocLine (line, this);
|
||||||
docLine.setQty(line.getMovementQty(), false);
|
docLine.setQty(line.getMovementQty(), false);
|
||||||
docLine.setReversalLine_ID(line.getReversalLine_ID());
|
docLine.setReversalLine_ID(line.getReversalLine_ID());
|
||||||
if (log.isLoggable(Level.FINE)) log.fine(docLine.toString());
|
if (log.isLoggable(Level.FINE)) log.fine(docLine.toString());
|
||||||
list.add (docLine);
|
list.add (docLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return Array
|
// Return Array
|
||||||
DocLine[] dls = new DocLine[list.size()];
|
DocLine[] dls = new DocLine[list.size()];
|
||||||
list.toArray(dls);
|
list.toArray(dls);
|
||||||
return dls;
|
return dls;
|
||||||
} // loadLines
|
} // loadLines
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Balance
|
* Get Balance
|
||||||
* @return balance (ZERO) - always balanced
|
* @return balance (ZERO) - always balanced
|
||||||
*/
|
*/
|
||||||
public BigDecimal getBalance()
|
public BigDecimal getBalance()
|
||||||
{
|
{
|
||||||
BigDecimal retValue = Env.ZERO;
|
BigDecimal retValue = Env.ZERO;
|
||||||
return retValue;
|
return retValue;
|
||||||
} // getBalance
|
} // getBalance
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create Facts (the accounting logic) for
|
* Create Facts (the accounting logic) for
|
||||||
* MMM.
|
* MMM.
|
||||||
* <pre>
|
* <pre>
|
||||||
* Movement
|
* Movement
|
||||||
* Inventory DR CR
|
* Inventory DR CR
|
||||||
* InventoryTo DR CR
|
* InventoryTo DR CR
|
||||||
* </pre>
|
* </pre>
|
||||||
* @param as account schema
|
* @param as account schema
|
||||||
* @return Fact
|
* @return Fact
|
||||||
*/
|
*/
|
||||||
public ArrayList<Fact> createFacts (MAcctSchema as)
|
public ArrayList<Fact> createFacts (MAcctSchema as)
|
||||||
{
|
{
|
||||||
// create Fact Header
|
// create Fact Header
|
||||||
Fact fact = new Fact(this, as, Fact.POST_Actual);
|
Fact fact = new Fact(this, as, Fact.POST_Actual);
|
||||||
setC_Currency_ID(as.getC_Currency_ID());
|
setC_Currency_ID(as.getC_Currency_ID());
|
||||||
|
|
||||||
// Line pointers
|
// Line pointers
|
||||||
FactLine dr = null;
|
FactLine dr = null;
|
||||||
FactLine cr = null;
|
FactLine cr = null;
|
||||||
|
|
||||||
for (int i = 0; i < p_lines.length; i++)
|
for (int i = 0; i < p_lines.length; i++)
|
||||||
{
|
{
|
||||||
DocLine line = p_lines[i];
|
DocLine line = p_lines[i];
|
||||||
BigDecimal costs = null;
|
BigDecimal costs = null;
|
||||||
|
|
||||||
if (!isReversal(line))
|
if (!isReversal(line))
|
||||||
{
|
{
|
||||||
MProduct product = (MProduct) line.getProduct();
|
MProduct product = (MProduct) line.getProduct();
|
||||||
String costingLevel = product.getCostingLevel(as);
|
String costingLevel = product.getCostingLevel(as);
|
||||||
if (MAcctSchema.COSTINGLEVEL_BatchLot.equals(costingLevel) )
|
if (MAcctSchema.COSTINGLEVEL_BatchLot.equals(costingLevel) )
|
||||||
{
|
{
|
||||||
if (line.getM_AttributeSetInstance_ID() == 0 )
|
if (line.getM_AttributeSetInstance_ID() == 0 )
|
||||||
{
|
{
|
||||||
MMovementLine mLine = (MMovementLine) line.getPO();
|
MMovementLine mLine = (MMovementLine) line.getPO();
|
||||||
MMovementLineMA mas[] = MMovementLineMA.get(getCtx(), mLine.get_ID(), getTrxName());
|
MMovementLineMA mas[] = MMovementLineMA.get(getCtx(), mLine.get_ID(), getTrxName());
|
||||||
if (mas != null && mas.length > 0 )
|
if (mas != null && mas.length > 0 )
|
||||||
{
|
{
|
||||||
costs = BigDecimal.ZERO;
|
costs = BigDecimal.ZERO;
|
||||||
for (int j = 0; j < mas.length; j++)
|
for (int j = 0; j < mas.length; j++)
|
||||||
{
|
{
|
||||||
MMovementLineMA ma = mas[j];
|
MMovementLineMA ma = mas[j];
|
||||||
BigDecimal QtyMA = ma.getMovementQty();
|
BigDecimal QtyMA = ma.getMovementQty();
|
||||||
ProductCost pc = line.getProductCost();
|
ProductCost pc = line.getProductCost();
|
||||||
pc.setQty(QtyMA);
|
pc.setQty(QtyMA);
|
||||||
pc.setM_M_AttributeSetInstance_ID(ma.getM_AttributeSetInstance_ID());
|
pc.setM_M_AttributeSetInstance_ID(ma.getM_AttributeSetInstance_ID());
|
||||||
BigDecimal maCosts = line.getProductCosts(as, line.getAD_Org_ID(), true, "M_MovementLine_ID=? AND IsSOTrx='N'");
|
BigDecimal maCosts = line.getProductCosts(as, line.getAD_Org_ID(), true, "M_MovementLine_ID=? AND IsSOTrx='N'");
|
||||||
|
|
||||||
costs = costs.add(maCosts);
|
costs = costs.add(maCosts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
costs = line.getProductCosts(as, line.getAD_Org_ID(), true, "M_MovementLine_ID=? AND IsSOTrx='N'");
|
costs = line.getProductCosts(as, line.getAD_Org_ID(), true, "M_MovementLine_ID=? AND IsSOTrx='N'");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// MZ Goodwill
|
// MZ Goodwill
|
||||||
// if Inventory Move CostDetail exist then get Cost from Cost Detail
|
// if Inventory Move CostDetail exist then get Cost from Cost Detail
|
||||||
costs = line.getProductCosts(as, line.getAD_Org_ID(), true, "M_MovementLine_ID=? AND IsSOTrx='N'");
|
costs = line.getProductCosts(as, line.getAD_Org_ID(), true, "M_MovementLine_ID=? AND IsSOTrx='N'");
|
||||||
// end MZ
|
// end MZ
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
costs = BigDecimal.ZERO;
|
costs = BigDecimal.ZERO;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ** Inventory DR CR
|
// ** Inventory DR CR
|
||||||
dr = fact.createLine(line,
|
dr = fact.createLine(line,
|
||||||
line.getAccount(ProductCost.ACCTTYPE_P_Asset, as),
|
line.getAccount(ProductCost.ACCTTYPE_P_Asset, as),
|
||||||
as.getC_Currency_ID(), costs.negate()); // from (-) CR
|
as.getC_Currency_ID(), costs.negate()); // from (-) CR
|
||||||
if (dr == null)
|
if (dr == null)
|
||||||
continue;
|
continue;
|
||||||
dr.setM_Locator_ID(line.getM_Locator_ID());
|
dr.setM_Locator_ID(line.getM_Locator_ID());
|
||||||
dr.setQty(line.getQty().negate()); // outgoing
|
dr.setQty(line.getQty().negate()); // outgoing
|
||||||
if (isReversal(line))
|
if (isReversal(line))
|
||||||
{
|
{
|
||||||
// Set AmtAcctDr from Original Movement
|
// Set AmtAcctDr from Original Movement
|
||||||
if (!dr.updateReverseLine (MMovement.Table_ID,
|
if (!dr.updateReverseLine (MMovement.Table_ID,
|
||||||
m_Reversal_ID, line.getReversalLine_ID(),Env.ONE))
|
m_Reversal_ID, line.getReversalLine_ID(),Env.ONE))
|
||||||
{
|
{
|
||||||
p_Error = "Original Inventory Move not posted yet";
|
p_Error = "Original Inventory Move not posted yet";
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ** InventoryTo DR CR
|
// ** InventoryTo DR CR
|
||||||
cr = fact.createLine(line,
|
cr = fact.createLine(line,
|
||||||
line.getAccount(ProductCost.ACCTTYPE_P_Asset, as),
|
line.getAccount(ProductCost.ACCTTYPE_P_Asset, as),
|
||||||
as.getC_Currency_ID(), costs); // to (+) DR
|
as.getC_Currency_ID(), costs); // to (+) DR
|
||||||
if (cr == null)
|
if (cr == null)
|
||||||
continue;
|
continue;
|
||||||
cr.setM_Locator_ID(line.getM_LocatorTo_ID());
|
cr.setM_Locator_ID(line.getM_LocatorTo_ID());
|
||||||
cr.setQty(line.getQty());
|
cr.setQty(line.getQty());
|
||||||
if (isReversal(line))
|
if (isReversal(line))
|
||||||
{
|
{
|
||||||
// Set AmtAcctCr from Original Movement
|
// Set AmtAcctCr from Original Movement
|
||||||
if (!cr.updateReverseLine (MMovement.Table_ID,
|
if (!cr.updateReverseLine (MMovement.Table_ID,
|
||||||
m_Reversal_ID, line.getReversalLine_ID(),Env.ONE))
|
m_Reversal_ID, line.getReversalLine_ID(),Env.ONE))
|
||||||
{
|
{
|
||||||
p_Error = "Original Inventory Move not posted yet";
|
p_Error = "Original Inventory Move not posted yet";
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
costs = cr.getAcctBalance(); //get original cost
|
costs = cr.getAcctBalance(); //get original cost
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only for between-org movements
|
// Only for between-org movements
|
||||||
if (dr.getAD_Org_ID() != cr.getAD_Org_ID())
|
if (dr.getAD_Org_ID() != cr.getAD_Org_ID())
|
||||||
{
|
{
|
||||||
String costingLevel = line.getProduct().getCostingLevel(as);
|
String costingLevel = line.getProduct().getCostingLevel(as);
|
||||||
if (!MAcctSchema.COSTINGLEVEL_Organization.equals(costingLevel))
|
if (!MAcctSchema.COSTINGLEVEL_Organization.equals(costingLevel))
|
||||||
continue;
|
continue;
|
||||||
//
|
//
|
||||||
String description = line.getDescription();
|
String description = line.getDescription();
|
||||||
if (description == null)
|
if (description == null)
|
||||||
description = "";
|
description = "";
|
||||||
// Cost Detail From
|
// Cost Detail From
|
||||||
if (!MCostDetail.createMovement(as, dr.getAD_Org_ID(), // locator org
|
if (!MCostDetail.createMovement(as, dr.getAD_Org_ID(), // locator org
|
||||||
line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(),
|
line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(),
|
||||||
line.get_ID(), 0,
|
line.get_ID(), 0,
|
||||||
costs.negate(), line.getQty().negate(), true,
|
costs.negate(), line.getQty().negate(), true,
|
||||||
description + "(|->)", getTrxName()))
|
description + "(|->)", getTrxName()))
|
||||||
{
|
{
|
||||||
p_Error = "Failed to create cost detail record";
|
p_Error = "Failed to create cost detail record";
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// Cost Detail To
|
// Cost Detail To
|
||||||
if (!MCostDetail.createMovement(as, cr.getAD_Org_ID(), // locator org
|
if (!MCostDetail.createMovement(as, cr.getAD_Org_ID(), // locator org
|
||||||
line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(),
|
line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(),
|
||||||
line.get_ID(), 0,
|
line.get_ID(), 0,
|
||||||
costs, line.getQty(), false,
|
costs, line.getQty(), false,
|
||||||
description + "(|<-)", getTrxName()))
|
description + "(|<-)", getTrxName()))
|
||||||
{
|
{
|
||||||
p_Error = "Failed to create cost detail record";
|
p_Error = "Failed to create cost detail record";
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
ArrayList<Fact> facts = new ArrayList<Fact>();
|
ArrayList<Fact> facts = new ArrayList<Fact>();
|
||||||
facts.add(fact);
|
facts.add(fact);
|
||||||
return facts;
|
return facts;
|
||||||
} // createFact
|
} // createFact
|
||||||
|
|
||||||
private boolean isReversal(DocLine line) {
|
private boolean isReversal(DocLine line) {
|
||||||
return m_Reversal_ID !=0 && line.getReversalLine_ID() != 0;
|
return m_Reversal_ID !=0 && line.getReversalLine_ID() != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // Doc_Movement
|
} // Doc_Movement
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.factory;
|
package balinusa.midsuit.factory;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -16,35 +16,35 @@ import org.compiere.model.MProductionLine;
|
||||||
import org.compiere.model.X_C_OrderLine;
|
import org.compiere.model.X_C_OrderLine;
|
||||||
import org.compiere.model.X_M_RequisitionLine;
|
import org.compiere.model.X_M_RequisitionLine;
|
||||||
|
|
||||||
import andromedia.midsuit.callout.MID_CalloutAnalysisQC;
|
import balinusa.midsuit.callout.MID_CalloutAnalysisQC;
|
||||||
import andromedia.midsuit.callout.MID_CalloutCeisaUpload;
|
import balinusa.midsuit.callout.MID_CalloutCeisaUpload;
|
||||||
import andromedia.midsuit.callout.MID_CalloutInOut;
|
import balinusa.midsuit.callout.MID_CalloutInOut;
|
||||||
import andromedia.midsuit.callout.MID_CalloutInOutLine;
|
import balinusa.midsuit.callout.MID_CalloutInOutLine;
|
||||||
import andromedia.midsuit.callout.MID_CalloutInventoryLine;
|
import balinusa.midsuit.callout.MID_CalloutInventoryLine;
|
||||||
import andromedia.midsuit.callout.MID_CalloutInventoryLineMA;
|
import balinusa.midsuit.callout.MID_CalloutInventoryLineMA;
|
||||||
import andromedia.midsuit.callout.MID_CalloutIsReturnCeisa;
|
import balinusa.midsuit.callout.MID_CalloutIsReturnCeisa;
|
||||||
import andromedia.midsuit.callout.MID_CalloutMovement;
|
import balinusa.midsuit.callout.MID_CalloutMovement;
|
||||||
import andromedia.midsuit.callout.MID_CalloutMovementLineMA;
|
import balinusa.midsuit.callout.MID_CalloutMovementLineMA;
|
||||||
import andromedia.midsuit.callout.MID_CalloutOrder;
|
import balinusa.midsuit.callout.MID_CalloutOrder;
|
||||||
import andromedia.midsuit.callout.MID_CalloutOrderCeisa;
|
import balinusa.midsuit.callout.MID_CalloutOrderCeisa;
|
||||||
import andromedia.midsuit.callout.MID_CalloutOrderLine;
|
import balinusa.midsuit.callout.MID_CalloutOrderLine;
|
||||||
import andromedia.midsuit.callout.MID_CalloutOrderLineMA;
|
import balinusa.midsuit.callout.MID_CalloutOrderLineMA;
|
||||||
import andromedia.midsuit.callout.MID_CalloutPPO;
|
import balinusa.midsuit.callout.MID_CalloutPPO;
|
||||||
import andromedia.midsuit.callout.MID_CalloutProduction;
|
import balinusa.midsuit.callout.MID_CalloutProduction;
|
||||||
import andromedia.midsuit.callout.MID_CalloutProductionLine;
|
import balinusa.midsuit.callout.MID_CalloutProductionLine;
|
||||||
import andromedia.midsuit.callout.MID_CalloutRMALineMA;
|
import balinusa.midsuit.callout.MID_CalloutRMALineMA;
|
||||||
import andromedia.midsuit.callout.MID_CalloutRequisition;
|
import balinusa.midsuit.callout.MID_CalloutRequisition;
|
||||||
import andromedia.midsuit.callout.MID_CalloutRequisitionLine;
|
import balinusa.midsuit.callout.MID_CalloutRequisitionLine;
|
||||||
import andromedia.midsuit.callout.MID_CalloutRequisitionTrxLine;
|
import balinusa.midsuit.callout.MID_CalloutRequisitionTrxLine;
|
||||||
import andromedia.midsuit.model.MID_Analysis;
|
import balinusa.midsuit.model.MID_Analysis;
|
||||||
import andromedia.midsuit.model.MID_MMovement;
|
import balinusa.midsuit.model.MID_MMovement;
|
||||||
import andromedia.midsuit.model.X_C_OrderLineMA;
|
import balinusa.midsuit.model.X_C_OrderLineMA;
|
||||||
import andromedia.midsuit.model.X_MID_Requisition;
|
import balinusa.midsuit.model.X_MID_Requisition;
|
||||||
import andromedia.midsuit.model.X_MID_RequisitionLine;
|
import balinusa.midsuit.model.X_MID_RequisitionLine;
|
||||||
import andromedia.midsuit.model.X_M_RMAMA;
|
import balinusa.midsuit.model.X_M_RMAMA;
|
||||||
import andromedia.midsuit.model.X_mid_ceisa_order;
|
import balinusa.midsuit.model.X_mid_ceisa_order;
|
||||||
import andromedia.midsuit.model.X_mid_ceisa_upload;
|
import balinusa.midsuit.model.X_mid_ceisa_upload;
|
||||||
import andromedia.midsuit.model.X_ps_ppo;
|
import balinusa.midsuit.model.X_ps_ppo;
|
||||||
|
|
||||||
public class MID_CalloutFactory implements IColumnCalloutFactory{
|
public class MID_CalloutFactory implements IColumnCalloutFactory{
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.factory;
|
package balinusa.midsuit.factory;
|
||||||
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
|
|
@ -11,10 +11,10 @@ import org.compiere.model.X_M_InOut;
|
||||||
import org.compiere.model.X_M_RMA;
|
import org.compiere.model.X_M_RMA;
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
|
|
||||||
import andromedia.midsuit.form.MID_WCreateFromInvoice;
|
import balinusa.midsuit.form.MID_WCreateFromInvoice;
|
||||||
import andromedia.midsuit.form.MID_WCreateFromOrder;
|
import balinusa.midsuit.form.MID_WCreateFromOrder;
|
||||||
import andromedia.midsuit.form.MID_WCreateFromRMA;
|
import balinusa.midsuit.form.MID_WCreateFromRMA;
|
||||||
import andromedia.midsuit.form.MID_WCreateFromShipment;
|
import balinusa.midsuit.form.MID_WCreateFromShipment;
|
||||||
|
|
||||||
public class MID_CreateFromFactory implements ICreateFromFactory{
|
public class MID_CreateFromFactory implements ICreateFromFactory{
|
||||||
private CLogger log = CLogger.getCLogger(getClass());
|
private CLogger log = CLogger.getCLogger(getClass());
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.factory;
|
package balinusa.midsuit.factory;
|
||||||
|
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
|
|
@ -16,18 +16,18 @@ import org.compiere.util.DB;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.eevolution.model.MDDOrder;
|
import org.eevolution.model.MDDOrder;
|
||||||
|
|
||||||
import andromedia.midsuit.doc.MID_DocAllocationHdr;
|
import balinusa.midsuit.doc.MID_DocAllocationHdr;
|
||||||
import andromedia.midsuit.doc.MID_DocAnalysis;
|
import balinusa.midsuit.doc.MID_DocAnalysis;
|
||||||
import andromedia.midsuit.doc.MID_DocDDOrder;
|
import balinusa.midsuit.doc.MID_DocDDOrder;
|
||||||
import andromedia.midsuit.doc.MID_DocInvoice;
|
import balinusa.midsuit.doc.MID_DocInvoice;
|
||||||
import andromedia.midsuit.doc.MID_DocMRPPPO;
|
import balinusa.midsuit.doc.MID_DocMRPPPO;
|
||||||
import andromedia.midsuit.doc.MID_DocMatchInv;
|
import balinusa.midsuit.doc.MID_DocMatchInv;
|
||||||
import andromedia.midsuit.doc.MID_DocMidRequsiition;
|
import balinusa.midsuit.doc.MID_DocMidRequsiition;
|
||||||
import andromedia.midsuit.doc.MID_DocMovement;
|
import balinusa.midsuit.doc.MID_DocMovement;
|
||||||
import andromedia.midsuit.model.MID_Analysis;
|
import balinusa.midsuit.model.MID_Analysis;
|
||||||
import andromedia.midsuit.model.MID_MMovement;
|
import balinusa.midsuit.model.MID_MMovement;
|
||||||
import andromedia.midsuit.model.MID_MRequisitionTrx;
|
import balinusa.midsuit.model.MID_MRequisitionTrx;
|
||||||
import andromedia.midsuit.model.MID_PPO;
|
import balinusa.midsuit.model.MID_PPO;
|
||||||
|
|
||||||
public class MID_DocFactory implements IDocFactory{
|
public class MID_DocFactory implements IDocFactory{
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.factory;
|
package balinusa.midsuit.factory;
|
||||||
|
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.factory;
|
package balinusa.midsuit.factory;
|
||||||
|
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
|
|
@ -11,47 +11,47 @@ import org.compiere.model.MMovementLine;
|
||||||
import org.compiere.model.PO;
|
import org.compiere.model.PO;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
|
|
||||||
import andromedia.midsuit.model.MID_Aging;
|
import balinusa.midsuit.model.MID_Aging;
|
||||||
import andromedia.midsuit.model.MID_Analysis;
|
import balinusa.midsuit.model.MID_Analysis;
|
||||||
import andromedia.midsuit.model.MID_AnalysisLine;
|
import balinusa.midsuit.model.MID_AnalysisLine;
|
||||||
import andromedia.midsuit.model.MID_AnalysisPro;
|
import balinusa.midsuit.model.MID_AnalysisPro;
|
||||||
import andromedia.midsuit.model.MID_Ceisa_Order;
|
import balinusa.midsuit.model.MID_Ceisa_Order;
|
||||||
import andromedia.midsuit.model.MID_MAssetAddition;
|
import balinusa.midsuit.model.MID_MAssetAddition;
|
||||||
import andromedia.midsuit.model.MID_MAssetDisposed;
|
import balinusa.midsuit.model.MID_MAssetDisposed;
|
||||||
import andromedia.midsuit.model.MID_MBillingList;
|
import balinusa.midsuit.model.MID_MBillingList;
|
||||||
import andromedia.midsuit.model.MID_MBillingListLine;
|
import balinusa.midsuit.model.MID_MBillingListLine;
|
||||||
import andromedia.midsuit.model.MID_MDDOrder;
|
import balinusa.midsuit.model.MID_MDDOrder;
|
||||||
import andromedia.midsuit.model.MID_MDDOrderLine;
|
import balinusa.midsuit.model.MID_MDDOrderLine;
|
||||||
import andromedia.midsuit.model.MID_MDepreciationEntry;
|
import balinusa.midsuit.model.MID_MDepreciationEntry;
|
||||||
import andromedia.midsuit.model.MID_MInventory;
|
import balinusa.midsuit.model.MID_MInventory;
|
||||||
import andromedia.midsuit.model.MID_MInvoice;
|
import balinusa.midsuit.model.MID_MInvoice;
|
||||||
import andromedia.midsuit.model.MID_MOrder;
|
import balinusa.midsuit.model.MID_MOrder;
|
||||||
import andromedia.midsuit.model.MID_MOrderLine;
|
import balinusa.midsuit.model.MID_MOrderLine;
|
||||||
import andromedia.midsuit.model.MID_MPayment;
|
import balinusa.midsuit.model.MID_MPayment;
|
||||||
import andromedia.midsuit.model.MID_MProductionConfirm;
|
import balinusa.midsuit.model.MID_MProductionConfirm;
|
||||||
import andromedia.midsuit.model.MID_MRequisition;
|
import balinusa.midsuit.model.MID_MRequisition;
|
||||||
import andromedia.midsuit.model.MID_MRequisitionLine;
|
import balinusa.midsuit.model.MID_MRequisitionLine;
|
||||||
import andromedia.midsuit.model.MID_MRequisitionTrx;
|
import balinusa.midsuit.model.MID_MRequisitionTrx;
|
||||||
import andromedia.midsuit.model.MID_MRequisitionTrxLine;
|
import balinusa.midsuit.model.MID_MRequisitionTrxLine;
|
||||||
import andromedia.midsuit.model.MID_MRequsitionTax;
|
import balinusa.midsuit.model.MID_MRequsitionTax;
|
||||||
import andromedia.midsuit.model.MID_PPO;
|
import balinusa.midsuit.model.MID_PPO;
|
||||||
import andromedia.midsuit.model.MID_PPOLine;
|
import balinusa.midsuit.model.MID_PPOLine;
|
||||||
import andromedia.midsuit.model.MID_UnrealizedRate;
|
import balinusa.midsuit.model.MID_UnrealizedRate;
|
||||||
import andromedia.midsuit.model.MID_UnrealizedRateLine;
|
import balinusa.midsuit.model.MID_UnrealizedRateLine;
|
||||||
import andromedia.midsuit.model.MWarehouse;
|
import balinusa.midsuit.model.MWarehouse;
|
||||||
import andromedia.midsuit.model.X_C_OrderLineMA;
|
import balinusa.midsuit.model.X_C_OrderLineMA;
|
||||||
import andromedia.midsuit.model.X_MID_UploadPEB;
|
import balinusa.midsuit.model.X_MID_UploadPEB;
|
||||||
import andromedia.midsuit.model.X_MID_UploadPEBLine;
|
import balinusa.midsuit.model.X_MID_UploadPEBLine;
|
||||||
import andromedia.midsuit.model.X_MID_UploadTPB;
|
import balinusa.midsuit.model.X_MID_UploadTPB;
|
||||||
import andromedia.midsuit.model.X_MID_UploadTPBLine;
|
import balinusa.midsuit.model.X_MID_UploadTPBLine;
|
||||||
import andromedia.midsuit.model.X_MID_UploadTPBLineDet;
|
import balinusa.midsuit.model.X_MID_UploadTPBLineDet;
|
||||||
import andromedia.midsuit.model.X_M_RMAMA;
|
import balinusa.midsuit.model.X_M_RMAMA;
|
||||||
import andromedia.midsuit.model.X_M_RequisitionTax;
|
import balinusa.midsuit.model.X_M_RequisitionTax;
|
||||||
import andromedia.midsuit.model.X_mid_ceisa_entitas;
|
import balinusa.midsuit.model.X_mid_ceisa_entitas;
|
||||||
import andromedia.midsuit.model.X_mid_ceisa_order;
|
import balinusa.midsuit.model.X_mid_ceisa_order;
|
||||||
import andromedia.midsuit.model.X_mid_ceisa_orderline;
|
import balinusa.midsuit.model.X_mid_ceisa_orderline;
|
||||||
import andromedia.midsuit.model.X_mid_ceisa_upload;
|
import balinusa.midsuit.model.X_mid_ceisa_upload;
|
||||||
import andromedia.midsuit.model.X_zpos_Cashier;
|
import balinusa.midsuit.model.X_zpos_Cashier;
|
||||||
|
|
||||||
public class MID_ModelFactory implements IModelFactory{
|
public class MID_ModelFactory implements IModelFactory{
|
||||||
private static HashMap<String, String> mapTableModels = new HashMap<String, String>();
|
private static HashMap<String, String> mapTableModels = new HashMap<String, String>();
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.factory;
|
package balinusa.midsuit.factory;
|
||||||
|
|
||||||
import org.adempiere.base.IProcessFactory;
|
import org.adempiere.base.IProcessFactory;
|
||||||
import org.compiere.process.ProcessCall;
|
import org.compiere.process.ProcessCall;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.factory;
|
package balinusa.midsuit.factory;
|
||||||
|
|
||||||
import org.adempiere.base.event.AbstractEventHandler;
|
import org.adempiere.base.event.AbstractEventHandler;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
|
|
@ -26,23 +26,23 @@ import org.compiere.model.PO;
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.osgi.service.event.Event;
|
import org.osgi.service.event.Event;
|
||||||
|
|
||||||
import andromedia.midsuit.model.X_M_RequisitionTax;
|
import balinusa.midsuit.model.X_M_RequisitionTax;
|
||||||
import andromedia.midsuit.validator.MID_CurrencyRateValidator;
|
import balinusa.midsuit.validator.MID_CurrencyRateValidator;
|
||||||
import andromedia.midsuit.validator.MID_DeprWorkfileValidator;
|
import balinusa.midsuit.validator.MID_DeprWorkfileValidator;
|
||||||
import andromedia.midsuit.validator.MID_InOutValidator;
|
import balinusa.midsuit.validator.MID_InOutValidator;
|
||||||
import andromedia.midsuit.validator.MID_InventoryLineMAValidator;
|
import balinusa.midsuit.validator.MID_InventoryLineMAValidator;
|
||||||
import andromedia.midsuit.validator.MID_InventoryLineValidator;
|
import balinusa.midsuit.validator.MID_InventoryLineValidator;
|
||||||
import andromedia.midsuit.validator.MID_InventoryValidator;
|
import balinusa.midsuit.validator.MID_InventoryValidator;
|
||||||
import andromedia.midsuit.validator.MID_InvoiceTaxValidator;
|
import balinusa.midsuit.validator.MID_InvoiceTaxValidator;
|
||||||
import andromedia.midsuit.validator.MID_JournalValidator;
|
import balinusa.midsuit.validator.MID_JournalValidator;
|
||||||
import andromedia.midsuit.validator.MID_OrderLineValidator;
|
import balinusa.midsuit.validator.MID_OrderLineValidator;
|
||||||
import andromedia.midsuit.validator.MID_OrderTaxValidator;
|
import balinusa.midsuit.validator.MID_OrderTaxValidator;
|
||||||
import andromedia.midsuit.validator.MID_OrderValidator;
|
import balinusa.midsuit.validator.MID_OrderValidator;
|
||||||
import andromedia.midsuit.validator.MID_PaymentValidator;
|
import balinusa.midsuit.validator.MID_PaymentValidator;
|
||||||
import andromedia.midsuit.validator.MID_ProductValidator;
|
import balinusa.midsuit.validator.MID_ProductValidator;
|
||||||
import andromedia.midsuit.validator.MID_ProductionLineValidator;
|
import balinusa.midsuit.validator.MID_ProductionLineValidator;
|
||||||
import andromedia.midsuit.validator.MID_ProductionValidator;
|
import balinusa.midsuit.validator.MID_ProductionValidator;
|
||||||
import andromedia.midsuit.validator.MID_RequisitionTaxValidator;
|
import balinusa.midsuit.validator.MID_RequisitionTaxValidator;
|
||||||
|
|
||||||
public class MID_ValidatorFactory extends AbstractEventHandler {
|
public class MID_ValidatorFactory extends AbstractEventHandler {
|
||||||
public CLogger log = CLogger.getCLogger(MID_ValidatorFactory.class);
|
public CLogger log = CLogger.getCLogger(MID_ValidatorFactory.class);
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.form;
|
package balinusa.midsuit.form;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.security.Timestamp;
|
import java.security.Timestamp;
|
||||||
|
|
@ -23,8 +23,8 @@ import org.compiere.util.KeyNamePair;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
import org.compiere.util.Trx;
|
import org.compiere.util.Trx;
|
||||||
|
|
||||||
import andromedia.midsuit.model.MID_MBillingList;
|
import balinusa.midsuit.model.MID_MBillingList;
|
||||||
import andromedia.midsuit.model.MID_MBillingListLine;
|
import balinusa.midsuit.model.MID_MBillingListLine;
|
||||||
|
|
||||||
public class BillingListGenerate extends GenForm {
|
public class BillingListGenerate extends GenForm {
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.form;
|
package balinusa.midsuit.form;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
|
|
@ -31,7 +31,7 @@ import org.compiere.util.Env;
|
||||||
import org.compiere.util.KeyNamePair;
|
import org.compiere.util.KeyNamePair;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
|
|
||||||
import andromedia.midsuit.model.MID_MRequisitionTrxLine;
|
import balinusa.midsuit.model.MID_MRequisitionTrxLine;
|
||||||
|
|
||||||
public class MID_CreateFromOrder extends CreateFrom {
|
public class MID_CreateFromOrder extends CreateFrom {
|
||||||
/*
|
/*
|
||||||
|
|
@ -1,230 +1,230 @@
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Copyright (C) 2009 Low Heng Sin *
|
* Copyright (C) 2009 Low Heng Sin *
|
||||||
* Copyright (C) 2009 Idalica Corporation *
|
* Copyright (C) 2009 Idalica Corporation *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* This program is free software; you can redistribute it and/or modify it *
|
||||||
* under the terms version 2 of the GNU General Public License as published *
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
* by the Free Software Foundation. This program is distributed in the hope *
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
* See the GNU General Public License for more details. *
|
* See the GNU General Public License for more details. *
|
||||||
* You should have received a copy of the GNU General Public License along *
|
* You should have received a copy of the GNU General Public License along *
|
||||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.form;
|
package balinusa.midsuit.form;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.compiere.apps.IStatusBar;
|
import org.compiere.apps.IStatusBar;
|
||||||
import org.compiere.grid.CreateFrom;
|
import org.compiere.grid.CreateFrom;
|
||||||
import org.compiere.minigrid.IMiniTable;
|
import org.compiere.minigrid.IMiniTable;
|
||||||
import org.compiere.model.GridTab;
|
import org.compiere.model.GridTab;
|
||||||
import org.compiere.model.MInOutLine;
|
import org.compiere.model.MInOutLine;
|
||||||
import org.compiere.model.MInOutLineMA;
|
import org.compiere.model.MInOutLineMA;
|
||||||
import org.compiere.model.MRMA;
|
import org.compiere.model.MRMA;
|
||||||
import org.compiere.model.MRMALine;
|
import org.compiere.model.MRMALine;
|
||||||
import org.compiere.model.MStorageOnHand;
|
import org.compiere.model.MStorageOnHand;
|
||||||
import org.compiere.model.Query;
|
import org.compiere.model.Query;
|
||||||
import org.compiere.model.X_M_InOutLineMA;
|
import org.compiere.model.X_M_InOutLineMA;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.KeyNamePair;
|
import org.compiere.util.KeyNamePair;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
|
|
||||||
import andromedia.midsuit.model.X_C_OrderLineMA;
|
import balinusa.midsuit.model.X_C_OrderLineMA;
|
||||||
import andromedia.midsuit.model.X_M_RMAMA;
|
import balinusa.midsuit.model.X_M_RMAMA;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create Transactions for RMA
|
* Create Transactions for RMA
|
||||||
* @author ashley
|
* @author ashley
|
||||||
* @author Teo Sarca, www.arhipac.ro
|
* @author Teo Sarca, www.arhipac.ro
|
||||||
* <li>BF [ 2007837 ] VCreateFrom.save() should run in trx
|
* <li>BF [ 2007837 ] VCreateFrom.save() should run in trx
|
||||||
*/
|
*/
|
||||||
public abstract class MID_CreateFromRMA extends CreateFrom {
|
public abstract class MID_CreateFromRMA extends CreateFrom {
|
||||||
|
|
||||||
public MID_CreateFromRMA(GridTab mTab)
|
public MID_CreateFromRMA(GridTab mTab)
|
||||||
{
|
{
|
||||||
super(mTab);
|
super(mTab);
|
||||||
if (log.isLoggable(Level.INFO)) log.info(mTab.toString());
|
if (log.isLoggable(Level.INFO)) log.info(mTab.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean dynInit() throws Exception
|
public boolean dynInit() throws Exception
|
||||||
{
|
{
|
||||||
log.config("");
|
log.config("");
|
||||||
setTitle(Msg.getElement(Env.getCtx(), "M_RMA_ID") + " .. " + Msg.translate(Env.getCtx(), "CreateFrom"));
|
setTitle(Msg.getElement(Env.getCtx(), "M_RMA_ID") + " .. " + Msg.translate(Env.getCtx(), "CreateFrom"));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Vector<Vector<Object>> getRMAData()
|
protected Vector<Vector<Object>> getRMAData()
|
||||||
{
|
{
|
||||||
int M_InOut_ID = Env.getContextAsInt(Env.getCtx(), getGridTab().getWindowNo(), "InOut_ID");
|
int M_InOut_ID = Env.getContextAsInt(Env.getCtx(), getGridTab().getWindowNo(), "InOut_ID");
|
||||||
int M_RMA_ID = Env.getContextAsInt(Env.getCtx(), getGridTab().getWindowNo(), "M_RMA_ID");
|
int M_RMA_ID = Env.getContextAsInt(Env.getCtx(), getGridTab().getWindowNo(), "M_RMA_ID");
|
||||||
|
|
||||||
Vector<Vector<Object>> data = new Vector<Vector<Object>>();
|
Vector<Vector<Object>> data = new Vector<Vector<Object>>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1 M_InOutLine_ID
|
* 1 M_InOutLine_ID
|
||||||
* 2 Line
|
* 2 Line
|
||||||
* 3 Product Name
|
* 3 Product Name
|
||||||
* 4 Qty Entered
|
* 4 Qty Entered
|
||||||
* 5 Movement Qty
|
* 5 Movement Qty
|
||||||
* 6 ASI
|
* 6 ASI
|
||||||
*/
|
*/
|
||||||
StringBuilder sqlStmt = new StringBuilder();
|
StringBuilder sqlStmt = new StringBuilder();
|
||||||
|
|
||||||
sqlStmt.append("SELECT iol.M_InOutLine_ID, iol.Line, ");
|
sqlStmt.append("SELECT iol.M_InOutLine_ID, iol.Line, ");
|
||||||
sqlStmt.append("COALESCE(p.Name, c.Name) AS ProductName, ");
|
sqlStmt.append("COALESCE(p.Name, c.Name) AS ProductName, ");
|
||||||
sqlStmt.append("iol.QtyEntered, ");
|
sqlStmt.append("iol.QtyEntered, ");
|
||||||
sqlStmt.append("iol.movementQty-(SELECT COALESCE((SELECT SUM(rmal.qty) FROM M_RMALine rmal JOIN M_RMA rma ON rma.M_RMA_ID=rmal.M_RMA_ID WHERE rmal.M_InOutLine_ID=iol.M_InOutLine_ID AND rma.DocStatus IN ('CO','CL')),0)) AS MovementQty, ");
|
sqlStmt.append("iol.movementQty-(SELECT COALESCE((SELECT SUM(rmal.qty) FROM M_RMALine rmal JOIN M_RMA rma ON rma.M_RMA_ID=rmal.M_RMA_ID WHERE rmal.M_InOutLine_ID=iol.M_InOutLine_ID AND rma.DocStatus IN ('CO','CL')),0)) AS MovementQty, ");
|
||||||
sqlStmt.append("CASE WHEN iol.M_AttributeSetInstance_ID IS NOT NULL THEN (SELECT SerNo FROM M_AttributeSetInstance asi WHERE asi.M_AttributeSetInstance_ID=iol.M_AttributeSetInstance_ID) END as ASI, ");
|
sqlStmt.append("CASE WHEN iol.M_AttributeSetInstance_ID IS NOT NULL THEN (SELECT SerNo FROM M_AttributeSetInstance asi WHERE asi.M_AttributeSetInstance_ID=iol.M_AttributeSetInstance_ID) END as ASI, ");
|
||||||
sqlStmt.append("iol.Description " );
|
sqlStmt.append("iol.Description " );
|
||||||
sqlStmt.append("FROM M_InOutLine iol ");
|
sqlStmt.append("FROM M_InOutLine iol ");
|
||||||
sqlStmt.append("LEFT JOIN M_Product p ON p.M_Product_ID = iol.M_Product_ID ");
|
sqlStmt.append("LEFT JOIN M_Product p ON p.M_Product_ID = iol.M_Product_ID ");
|
||||||
sqlStmt.append("LEFT JOIN C_Charge c ON c.C_Charge_ID = iol.C_Charge_ID ");
|
sqlStmt.append("LEFT JOIN C_Charge c ON c.C_Charge_ID = iol.C_Charge_ID ");
|
||||||
sqlStmt.append("WHERE M_InOut_ID=? ");
|
sqlStmt.append("WHERE M_InOut_ID=? ");
|
||||||
sqlStmt.append("AND iol.M_InOutLine_ID NOT IN (SELECT rmal.M_InOutLine_ID FROM M_RMALine rmal WHERE rmal.M_RMA_ID=?)");
|
sqlStmt.append("AND iol.M_InOutLine_ID NOT IN (SELECT rmal.M_InOutLine_ID FROM M_RMALine rmal WHERE rmal.M_RMA_ID=?)");
|
||||||
sqlStmt.append(" ORDER BY iol.Line " );
|
sqlStmt.append(" ORDER BY iol.Line " );
|
||||||
|
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
pstmt = DB.prepareStatement(sqlStmt.toString(), null);
|
pstmt = DB.prepareStatement(sqlStmt.toString(), null);
|
||||||
pstmt.setInt(1, M_InOut_ID);
|
pstmt.setInt(1, M_InOut_ID);
|
||||||
pstmt.setInt(2, M_RMA_ID);
|
pstmt.setInt(2, M_RMA_ID);
|
||||||
rs = pstmt.executeQuery();
|
rs = pstmt.executeQuery();
|
||||||
while (rs.next())
|
while (rs.next())
|
||||||
{
|
{
|
||||||
Vector<Object> line = new Vector<Object>(8);
|
Vector<Object> line = new Vector<Object>(8);
|
||||||
line.add(new Boolean(false)); // 0-Selection
|
line.add(new Boolean(false)); // 0-Selection
|
||||||
|
|
||||||
KeyNamePair lineKNPair = new KeyNamePair(rs.getInt(1), rs.getString(2)); // 1-Line
|
KeyNamePair lineKNPair = new KeyNamePair(rs.getInt(1), rs.getString(2)); // 1-Line
|
||||||
line.add(lineKNPair);
|
line.add(lineKNPair);
|
||||||
line.add(rs.getString(3)); //2-Product
|
line.add(rs.getString(3)); //2-Product
|
||||||
line.add(rs.getString(6)); //3-ASI
|
line.add(rs.getString(6)); //3-ASI
|
||||||
|
|
||||||
BigDecimal qtyEntered = rs.getBigDecimal(4);
|
BigDecimal qtyEntered = rs.getBigDecimal(4);
|
||||||
BigDecimal movementQty = rs.getBigDecimal(5);
|
BigDecimal movementQty = rs.getBigDecimal(5);
|
||||||
|
|
||||||
line.add(qtyEntered); //4-Qty
|
line.add(qtyEntered); //4-Qty
|
||||||
line.add(movementQty); //5-Movement Qty
|
line.add(movementQty); //5-Movement Qty
|
||||||
|
|
||||||
line.add(rs.getString(7)); // 6 - Description
|
line.add(rs.getString(7)); // 6 - Description
|
||||||
data.add(line);
|
data.add(line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (SQLException e)
|
catch (SQLException e)
|
||||||
{
|
{
|
||||||
log.log(Level.SEVERE, sqlStmt.toString(), e);
|
log.log(Level.SEVERE, sqlStmt.toString(), e);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
DB.close(rs, pstmt);
|
DB.close(rs, pstmt);
|
||||||
rs = null;
|
rs = null;
|
||||||
pstmt = null;
|
pstmt = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void info(IMiniTable miniTable, IStatusBar statusBar)
|
public void info(IMiniTable miniTable, IStatusBar statusBar)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void configureMiniTable (IMiniTable miniTable)
|
protected void configureMiniTable (IMiniTable miniTable)
|
||||||
{
|
{
|
||||||
miniTable.setColumnClass(0, Boolean.class, false); // 0-Selection
|
miniTable.setColumnClass(0, Boolean.class, false); // 0-Selection
|
||||||
miniTable.setColumnClass(1, String.class, true); // 1-Line
|
miniTable.setColumnClass(1, String.class, true); // 1-Line
|
||||||
miniTable.setColumnClass(2, String.class, true); // 2-Product
|
miniTable.setColumnClass(2, String.class, true); // 2-Product
|
||||||
miniTable.setColumnClass(3, String.class, true); // 3-ASI
|
miniTable.setColumnClass(3, String.class, true); // 3-ASI
|
||||||
miniTable.setColumnClass(4, BigDecimal.class, true); // 4-Qty
|
miniTable.setColumnClass(4, BigDecimal.class, true); // 4-Qty
|
||||||
miniTable.setColumnClass(5, BigDecimal.class, false); // 5-Delivered Qty
|
miniTable.setColumnClass(5, BigDecimal.class, false); // 5-Delivered Qty
|
||||||
miniTable.setColumnClass(6, String.class, true); // 6-Description
|
miniTable.setColumnClass(6, String.class, true); // 6-Description
|
||||||
|
|
||||||
// Table UI
|
// Table UI
|
||||||
miniTable.autoSize();
|
miniTable.autoSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean save(IMiniTable miniTable, String trxName)
|
public boolean save(IMiniTable miniTable, String trxName)
|
||||||
{
|
{
|
||||||
log.config("");
|
log.config("");
|
||||||
int M_RMA_ID = Env.getContextAsInt(Env.getCtx(), getGridTab().getWindowNo(), "M_RMA_ID");
|
int M_RMA_ID = Env.getContextAsInt(Env.getCtx(), getGridTab().getWindowNo(), "M_RMA_ID");
|
||||||
|
|
||||||
// Integer bpId = (Integer)bPartnerField.getValue();
|
// Integer bpId = (Integer)bPartnerField.getValue();
|
||||||
MRMA rma = new MRMA(Env.getCtx(), M_RMA_ID, trxName);
|
MRMA rma = new MRMA(Env.getCtx(), M_RMA_ID, trxName);
|
||||||
//update BP
|
//update BP
|
||||||
// rma.setC_BPartner_ID(bpId);
|
// rma.setC_BPartner_ID(bpId);
|
||||||
|
|
||||||
for (int i = 0; i < miniTable.getRowCount(); i++)
|
for (int i = 0; i < miniTable.getRowCount(); i++)
|
||||||
{
|
{
|
||||||
if (((Boolean)miniTable.getValueAt(i, 0)).booleanValue())
|
if (((Boolean)miniTable.getValueAt(i, 0)).booleanValue())
|
||||||
{
|
{
|
||||||
BigDecimal d = (BigDecimal)miniTable.getValueAt(i, 5); // 5-Movement Qty
|
BigDecimal d = (BigDecimal)miniTable.getValueAt(i, 5); // 5-Movement Qty
|
||||||
KeyNamePair pp = (KeyNamePair)miniTable.getValueAt(i, 1); // 1-Line
|
KeyNamePair pp = (KeyNamePair)miniTable.getValueAt(i, 1); // 1-Line
|
||||||
|
|
||||||
int inOutLineId = pp.getKey();
|
int inOutLineId = pp.getKey();
|
||||||
MInOutLine iol = new MInOutLine(rma.getCtx(), inOutLineId, rma.get_TrxName());
|
MInOutLine iol = new MInOutLine(rma.getCtx(), inOutLineId, rma.get_TrxName());
|
||||||
MRMALine rmaLine = new MRMALine(rma.getCtx(), 0, rma.get_TrxName());
|
MRMALine rmaLine = new MRMALine(rma.getCtx(), 0, rma.get_TrxName());
|
||||||
rmaLine.setM_RMA_ID(M_RMA_ID);
|
rmaLine.setM_RMA_ID(M_RMA_ID);
|
||||||
rmaLine.setM_InOutLine_ID(inOutLineId);
|
rmaLine.setM_InOutLine_ID(inOutLineId);
|
||||||
rmaLine.setQty(d);
|
rmaLine.setQty(d);
|
||||||
rmaLine.setAD_Org_ID(rma.getAD_Org_ID());
|
rmaLine.setAD_Org_ID(rma.getAD_Org_ID());
|
||||||
rmaLine.setDescription((String)miniTable.getValueAt(i, 6));
|
rmaLine.setDescription((String)miniTable.getValueAt(i, 6));
|
||||||
if (!rmaLine.save())
|
if (!rmaLine.save())
|
||||||
{
|
{
|
||||||
throw new IllegalStateException("Could not create RMA Line");
|
throw new IllegalStateException("Could not create RMA Line");
|
||||||
}
|
}
|
||||||
List<MInOutLineMA> attLines = new Query(Env.getCtx(), X_M_InOutLineMA.Table_Name, "M_InOutLine_ID =?", trxName)
|
List<MInOutLineMA> attLines = new Query(Env.getCtx(), X_M_InOutLineMA.Table_Name, "M_InOutLine_ID =?", trxName)
|
||||||
.setParameters(new Object[] { inOutLineId })
|
.setParameters(new Object[] { inOutLineId })
|
||||||
.setOnlyActiveRecords(true)
|
.setOnlyActiveRecords(true)
|
||||||
.list();
|
.list();
|
||||||
log.severe(iol.getM_AttributeSetInstance_ID()+" ");
|
log.severe(iol.getM_AttributeSetInstance_ID()+" ");
|
||||||
if(attLines.size()<=0)
|
if(attLines.size()<=0)
|
||||||
rmaLine.set_ValueNoCheck("M_AttributeSetInstance_ID", iol.getM_AttributeSetInstance_ID());
|
rmaLine.set_ValueNoCheck("M_AttributeSetInstance_ID", iol.getM_AttributeSetInstance_ID());
|
||||||
else {
|
else {
|
||||||
for(MInOutLineMA attLine : attLines) {
|
for(MInOutLineMA attLine : attLines) {
|
||||||
X_M_RMAMA inoutAtt = new X_M_RMAMA(rma.getCtx(), 0, rma.get_TrxName());
|
X_M_RMAMA inoutAtt = new X_M_RMAMA(rma.getCtx(), 0, rma.get_TrxName());
|
||||||
inoutAtt.setAD_Org_ID(attLine.getAD_Org_ID());
|
inoutAtt.setAD_Org_ID(attLine.getAD_Org_ID());
|
||||||
inoutAtt.setM_InOutLine_ID(iol.getM_InOutLine_ID());
|
inoutAtt.setM_InOutLine_ID(iol.getM_InOutLine_ID());
|
||||||
inoutAtt.setM_RMALine_ID(rmaLine.get_ID());
|
inoutAtt.setM_RMALine_ID(rmaLine.get_ID());
|
||||||
inoutAtt.setIsAutoGenerated(false);
|
inoutAtt.setIsAutoGenerated(false);
|
||||||
inoutAtt.setM_AttributeSetInstance_ID(attLine.getM_AttributeSetInstance_ID());
|
inoutAtt.setM_AttributeSetInstance_ID(attLine.getM_AttributeSetInstance_ID());
|
||||||
inoutAtt.setMovementQty(attLine.getMovementQty());
|
inoutAtt.setMovementQty(attLine.getMovementQty());
|
||||||
inoutAtt.setDateMaterialPolicy(attLine.getDateMaterialPolicy());
|
inoutAtt.setDateMaterialPolicy(attLine.getDateMaterialPolicy());
|
||||||
inoutAtt.saveEx();
|
inoutAtt.saveEx();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rma.saveEx();
|
rma.saveEx();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Vector<String> getOISColumnNames()
|
protected Vector<String> getOISColumnNames()
|
||||||
{
|
{
|
||||||
// Header Info
|
// Header Info
|
||||||
Vector<String> columnNames = new Vector<String>(7);
|
Vector<String> columnNames = new Vector<String>(7);
|
||||||
columnNames.add(Msg.getMsg(Env.getCtx(), "Select"));
|
columnNames.add(Msg.getMsg(Env.getCtx(), "Select"));
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "Line"));
|
columnNames.add(Msg.translate(Env.getCtx(), "Line"));
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "M_Product_ID"));
|
columnNames.add(Msg.translate(Env.getCtx(), "M_Product_ID"));
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "SerNo"));
|
columnNames.add(Msg.translate(Env.getCtx(), "SerNo"));
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "Quantity"));
|
columnNames.add(Msg.translate(Env.getCtx(), "Quantity"));
|
||||||
columnNames.add(Msg.getElement(Env.getCtx(), "QtyDelivered", false));
|
columnNames.add(Msg.getElement(Env.getCtx(), "QtyDelivered", false));
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "Description"));
|
columnNames.add(Msg.translate(Env.getCtx(), "Description"));
|
||||||
|
|
||||||
return columnNames;
|
return columnNames;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.form;
|
package balinusa.midsuit.form;
|
||||||
|
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
package andromedia.midsuit.form;
|
package balinusa.midsuit.form;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
|
|
@ -50,8 +50,8 @@ import org.compiere.util.Env;
|
||||||
import org.compiere.util.KeyNamePair;
|
import org.compiere.util.KeyNamePair;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
|
|
||||||
import andromedia.midsuit.model.X_C_OrderLineMA;
|
import balinusa.midsuit.model.X_C_OrderLineMA;
|
||||||
import andromedia.midsuit.model.X_M_RMAMA;
|
import balinusa.midsuit.model.X_M_RMAMA;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create Invoice Transactions from PO Orders or Receipt
|
* Create Invoice Transactions from PO Orders or Receipt
|
||||||
|
|
@ -1,475 +1,475 @@
|
||||||
package andromedia.midsuit.form;
|
package balinusa.midsuit.form;
|
||||||
|
|
||||||
import static org.compiere.model.SystemIDs.COLUMN_C_INVOICE_C_BPARTNER_ID;
|
import static org.compiere.model.SystemIDs.COLUMN_C_INVOICE_C_BPARTNER_ID;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.adempiere.webui.ClientInfo;
|
import org.adempiere.webui.ClientInfo;
|
||||||
import org.adempiere.webui.LayoutUtils;
|
import org.adempiere.webui.LayoutUtils;
|
||||||
import org.adempiere.webui.apps.AEnv;
|
import org.adempiere.webui.apps.AEnv;
|
||||||
import org.adempiere.webui.apps.form.WCreateFromInvoiceUI;
|
import org.adempiere.webui.apps.form.WCreateFromInvoiceUI;
|
||||||
import org.adempiere.webui.apps.form.WCreateFromWindow;
|
import org.adempiere.webui.apps.form.WCreateFromWindow;
|
||||||
import org.adempiere.webui.component.Column;
|
import org.adempiere.webui.component.Column;
|
||||||
import org.adempiere.webui.component.Columns;
|
import org.adempiere.webui.component.Columns;
|
||||||
import org.adempiere.webui.component.Grid;
|
import org.adempiere.webui.component.Grid;
|
||||||
import org.adempiere.webui.component.GridFactory;
|
import org.adempiere.webui.component.GridFactory;
|
||||||
import org.adempiere.webui.component.Label;
|
import org.adempiere.webui.component.Label;
|
||||||
import org.adempiere.webui.component.ListItem;
|
import org.adempiere.webui.component.ListItem;
|
||||||
import org.adempiere.webui.component.ListModelTable;
|
import org.adempiere.webui.component.ListModelTable;
|
||||||
import org.adempiere.webui.component.Listbox;
|
import org.adempiere.webui.component.Listbox;
|
||||||
import org.adempiere.webui.component.ListboxFactory;
|
import org.adempiere.webui.component.ListboxFactory;
|
||||||
import org.adempiere.webui.component.Panel;
|
import org.adempiere.webui.component.Panel;
|
||||||
import org.adempiere.webui.component.Row;
|
import org.adempiere.webui.component.Row;
|
||||||
import org.adempiere.webui.component.Rows;
|
import org.adempiere.webui.component.Rows;
|
||||||
import org.adempiere.webui.editor.WEditor;
|
import org.adempiere.webui.editor.WEditor;
|
||||||
import org.adempiere.webui.editor.WSearchEditor;
|
import org.adempiere.webui.editor.WSearchEditor;
|
||||||
import org.adempiere.webui.event.ValueChangeEvent;
|
import org.adempiere.webui.event.ValueChangeEvent;
|
||||||
import org.adempiere.webui.event.ValueChangeListener;
|
import org.adempiere.webui.event.ValueChangeListener;
|
||||||
import org.adempiere.webui.util.ZKUpdateUtil;
|
import org.adempiere.webui.util.ZKUpdateUtil;
|
||||||
import org.compiere.grid.CreateFromInvoice;
|
import org.compiere.grid.CreateFromInvoice;
|
||||||
import org.compiere.model.GridTab;
|
import org.compiere.model.GridTab;
|
||||||
import org.compiere.model.MDocType;
|
import org.compiere.model.MDocType;
|
||||||
import org.compiere.model.MLookup;
|
import org.compiere.model.MLookup;
|
||||||
import org.compiere.model.MLookupFactory;
|
import org.compiere.model.MLookupFactory;
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.DisplayType;
|
import org.compiere.util.DisplayType;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.KeyNamePair;
|
import org.compiere.util.KeyNamePair;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
import org.zkoss.zk.ui.Component;
|
import org.zkoss.zk.ui.Component;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zk.ui.event.EventListener;
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
import org.zkoss.zul.Space;
|
import org.zkoss.zul.Space;
|
||||||
|
|
||||||
public class MID_WCreateFromInvoice extends MID_CreateFromInvoice implements EventListener<Event>, ValueChangeListener
|
public class MID_WCreateFromInvoice extends MID_CreateFromInvoice implements EventListener<Event>, ValueChangeListener
|
||||||
{
|
{
|
||||||
private WCreateFromWindow window;
|
private WCreateFromWindow window;
|
||||||
|
|
||||||
public MID_WCreateFromInvoice(GridTab tab)
|
public MID_WCreateFromInvoice(GridTab tab)
|
||||||
{
|
{
|
||||||
super(tab);
|
super(tab);
|
||||||
log.info(getGridTab().toString());
|
log.info(getGridTab().toString());
|
||||||
|
|
||||||
window = new WCreateFromWindow(this, getGridTab().getWindowNo());
|
window = new WCreateFromWindow(this, getGridTab().getWindowNo());
|
||||||
|
|
||||||
p_WindowNo = getGridTab().getWindowNo();
|
p_WindowNo = getGridTab().getWindowNo();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!dynInit())
|
if (!dynInit())
|
||||||
return;
|
return;
|
||||||
zkInit();
|
zkInit();
|
||||||
setInitOK(true);
|
setInitOK(true);
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
log.log(Level.SEVERE, "", e);
|
log.log(Level.SEVERE, "", e);
|
||||||
setInitOK(false);
|
setInitOK(false);
|
||||||
}
|
}
|
||||||
AEnv.showWindow(window);
|
AEnv.showWindow(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Window No */
|
/** Window No */
|
||||||
private int p_WindowNo;
|
private int p_WindowNo;
|
||||||
|
|
||||||
/** Logger */
|
/** Logger */
|
||||||
private CLogger log = CLogger.getCLogger(getClass());
|
private CLogger log = CLogger.getCLogger(getClass());
|
||||||
|
|
||||||
protected Label bPartnerLabel = new Label();
|
protected Label bPartnerLabel = new Label();
|
||||||
protected WEditor bPartnerField;
|
protected WEditor bPartnerField;
|
||||||
|
|
||||||
protected Label orderLabel = new Label();
|
protected Label orderLabel = new Label();
|
||||||
protected Listbox orderField = ListboxFactory.newDropdownListbox();
|
protected Listbox orderField = ListboxFactory.newDropdownListbox();
|
||||||
|
|
||||||
protected Label shipmentLabel = new Label();
|
protected Label shipmentLabel = new Label();
|
||||||
protected Listbox shipmentField = ListboxFactory.newDropdownListbox();
|
protected Listbox shipmentField = ListboxFactory.newDropdownListbox();
|
||||||
|
|
||||||
/** Label for the rma selection */
|
/** Label for the rma selection */
|
||||||
protected Label rmaLabel = new Label();
|
protected Label rmaLabel = new Label();
|
||||||
/** Combo box for selecting RMA document */
|
/** Combo box for selecting RMA document */
|
||||||
protected Listbox rmaField = ListboxFactory.newDropdownListbox();
|
protected Listbox rmaField = ListboxFactory.newDropdownListbox();
|
||||||
|
|
||||||
private Grid parameterStdLayout;
|
private Grid parameterStdLayout;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dynamic Init
|
* Dynamic Init
|
||||||
* @throws Exception if Lookups cannot be initialized
|
* @throws Exception if Lookups cannot be initialized
|
||||||
* @return true if initialized
|
* @return true if initialized
|
||||||
*/
|
*/
|
||||||
public boolean dynInit() throws Exception
|
public boolean dynInit() throws Exception
|
||||||
{
|
{
|
||||||
log.config("");
|
log.config("");
|
||||||
|
|
||||||
super.dynInit();
|
super.dynInit();
|
||||||
|
|
||||||
window.setTitle(getTitle());
|
window.setTitle(getTitle());
|
||||||
|
|
||||||
// RMA Selection option should only be available for AP Credit Memo
|
// RMA Selection option should only be available for AP Credit Memo
|
||||||
Integer docTypeId = (Integer)getGridTab().getValue("C_DocTypeTarget_ID");
|
Integer docTypeId = (Integer)getGridTab().getValue("C_DocTypeTarget_ID");
|
||||||
MDocType docType = MDocType.get(Env.getCtx(), docTypeId);
|
MDocType docType = MDocType.get(Env.getCtx(), docTypeId);
|
||||||
if (!MDocType.DOCBASETYPE_APCreditMemo.equals(docType.getDocBaseType()) && !MDocType.DOCBASETYPE_ARCreditMemo.equals(docType.getDocBaseType()))
|
if (!MDocType.DOCBASETYPE_APCreditMemo.equals(docType.getDocBaseType()) && !MDocType.DOCBASETYPE_ARCreditMemo.equals(docType.getDocBaseType()))
|
||||||
{
|
{
|
||||||
rmaLabel.setVisible(false);
|
rmaLabel.setVisible(false);
|
||||||
rmaField.setVisible(false);
|
rmaField.setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
initBPartner(true);
|
initBPartner(true);
|
||||||
bPartnerField.addValueChangeListener(this);
|
bPartnerField.addValueChangeListener(this);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} // dynInit
|
} // dynInit
|
||||||
|
|
||||||
protected void zkInit() throws Exception
|
protected void zkInit() throws Exception
|
||||||
{
|
{
|
||||||
bPartnerLabel.setText(Msg.getElement(Env.getCtx(), "C_BPartner_ID"));
|
bPartnerLabel.setText(Msg.getElement(Env.getCtx(), "C_BPartner_ID"));
|
||||||
orderLabel.setText(Msg.getElement(Env.getCtx(), "C_Order_ID", isSOTrx));
|
orderLabel.setText(Msg.getElement(Env.getCtx(), "C_Order_ID", isSOTrx));
|
||||||
shipmentLabel.setText(Msg.getElement(Env.getCtx(), "M_InOut_ID", isSOTrx));
|
shipmentLabel.setText(Msg.getElement(Env.getCtx(), "M_InOut_ID", isSOTrx));
|
||||||
rmaLabel.setText(Msg.translate(Env.getCtx(), "M_RMA_ID"));
|
rmaLabel.setText(Msg.translate(Env.getCtx(), "M_RMA_ID"));
|
||||||
|
|
||||||
Panel parameterPanel = window.getParameterPanel();
|
Panel parameterPanel = window.getParameterPanel();
|
||||||
|
|
||||||
parameterStdLayout = GridFactory.newGridLayout();
|
parameterStdLayout = GridFactory.newGridLayout();
|
||||||
Panel parameterStdPanel = new Panel();
|
Panel parameterStdPanel = new Panel();
|
||||||
parameterStdPanel.appendChild(parameterStdLayout);
|
parameterStdPanel.appendChild(parameterStdLayout);
|
||||||
|
|
||||||
setupColumns(parameterStdLayout);
|
setupColumns(parameterStdLayout);
|
||||||
|
|
||||||
parameterPanel.appendChild(parameterStdPanel);
|
parameterPanel.appendChild(parameterStdPanel);
|
||||||
ZKUpdateUtil.setVflex(parameterStdLayout, "min");
|
ZKUpdateUtil.setVflex(parameterStdLayout, "min");
|
||||||
|
|
||||||
Rows rows = (Rows) parameterStdLayout.newRows();
|
Rows rows = (Rows) parameterStdLayout.newRows();
|
||||||
Row row = rows.newRow();
|
Row row = rows.newRow();
|
||||||
row.appendChild(bPartnerLabel.rightAlign());
|
row.appendChild(bPartnerLabel.rightAlign());
|
||||||
if (bPartnerField != null)
|
if (bPartnerField != null)
|
||||||
row.appendChild(bPartnerField.getComponent());
|
row.appendChild(bPartnerField.getComponent());
|
||||||
row.appendChild(orderLabel.rightAlign());
|
row.appendChild(orderLabel.rightAlign());
|
||||||
ZKUpdateUtil.setHflex(orderField, "1");
|
ZKUpdateUtil.setHflex(orderField, "1");
|
||||||
row.appendChild(orderField);
|
row.appendChild(orderField);
|
||||||
|
|
||||||
row = rows.newRow();
|
row = rows.newRow();
|
||||||
row.appendChild(new Space());
|
row.appendChild(new Space());
|
||||||
row.appendChild(new Space());
|
row.appendChild(new Space());
|
||||||
row.appendChild(shipmentLabel.rightAlign());
|
row.appendChild(shipmentLabel.rightAlign());
|
||||||
ZKUpdateUtil.setHflex(shipmentField, "1");
|
ZKUpdateUtil.setHflex(shipmentField, "1");
|
||||||
row.appendChild(shipmentField);
|
row.appendChild(shipmentField);
|
||||||
|
|
||||||
// Add RMA document selection to panel
|
// Add RMA document selection to panel
|
||||||
row = rows.newRow();
|
row = rows.newRow();
|
||||||
row.appendChild(new Space());
|
row.appendChild(new Space());
|
||||||
row.appendChild(new Space());
|
row.appendChild(new Space());
|
||||||
row.appendChild(rmaLabel.rightAlign());
|
row.appendChild(rmaLabel.rightAlign());
|
||||||
ZKUpdateUtil.setHflex(rmaField, "1");
|
ZKUpdateUtil.setHflex(rmaField, "1");
|
||||||
row.appendChild(rmaField);
|
row.appendChild(rmaField);
|
||||||
|
|
||||||
if (ClientInfo.isMobile()) {
|
if (ClientInfo.isMobile()) {
|
||||||
if (noOfParameterColumn == 2)
|
if (noOfParameterColumn == 2)
|
||||||
LayoutUtils.compactTo(parameterStdLayout, 2);
|
LayoutUtils.compactTo(parameterStdLayout, 2);
|
||||||
ClientInfo.onClientInfo(window, this::onClientInfo);
|
ClientInfo.onClientInfo(window, this::onClientInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
hideEmptyRow(rows);
|
hideEmptyRow(rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void hideEmptyRow(org.zkoss.zul.Rows rows) {
|
private void hideEmptyRow(org.zkoss.zul.Rows rows) {
|
||||||
for(Component a : rows.getChildren()) {
|
for(Component a : rows.getChildren()) {
|
||||||
Row row = (Row) a;
|
Row row = (Row) a;
|
||||||
boolean visible = false;
|
boolean visible = false;
|
||||||
for(Component b : row.getChildren()) {
|
for(Component b : row.getChildren()) {
|
||||||
if (b instanceof Space)
|
if (b instanceof Space)
|
||||||
continue;
|
continue;
|
||||||
else if (!b.isVisible()) {
|
else if (!b.isVisible()) {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
if (!b.getChildren().isEmpty()) {
|
if (!b.getChildren().isEmpty()) {
|
||||||
for (Component c : b.getChildren()) {
|
for (Component c : b.getChildren()) {
|
||||||
if (c.isVisible()) {
|
if (c.isVisible()) {
|
||||||
visible = true;
|
visible = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
visible = true;
|
visible = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
row.setVisible(visible);
|
row.setVisible(visible);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean m_actionActive = false;
|
private boolean m_actionActive = false;
|
||||||
|
|
||||||
private int noOfParameterColumn;
|
private int noOfParameterColumn;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Action Listener
|
* Action Listener
|
||||||
* @param e event
|
* @param e event
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public void onEvent(Event e) throws Exception
|
public void onEvent(Event e) throws Exception
|
||||||
{
|
{
|
||||||
if (m_actionActive)
|
if (m_actionActive)
|
||||||
return;
|
return;
|
||||||
m_actionActive = true;
|
m_actionActive = true;
|
||||||
|
|
||||||
// Order
|
// Order
|
||||||
if (e.getTarget().equals(orderField))
|
if (e.getTarget().equals(orderField))
|
||||||
{
|
{
|
||||||
ListItem li = orderField.getSelectedItem();
|
ListItem li = orderField.getSelectedItem();
|
||||||
int C_Order_ID = 0;
|
int C_Order_ID = 0;
|
||||||
if (li != null && li.getValue() != null)
|
if (li != null && li.getValue() != null)
|
||||||
C_Order_ID = ((Integer) li.getValue()).intValue();
|
C_Order_ID = ((Integer) li.getValue()).intValue();
|
||||||
// set Invoice, RMA and Shipment to Null
|
// set Invoice, RMA and Shipment to Null
|
||||||
rmaField.setSelectedIndex(-1);
|
rmaField.setSelectedIndex(-1);
|
||||||
shipmentField.setSelectedIndex(-1);
|
shipmentField.setSelectedIndex(-1);
|
||||||
loadOrder(C_Order_ID, true);
|
loadOrder(C_Order_ID, true);
|
||||||
}
|
}
|
||||||
// Shipment
|
// Shipment
|
||||||
else if (e.getTarget().equals(shipmentField))
|
else if (e.getTarget().equals(shipmentField))
|
||||||
{
|
{
|
||||||
ListItem li = shipmentField.getSelectedItem();
|
ListItem li = shipmentField.getSelectedItem();
|
||||||
int M_InOut_ID = 0;
|
int M_InOut_ID = 0;
|
||||||
if (li != null && li.getValue() != null)
|
if (li != null && li.getValue() != null)
|
||||||
M_InOut_ID = ((Integer) li.getValue()).intValue();
|
M_InOut_ID = ((Integer) li.getValue()).intValue();
|
||||||
// set Order, RMA and Invoice to Null
|
// set Order, RMA and Invoice to Null
|
||||||
orderField.setSelectedIndex(-1);
|
orderField.setSelectedIndex(-1);
|
||||||
rmaField.setSelectedIndex(-1);
|
rmaField.setSelectedIndex(-1);
|
||||||
loadShipment(M_InOut_ID);
|
loadShipment(M_InOut_ID);
|
||||||
}
|
}
|
||||||
// RMA
|
// RMA
|
||||||
else if (e.getTarget().equals(rmaField))
|
else if (e.getTarget().equals(rmaField))
|
||||||
{
|
{
|
||||||
ListItem li = rmaField.getSelectedItem();
|
ListItem li = rmaField.getSelectedItem();
|
||||||
int M_RMA_ID = 0;
|
int M_RMA_ID = 0;
|
||||||
if (li != null && li.getValue() != null)
|
if (li != null && li.getValue() != null)
|
||||||
M_RMA_ID = ((Integer) li.getValue()).intValue();
|
M_RMA_ID = ((Integer) li.getValue()).intValue();
|
||||||
// set Order and Invoice to Null
|
// set Order and Invoice to Null
|
||||||
orderField.setSelectedIndex(-1);
|
orderField.setSelectedIndex(-1);
|
||||||
shipmentField.setSelectedIndex(-1);
|
shipmentField.setSelectedIndex(-1);
|
||||||
loadRMA(M_RMA_ID);
|
loadRMA(M_RMA_ID);
|
||||||
}
|
}
|
||||||
m_actionActive = false;
|
m_actionActive = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change Listener
|
* Change Listener
|
||||||
* @param e event
|
* @param e event
|
||||||
*/
|
*/
|
||||||
public void valueChange (ValueChangeEvent e)
|
public void valueChange (ValueChangeEvent e)
|
||||||
{
|
{
|
||||||
if (log.isLoggable(Level.CONFIG)) log.config(e.getPropertyName() + "=" + e.getNewValue());
|
if (log.isLoggable(Level.CONFIG)) log.config(e.getPropertyName() + "=" + e.getNewValue());
|
||||||
|
|
||||||
// BPartner - load Order/Invoice/Shipment
|
// BPartner - load Order/Invoice/Shipment
|
||||||
if (e.getPropertyName().equals("C_BPartner_ID"))
|
if (e.getPropertyName().equals("C_BPartner_ID"))
|
||||||
{
|
{
|
||||||
int C_BPartner_ID = ((Integer)e.getNewValue()).intValue();
|
int C_BPartner_ID = ((Integer)e.getNewValue()).intValue();
|
||||||
initBPOrderDetails (C_BPartner_ID, true);
|
initBPOrderDetails (C_BPartner_ID, true);
|
||||||
}
|
}
|
||||||
window.tableChanged(null);
|
window.tableChanged(null);
|
||||||
} // vetoableChange
|
} // vetoableChange
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* Load BPartner Field
|
* Load BPartner Field
|
||||||
* @param forInvoice true if Invoices are to be created, false receipts
|
* @param forInvoice true if Invoices are to be created, false receipts
|
||||||
* @throws Exception if Lookups cannot be initialized
|
* @throws Exception if Lookups cannot be initialized
|
||||||
*/
|
*/
|
||||||
protected void initBPartner (boolean forInvoice) throws Exception
|
protected void initBPartner (boolean forInvoice) throws Exception
|
||||||
{
|
{
|
||||||
// load BPartner
|
// load BPartner
|
||||||
int AD_Column_ID = COLUMN_C_INVOICE_C_BPARTNER_ID; // C_Invoice.C_BPartner_ID
|
int AD_Column_ID = COLUMN_C_INVOICE_C_BPARTNER_ID; // C_Invoice.C_BPartner_ID
|
||||||
MLookup lookup = MLookupFactory.get (Env.getCtx(), p_WindowNo, 0, AD_Column_ID, DisplayType.Search);
|
MLookup lookup = MLookupFactory.get (Env.getCtx(), p_WindowNo, 0, AD_Column_ID, DisplayType.Search);
|
||||||
bPartnerField = new WSearchEditor ("C_BPartner_ID", true, false, true, lookup);
|
bPartnerField = new WSearchEditor ("C_BPartner_ID", true, false, true, lookup);
|
||||||
//
|
//
|
||||||
int C_BPartner_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_BPartner_ID");
|
int C_BPartner_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_BPartner_ID");
|
||||||
bPartnerField.setValue(new Integer(C_BPartner_ID));
|
bPartnerField.setValue(new Integer(C_BPartner_ID));
|
||||||
|
|
||||||
// initial loading
|
// initial loading
|
||||||
initBPOrderDetails(C_BPartner_ID, forInvoice);
|
initBPOrderDetails(C_BPartner_ID, forInvoice);
|
||||||
} // initBPartner
|
} // initBPartner
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load PBartner dependent Order/Invoice/Shipment Field.
|
* Load PBartner dependent Order/Invoice/Shipment Field.
|
||||||
* @param C_BPartner_ID BPartner
|
* @param C_BPartner_ID BPartner
|
||||||
* @param forInvoice for invoice
|
* @param forInvoice for invoice
|
||||||
*/
|
*/
|
||||||
protected void initBPOrderDetails (int C_BPartner_ID, boolean forInvoice)
|
protected void initBPOrderDetails (int C_BPartner_ID, boolean forInvoice)
|
||||||
{
|
{
|
||||||
if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID=" + C_BPartner_ID);
|
if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID=" + C_BPartner_ID);
|
||||||
KeyNamePair pp = new KeyNamePair(0,"");
|
KeyNamePair pp = new KeyNamePair(0,"");
|
||||||
// load PO Orders - Closed, Completed
|
// load PO Orders - Closed, Completed
|
||||||
orderField.removeActionListener(this);
|
orderField.removeActionListener(this);
|
||||||
orderField.removeAllItems();
|
orderField.removeAllItems();
|
||||||
orderField.addItem(pp);
|
orderField.addItem(pp);
|
||||||
|
|
||||||
ArrayList<KeyNamePair> list = loadOrderData(C_BPartner_ID, forInvoice, false);
|
ArrayList<KeyNamePair> list = loadOrderData(C_BPartner_ID, forInvoice, false);
|
||||||
for(KeyNamePair knp : list)
|
for(KeyNamePair knp : list)
|
||||||
orderField.addItem(knp);
|
orderField.addItem(knp);
|
||||||
|
|
||||||
orderField.setSelectedIndex(0);
|
orderField.setSelectedIndex(0);
|
||||||
orderField.addActionListener(this);
|
orderField.addActionListener(this);
|
||||||
|
|
||||||
initBPDetails(C_BPartner_ID);
|
initBPDetails(C_BPartner_ID);
|
||||||
} // initBPartnerOIS
|
} // initBPartnerOIS
|
||||||
|
|
||||||
public void initBPDetails(int C_BPartner_ID)
|
public void initBPDetails(int C_BPartner_ID)
|
||||||
{
|
{
|
||||||
initBPShipmentDetails(C_BPartner_ID);
|
initBPShipmentDetails(C_BPartner_ID);
|
||||||
initBPRMADetails(C_BPartner_ID);
|
initBPRMADetails(C_BPartner_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load PBartner dependent Order/Invoice/Shipment Field.
|
* Load PBartner dependent Order/Invoice/Shipment Field.
|
||||||
* @param C_BPartner_ID
|
* @param C_BPartner_ID
|
||||||
*/
|
*/
|
||||||
private void initBPShipmentDetails(int C_BPartner_ID)
|
private void initBPShipmentDetails(int C_BPartner_ID)
|
||||||
{
|
{
|
||||||
if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID" + C_BPartner_ID);
|
if (log.isLoggable(Level.CONFIG)) log.config("C_BPartner_ID" + C_BPartner_ID);
|
||||||
|
|
||||||
// load Shipments (Receipts) - Completed, Closed
|
// load Shipments (Receipts) - Completed, Closed
|
||||||
shipmentField.removeActionListener(this);
|
shipmentField.removeActionListener(this);
|
||||||
shipmentField.removeAllItems();
|
shipmentField.removeAllItems();
|
||||||
// None
|
// None
|
||||||
KeyNamePair pp = new KeyNamePair(0,"");
|
KeyNamePair pp = new KeyNamePair(0,"");
|
||||||
shipmentField.addItem(pp);
|
shipmentField.addItem(pp);
|
||||||
|
|
||||||
ArrayList<KeyNamePair> list = loadShipmentData(C_BPartner_ID);
|
ArrayList<KeyNamePair> list = loadShipmentData(C_BPartner_ID);
|
||||||
for(KeyNamePair knp : list)
|
for(KeyNamePair knp : list)
|
||||||
shipmentField.addItem(knp);
|
shipmentField.addItem(knp);
|
||||||
|
|
||||||
shipmentField.setSelectedIndex(0);
|
shipmentField.setSelectedIndex(0);
|
||||||
shipmentField.addActionListener(this);
|
shipmentField.addActionListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load RMA that are candidates for shipment
|
* Load RMA that are candidates for shipment
|
||||||
* @param C_BPartner_ID BPartner
|
* @param C_BPartner_ID BPartner
|
||||||
*/
|
*/
|
||||||
private void initBPRMADetails(int C_BPartner_ID)
|
private void initBPRMADetails(int C_BPartner_ID)
|
||||||
{
|
{
|
||||||
rmaField.removeActionListener(this);
|
rmaField.removeActionListener(this);
|
||||||
rmaField.removeAllItems();
|
rmaField.removeAllItems();
|
||||||
// None
|
// None
|
||||||
KeyNamePair pp = new KeyNamePair(0,"");
|
KeyNamePair pp = new KeyNamePair(0,"");
|
||||||
rmaField.addItem(pp);
|
rmaField.addItem(pp);
|
||||||
|
|
||||||
ArrayList<KeyNamePair> list = loadRMAData(C_BPartner_ID);
|
ArrayList<KeyNamePair> list = loadRMAData(C_BPartner_ID);
|
||||||
for(KeyNamePair knp : list)
|
for(KeyNamePair knp : list)
|
||||||
rmaField.addItem(knp);
|
rmaField.addItem(knp);
|
||||||
|
|
||||||
rmaField.setSelectedIndex(0);
|
rmaField.setSelectedIndex(0);
|
||||||
rmaField.addActionListener(this);
|
rmaField.addActionListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load Data - Order
|
* Load Data - Order
|
||||||
* @param C_Order_ID Order
|
* @param C_Order_ID Order
|
||||||
* @param forInvoice true if for invoice vs. delivery qty
|
* @param forInvoice true if for invoice vs. delivery qty
|
||||||
*/
|
*/
|
||||||
protected void loadOrder (int C_Order_ID, boolean forInvoice)
|
protected void loadOrder (int C_Order_ID, boolean forInvoice)
|
||||||
{
|
{
|
||||||
loadTableOIS(getOrderData(C_Order_ID, forInvoice));
|
loadTableOIS(getOrderData(C_Order_ID, forInvoice));
|
||||||
} // LoadOrder
|
} // LoadOrder
|
||||||
|
|
||||||
protected void loadRMA (int M_RMA_ID)
|
protected void loadRMA (int M_RMA_ID)
|
||||||
{
|
{
|
||||||
loadTableOIS(getRMAData(M_RMA_ID));
|
loadTableOIS(getRMAData(M_RMA_ID));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void loadShipment (int M_InOut_ID)
|
protected void loadShipment (int M_InOut_ID)
|
||||||
{
|
{
|
||||||
loadTableOIS(getShipmentData(M_InOut_ID));
|
loadTableOIS(getShipmentData(M_InOut_ID));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load Order/Invoice/Shipment data into Table
|
* Load Order/Invoice/Shipment data into Table
|
||||||
* @param data data
|
* @param data data
|
||||||
*/
|
*/
|
||||||
protected void loadTableOIS (Vector<?> data)
|
protected void loadTableOIS (Vector<?> data)
|
||||||
{
|
{
|
||||||
window.getWListbox().clear();
|
window.getWListbox().clear();
|
||||||
|
|
||||||
// Remove previous listeners
|
// Remove previous listeners
|
||||||
window.getWListbox().getModel().removeTableModelListener(window);
|
window.getWListbox().getModel().removeTableModelListener(window);
|
||||||
// Set Model
|
// Set Model
|
||||||
ListModelTable model = new ListModelTable(data);
|
ListModelTable model = new ListModelTable(data);
|
||||||
model.addTableModelListener(window);
|
model.addTableModelListener(window);
|
||||||
window.getWListbox().setData(model, getOISColumnNames());
|
window.getWListbox().setData(model, getOISColumnNames());
|
||||||
//
|
//
|
||||||
|
|
||||||
configureMiniTable(window.getWListbox());
|
configureMiniTable(window.getWListbox());
|
||||||
} // loadOrder
|
} // loadOrder
|
||||||
|
|
||||||
public void showWindow()
|
public void showWindow()
|
||||||
{
|
{
|
||||||
window.setVisible(true);
|
window.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void closeWindow()
|
public void closeWindow()
|
||||||
{
|
{
|
||||||
window.dispose();
|
window.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getWindow() {
|
public Object getWindow() {
|
||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setupColumns(Grid parameterGrid) {
|
protected void setupColumns(Grid parameterGrid) {
|
||||||
noOfParameterColumn = ClientInfo.maxWidth((ClientInfo.EXTRA_SMALL_WIDTH+ClientInfo.SMALL_WIDTH)/2) ? 2 : 4;
|
noOfParameterColumn = ClientInfo.maxWidth((ClientInfo.EXTRA_SMALL_WIDTH+ClientInfo.SMALL_WIDTH)/2) ? 2 : 4;
|
||||||
Columns columns = new Columns();
|
Columns columns = new Columns();
|
||||||
parameterGrid.appendChild(columns);
|
parameterGrid.appendChild(columns);
|
||||||
if (ClientInfo.maxWidth((ClientInfo.EXTRA_SMALL_WIDTH+ClientInfo.SMALL_WIDTH)/2))
|
if (ClientInfo.maxWidth((ClientInfo.EXTRA_SMALL_WIDTH+ClientInfo.SMALL_WIDTH)/2))
|
||||||
{
|
{
|
||||||
Column column = new Column();
|
Column column = new Column();
|
||||||
ZKUpdateUtil.setWidth(column, "35%");
|
ZKUpdateUtil.setWidth(column, "35%");
|
||||||
columns.appendChild(column);
|
columns.appendChild(column);
|
||||||
column = new Column();
|
column = new Column();
|
||||||
ZKUpdateUtil.setWidth(column, "65%");
|
ZKUpdateUtil.setWidth(column, "65%");
|
||||||
columns.appendChild(column);
|
columns.appendChild(column);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Column column = new Column();
|
Column column = new Column();
|
||||||
columns.appendChild(column);
|
columns.appendChild(column);
|
||||||
column = new Column();
|
column = new Column();
|
||||||
ZKUpdateUtil.setWidth(column, "15%");
|
ZKUpdateUtil.setWidth(column, "15%");
|
||||||
columns.appendChild(column);
|
columns.appendChild(column);
|
||||||
ZKUpdateUtil.setWidth(column, "35%");
|
ZKUpdateUtil.setWidth(column, "35%");
|
||||||
column = new Column();
|
column = new Column();
|
||||||
ZKUpdateUtil.setWidth(column, "15%");
|
ZKUpdateUtil.setWidth(column, "15%");
|
||||||
columns.appendChild(column);
|
columns.appendChild(column);
|
||||||
column = new Column();
|
column = new Column();
|
||||||
ZKUpdateUtil.setWidth(column, "35%");
|
ZKUpdateUtil.setWidth(column, "35%");
|
||||||
columns.appendChild(column);
|
columns.appendChild(column);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onClientInfo()
|
protected void onClientInfo()
|
||||||
{
|
{
|
||||||
if (ClientInfo.isMobile() && parameterStdLayout != null && parameterStdLayout.getRows() != null)
|
if (ClientInfo.isMobile() && parameterStdLayout != null && parameterStdLayout.getRows() != null)
|
||||||
{
|
{
|
||||||
int nc = ClientInfo.maxWidth((ClientInfo.EXTRA_SMALL_WIDTH+ClientInfo.SMALL_WIDTH)/2) ? 2 : 4;
|
int nc = ClientInfo.maxWidth((ClientInfo.EXTRA_SMALL_WIDTH+ClientInfo.SMALL_WIDTH)/2) ? 2 : 4;
|
||||||
int cc = noOfParameterColumn;
|
int cc = noOfParameterColumn;
|
||||||
if (nc == cc)
|
if (nc == cc)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
parameterStdLayout.getColumns().detach();
|
parameterStdLayout.getColumns().detach();
|
||||||
setupColumns(parameterStdLayout);
|
setupColumns(parameterStdLayout);
|
||||||
if (cc > nc)
|
if (cc > nc)
|
||||||
{
|
{
|
||||||
LayoutUtils.compactTo(parameterStdLayout, nc);
|
LayoutUtils.compactTo(parameterStdLayout, nc);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LayoutUtils.expandTo(parameterStdLayout, nc, false);
|
LayoutUtils.expandTo(parameterStdLayout, nc, false);
|
||||||
}
|
}
|
||||||
hideEmptyRow(parameterStdLayout.getRows());
|
hideEmptyRow(parameterStdLayout.getRows());
|
||||||
|
|
||||||
ZKUpdateUtil.setCSSHeight(window);
|
ZKUpdateUtil.setCSSHeight(window);
|
||||||
ZKUpdateUtil.setCSSWidth(window);
|
ZKUpdateUtil.setCSSWidth(window);
|
||||||
window.invalidate();
|
window.invalidate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.form;
|
package balinusa.midsuit.form;
|
||||||
|
|
||||||
import static org.compiere.model.SystemIDs.COLUMN_C_INVOICELINE_M_PRODUCT_ID;
|
import static org.compiere.model.SystemIDs.COLUMN_C_INVOICELINE_M_PRODUCT_ID;
|
||||||
|
|
||||||
|
|
@ -1,204 +1,204 @@
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* Copyright (C) 2009 Low Heng Sin *
|
* Copyright (C) 2009 Low Heng Sin *
|
||||||
* Copyright (C) 2009 Idalica Corporation *
|
* Copyright (C) 2009 Idalica Corporation *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* This program is free software; you can redistribute it and/or modify it *
|
||||||
* under the terms version 2 of the GNU General Public License as published *
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
* by the Free Software Foundation. This program is distributed in the hope *
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
* See the GNU General Public License for more details. *
|
* See the GNU General Public License for more details. *
|
||||||
* You should have received a copy of the GNU General Public License along *
|
* You should have received a copy of the GNU General Public License along *
|
||||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.form;
|
package balinusa.midsuit.form;
|
||||||
|
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.adempiere.webui.ClientInfo;
|
import org.adempiere.webui.ClientInfo;
|
||||||
import org.adempiere.webui.apps.AEnv;
|
import org.adempiere.webui.apps.AEnv;
|
||||||
import org.adempiere.webui.apps.form.WCreateFromWindow;
|
import org.adempiere.webui.apps.form.WCreateFromWindow;
|
||||||
import org.adempiere.webui.component.Grid;
|
import org.adempiere.webui.component.Grid;
|
||||||
import org.adempiere.webui.component.GridFactory;
|
import org.adempiere.webui.component.GridFactory;
|
||||||
import org.adempiere.webui.component.Label;
|
import org.adempiere.webui.component.Label;
|
||||||
import org.adempiere.webui.component.ListModelTable;
|
import org.adempiere.webui.component.ListModelTable;
|
||||||
import org.adempiere.webui.component.Panel;
|
import org.adempiere.webui.component.Panel;
|
||||||
import org.adempiere.webui.component.Row;
|
import org.adempiere.webui.component.Row;
|
||||||
import org.adempiere.webui.component.Rows;
|
import org.adempiere.webui.component.Rows;
|
||||||
import org.adempiere.webui.editor.WEditor;
|
import org.adempiere.webui.editor.WEditor;
|
||||||
import org.adempiere.webui.editor.WSearchEditor;
|
import org.adempiere.webui.editor.WSearchEditor;
|
||||||
import org.adempiere.webui.event.ValueChangeEvent;
|
import org.adempiere.webui.event.ValueChangeEvent;
|
||||||
import org.adempiere.webui.event.ValueChangeListener;
|
import org.adempiere.webui.event.ValueChangeListener;
|
||||||
import org.adempiere.webui.util.ZKUpdateUtil;
|
import org.adempiere.webui.util.ZKUpdateUtil;
|
||||||
import org.compiere.model.GridTab;
|
import org.compiere.model.GridTab;
|
||||||
import org.compiere.model.MLookup;
|
import org.compiere.model.MLookup;
|
||||||
import org.compiere.model.MLookupFactory;
|
import org.compiere.model.MLookupFactory;
|
||||||
|
|
||||||
import static org.compiere.model.SystemIDs.*;
|
import static org.compiere.model.SystemIDs.*;
|
||||||
|
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.DisplayType;
|
import org.compiere.util.DisplayType;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
|
|
||||||
public class MID_WCreateFromRMA extends MID_CreateFromRMA implements ValueChangeListener
|
public class MID_WCreateFromRMA extends MID_CreateFromRMA implements ValueChangeListener
|
||||||
{
|
{
|
||||||
private WCreateFromWindow window;
|
private WCreateFromWindow window;
|
||||||
|
|
||||||
public MID_WCreateFromRMA(GridTab tab)
|
public MID_WCreateFromRMA(GridTab tab)
|
||||||
{
|
{
|
||||||
super(tab);
|
super(tab);
|
||||||
log.info(getGridTab().toString());
|
log.info(getGridTab().toString());
|
||||||
|
|
||||||
window = new WCreateFromWindow(this, getGridTab().getWindowNo());
|
window = new WCreateFromWindow(this, getGridTab().getWindowNo());
|
||||||
|
|
||||||
p_WindowNo = getGridTab().getWindowNo();
|
p_WindowNo = getGridTab().getWindowNo();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!dynInit())
|
if (!dynInit())
|
||||||
return;
|
return;
|
||||||
zkInit();
|
zkInit();
|
||||||
setInitOK(true);
|
setInitOK(true);
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
log.log(Level.SEVERE, "", e);
|
log.log(Level.SEVERE, "", e);
|
||||||
setInitOK(false);
|
setInitOK(false);
|
||||||
}
|
}
|
||||||
AEnv.showWindow(window);
|
AEnv.showWindow(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Window No */
|
/** Window No */
|
||||||
private int p_WindowNo;
|
private int p_WindowNo;
|
||||||
|
|
||||||
/** Logger */
|
/** Logger */
|
||||||
private CLogger log = CLogger.getCLogger(getClass());
|
private CLogger log = CLogger.getCLogger(getClass());
|
||||||
|
|
||||||
protected Label bPartnerLabel = new Label();
|
protected Label bPartnerLabel = new Label();
|
||||||
protected WEditor bPartnerField;
|
protected WEditor bPartnerField;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dynamic Init
|
* Dynamic Init
|
||||||
* @throws Exception if Lookups cannot be initialized
|
* @throws Exception if Lookups cannot be initialized
|
||||||
* @return true if initialized
|
* @return true if initialized
|
||||||
*/
|
*/
|
||||||
public boolean dynInit() throws Exception
|
public boolean dynInit() throws Exception
|
||||||
{
|
{
|
||||||
log.config("");
|
log.config("");
|
||||||
|
|
||||||
super.dynInit();
|
super.dynInit();
|
||||||
|
|
||||||
window.setTitle(getTitle());
|
window.setTitle(getTitle());
|
||||||
|
|
||||||
initBPartner(true);
|
initBPartner(true);
|
||||||
bPartnerField.addValueChangeListener(this);
|
bPartnerField.addValueChangeListener(this);
|
||||||
|
|
||||||
loadRMA();
|
loadRMA();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} // dynInit
|
} // dynInit
|
||||||
|
|
||||||
protected void zkInit() throws Exception
|
protected void zkInit() throws Exception
|
||||||
{
|
{
|
||||||
bPartnerLabel.setText(Msg.getElement(Env.getCtx(), "C_BPartner_ID"));
|
bPartnerLabel.setText(Msg.getElement(Env.getCtx(), "C_BPartner_ID"));
|
||||||
|
|
||||||
Panel parameterPanel = window.getParameterPanel();
|
Panel parameterPanel = window.getParameterPanel();
|
||||||
|
|
||||||
Grid parameterStdLayout = GridFactory.newGridLayout();
|
Grid parameterStdLayout = GridFactory.newGridLayout();
|
||||||
Panel parameterStdPanel = new Panel();
|
Panel parameterStdPanel = new Panel();
|
||||||
parameterStdPanel.appendChild(parameterStdLayout);
|
parameterStdPanel.appendChild(parameterStdLayout);
|
||||||
|
|
||||||
parameterPanel.appendChild(parameterStdPanel);
|
parameterPanel.appendChild(parameterStdPanel);
|
||||||
ZKUpdateUtil.setVflex(parameterStdLayout, "min");
|
ZKUpdateUtil.setVflex(parameterStdLayout, "min");
|
||||||
|
|
||||||
Rows rows = (Rows) parameterStdLayout.newRows();
|
Rows rows = (Rows) parameterStdLayout.newRows();
|
||||||
Row row = rows.newRow();
|
Row row = rows.newRow();
|
||||||
row.appendChild(bPartnerLabel.rightAlign());
|
row.appendChild(bPartnerLabel.rightAlign());
|
||||||
if (bPartnerField != null)
|
if (bPartnerField != null)
|
||||||
row.appendChild(bPartnerField.getComponent());
|
row.appendChild(bPartnerField.getComponent());
|
||||||
|
|
||||||
if (ClientInfo.isMobile()) {
|
if (ClientInfo.isMobile()) {
|
||||||
ClientInfo.onClientInfo(window, this::onClientInfo);
|
ClientInfo.onClientInfo(window, this::onClientInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change Listener
|
* Change Listener
|
||||||
* @param e event
|
* @param e event
|
||||||
*/
|
*/
|
||||||
public void valueChange (ValueChangeEvent e)
|
public void valueChange (ValueChangeEvent e)
|
||||||
{
|
{
|
||||||
if (log.isLoggable(Level.CONFIG)) log.config(e.getPropertyName() + "=" + e.getNewValue());
|
if (log.isLoggable(Level.CONFIG)) log.config(e.getPropertyName() + "=" + e.getNewValue());
|
||||||
|
|
||||||
// BPartner - load Order/Invoice/Shipment
|
// BPartner - load Order/Invoice/Shipment
|
||||||
if (e.getPropertyName().equals("C_BPartner_ID"))
|
if (e.getPropertyName().equals("C_BPartner_ID"))
|
||||||
{
|
{
|
||||||
loadRMA();
|
loadRMA();
|
||||||
}
|
}
|
||||||
window.tableChanged(null);
|
window.tableChanged(null);
|
||||||
} // vetoableChange
|
} // vetoableChange
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* Load BPartner Field
|
* Load BPartner Field
|
||||||
* @param forInvoice true if Invoices are to be created, false receipts
|
* @param forInvoice true if Invoices are to be created, false receipts
|
||||||
* @throws Exception if Lookups cannot be initialized
|
* @throws Exception if Lookups cannot be initialized
|
||||||
*/
|
*/
|
||||||
protected void initBPartner (boolean forInvoice) throws Exception
|
protected void initBPartner (boolean forInvoice) throws Exception
|
||||||
{
|
{
|
||||||
// load BPartner
|
// load BPartner
|
||||||
int AD_Column_ID = COLUMN_C_INVOICE_C_BPARTNER_ID; // C_Invoice.C_BPartner_ID
|
int AD_Column_ID = COLUMN_C_INVOICE_C_BPARTNER_ID; // C_Invoice.C_BPartner_ID
|
||||||
MLookup lookup = MLookupFactory.get (Env.getCtx(), p_WindowNo, 0, AD_Column_ID, DisplayType.Search);
|
MLookup lookup = MLookupFactory.get (Env.getCtx(), p_WindowNo, 0, AD_Column_ID, DisplayType.Search);
|
||||||
bPartnerField = new WSearchEditor ("C_BPartner_ID", true, false, true, lookup);
|
bPartnerField = new WSearchEditor ("C_BPartner_ID", true, false, true, lookup);
|
||||||
//
|
//
|
||||||
int C_BPartner_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_BPartner_ID");
|
int C_BPartner_ID = Env.getContextAsInt(Env.getCtx(), p_WindowNo, "C_BPartner_ID");
|
||||||
bPartnerField.setValue(new Integer(C_BPartner_ID));
|
bPartnerField.setValue(new Integer(C_BPartner_ID));
|
||||||
} // initBPartner
|
} // initBPartner
|
||||||
|
|
||||||
protected void loadRMA()
|
protected void loadRMA()
|
||||||
{
|
{
|
||||||
loadTableOIS(getRMAData());
|
loadTableOIS(getRMAData());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load Order/Invoice/Shipment data into Table
|
* Load Order/Invoice/Shipment data into Table
|
||||||
* @param data data
|
* @param data data
|
||||||
*/
|
*/
|
||||||
protected void loadTableOIS (Vector<?> data)
|
protected void loadTableOIS (Vector<?> data)
|
||||||
{
|
{
|
||||||
window.getWListbox().clear();
|
window.getWListbox().clear();
|
||||||
|
|
||||||
// Remove previous listeners
|
// Remove previous listeners
|
||||||
window.getWListbox().getModel().removeTableModelListener(window);
|
window.getWListbox().getModel().removeTableModelListener(window);
|
||||||
// Set Model
|
// Set Model
|
||||||
ListModelTable model = new ListModelTable(data);
|
ListModelTable model = new ListModelTable(data);
|
||||||
model.addTableModelListener(window);
|
model.addTableModelListener(window);
|
||||||
window.getWListbox().setData(model, getOISColumnNames());
|
window.getWListbox().setData(model, getOISColumnNames());
|
||||||
//
|
//
|
||||||
|
|
||||||
configureMiniTable(window.getWListbox());
|
configureMiniTable(window.getWListbox());
|
||||||
} // loadOrder
|
} // loadOrder
|
||||||
|
|
||||||
public void showWindow()
|
public void showWindow()
|
||||||
{
|
{
|
||||||
window.setVisible(true);
|
window.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void closeWindow()
|
public void closeWindow()
|
||||||
{
|
{
|
||||||
window.dispose();
|
window.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getWindow() {
|
public Object getWindow() {
|
||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onClientInfo() {
|
protected void onClientInfo() {
|
||||||
ZKUpdateUtil.setCSSHeight(window);
|
ZKUpdateUtil.setCSSHeight(window);
|
||||||
ZKUpdateUtil.setCSSWidth(window);
|
ZKUpdateUtil.setCSSWidth(window);
|
||||||
window.invalidate();
|
window.invalidate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.form;
|
package balinusa.midsuit.form;
|
||||||
|
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
package andromedia.midsuit.form;
|
package balinusa.midsuit.form;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,4 +1,4 @@
|
||||||
package andromedia.midsuit.form;
|
package balinusa.midsuit.form;
|
||||||
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.form;
|
package balinusa.midsuit.form;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
@ -49,7 +49,7 @@ import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zk.ui.event.EventListener;
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
import org.zkoss.zul.North;
|
import org.zkoss.zul.North;
|
||||||
|
|
||||||
import andromedia.midsuit.grid.InvoiceLandedCost;
|
import balinusa.midsuit.grid.InvoiceLandedCost;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate Shipment (manual) view class
|
* Generate Shipment (manual) view class
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.grid;
|
package balinusa.midsuit.grid;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
|
|
@ -1,167 +1,167 @@
|
||||||
package andromedia.midsuit.model;
|
package balinusa.midsuit.model;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.compiere.process.DocAction;
|
import org.compiere.process.DocAction;
|
||||||
import org.compiere.process.DocOptions;
|
import org.compiere.process.DocOptions;
|
||||||
import org.compiere.process.DocumentEngine;
|
import org.compiere.process.DocumentEngine;
|
||||||
|
|
||||||
public class AND_PPO extends X_ps_ppo implements DocAction, DocOptions{
|
public class AND_PPO extends X_ps_ppo implements DocAction, DocOptions{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 4798412851170213351L;
|
private static final long serialVersionUID = 4798412851170213351L;
|
||||||
|
|
||||||
public AND_PPO(Properties ctx, int ps_ppo_ID, String trxName) {
|
public AND_PPO(Properties ctx, int ps_ppo_ID, String trxName) {
|
||||||
super(ctx, ps_ppo_ID, trxName);
|
super(ctx, ps_ppo_ID, trxName);
|
||||||
// TODO Auto-generated constructor stub
|
// TODO Auto-generated constructor stub
|
||||||
}
|
}
|
||||||
|
|
||||||
public AND_PPO(Properties ctx, ResultSet rs, String trxName) {
|
public AND_PPO(Properties ctx, ResultSet rs, String trxName) {
|
||||||
super(ctx, rs, trxName);
|
super(ctx, rs, trxName);
|
||||||
// TODO Auto-generated constructor stub
|
// TODO Auto-generated constructor stub
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int customizeValidActions(String docStatus, Object processing, String orderType, String isSOTrx,
|
public int customizeValidActions(String docStatus, Object processing, String orderType, String isSOTrx,
|
||||||
int AD_Table_ID, String[] docAction, String[] options, int index) {
|
int AD_Table_ID, String[] docAction, String[] options, int index) {
|
||||||
for (int i = 0; i < options.length; i++) {
|
for (int i = 0; i < options.length; i++) {
|
||||||
options[i] = null;
|
options[i] = null;
|
||||||
}
|
}
|
||||||
index = 0;
|
index = 0;
|
||||||
if (docStatus.equals(DocumentEngine.STATUS_Drafted) || docStatus.equals(DocumentEngine.STATUS_Invalid)) {
|
if (docStatus.equals(DocumentEngine.STATUS_Drafted) || docStatus.equals(DocumentEngine.STATUS_Invalid)) {
|
||||||
options[index++] = DocumentEngine.ACTION_Complete;
|
options[index++] = DocumentEngine.ACTION_Complete;
|
||||||
options[index++] = DocumentEngine.ACTION_Prepare;
|
options[index++] = DocumentEngine.ACTION_Prepare;
|
||||||
options[index++] = DocumentEngine.ACTION_Void;
|
options[index++] = DocumentEngine.ACTION_Void;
|
||||||
} else if (docStatus.equals(DocumentEngine.STATUS_Completed)) {
|
} else if (docStatus.equals(DocumentEngine.STATUS_Completed)) {
|
||||||
options[index++] = DocumentEngine.ACTION_Close;
|
options[index++] = DocumentEngine.ACTION_Close;
|
||||||
options[index++] = DocumentEngine.ACTION_ReActivate;
|
options[index++] = DocumentEngine.ACTION_ReActivate;
|
||||||
} else if (docStatus.equals(DocumentEngine.STATUS_InProgress))
|
} else if (docStatus.equals(DocumentEngine.STATUS_InProgress))
|
||||||
options[index++] = DocumentEngine.ACTION_Complete;
|
options[index++] = DocumentEngine.ACTION_Complete;
|
||||||
|
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean processIt(String action) throws Exception {
|
public boolean processIt(String action) throws Exception {
|
||||||
log.warning("Processing Action=" + action + " - DocStatus=" + getDocStatus() + " - DocAction=" + getDocAction());
|
log.warning("Processing Action=" + action + " - DocStatus=" + getDocStatus() + " - DocAction=" + getDocAction());
|
||||||
DocumentEngine engine = new DocumentEngine(this, getDocStatus());
|
DocumentEngine engine = new DocumentEngine(this, getDocStatus());
|
||||||
return engine.processIt(getDocAction(), getDocAction());
|
return engine.processIt(getDocAction(), getDocAction());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean unlockIt() {
|
public boolean unlockIt() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean invalidateIt() {
|
public boolean invalidateIt() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String prepareIt() {
|
public String prepareIt() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean approveIt() {
|
public boolean approveIt() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean rejectIt() {
|
public boolean rejectIt() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String completeIt() {
|
public String completeIt() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean voidIt() {
|
public boolean voidIt() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean closeIt() {
|
public boolean closeIt() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean reverseCorrectIt() {
|
public boolean reverseCorrectIt() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean reverseAccrualIt() {
|
public boolean reverseAccrualIt() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean reActivateIt() {
|
public boolean reActivateIt() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
setDocStatus(DocAction.STATUS_InProgress);
|
setDocStatus(DocAction.STATUS_InProgress);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getSummary() {
|
public String getSummary() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDocumentInfo() {
|
public String getDocumentInfo() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public File createPDF() {
|
public File createPDF() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getProcessMsg() {
|
public String getProcessMsg() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getDoc_User_ID() {
|
public int getDoc_User_ID() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getC_Currency_ID() {
|
public int getC_Currency_ID() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BigDecimal getApprovalAmt() {
|
public BigDecimal getApprovalAmt() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.model;
|
package balinusa.midsuit.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.model;
|
package balinusa.midsuit.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.model;
|
package balinusa.midsuit.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.model;
|
package balinusa.midsuit.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.model;
|
package balinusa.midsuit.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.model;
|
package balinusa.midsuit.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.model;
|
package balinusa.midsuit.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.model;
|
package balinusa.midsuit.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.model;
|
package balinusa.midsuit.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.model;
|
package balinusa.midsuit.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.model;
|
package balinusa.midsuit.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.model;
|
package balinusa.midsuit.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.model;
|
package balinusa.midsuit.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.model;
|
package balinusa.midsuit.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package andromedia.midsuit.model;
|
package balinusa.midsuit.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue