FR [ 2380080 ] Implement drop shipment
https://sourceforge.net/tracker/?func=detail&group_id=176962&atid=879335&aid=2380080
This commit is contained in:
parent
c80f34265e
commit
724fbe0272
|
@ -1,31 +1,22 @@
|
|||
/**********************************************************************
|
||||
* This file is part of Adempiere ERP Bazaar *
|
||||
* http://www.adempiere.org *
|
||||
* *
|
||||
* Copyright (C) Trifon Trifonov. *
|
||||
* Copyright (C) Contributors *
|
||||
* *
|
||||
* This program is free software, you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License *
|
||||
* as published by the Free Software Foundation, either version 2 *
|
||||
* of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY, without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* 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., 51 Franklin Street, Fifth Floor, Boston, *
|
||||
* MA 02110-1301, USA. *
|
||||
* *
|
||||
* Contributors: *
|
||||
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
|
||||
* *
|
||||
* Sponsors: *
|
||||
* - Company (http://www.site.com) *
|
||||
**********************************************************************/
|
||||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||
* 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 *
|
||||
* 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 *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* 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., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* 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 *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.compiere.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
@ -65,7 +56,20 @@ public interface I_AD_OrgInfo
|
|||
*/
|
||||
public int getAD_OrgType_ID();
|
||||
|
||||
public I_AD_OrgType getAD_OrgType() throws Exception;
|
||||
public I_AD_OrgType getAD_OrgType() throws RuntimeException;
|
||||
|
||||
/** Column name AD_Org_ID */
|
||||
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||
|
||||
/** Set Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public void setAD_Org_ID (int AD_Org_ID);
|
||||
|
||||
/** Get Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public int getAD_Org_ID();
|
||||
|
||||
/** Column name C_Location_ID */
|
||||
public static final String COLUMNNAME_C_Location_ID = "C_Location_ID";
|
||||
|
@ -93,6 +97,19 @@ public interface I_AD_OrgInfo
|
|||
*/
|
||||
public String getDUNS();
|
||||
|
||||
/** Column name DropShip_Warehouse_ID */
|
||||
public static final String COLUMNNAME_DropShip_Warehouse_ID = "DropShip_Warehouse_ID";
|
||||
|
||||
/** Set Drop Ship Warehouse.
|
||||
* The (logical) warehouse to use for recording drop ship receipts and shipments.
|
||||
*/
|
||||
public void setDropShip_Warehouse_ID (int DropShip_Warehouse_ID);
|
||||
|
||||
/** Get Drop Ship Warehouse.
|
||||
* The (logical) warehouse to use for recording drop ship receipts and shipments.
|
||||
*/
|
||||
public int getDropShip_Warehouse_ID();
|
||||
|
||||
/** Column name M_Warehouse_ID */
|
||||
public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID";
|
||||
|
||||
|
@ -106,7 +123,7 @@ public interface I_AD_OrgInfo
|
|||
*/
|
||||
public int getM_Warehouse_ID();
|
||||
|
||||
public I_M_Warehouse getM_Warehouse() throws Exception;
|
||||
public I_M_Warehouse getM_Warehouse() throws RuntimeException;
|
||||
|
||||
/** Column name Parent_Org_ID */
|
||||
public static final String COLUMNNAME_Parent_Org_ID = "Parent_Org_ID";
|
||||
|
|
|
@ -1,31 +1,22 @@
|
|||
/**********************************************************************
|
||||
* This file is part of Adempiere ERP Bazaar *
|
||||
* http://www.adempiere.org *
|
||||
* *
|
||||
* Copyright (C) Trifon Trifonov. *
|
||||
* Copyright (C) Contributors *
|
||||
* *
|
||||
* This program is free software, you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License *
|
||||
* as published by the Free Software Foundation, either version 2 *
|
||||
* of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY, without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* 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., 51 Franklin Street, Fifth Floor, Boston, *
|
||||
* MA 02110-1301, USA. *
|
||||
* *
|
||||
* Contributors: *
|
||||
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
|
||||
* *
|
||||
* Sponsors: *
|
||||
* - Company (http://www.site.com) *
|
||||
**********************************************************************/
|
||||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||
* 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 *
|
||||
* 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 *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* 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., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* 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 *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.compiere.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
@ -66,6 +57,19 @@ public interface I_C_Order
|
|||
*/
|
||||
public int getAD_OrgTrx_ID();
|
||||
|
||||
/** Column name AD_Org_ID */
|
||||
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||
|
||||
/** Set Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public void setAD_Org_ID (int AD_Org_ID);
|
||||
|
||||
/** Get Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public int getAD_Org_ID();
|
||||
|
||||
/** Column name AD_User_ID */
|
||||
public static final String COLUMNNAME_AD_User_ID = "AD_User_ID";
|
||||
|
||||
|
@ -79,7 +83,7 @@ public interface I_C_Order
|
|||
*/
|
||||
public int getAD_User_ID();
|
||||
|
||||
public I_AD_User getAD_User() throws Exception;
|
||||
public I_AD_User getAD_User() throws RuntimeException;
|
||||
|
||||
/** Column name AmountRefunded */
|
||||
public static final String COLUMNNAME_AmountRefunded = "AmountRefunded";
|
||||
|
@ -151,7 +155,7 @@ public interface I_C_Order
|
|||
*/
|
||||
public int getC_Activity_ID();
|
||||
|
||||
public I_C_Activity getC_Activity() throws Exception;
|
||||
public I_C_Activity getC_Activity() throws RuntimeException;
|
||||
|
||||
/** Column name C_BPartner_ID */
|
||||
public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID";
|
||||
|
@ -166,7 +170,7 @@ public interface I_C_Order
|
|||
*/
|
||||
public int getC_BPartner_ID();
|
||||
|
||||
public I_C_BPartner getC_BPartner() throws Exception;
|
||||
public I_C_BPartner getC_BPartner() throws RuntimeException;
|
||||
|
||||
/** Column name C_BPartner_Location_ID */
|
||||
public static final String COLUMNNAME_C_BPartner_Location_ID = "C_BPartner_Location_ID";
|
||||
|
@ -181,7 +185,7 @@ public interface I_C_Order
|
|||
*/
|
||||
public int getC_BPartner_Location_ID();
|
||||
|
||||
public I_C_BPartner_Location getC_BPartner_Location() throws Exception;
|
||||
public I_C_BPartner_Location getC_BPartner_Location() throws RuntimeException;
|
||||
|
||||
/** Column name C_Campaign_ID */
|
||||
public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID";
|
||||
|
@ -196,7 +200,7 @@ public interface I_C_Order
|
|||
*/
|
||||
public int getC_Campaign_ID();
|
||||
|
||||
public I_C_Campaign getC_Campaign() throws Exception;
|
||||
public I_C_Campaign getC_Campaign() throws RuntimeException;
|
||||
|
||||
/** Column name C_CashLine_ID */
|
||||
public static final String COLUMNNAME_C_CashLine_ID = "C_CashLine_ID";
|
||||
|
@ -211,7 +215,7 @@ public interface I_C_Order
|
|||
*/
|
||||
public int getC_CashLine_ID();
|
||||
|
||||
public I_C_CashLine getC_CashLine() throws Exception;
|
||||
public I_C_CashLine getC_CashLine() throws RuntimeException;
|
||||
|
||||
/** Column name C_Charge_ID */
|
||||
public static final String COLUMNNAME_C_Charge_ID = "C_Charge_ID";
|
||||
|
@ -239,7 +243,7 @@ public interface I_C_Order
|
|||
*/
|
||||
public int getC_ConversionType_ID();
|
||||
|
||||
public I_C_ConversionType getC_ConversionType() throws Exception;
|
||||
public I_C_ConversionType getC_ConversionType() throws RuntimeException;
|
||||
|
||||
/** Column name C_Currency_ID */
|
||||
public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID";
|
||||
|
@ -254,7 +258,20 @@ public interface I_C_Order
|
|||
*/
|
||||
public int getC_Currency_ID();
|
||||
|
||||
public I_C_Currency getC_Currency() throws Exception;
|
||||
public I_C_Currency getC_Currency() throws RuntimeException;
|
||||
|
||||
/** Column name C_DocTypeTarget_ID */
|
||||
public static final String COLUMNNAME_C_DocTypeTarget_ID = "C_DocTypeTarget_ID";
|
||||
|
||||
/** Set Target Document Type.
|
||||
* Target document type for conversing documents
|
||||
*/
|
||||
public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID);
|
||||
|
||||
/** Get Target Document Type.
|
||||
* Target document type for conversing documents
|
||||
*/
|
||||
public int getC_DocTypeTarget_ID();
|
||||
|
||||
/** Column name C_DocType_ID */
|
||||
public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID";
|
||||
|
@ -269,20 +286,80 @@ public interface I_C_Order
|
|||
*/
|
||||
public int getC_DocType_ID();
|
||||
|
||||
public I_C_DocType getC_DocType() throws Exception;
|
||||
public I_C_DocType getC_DocType() throws RuntimeException;
|
||||
|
||||
/** Column name C_DocTypeTarget_ID */
|
||||
public static final String COLUMNNAME_C_DocTypeTarget_ID = "C_DocTypeTarget_ID";
|
||||
/** Column name C_Order_ID */
|
||||
public static final String COLUMNNAME_C_Order_ID = "C_Order_ID";
|
||||
|
||||
/** Set Target Document Type.
|
||||
* Target document type for conversing documents
|
||||
/** Set Order.
|
||||
* Order
|
||||
*/
|
||||
public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID);
|
||||
public void setC_Order_ID (int C_Order_ID);
|
||||
|
||||
/** Get Target Document Type.
|
||||
* Target document type for conversing documents
|
||||
/** Get Order.
|
||||
* Order
|
||||
*/
|
||||
public int getC_DocTypeTarget_ID();
|
||||
public int getC_Order_ID();
|
||||
|
||||
/** Column name C_POS_ID */
|
||||
public static final String COLUMNNAME_C_POS_ID = "C_POS_ID";
|
||||
|
||||
/** Set POS Terminal.
|
||||
* Point of Sales Terminal
|
||||
*/
|
||||
public void setC_POS_ID (int C_POS_ID);
|
||||
|
||||
/** Get POS Terminal.
|
||||
* Point of Sales Terminal
|
||||
*/
|
||||
public int getC_POS_ID();
|
||||
|
||||
public I_C_POS getC_POS() throws RuntimeException;
|
||||
|
||||
/** Column name C_PaymentTerm_ID */
|
||||
public static final String COLUMNNAME_C_PaymentTerm_ID = "C_PaymentTerm_ID";
|
||||
|
||||
/** Set Payment Term.
|
||||
* The terms of Payment (timing, discount)
|
||||
*/
|
||||
public void setC_PaymentTerm_ID (int C_PaymentTerm_ID);
|
||||
|
||||
/** Get Payment Term.
|
||||
* The terms of Payment (timing, discount)
|
||||
*/
|
||||
public int getC_PaymentTerm_ID();
|
||||
|
||||
public I_C_PaymentTerm getC_PaymentTerm() throws RuntimeException;
|
||||
|
||||
/** Column name C_Payment_ID */
|
||||
public static final String COLUMNNAME_C_Payment_ID = "C_Payment_ID";
|
||||
|
||||
/** Set Payment.
|
||||
* Payment identifier
|
||||
*/
|
||||
public void setC_Payment_ID (int C_Payment_ID);
|
||||
|
||||
/** Get Payment.
|
||||
* Payment identifier
|
||||
*/
|
||||
public int getC_Payment_ID();
|
||||
|
||||
public I_C_Payment getC_Payment() throws RuntimeException;
|
||||
|
||||
/** Column name C_Project_ID */
|
||||
public static final String COLUMNNAME_C_Project_ID = "C_Project_ID";
|
||||
|
||||
/** Set Project.
|
||||
* Financial Project
|
||||
*/
|
||||
public void setC_Project_ID (int C_Project_ID);
|
||||
|
||||
/** Get Project.
|
||||
* Financial Project
|
||||
*/
|
||||
public int getC_Project_ID();
|
||||
|
||||
public I_C_Project getC_Project() throws RuntimeException;
|
||||
|
||||
/** Column name ChargeAmt */
|
||||
public static final String COLUMNNAME_ChargeAmt = "ChargeAmt";
|
||||
|
@ -310,79 +387,6 @@ public interface I_C_Order
|
|||
*/
|
||||
public String getCopyFrom();
|
||||
|
||||
/** Column name C_Order_ID */
|
||||
public static final String COLUMNNAME_C_Order_ID = "C_Order_ID";
|
||||
|
||||
/** Set Order.
|
||||
* Order
|
||||
*/
|
||||
public void setC_Order_ID (int C_Order_ID);
|
||||
|
||||
/** Get Order.
|
||||
* Order
|
||||
*/
|
||||
public int getC_Order_ID();
|
||||
|
||||
/** Column name C_Payment_ID */
|
||||
public static final String COLUMNNAME_C_Payment_ID = "C_Payment_ID";
|
||||
|
||||
/** Set Payment.
|
||||
* Payment identifier
|
||||
*/
|
||||
public void setC_Payment_ID (int C_Payment_ID);
|
||||
|
||||
/** Get Payment.
|
||||
* Payment identifier
|
||||
*/
|
||||
public int getC_Payment_ID();
|
||||
|
||||
public I_C_Payment getC_Payment() throws Exception;
|
||||
|
||||
/** Column name C_PaymentTerm_ID */
|
||||
public static final String COLUMNNAME_C_PaymentTerm_ID = "C_PaymentTerm_ID";
|
||||
|
||||
/** Set Payment Term.
|
||||
* The terms of Payment (timing, discount)
|
||||
*/
|
||||
public void setC_PaymentTerm_ID (int C_PaymentTerm_ID);
|
||||
|
||||
/** Get Payment Term.
|
||||
* The terms of Payment (timing, discount)
|
||||
*/
|
||||
public int getC_PaymentTerm_ID();
|
||||
|
||||
public I_C_PaymentTerm getC_PaymentTerm() throws Exception;
|
||||
|
||||
/** Column name C_POS_ID */
|
||||
public static final String COLUMNNAME_C_POS_ID = "C_POS_ID";
|
||||
|
||||
/** Set POS Terminal.
|
||||
* Point of Sales Terminal
|
||||
*/
|
||||
public void setC_POS_ID (int C_POS_ID);
|
||||
|
||||
/** Get POS Terminal.
|
||||
* Point of Sales Terminal
|
||||
*/
|
||||
public int getC_POS_ID();
|
||||
|
||||
public I_C_POS getC_POS() throws Exception;
|
||||
|
||||
/** Column name C_Project_ID */
|
||||
public static final String COLUMNNAME_C_Project_ID = "C_Project_ID";
|
||||
|
||||
/** Set Project.
|
||||
* Financial Project
|
||||
*/
|
||||
public void setC_Project_ID (int C_Project_ID);
|
||||
|
||||
/** Get Project.
|
||||
* Financial Project
|
||||
*/
|
||||
public int getC_Project_ID();
|
||||
|
||||
public I_C_Project getC_Project() throws Exception;
|
||||
|
||||
/** Column name DateAcct */
|
||||
public static final String COLUMNNAME_DateAcct = "DateAcct";
|
||||
|
||||
|
@ -513,6 +517,45 @@ public interface I_C_Order
|
|||
*/
|
||||
public String getDocumentNo();
|
||||
|
||||
/** Column name DropShip_BPartner_ID */
|
||||
public static final String COLUMNNAME_DropShip_BPartner_ID = "DropShip_BPartner_ID";
|
||||
|
||||
/** Set Drop Shipment Partner.
|
||||
* Business Partner to ship to
|
||||
*/
|
||||
public void setDropShip_BPartner_ID (int DropShip_BPartner_ID);
|
||||
|
||||
/** Get Drop Shipment Partner.
|
||||
* Business Partner to ship to
|
||||
*/
|
||||
public int getDropShip_BPartner_ID();
|
||||
|
||||
/** Column name DropShip_Location_ID */
|
||||
public static final String COLUMNNAME_DropShip_Location_ID = "DropShip_Location_ID";
|
||||
|
||||
/** Set Drop Shipment Location.
|
||||
* Business Partner Location for shipping to
|
||||
*/
|
||||
public void setDropShip_Location_ID (int DropShip_Location_ID);
|
||||
|
||||
/** Get Drop Shipment Location.
|
||||
* Business Partner Location for shipping to
|
||||
*/
|
||||
public int getDropShip_Location_ID();
|
||||
|
||||
/** Column name DropShip_User_ID */
|
||||
public static final String COLUMNNAME_DropShip_User_ID = "DropShip_User_ID";
|
||||
|
||||
/** Set Drop Shipment Contact.
|
||||
* Business Partner Contact for drop shipment
|
||||
*/
|
||||
public void setDropShip_User_ID (int DropShip_User_ID);
|
||||
|
||||
/** Get Drop Shipment Contact.
|
||||
* Business Partner Contact for drop shipment
|
||||
*/
|
||||
public int getDropShip_User_ID();
|
||||
|
||||
/** Column name FreightAmt */
|
||||
public static final String COLUMNNAME_FreightAmt = "FreightAmt";
|
||||
|
||||
|
@ -652,6 +695,19 @@ public interface I_C_Order
|
|||
*/
|
||||
public boolean isPrinted();
|
||||
|
||||
/** Column name IsSOTrx */
|
||||
public static final String COLUMNNAME_IsSOTrx = "IsSOTrx";
|
||||
|
||||
/** Set Sales Transaction.
|
||||
* This is a Sales Transaction
|
||||
*/
|
||||
public void setIsSOTrx (boolean IsSOTrx);
|
||||
|
||||
/** Get Sales Transaction.
|
||||
* This is a Sales Transaction
|
||||
*/
|
||||
public boolean isSOTrx();
|
||||
|
||||
/** Column name IsSelected */
|
||||
public static final String COLUMNNAME_IsSelected = "IsSelected";
|
||||
|
||||
|
@ -674,19 +730,6 @@ public interface I_C_Order
|
|||
*/
|
||||
public boolean isSelfService();
|
||||
|
||||
/** Column name IsSOTrx */
|
||||
public static final String COLUMNNAME_IsSOTrx = "IsSOTrx";
|
||||
|
||||
/** Set Sales Transaction.
|
||||
* This is a Sales Transaction
|
||||
*/
|
||||
public void setIsSOTrx (boolean IsSOTrx);
|
||||
|
||||
/** Get Sales Transaction.
|
||||
* This is a Sales Transaction
|
||||
*/
|
||||
public boolean isSOTrx();
|
||||
|
||||
/** Column name IsTaxIncluded */
|
||||
public static final String COLUMNNAME_IsTaxIncluded = "IsTaxIncluded";
|
||||
|
||||
|
@ -726,6 +769,21 @@ public interface I_C_Order
|
|||
*/
|
||||
public int getLink_Order_ID();
|
||||
|
||||
/** Column name M_FreightCategory_ID */
|
||||
public static final String COLUMNNAME_M_FreightCategory_ID = "M_FreightCategory_ID";
|
||||
|
||||
/** Set Freight Category.
|
||||
* Category of the Freight
|
||||
*/
|
||||
public void setM_FreightCategory_ID (int M_FreightCategory_ID);
|
||||
|
||||
/** Get Freight Category.
|
||||
* Category of the Freight
|
||||
*/
|
||||
public int getM_FreightCategory_ID();
|
||||
|
||||
public I_M_FreightCategory getM_FreightCategory() throws RuntimeException;
|
||||
|
||||
/** Column name M_PriceList_ID */
|
||||
public static final String COLUMNNAME_M_PriceList_ID = "M_PriceList_ID";
|
||||
|
||||
|
@ -739,7 +797,7 @@ public interface I_C_Order
|
|||
*/
|
||||
public int getM_PriceList_ID();
|
||||
|
||||
public I_M_PriceList getM_PriceList() throws Exception;
|
||||
public I_M_PriceList getM_PriceList() throws RuntimeException;
|
||||
|
||||
/** Column name M_Shipper_ID */
|
||||
public static final String COLUMNNAME_M_Shipper_ID = "M_Shipper_ID";
|
||||
|
@ -754,7 +812,7 @@ public interface I_C_Order
|
|||
*/
|
||||
public int getM_Shipper_ID();
|
||||
|
||||
public I_M_Shipper getM_Shipper() throws Exception;
|
||||
public I_M_Shipper getM_Shipper() throws RuntimeException;
|
||||
|
||||
/** Column name M_Warehouse_ID */
|
||||
public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID";
|
||||
|
@ -769,7 +827,7 @@ public interface I_C_Order
|
|||
*/
|
||||
public int getM_Warehouse_ID();
|
||||
|
||||
public I_M_Warehouse getM_Warehouse() throws Exception;
|
||||
public I_M_Warehouse getM_Warehouse() throws RuntimeException;
|
||||
|
||||
/** Column name OrderType */
|
||||
public static final String COLUMNNAME_OrderType = "OrderType";
|
||||
|
@ -780,6 +838,19 @@ public interface I_C_Order
|
|||
/** Get OrderType */
|
||||
public String getOrderType();
|
||||
|
||||
/** Column name POReference */
|
||||
public static final String COLUMNNAME_POReference = "POReference";
|
||||
|
||||
/** Set Order Reference.
|
||||
* Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner
|
||||
*/
|
||||
public void setPOReference (String POReference);
|
||||
|
||||
/** Get Order Reference.
|
||||
* Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner
|
||||
*/
|
||||
public String getPOReference();
|
||||
|
||||
/** Column name Pay_BPartner_ID */
|
||||
public static final String COLUMNNAME_Pay_BPartner_ID = "Pay_BPartner_ID";
|
||||
|
||||
|
@ -819,19 +890,6 @@ public interface I_C_Order
|
|||
*/
|
||||
public String getPaymentRule();
|
||||
|
||||
/** Column name POReference */
|
||||
public static final String COLUMNNAME_POReference = "POReference";
|
||||
|
||||
/** Set Order Reference.
|
||||
* Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner
|
||||
*/
|
||||
public void setPOReference (String POReference);
|
||||
|
||||
/** Get Order Reference.
|
||||
* Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner
|
||||
*/
|
||||
public String getPOReference();
|
||||
|
||||
/** Column name Posted */
|
||||
public static final String COLUMNNAME_Posted = "Posted";
|
||||
|
||||
|
|
|
@ -1,31 +1,22 @@
|
|||
/**********************************************************************
|
||||
* This file is part of Adempiere ERP Bazaar *
|
||||
* http://www.adempiere.org *
|
||||
* *
|
||||
* Copyright (C) Trifon Trifonov. *
|
||||
* Copyright (C) Contributors *
|
||||
* *
|
||||
* This program is free software, you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License *
|
||||
* as published by the Free Software Foundation, either version 2 *
|
||||
* of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY, without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* 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., 51 Franklin Street, Fifth Floor, Boston, *
|
||||
* MA 02110-1301, USA. *
|
||||
* *
|
||||
* Contributors: *
|
||||
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
|
||||
* *
|
||||
* Sponsors: *
|
||||
* - Company (http://www.site.com) *
|
||||
**********************************************************************/
|
||||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||
* 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 *
|
||||
* 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 *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* 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., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* 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 *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.compiere.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
@ -66,6 +57,19 @@ public interface I_M_InOut
|
|||
*/
|
||||
public int getAD_OrgTrx_ID();
|
||||
|
||||
/** Column name AD_Org_ID */
|
||||
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||
|
||||
/** Set Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public void setAD_Org_ID (int AD_Org_ID);
|
||||
|
||||
/** Get Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public int getAD_Org_ID();
|
||||
|
||||
/** Column name AD_User_ID */
|
||||
public static final String COLUMNNAME_AD_User_ID = "AD_User_ID";
|
||||
|
||||
|
@ -79,7 +83,7 @@ public interface I_M_InOut
|
|||
*/
|
||||
public int getAD_User_ID();
|
||||
|
||||
public I_AD_User getAD_User() throws Exception;
|
||||
public I_AD_User getAD_User() throws RuntimeException;
|
||||
|
||||
/** Column name C_Activity_ID */
|
||||
public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID";
|
||||
|
@ -94,7 +98,7 @@ public interface I_M_InOut
|
|||
*/
|
||||
public int getC_Activity_ID();
|
||||
|
||||
public I_C_Activity getC_Activity() throws Exception;
|
||||
public I_C_Activity getC_Activity() throws RuntimeException;
|
||||
|
||||
/** Column name C_BPartner_ID */
|
||||
public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID";
|
||||
|
@ -109,7 +113,7 @@ public interface I_M_InOut
|
|||
*/
|
||||
public int getC_BPartner_ID();
|
||||
|
||||
public I_C_BPartner getC_BPartner() throws Exception;
|
||||
public I_C_BPartner getC_BPartner() throws RuntimeException;
|
||||
|
||||
/** Column name C_BPartner_Location_ID */
|
||||
public static final String COLUMNNAME_C_BPartner_Location_ID = "C_BPartner_Location_ID";
|
||||
|
@ -124,7 +128,7 @@ public interface I_M_InOut
|
|||
*/
|
||||
public int getC_BPartner_Location_ID();
|
||||
|
||||
public I_C_BPartner_Location getC_BPartner_Location() throws Exception;
|
||||
public I_C_BPartner_Location getC_BPartner_Location() throws RuntimeException;
|
||||
|
||||
/** Column name C_Campaign_ID */
|
||||
public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID";
|
||||
|
@ -139,7 +143,7 @@ public interface I_M_InOut
|
|||
*/
|
||||
public int getC_Campaign_ID();
|
||||
|
||||
public I_C_Campaign getC_Campaign() throws Exception;
|
||||
public I_C_Campaign getC_Campaign() throws RuntimeException;
|
||||
|
||||
/** Column name C_Charge_ID */
|
||||
public static final String COLUMNNAME_C_Charge_ID = "C_Charge_ID";
|
||||
|
@ -167,19 +171,6 @@ public interface I_M_InOut
|
|||
*/
|
||||
public int getC_DocType_ID();
|
||||
|
||||
/** Column name ChargeAmt */
|
||||
public static final String COLUMNNAME_ChargeAmt = "ChargeAmt";
|
||||
|
||||
/** Set Charge amount.
|
||||
* Charge Amount
|
||||
*/
|
||||
public void setChargeAmt (BigDecimal ChargeAmt);
|
||||
|
||||
/** Get Charge amount.
|
||||
* Charge Amount
|
||||
*/
|
||||
public BigDecimal getChargeAmt();
|
||||
|
||||
/** Column name C_Invoice_ID */
|
||||
public static final String COLUMNNAME_C_Invoice_ID = "C_Invoice_ID";
|
||||
|
||||
|
@ -193,7 +184,7 @@ public interface I_M_InOut
|
|||
*/
|
||||
public int getC_Invoice_ID();
|
||||
|
||||
public I_C_Invoice getC_Invoice() throws Exception;
|
||||
public I_C_Invoice getC_Invoice() throws RuntimeException;
|
||||
|
||||
/** Column name C_Order_ID */
|
||||
public static final String COLUMNNAME_C_Order_ID = "C_Order_ID";
|
||||
|
@ -208,7 +199,7 @@ public interface I_M_InOut
|
|||
*/
|
||||
public int getC_Order_ID();
|
||||
|
||||
public I_C_Order getC_Order() throws Exception;
|
||||
public I_C_Order getC_Order() throws RuntimeException;
|
||||
|
||||
/** Column name C_Project_ID */
|
||||
public static final String COLUMNNAME_C_Project_ID = "C_Project_ID";
|
||||
|
@ -223,7 +214,20 @@ public interface I_M_InOut
|
|||
*/
|
||||
public int getC_Project_ID();
|
||||
|
||||
public I_C_Project getC_Project() throws Exception;
|
||||
public I_C_Project getC_Project() throws RuntimeException;
|
||||
|
||||
/** Column name ChargeAmt */
|
||||
public static final String COLUMNNAME_ChargeAmt = "ChargeAmt";
|
||||
|
||||
/** Set Charge amount.
|
||||
* Charge Amount
|
||||
*/
|
||||
public void setChargeAmt (BigDecimal ChargeAmt);
|
||||
|
||||
/** Get Charge amount.
|
||||
* Charge Amount
|
||||
*/
|
||||
public BigDecimal getChargeAmt();
|
||||
|
||||
/** Column name CreateConfirm */
|
||||
public static final String COLUMNNAME_CreateConfirm = "CreateConfirm";
|
||||
|
@ -386,6 +390,45 @@ public interface I_M_InOut
|
|||
*/
|
||||
public String getDocumentNo();
|
||||
|
||||
/** Column name DropShip_BPartner_ID */
|
||||
public static final String COLUMNNAME_DropShip_BPartner_ID = "DropShip_BPartner_ID";
|
||||
|
||||
/** Set Drop Shipment Partner.
|
||||
* Business Partner to ship to
|
||||
*/
|
||||
public void setDropShip_BPartner_ID (int DropShip_BPartner_ID);
|
||||
|
||||
/** Get Drop Shipment Partner.
|
||||
* Business Partner to ship to
|
||||
*/
|
||||
public int getDropShip_BPartner_ID();
|
||||
|
||||
/** Column name DropShip_Location_ID */
|
||||
public static final String COLUMNNAME_DropShip_Location_ID = "DropShip_Location_ID";
|
||||
|
||||
/** Set Drop Shipment Location.
|
||||
* Business Partner Location for shipping to
|
||||
*/
|
||||
public void setDropShip_Location_ID (int DropShip_Location_ID);
|
||||
|
||||
/** Get Drop Shipment Location.
|
||||
* Business Partner Location for shipping to
|
||||
*/
|
||||
public int getDropShip_Location_ID();
|
||||
|
||||
/** Column name DropShip_User_ID */
|
||||
public static final String COLUMNNAME_DropShip_User_ID = "DropShip_User_ID";
|
||||
|
||||
/** Set Drop Shipment Contact.
|
||||
* Business Partner Contact for drop shipment
|
||||
*/
|
||||
public void setDropShip_User_ID (int DropShip_User_ID);
|
||||
|
||||
/** Get Drop Shipment Contact.
|
||||
* Business Partner Contact for drop shipment
|
||||
*/
|
||||
public int getDropShip_User_ID();
|
||||
|
||||
/** Column name FreightAmt */
|
||||
public static final String COLUMNNAME_FreightAmt = "FreightAmt";
|
||||
|
||||
|
@ -438,6 +481,19 @@ public interface I_M_InOut
|
|||
*/
|
||||
public boolean isApproved();
|
||||
|
||||
/** Column name IsDropShip */
|
||||
public static final String COLUMNNAME_IsDropShip = "IsDropShip";
|
||||
|
||||
/** Set Drop Shipment.
|
||||
* Drop Shipments are sent from the Vendor directly to the Customer
|
||||
*/
|
||||
public void setIsDropShip (boolean IsDropShip);
|
||||
|
||||
/** Get Drop Shipment.
|
||||
* Drop Shipments are sent from the Vendor directly to the Customer
|
||||
*/
|
||||
public boolean isDropShip();
|
||||
|
||||
/** Column name IsInDispute */
|
||||
public static final String COLUMNNAME_IsInDispute = "IsInDispute";
|
||||
|
||||
|
@ -503,6 +559,51 @@ public interface I_M_InOut
|
|||
*/
|
||||
public int getM_InOut_ID();
|
||||
|
||||
/** Column name M_RMA_ID */
|
||||
public static final String COLUMNNAME_M_RMA_ID = "M_RMA_ID";
|
||||
|
||||
/** Set RMA.
|
||||
* Return Material Authorization
|
||||
*/
|
||||
public void setM_RMA_ID (int M_RMA_ID);
|
||||
|
||||
/** Get RMA.
|
||||
* Return Material Authorization
|
||||
*/
|
||||
public int getM_RMA_ID();
|
||||
|
||||
public I_M_RMA getM_RMA() throws RuntimeException;
|
||||
|
||||
/** Column name M_Shipper_ID */
|
||||
public static final String COLUMNNAME_M_Shipper_ID = "M_Shipper_ID";
|
||||
|
||||
/** Set Shipper.
|
||||
* Method or manner of product delivery
|
||||
*/
|
||||
public void setM_Shipper_ID (int M_Shipper_ID);
|
||||
|
||||
/** Get Shipper.
|
||||
* Method or manner of product delivery
|
||||
*/
|
||||
public int getM_Shipper_ID();
|
||||
|
||||
public I_M_Shipper getM_Shipper() throws RuntimeException;
|
||||
|
||||
/** Column name M_Warehouse_ID */
|
||||
public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID";
|
||||
|
||||
/** Set Warehouse.
|
||||
* Storage Warehouse and Service Point
|
||||
*/
|
||||
public void setM_Warehouse_ID (int M_Warehouse_ID);
|
||||
|
||||
/** Get Warehouse.
|
||||
* Storage Warehouse and Service Point
|
||||
*/
|
||||
public int getM_Warehouse_ID();
|
||||
|
||||
public I_M_Warehouse getM_Warehouse() throws RuntimeException;
|
||||
|
||||
/** Column name MovementDate */
|
||||
public static final String COLUMNNAME_MovementDate = "MovementDate";
|
||||
|
||||
|
@ -529,51 +630,6 @@ public interface I_M_InOut
|
|||
*/
|
||||
public String getMovementType();
|
||||
|
||||
/** Column name M_RMA_ID */
|
||||
public static final String COLUMNNAME_M_RMA_ID = "M_RMA_ID";
|
||||
|
||||
/** Set RMA.
|
||||
* Return Material Authorization
|
||||
*/
|
||||
public void setM_RMA_ID (int M_RMA_ID);
|
||||
|
||||
/** Get RMA.
|
||||
* Return Material Authorization
|
||||
*/
|
||||
public int getM_RMA_ID();
|
||||
|
||||
public I_M_RMA getM_RMA() throws Exception;
|
||||
|
||||
/** Column name M_Shipper_ID */
|
||||
public static final String COLUMNNAME_M_Shipper_ID = "M_Shipper_ID";
|
||||
|
||||
/** Set Shipper.
|
||||
* Method or manner of product delivery
|
||||
*/
|
||||
public void setM_Shipper_ID (int M_Shipper_ID);
|
||||
|
||||
/** Get Shipper.
|
||||
* Method or manner of product delivery
|
||||
*/
|
||||
public int getM_Shipper_ID();
|
||||
|
||||
public I_M_Shipper getM_Shipper() throws Exception;
|
||||
|
||||
/** Column name M_Warehouse_ID */
|
||||
public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID";
|
||||
|
||||
/** Set Warehouse.
|
||||
* Storage Warehouse and Service Point
|
||||
*/
|
||||
public void setM_Warehouse_ID (int M_Warehouse_ID);
|
||||
|
||||
/** Get Warehouse.
|
||||
* Storage Warehouse and Service Point
|
||||
*/
|
||||
public int getM_Warehouse_ID();
|
||||
|
||||
public I_M_Warehouse getM_Warehouse() throws Exception;
|
||||
|
||||
/** Column name NoPackages */
|
||||
public static final String COLUMNNAME_NoPackages = "NoPackages";
|
||||
|
||||
|
@ -587,19 +643,6 @@ public interface I_M_InOut
|
|||
*/
|
||||
public int getNoPackages();
|
||||
|
||||
/** Column name PickDate */
|
||||
public static final String COLUMNNAME_PickDate = "PickDate";
|
||||
|
||||
/** Set Pick Date.
|
||||
* Date/Time when picked for Shipment
|
||||
*/
|
||||
public void setPickDate (Timestamp PickDate);
|
||||
|
||||
/** Get Pick Date.
|
||||
* Date/Time when picked for Shipment
|
||||
*/
|
||||
public Timestamp getPickDate();
|
||||
|
||||
/** Column name POReference */
|
||||
public static final String COLUMNNAME_POReference = "POReference";
|
||||
|
||||
|
@ -613,6 +656,19 @@ public interface I_M_InOut
|
|||
*/
|
||||
public String getPOReference();
|
||||
|
||||
/** Column name PickDate */
|
||||
public static final String COLUMNNAME_PickDate = "PickDate";
|
||||
|
||||
/** Set Pick Date.
|
||||
* Date/Time when picked for Shipment
|
||||
*/
|
||||
public void setPickDate (Timestamp PickDate);
|
||||
|
||||
/** Get Pick Date.
|
||||
* Date/Time when picked for Shipment
|
||||
*/
|
||||
public Timestamp getPickDate();
|
||||
|
||||
/** Column name Posted */
|
||||
public static final String COLUMNNAME_Posted = "Posted";
|
||||
|
||||
|
|
|
@ -349,6 +349,11 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
setUser1_ID(order.getUser1_ID());
|
||||
setUser2_ID(order.getUser2_ID());
|
||||
setPriorityRule(order.getPriorityRule());
|
||||
// Drop shipment
|
||||
setIsDropShip(order.isDropShip());
|
||||
setDropShip_BPartner_ID(order.getDropShip_BPartner_ID());
|
||||
setDropShip_Location_ID(order.getDropShip_Location_ID());
|
||||
setDropShip_User_ID(order.getDropShip_User_ID());
|
||||
} // MInOut
|
||||
|
||||
/**
|
||||
|
@ -410,6 +415,12 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
setM_Shipper_ID(order.getM_Shipper_ID());
|
||||
setFreightCostRule (order.getFreightCostRule());
|
||||
setFreightAmt(order.getFreightAmt());
|
||||
|
||||
// Drop Shipment
|
||||
setIsDropShip(order.isDropShip());
|
||||
setDropShip_BPartner_ID(order.getDropShip_BPartner_ID());
|
||||
setDropShip_Location_ID(order.getDropShip_Location_ID());
|
||||
setDropShip_User_ID(order.getDropShip_User_ID());
|
||||
}
|
||||
} // MInOut
|
||||
|
||||
|
@ -462,6 +473,13 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
setAD_OrgTrx_ID(original.getAD_OrgTrx_ID());
|
||||
setUser1_ID(original.getUser1_ID());
|
||||
setUser2_ID(original.getUser2_ID());
|
||||
|
||||
// DropShipment
|
||||
setIsDropShip(original.isDropShip());
|
||||
setDropShip_BPartner_ID(original.getDropShip_BPartner_ID());
|
||||
setDropShip_Location_ID(original.getDropShip_Location_ID());
|
||||
setDropShip_User_ID(original.getDropShip_User_ID());
|
||||
|
||||
} // MInOut
|
||||
|
||||
|
||||
|
@ -1509,6 +1527,11 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
MInOut counter = createCounterDoc();
|
||||
if (counter != null)
|
||||
info.append(" - @CounterDoc@: @M_InOut_ID@=").append(counter.getDocumentNo());
|
||||
|
||||
// Drop Shipments
|
||||
MInOut dropShipment = createDropShipment();
|
||||
if (dropShipment != null)
|
||||
info.append(" - @DropShipment@: @M_InOut_ID@=").append(dropShipment.getDocumentNo());
|
||||
// User Validation
|
||||
String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE);
|
||||
if (valid != null)
|
||||
|
@ -1526,6 +1549,78 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
return DocAction.STATUS_Completed;
|
||||
} // completeIt
|
||||
|
||||
/**
|
||||
* Automatically creates a customer shipment for any
|
||||
* drop shipment material receipt
|
||||
* Based on createCounterDoc() by JJ
|
||||
* @return shipment if created else null
|
||||
*/
|
||||
private MInOut createDropShipment() {
|
||||
|
||||
if ( isSOTrx() || !isDropShip() || getC_Order_ID() == 0 )
|
||||
return null;
|
||||
|
||||
// Document Type
|
||||
int C_DocTypeTarget_ID = 0;
|
||||
MDocType[] shipmentTypes = MDocType.getOfDocBaseType(getCtx(), MDocType.DOCBASETYPE_MaterialDelivery);
|
||||
|
||||
for (int i = 0; i < shipmentTypes.length; i++ )
|
||||
{
|
||||
if (shipmentTypes[i].isSOTrx() && ( C_DocTypeTarget_ID == 0 || shipmentTypes[i].isDefault() ) )
|
||||
C_DocTypeTarget_ID = shipmentTypes[i].getC_DocType_ID();
|
||||
}
|
||||
|
||||
// Deep Copy
|
||||
MInOut dropShipment = copyFrom(this, getMovementDate(),
|
||||
C_DocTypeTarget_ID, !isSOTrx(), false, get_TrxName(), true);
|
||||
|
||||
int linkedOrderID = new MOrder (getCtx(), getC_Order_ID(), get_TrxName()).getLink_Order_ID();
|
||||
if (linkedOrderID != 0)
|
||||
{
|
||||
dropShipment.setC_Order_ID(linkedOrderID);
|
||||
|
||||
// get invoice id from linked order
|
||||
int invID = new MOrder (getCtx(), linkedOrderID, get_TrxName()).getC_Invoice_ID();
|
||||
if ( invID != 0 )
|
||||
dropShipment.setC_Invoice_ID(invID);
|
||||
}
|
||||
else
|
||||
return null;
|
||||
|
||||
dropShipment.setC_BPartner_ID(getDropShip_BPartner_ID());
|
||||
dropShipment.setC_BPartner_Location_ID(getDropShip_Location_ID());
|
||||
dropShipment.setAD_User_ID(getDropShip_User_ID());
|
||||
dropShipment.setIsDropShip(false);
|
||||
dropShipment.setDropShip_BPartner_ID(0);
|
||||
dropShipment.setDropShip_Location_ID(0);
|
||||
dropShipment.setDropShip_User_ID(0);
|
||||
dropShipment.setMovementType(MOVEMENTTYPE_CustomerShipment);
|
||||
|
||||
// References (Should not be required
|
||||
dropShipment.setSalesRep_ID(getSalesRep_ID());
|
||||
dropShipment.save(get_TrxName());
|
||||
|
||||
// Update line order references to linked sales order lines
|
||||
MInOutLine[] lines = dropShipment.getLines(true);
|
||||
for (int i = 0; i < lines.length; i++)
|
||||
{
|
||||
MInOutLine dropLine = lines[i];
|
||||
MOrderLine ol = new MOrderLine(getCtx(), dropLine.getC_OrderLine_ID(), null);
|
||||
if ( ol.getC_OrderLine_ID() != 0 ) {
|
||||
dropLine.setC_OrderLine_ID(ol.getLink_OrderLine_ID());
|
||||
dropLine.save();
|
||||
}
|
||||
}
|
||||
|
||||
log.fine(dropShipment.toString());
|
||||
|
||||
dropShipment.setDocAction(DocAction.ACTION_Complete);
|
||||
dropShipment.processIt(DocAction.ACTION_Complete);
|
||||
dropShipment.save();
|
||||
|
||||
return dropShipment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the definite document number after completed
|
||||
*/
|
||||
|
@ -1749,6 +1844,15 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
counter.setM_Warehouse_ID(counterOrgInfo.getM_Warehouse_ID());
|
||||
//
|
||||
counter.setBPartner(counterBP);
|
||||
|
||||
if ( isDropShip() )
|
||||
{
|
||||
counter.setIsDropShip(true );
|
||||
counter.setDropShip_BPartner_ID(getDropShip_BPartner_ID());
|
||||
counter.setDropShip_Location_ID(getDropShip_Location_ID());
|
||||
counter.setDropShip_User_ID(getDropShip_User_ID());
|
||||
}
|
||||
|
||||
// Refernces (Should not be required
|
||||
counter.setSalesRep_ID(getSalesRep_ID());
|
||||
counter.save(get_TrxName());
|
||||
|
|
|
@ -114,6 +114,9 @@ public class MOrder extends X_C_Order implements DocAction
|
|||
if (to.copyLinesFrom(from, counter, copyASI) == 0)
|
||||
throw new IllegalStateException("Could not create Order Lines");
|
||||
|
||||
// don't copy linked PO/SO
|
||||
to.setLink_Order_ID(0);
|
||||
|
||||
return to;
|
||||
} // copyFrom
|
||||
|
||||
|
@ -509,6 +512,8 @@ public class MOrder extends X_C_Order implements DocAction
|
|||
line.setQtyReserved(Env.ZERO);
|
||||
line.setDateDelivered(null);
|
||||
line.setDateInvoiced(null);
|
||||
// don't copy linked lines
|
||||
line.setLink_OrderLine_ID(0);
|
||||
// Tax
|
||||
if (getC_BPartner_ID() != otherOrder.getC_BPartner_ID())
|
||||
line.setTax(); // recalculate
|
||||
|
@ -1350,7 +1355,7 @@ public class MOrder extends X_C_Order implements DocAction
|
|||
// Closing Binding Quotation
|
||||
|| (MDocType.DOCSUBTYPESO_Quotation.equals(dt.getDocSubTypeSO())
|
||||
&& DOCACTION_Close.equals(getDocAction()))
|
||||
|| isDropShip() )
|
||||
) // || isDropShip() )
|
||||
binding = false;
|
||||
boolean isSOTrx = isSOTrx();
|
||||
log.fine("Binding=" + binding + " - IsSOTrx=" + isSOTrx);
|
||||
|
|
|
@ -74,7 +74,7 @@ public class X_AD_OrgInfo extends PO implements I_AD_OrgInfo, I_Persistent
|
|||
return sb.toString();
|
||||
}
|
||||
|
||||
public I_AD_OrgType getAD_OrgType() throws Exception
|
||||
public I_AD_OrgType getAD_OrgType() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_AD_OrgType.Table_Name);
|
||||
I_AD_OrgType result = null;
|
||||
|
@ -85,7 +85,7 @@ public class X_AD_OrgInfo extends PO implements I_AD_OrgInfo, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -155,7 +155,30 @@ public class X_AD_OrgInfo extends PO implements I_AD_OrgInfo, I_Persistent
|
|||
return (String)get_Value(COLUMNNAME_DUNS);
|
||||
}
|
||||
|
||||
public I_M_Warehouse getM_Warehouse() throws Exception
|
||||
/** Set Drop Ship Warehouse.
|
||||
@param DropShip_Warehouse_ID
|
||||
The (logical) warehouse to use for recording drop ship receipts and shipments.
|
||||
*/
|
||||
public void setDropShip_Warehouse_ID (int DropShip_Warehouse_ID)
|
||||
{
|
||||
if (DropShip_Warehouse_ID < 1)
|
||||
set_Value (COLUMNNAME_DropShip_Warehouse_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_DropShip_Warehouse_ID, Integer.valueOf(DropShip_Warehouse_ID));
|
||||
}
|
||||
|
||||
/** Get Drop Ship Warehouse.
|
||||
@return The (logical) warehouse to use for recording drop ship receipts and shipments.
|
||||
*/
|
||||
public int getDropShip_Warehouse_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_DropShip_Warehouse_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_Warehouse getM_Warehouse() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_M_Warehouse.Table_Name);
|
||||
I_M_Warehouse result = null;
|
||||
|
@ -166,7 +189,7 @@ public class X_AD_OrgInfo extends PO implements I_AD_OrgInfo, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -194,8 +217,6 @@ public class X_AD_OrgInfo extends PO implements I_AD_OrgInfo, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Parent_Org_ID AD_Reference_ID=130 */
|
||||
public static final int PARENT_ORG_ID_AD_Reference_ID=130;
|
||||
/** Set Parent Organization.
|
||||
@param Parent_Org_ID
|
||||
Parent (superior) Organization
|
||||
|
@ -238,8 +259,6 @@ public class X_AD_OrgInfo extends PO implements I_AD_OrgInfo, I_Persistent
|
|||
return (String)get_Value(COLUMNNAME_ReceiptFooterMsg);
|
||||
}
|
||||
|
||||
/** Supervisor_ID AD_Reference_ID=286 */
|
||||
public static final int SUPERVISOR_ID_AD_Reference_ID=286;
|
||||
/** Set Supervisor.
|
||||
@param Supervisor_ID
|
||||
Supervisor for this user/organization - used for escalation and approval
|
||||
|
@ -282,8 +301,6 @@ public class X_AD_OrgInfo extends PO implements I_AD_OrgInfo, I_Persistent
|
|||
return (String)get_Value(COLUMNNAME_TaxID);
|
||||
}
|
||||
|
||||
/** TransferBank_ID AD_Reference_ID=52001 */
|
||||
public static final int TRANSFERBANK_ID_AD_Reference_ID=52001;
|
||||
/** Set Bank for transfers.
|
||||
@param TransferBank_ID
|
||||
Bank account depending on currency will be used from this bank for doing transfers
|
||||
|
@ -307,8 +324,6 @@ public class X_AD_OrgInfo extends PO implements I_AD_OrgInfo, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** TransferCashBook_ID AD_Reference_ID=52004 */
|
||||
public static final int TRANSFERCASHBOOK_ID_AD_Reference_ID=52004;
|
||||
/** Set CashBook for transfers.
|
||||
@param TransferCashBook_ID CashBook for transfers */
|
||||
public void setTransferCashBook_ID (int TransferCashBook_ID)
|
||||
|
|
|
@ -47,9 +47,9 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
setC_BPartner_Location_ID (0);
|
||||
setC_Currency_ID (0);
|
||||
// @C_Currency_ID@
|
||||
setC_DocTypeTarget_ID (0);
|
||||
setC_DocType_ID (0);
|
||||
// 0
|
||||
setC_DocTypeTarget_ID (0);
|
||||
setC_Order_ID (0);
|
||||
setC_PaymentTerm_ID (0);
|
||||
setDateAcct (new Timestamp( System.currentTimeMillis() ));
|
||||
|
@ -82,10 +82,10 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
// N
|
||||
setIsInvoiced (false);
|
||||
setIsPrinted (false);
|
||||
setIsSelected (false);
|
||||
setIsSelfService (false);
|
||||
setIsSOTrx (false);
|
||||
// @IsSOTrx@
|
||||
setIsSelected (false);
|
||||
setIsSelfService (false);
|
||||
setIsTaxIncluded (false);
|
||||
setIsTransferred (false);
|
||||
setM_PriceList_ID (0);
|
||||
|
@ -131,8 +131,6 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return sb.toString();
|
||||
}
|
||||
|
||||
/** AD_OrgTrx_ID AD_Reference_ID=130 */
|
||||
public static final int AD_ORGTRX_ID_AD_Reference_ID=130;
|
||||
/** Set Trx Organization.
|
||||
@param AD_OrgTrx_ID
|
||||
Performing or initiating organization
|
||||
|
@ -156,7 +154,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_AD_User getAD_User() throws Exception
|
||||
public I_AD_User getAD_User() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_AD_User.Table_Name);
|
||||
I_AD_User result = null;
|
||||
|
@ -167,7 +165,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -229,8 +227,6 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return bd;
|
||||
}
|
||||
|
||||
/** Bill_BPartner_ID AD_Reference_ID=138 */
|
||||
public static final int BILL_BPARTNER_ID_AD_Reference_ID=138;
|
||||
/** Set Invoice Partner.
|
||||
@param Bill_BPartner_ID
|
||||
Business Partner to be invoiced
|
||||
|
@ -254,8 +250,6 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Bill_Location_ID AD_Reference_ID=159 */
|
||||
public static final int BILL_LOCATION_ID_AD_Reference_ID=159;
|
||||
/** Set Invoice Location.
|
||||
@param Bill_Location_ID
|
||||
Business Partner Location for invoicing
|
||||
|
@ -279,8 +273,6 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Bill_User_ID AD_Reference_ID=110 */
|
||||
public static final int BILL_USER_ID_AD_Reference_ID=110;
|
||||
/** Set Invoice Contact.
|
||||
@param Bill_User_ID
|
||||
Business Partner Contact for invoicing
|
||||
|
@ -304,7 +296,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Activity getC_Activity() throws Exception
|
||||
public I_C_Activity getC_Activity() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Activity.Table_Name);
|
||||
I_C_Activity result = null;
|
||||
|
@ -315,7 +307,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -343,7 +335,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_BPartner getC_BPartner() throws Exception
|
||||
public I_C_BPartner getC_BPartner() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_BPartner.Table_Name);
|
||||
I_C_BPartner result = null;
|
||||
|
@ -354,7 +346,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -381,7 +373,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_BPartner_Location getC_BPartner_Location() throws Exception
|
||||
public I_C_BPartner_Location getC_BPartner_Location() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_BPartner_Location.Table_Name);
|
||||
I_C_BPartner_Location result = null;
|
||||
|
@ -392,7 +384,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -419,7 +411,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Campaign getC_Campaign() throws Exception
|
||||
public I_C_Campaign getC_Campaign() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Campaign.Table_Name);
|
||||
I_C_Campaign result = null;
|
||||
|
@ -430,7 +422,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -458,7 +450,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_CashLine getC_CashLine() throws Exception
|
||||
public I_C_CashLine getC_CashLine() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_CashLine.Table_Name);
|
||||
I_C_CashLine result = null;
|
||||
|
@ -469,7 +461,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -497,8 +489,6 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** C_Charge_ID AD_Reference_ID=200 */
|
||||
public static final int C_CHARGE_ID_AD_Reference_ID=200;
|
||||
/** Set Charge.
|
||||
@param C_Charge_ID
|
||||
Additional document charges
|
||||
|
@ -522,7 +512,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_ConversionType getC_ConversionType() throws Exception
|
||||
public I_C_ConversionType getC_ConversionType() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_ConversionType.Table_Name);
|
||||
I_C_ConversionType result = null;
|
||||
|
@ -533,7 +523,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -561,7 +551,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Currency getC_Currency() throws Exception
|
||||
public I_C_Currency getC_Currency() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Currency.Table_Name);
|
||||
I_C_Currency result = null;
|
||||
|
@ -572,7 +562,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -599,9 +589,29 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** C_DocType_ID AD_Reference_ID=170 */
|
||||
public static final int C_DOCTYPE_ID_AD_Reference_ID=170;
|
||||
public I_C_DocType getC_DocType() throws Exception
|
||||
/** Set Target Document Type.
|
||||
@param C_DocTypeTarget_ID
|
||||
Target document type for conversing documents
|
||||
*/
|
||||
public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID)
|
||||
{
|
||||
if (C_DocTypeTarget_ID < 1)
|
||||
throw new IllegalArgumentException ("C_DocTypeTarget_ID is mandatory.");
|
||||
set_Value (COLUMNNAME_C_DocTypeTarget_ID, Integer.valueOf(C_DocTypeTarget_ID));
|
||||
}
|
||||
|
||||
/** Get Target Document Type.
|
||||
@return Target document type for conversing documents
|
||||
*/
|
||||
public int getC_DocTypeTarget_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_DocTypeTarget_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_DocType getC_DocType() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_DocType.Table_Name);
|
||||
I_C_DocType result = null;
|
||||
|
@ -612,7 +622,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -639,25 +649,178 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** C_DocTypeTarget_ID AD_Reference_ID=170 */
|
||||
public static final int C_DOCTYPETARGET_ID_AD_Reference_ID=170;
|
||||
/** Set Target Document Type.
|
||||
@param C_DocTypeTarget_ID
|
||||
Target document type for conversing documents
|
||||
/** Set Order.
|
||||
@param C_Order_ID
|
||||
Order
|
||||
*/
|
||||
public void setC_DocTypeTarget_ID (int C_DocTypeTarget_ID)
|
||||
public void setC_Order_ID (int C_Order_ID)
|
||||
{
|
||||
if (C_DocTypeTarget_ID < 1)
|
||||
throw new IllegalArgumentException ("C_DocTypeTarget_ID is mandatory.");
|
||||
set_Value (COLUMNNAME_C_DocTypeTarget_ID, Integer.valueOf(C_DocTypeTarget_ID));
|
||||
if (C_Order_ID < 1)
|
||||
throw new IllegalArgumentException ("C_Order_ID is mandatory.");
|
||||
set_ValueNoCheck (COLUMNNAME_C_Order_ID, Integer.valueOf(C_Order_ID));
|
||||
}
|
||||
|
||||
/** Get Target Document Type.
|
||||
@return Target document type for conversing documents
|
||||
/** Get Order.
|
||||
@return Order
|
||||
*/
|
||||
public int getC_DocTypeTarget_ID ()
|
||||
public int getC_Order_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_DocTypeTarget_ID);
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_Order_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_POS getC_POS() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_POS.Table_Name);
|
||||
I_C_POS result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (I_C_POS)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_POS_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set POS Terminal.
|
||||
@param C_POS_ID
|
||||
Point of Sales Terminal
|
||||
*/
|
||||
public void setC_POS_ID (int C_POS_ID)
|
||||
{
|
||||
if (C_POS_ID < 1)
|
||||
set_Value (COLUMNNAME_C_POS_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_POS_ID, Integer.valueOf(C_POS_ID));
|
||||
}
|
||||
|
||||
/** Get POS Terminal.
|
||||
@return Point of Sales Terminal
|
||||
*/
|
||||
public int getC_POS_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_POS_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_PaymentTerm getC_PaymentTerm() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_PaymentTerm.Table_Name);
|
||||
I_C_PaymentTerm result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (I_C_PaymentTerm)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_PaymentTerm_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set Payment Term.
|
||||
@param C_PaymentTerm_ID
|
||||
The terms of Payment (timing, discount)
|
||||
*/
|
||||
public void setC_PaymentTerm_ID (int C_PaymentTerm_ID)
|
||||
{
|
||||
if (C_PaymentTerm_ID < 1)
|
||||
throw new IllegalArgumentException ("C_PaymentTerm_ID is mandatory.");
|
||||
set_Value (COLUMNNAME_C_PaymentTerm_ID, Integer.valueOf(C_PaymentTerm_ID));
|
||||
}
|
||||
|
||||
/** Get Payment Term.
|
||||
@return The terms of Payment (timing, discount)
|
||||
*/
|
||||
public int getC_PaymentTerm_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_PaymentTerm_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Payment getC_Payment() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Payment.Table_Name);
|
||||
I_C_Payment result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (I_C_Payment)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Payment_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set Payment.
|
||||
@param C_Payment_ID
|
||||
Payment identifier
|
||||
*/
|
||||
public void setC_Payment_ID (int C_Payment_ID)
|
||||
{
|
||||
if (C_Payment_ID < 1)
|
||||
set_Value (COLUMNNAME_C_Payment_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_Payment_ID, Integer.valueOf(C_Payment_ID));
|
||||
}
|
||||
|
||||
/** Get Payment.
|
||||
@return Payment identifier
|
||||
*/
|
||||
public int getC_Payment_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_Payment_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Project getC_Project() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Project.Table_Name);
|
||||
I_C_Project result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (I_C_Project)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Project_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set Project.
|
||||
@param C_Project_ID
|
||||
Financial Project
|
||||
*/
|
||||
public void setC_Project_ID (int C_Project_ID)
|
||||
{
|
||||
if (C_Project_ID < 1)
|
||||
set_Value (COLUMNNAME_C_Project_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID));
|
||||
}
|
||||
|
||||
/** Get Project.
|
||||
@return Financial Project
|
||||
*/
|
||||
public int getC_Project_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
|
@ -700,183 +863,6 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return (String)get_Value(COLUMNNAME_CopyFrom);
|
||||
}
|
||||
|
||||
/** Set Order.
|
||||
@param C_Order_ID
|
||||
Order
|
||||
*/
|
||||
public void setC_Order_ID (int C_Order_ID)
|
||||
{
|
||||
if (C_Order_ID < 1)
|
||||
throw new IllegalArgumentException ("C_Order_ID is mandatory.");
|
||||
set_ValueNoCheck (COLUMNNAME_C_Order_ID, Integer.valueOf(C_Order_ID));
|
||||
}
|
||||
|
||||
/** Get Order.
|
||||
@return Order
|
||||
*/
|
||||
public int getC_Order_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_Order_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Payment getC_Payment() throws Exception
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Payment.Table_Name);
|
||||
I_C_Payment result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (I_C_Payment)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Payment_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set Payment.
|
||||
@param C_Payment_ID
|
||||
Payment identifier
|
||||
*/
|
||||
public void setC_Payment_ID (int C_Payment_ID)
|
||||
{
|
||||
if (C_Payment_ID < 1)
|
||||
set_Value (COLUMNNAME_C_Payment_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_Payment_ID, Integer.valueOf(C_Payment_ID));
|
||||
}
|
||||
|
||||
/** Get Payment.
|
||||
@return Payment identifier
|
||||
*/
|
||||
public int getC_Payment_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_Payment_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_PaymentTerm getC_PaymentTerm() throws Exception
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_PaymentTerm.Table_Name);
|
||||
I_C_PaymentTerm result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (I_C_PaymentTerm)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_PaymentTerm_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set Payment Term.
|
||||
@param C_PaymentTerm_ID
|
||||
The terms of Payment (timing, discount)
|
||||
*/
|
||||
public void setC_PaymentTerm_ID (int C_PaymentTerm_ID)
|
||||
{
|
||||
if (C_PaymentTerm_ID < 1)
|
||||
throw new IllegalArgumentException ("C_PaymentTerm_ID is mandatory.");
|
||||
set_Value (COLUMNNAME_C_PaymentTerm_ID, Integer.valueOf(C_PaymentTerm_ID));
|
||||
}
|
||||
|
||||
/** Get Payment Term.
|
||||
@return The terms of Payment (timing, discount)
|
||||
*/
|
||||
public int getC_PaymentTerm_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_PaymentTerm_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_POS getC_POS() throws Exception
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_POS.Table_Name);
|
||||
I_C_POS result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (I_C_POS)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_POS_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set POS Terminal.
|
||||
@param C_POS_ID
|
||||
Point of Sales Terminal
|
||||
*/
|
||||
public void setC_POS_ID (int C_POS_ID)
|
||||
{
|
||||
if (C_POS_ID < 1)
|
||||
set_Value (COLUMNNAME_C_POS_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_POS_ID, Integer.valueOf(C_POS_ID));
|
||||
}
|
||||
|
||||
/** Get POS Terminal.
|
||||
@return Point of Sales Terminal
|
||||
*/
|
||||
public int getC_POS_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_POS_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Project getC_Project() throws Exception
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Project.Table_Name);
|
||||
I_C_Project result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (I_C_Project)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Project_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set Project.
|
||||
@param C_Project_ID
|
||||
Financial Project
|
||||
*/
|
||||
public void setC_Project_ID (int C_Project_ID)
|
||||
{
|
||||
if (C_Project_ID < 1)
|
||||
set_Value (COLUMNNAME_C_Project_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID));
|
||||
}
|
||||
|
||||
/** Get Project.
|
||||
@return Financial Project
|
||||
*/
|
||||
public int getC_Project_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Account Date.
|
||||
@param DateAcct
|
||||
Accounting Date
|
||||
|
@ -1145,6 +1131,75 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return new KeyNamePair(get_ID(), getDocumentNo());
|
||||
}
|
||||
|
||||
/** Set Drop Shipment Partner.
|
||||
@param DropShip_BPartner_ID
|
||||
Business Partner to ship to
|
||||
*/
|
||||
public void setDropShip_BPartner_ID (int DropShip_BPartner_ID)
|
||||
{
|
||||
if (DropShip_BPartner_ID < 1)
|
||||
set_Value (COLUMNNAME_DropShip_BPartner_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_DropShip_BPartner_ID, Integer.valueOf(DropShip_BPartner_ID));
|
||||
}
|
||||
|
||||
/** Get Drop Shipment Partner.
|
||||
@return Business Partner to ship to
|
||||
*/
|
||||
public int getDropShip_BPartner_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_DropShip_BPartner_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Drop Shipment Location.
|
||||
@param DropShip_Location_ID
|
||||
Business Partner Location for shipping to
|
||||
*/
|
||||
public void setDropShip_Location_ID (int DropShip_Location_ID)
|
||||
{
|
||||
if (DropShip_Location_ID < 1)
|
||||
set_Value (COLUMNNAME_DropShip_Location_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_DropShip_Location_ID, Integer.valueOf(DropShip_Location_ID));
|
||||
}
|
||||
|
||||
/** Get Drop Shipment Location.
|
||||
@return Business Partner Location for shipping to
|
||||
*/
|
||||
public int getDropShip_Location_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_DropShip_Location_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Drop Shipment Contact.
|
||||
@param DropShip_User_ID
|
||||
Business Partner Contact for drop shipment
|
||||
*/
|
||||
public void setDropShip_User_ID (int DropShip_User_ID)
|
||||
{
|
||||
if (DropShip_User_ID < 1)
|
||||
set_Value (COLUMNNAME_DropShip_User_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_DropShip_User_ID, Integer.valueOf(DropShip_User_ID));
|
||||
}
|
||||
|
||||
/** Get Drop Shipment Contact.
|
||||
@return Business Partner Contact for drop shipment
|
||||
*/
|
||||
public int getDropShip_User_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_DropShip_User_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Freight Amount.
|
||||
@param FreightAmt
|
||||
Freight Amount
|
||||
|
@ -1344,7 +1399,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
*/
|
||||
public void setIsDropShip (boolean IsDropShip)
|
||||
{
|
||||
set_ValueNoCheck (COLUMNNAME_IsDropShip, Boolean.valueOf(IsDropShip));
|
||||
set_Value (COLUMNNAME_IsDropShip, Boolean.valueOf(IsDropShip));
|
||||
}
|
||||
|
||||
/** Get Drop Shipment.
|
||||
|
@ -1410,6 +1465,30 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return false;
|
||||
}
|
||||
|
||||
/** Set Sales Transaction.
|
||||
@param IsSOTrx
|
||||
This is a Sales Transaction
|
||||
*/
|
||||
public void setIsSOTrx (boolean IsSOTrx)
|
||||
{
|
||||
set_Value (COLUMNNAME_IsSOTrx, Boolean.valueOf(IsSOTrx));
|
||||
}
|
||||
|
||||
/** Get Sales Transaction.
|
||||
@return This is a Sales Transaction
|
||||
*/
|
||||
public boolean isSOTrx ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_IsSOTrx);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Set Selected.
|
||||
@param IsSelected Selected */
|
||||
public void setIsSelected (boolean IsSelected)
|
||||
|
@ -1455,30 +1534,6 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return false;
|
||||
}
|
||||
|
||||
/** Set Sales Transaction.
|
||||
@param IsSOTrx
|
||||
This is a Sales Transaction
|
||||
*/
|
||||
public void setIsSOTrx (boolean IsSOTrx)
|
||||
{
|
||||
set_Value (COLUMNNAME_IsSOTrx, Boolean.valueOf(IsSOTrx));
|
||||
}
|
||||
|
||||
/** Get Sales Transaction.
|
||||
@return This is a Sales Transaction
|
||||
*/
|
||||
public boolean isSOTrx ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_IsSOTrx);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Set Price includes Tax.
|
||||
@param IsTaxIncluded
|
||||
Tax is included in the price
|
||||
|
@ -1527,8 +1582,6 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return false;
|
||||
}
|
||||
|
||||
/** Link_Order_ID AD_Reference_ID=290 */
|
||||
public static final int LINK_ORDER_ID_AD_Reference_ID=290;
|
||||
/** Set Linked Order.
|
||||
@param Link_Order_ID
|
||||
This field links a sales order to the purchase order that is generated from it.
|
||||
|
@ -1552,7 +1605,46 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_PriceList getM_PriceList() throws Exception
|
||||
public I_M_FreightCategory getM_FreightCategory() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_M_FreightCategory.Table_Name);
|
||||
I_M_FreightCategory result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (I_M_FreightCategory)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_FreightCategory_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set Freight Category.
|
||||
@param M_FreightCategory_ID
|
||||
Category of the Freight
|
||||
*/
|
||||
public void setM_FreightCategory_ID (int M_FreightCategory_ID)
|
||||
{
|
||||
if (M_FreightCategory_ID < 1)
|
||||
set_Value (COLUMNNAME_M_FreightCategory_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_M_FreightCategory_ID, Integer.valueOf(M_FreightCategory_ID));
|
||||
}
|
||||
|
||||
/** Get Freight Category.
|
||||
@return Category of the Freight
|
||||
*/
|
||||
public int getM_FreightCategory_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_M_FreightCategory_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_PriceList getM_PriceList() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_M_PriceList.Table_Name);
|
||||
I_M_PriceList result = null;
|
||||
|
@ -1563,7 +1655,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -1590,7 +1682,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_Shipper getM_Shipper() throws Exception
|
||||
public I_M_Shipper getM_Shipper() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_M_Shipper.Table_Name);
|
||||
I_M_Shipper result = null;
|
||||
|
@ -1601,7 +1693,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -1629,7 +1721,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_Warehouse getM_Warehouse() throws Exception
|
||||
public I_M_Warehouse getM_Warehouse() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_M_Warehouse.Table_Name);
|
||||
I_M_Warehouse result = null;
|
||||
|
@ -1640,7 +1732,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -1681,6 +1773,23 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return (String)get_Value(COLUMNNAME_OrderType);
|
||||
}
|
||||
|
||||
/** Set Order Reference.
|
||||
@param POReference
|
||||
Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner
|
||||
*/
|
||||
public void setPOReference (String POReference)
|
||||
{
|
||||
set_Value (COLUMNNAME_POReference, POReference);
|
||||
}
|
||||
|
||||
/** Get Order Reference.
|
||||
@return Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner
|
||||
*/
|
||||
public String getPOReference ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_POReference);
|
||||
}
|
||||
|
||||
/** Set Payment BPartner.
|
||||
@param Pay_BPartner_ID
|
||||
Business Partner responsible for the payment
|
||||
|
@ -1761,23 +1870,6 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return (String)get_Value(COLUMNNAME_PaymentRule);
|
||||
}
|
||||
|
||||
/** Set Order Reference.
|
||||
@param POReference
|
||||
Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner
|
||||
*/
|
||||
public void setPOReference (String POReference)
|
||||
{
|
||||
set_Value (COLUMNNAME_POReference, POReference);
|
||||
}
|
||||
|
||||
/** Get Order Reference.
|
||||
@return Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner
|
||||
*/
|
||||
public String getPOReference ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_POReference);
|
||||
}
|
||||
|
||||
/** Set Posted.
|
||||
@param Posted
|
||||
Posting status
|
||||
|
@ -1877,8 +1969,6 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return false;
|
||||
}
|
||||
|
||||
/** Ref_Order_ID AD_Reference_ID=290 */
|
||||
public static final int REF_ORDER_ID_AD_Reference_ID=290;
|
||||
/** Set Referenced Order.
|
||||
@param Ref_Order_ID
|
||||
Reference to corresponding Sales/Purchase Order
|
||||
|
@ -1902,8 +1992,6 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** SalesRep_ID AD_Reference_ID=190 */
|
||||
public static final int SALESREP_ID_AD_Reference_ID=190;
|
||||
/** Set Sales Representative.
|
||||
@param SalesRep_ID
|
||||
Sales Representative or Company Agent
|
||||
|
@ -1972,8 +2060,6 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return bd;
|
||||
}
|
||||
|
||||
/** User1_ID AD_Reference_ID=134 */
|
||||
public static final int USER1_ID_AD_Reference_ID=134;
|
||||
/** Set User List 1.
|
||||
@param User1_ID
|
||||
User defined list element #1
|
||||
|
@ -1997,8 +2083,6 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** User2_ID AD_Reference_ID=137 */
|
||||
public static final int USER2_ID_AD_Reference_ID=137;
|
||||
/** Set User List 2.
|
||||
@param User2_ID
|
||||
User defined list element #2
|
||||
|
|
|
@ -66,10 +66,10 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
setIsSOTrx (false);
|
||||
// @IsSOTrx@
|
||||
setM_InOut_ID (0);
|
||||
setM_Warehouse_ID (0);
|
||||
setMovementDate (new Timestamp( System.currentTimeMillis() ));
|
||||
// @#Date@
|
||||
setMovementType (null);
|
||||
setM_Warehouse_ID (0);
|
||||
setPosted (false);
|
||||
setPriorityRule (null);
|
||||
// 5
|
||||
|
@ -106,8 +106,6 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return sb.toString();
|
||||
}
|
||||
|
||||
/** AD_OrgTrx_ID AD_Reference_ID=130 */
|
||||
public static final int AD_ORGTRX_ID_AD_Reference_ID=130;
|
||||
/** Set Trx Organization.
|
||||
@param AD_OrgTrx_ID
|
||||
Performing or initiating organization
|
||||
|
@ -131,7 +129,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_AD_User getAD_User() throws Exception
|
||||
public I_AD_User getAD_User() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_AD_User.Table_Name);
|
||||
I_AD_User result = null;
|
||||
|
@ -142,7 +140,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -170,7 +168,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Activity getC_Activity() throws Exception
|
||||
public I_C_Activity getC_Activity() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Activity.Table_Name);
|
||||
I_C_Activity result = null;
|
||||
|
@ -181,7 +179,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -209,7 +207,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_BPartner getC_BPartner() throws Exception
|
||||
public I_C_BPartner getC_BPartner() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_BPartner.Table_Name);
|
||||
I_C_BPartner result = null;
|
||||
|
@ -220,7 +218,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -247,7 +245,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_BPartner_Location getC_BPartner_Location() throws Exception
|
||||
public I_C_BPartner_Location getC_BPartner_Location() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_BPartner_Location.Table_Name);
|
||||
I_C_BPartner_Location result = null;
|
||||
|
@ -258,7 +256,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -285,7 +283,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Campaign getC_Campaign() throws Exception
|
||||
public I_C_Campaign getC_Campaign() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Campaign.Table_Name);
|
||||
I_C_Campaign result = null;
|
||||
|
@ -296,7 +294,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -324,8 +322,6 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** C_Charge_ID AD_Reference_ID=200 */
|
||||
public static final int C_CHARGE_ID_AD_Reference_ID=200;
|
||||
/** Set Charge.
|
||||
@param C_Charge_ID
|
||||
Additional document charges
|
||||
|
@ -349,8 +345,6 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** C_DocType_ID AD_Reference_ID=170 */
|
||||
public static final int C_DOCTYPE_ID_AD_Reference_ID=170;
|
||||
/** Set Document Type.
|
||||
@param C_DocType_ID
|
||||
Document type or rules
|
||||
|
@ -373,27 +367,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Charge amount.
|
||||
@param ChargeAmt
|
||||
Charge Amount
|
||||
*/
|
||||
public void setChargeAmt (BigDecimal ChargeAmt)
|
||||
{
|
||||
set_Value (COLUMNNAME_ChargeAmt, ChargeAmt);
|
||||
}
|
||||
|
||||
/** Get Charge amount.
|
||||
@return Charge Amount
|
||||
*/
|
||||
public BigDecimal getChargeAmt ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ChargeAmt);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
public I_C_Invoice getC_Invoice() throws Exception
|
||||
public I_C_Invoice getC_Invoice() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Invoice.Table_Name);
|
||||
I_C_Invoice result = null;
|
||||
|
@ -404,7 +378,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -432,7 +406,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Order getC_Order() throws Exception
|
||||
public I_C_Order getC_Order() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Order.Table_Name);
|
||||
I_C_Order result = null;
|
||||
|
@ -443,7 +417,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -471,7 +445,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Project getC_Project() throws Exception
|
||||
public I_C_Project getC_Project() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Project.Table_Name);
|
||||
I_C_Project result = null;
|
||||
|
@ -482,7 +456,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -510,6 +484,26 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Charge amount.
|
||||
@param ChargeAmt
|
||||
Charge Amount
|
||||
*/
|
||||
public void setChargeAmt (BigDecimal ChargeAmt)
|
||||
{
|
||||
set_Value (COLUMNNAME_ChargeAmt, ChargeAmt);
|
||||
}
|
||||
|
||||
/** Get Charge amount.
|
||||
@return Charge Amount
|
||||
*/
|
||||
public BigDecimal getChargeAmt ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ChargeAmt);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Create Confirm.
|
||||
@param CreateConfirm Create Confirm */
|
||||
public void setCreateConfirm (String CreateConfirm)
|
||||
|
@ -819,6 +813,75 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return new KeyNamePair(get_ID(), getDocumentNo());
|
||||
}
|
||||
|
||||
/** Set Drop Shipment Partner.
|
||||
@param DropShip_BPartner_ID
|
||||
Business Partner to ship to
|
||||
*/
|
||||
public void setDropShip_BPartner_ID (int DropShip_BPartner_ID)
|
||||
{
|
||||
if (DropShip_BPartner_ID < 1)
|
||||
set_Value (COLUMNNAME_DropShip_BPartner_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_DropShip_BPartner_ID, Integer.valueOf(DropShip_BPartner_ID));
|
||||
}
|
||||
|
||||
/** Get Drop Shipment Partner.
|
||||
@return Business Partner to ship to
|
||||
*/
|
||||
public int getDropShip_BPartner_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_DropShip_BPartner_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Drop Shipment Location.
|
||||
@param DropShip_Location_ID
|
||||
Business Partner Location for shipping to
|
||||
*/
|
||||
public void setDropShip_Location_ID (int DropShip_Location_ID)
|
||||
{
|
||||
if (DropShip_Location_ID < 1)
|
||||
set_Value (COLUMNNAME_DropShip_Location_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_DropShip_Location_ID, Integer.valueOf(DropShip_Location_ID));
|
||||
}
|
||||
|
||||
/** Get Drop Shipment Location.
|
||||
@return Business Partner Location for shipping to
|
||||
*/
|
||||
public int getDropShip_Location_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_DropShip_Location_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Drop Shipment Contact.
|
||||
@param DropShip_User_ID
|
||||
Business Partner Contact for drop shipment
|
||||
*/
|
||||
public void setDropShip_User_ID (int DropShip_User_ID)
|
||||
{
|
||||
if (DropShip_User_ID < 1)
|
||||
set_Value (COLUMNNAME_DropShip_User_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_DropShip_User_ID, Integer.valueOf(DropShip_User_ID));
|
||||
}
|
||||
|
||||
/** Get Drop Shipment Contact.
|
||||
@return Business Partner Contact for drop shipment
|
||||
*/
|
||||
public int getDropShip_User_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_DropShip_User_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Freight Amount.
|
||||
@param FreightAmt
|
||||
Freight Amount
|
||||
|
@ -908,6 +971,30 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return false;
|
||||
}
|
||||
|
||||
/** Set Drop Shipment.
|
||||
@param IsDropShip
|
||||
Drop Shipments are sent from the Vendor directly to the Customer
|
||||
*/
|
||||
public void setIsDropShip (boolean IsDropShip)
|
||||
{
|
||||
set_Value (COLUMNNAME_IsDropShip, Boolean.valueOf(IsDropShip));
|
||||
}
|
||||
|
||||
/** Get Drop Shipment.
|
||||
@return Drop Shipments are sent from the Vendor directly to the Customer
|
||||
*/
|
||||
public boolean isDropShip ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_IsDropShip);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Set In Dispute.
|
||||
@param IsInDispute
|
||||
Document is in dispute
|
||||
|
@ -1026,6 +1113,122 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_RMA getM_RMA() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_M_RMA.Table_Name);
|
||||
I_M_RMA result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (I_M_RMA)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_RMA_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set RMA.
|
||||
@param M_RMA_ID
|
||||
Return Material Authorization
|
||||
*/
|
||||
public void setM_RMA_ID (int M_RMA_ID)
|
||||
{
|
||||
if (M_RMA_ID < 1)
|
||||
set_Value (COLUMNNAME_M_RMA_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_M_RMA_ID, Integer.valueOf(M_RMA_ID));
|
||||
}
|
||||
|
||||
/** Get RMA.
|
||||
@return Return Material Authorization
|
||||
*/
|
||||
public int getM_RMA_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_M_RMA_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_Shipper getM_Shipper() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_M_Shipper.Table_Name);
|
||||
I_M_Shipper result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (I_M_Shipper)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Shipper_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set Shipper.
|
||||
@param M_Shipper_ID
|
||||
Method or manner of product delivery
|
||||
*/
|
||||
public void setM_Shipper_ID (int M_Shipper_ID)
|
||||
{
|
||||
if (M_Shipper_ID < 1)
|
||||
set_Value (COLUMNNAME_M_Shipper_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_M_Shipper_ID, Integer.valueOf(M_Shipper_ID));
|
||||
}
|
||||
|
||||
/** Get Shipper.
|
||||
@return Method or manner of product delivery
|
||||
*/
|
||||
public int getM_Shipper_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_M_Shipper_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_Warehouse getM_Warehouse() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_M_Warehouse.Table_Name);
|
||||
I_M_Warehouse result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (I_M_Warehouse)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Warehouse_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set Warehouse.
|
||||
@param M_Warehouse_ID
|
||||
Storage Warehouse and Service Point
|
||||
*/
|
||||
public void setM_Warehouse_ID (int M_Warehouse_ID)
|
||||
{
|
||||
if (M_Warehouse_ID < 1)
|
||||
throw new IllegalArgumentException ("M_Warehouse_ID is mandatory.");
|
||||
set_ValueNoCheck (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID));
|
||||
}
|
||||
|
||||
/** Get Warehouse.
|
||||
@return Storage Warehouse and Service Point
|
||||
*/
|
||||
public int getM_Warehouse_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_M_Warehouse_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Movement Date.
|
||||
@param MovementDate
|
||||
Date a product was moved in or out of inventory
|
||||
|
@ -1089,122 +1292,6 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return (String)get_Value(COLUMNNAME_MovementType);
|
||||
}
|
||||
|
||||
public I_M_RMA getM_RMA() throws Exception
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_M_RMA.Table_Name);
|
||||
I_M_RMA result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (I_M_RMA)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_RMA_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set RMA.
|
||||
@param M_RMA_ID
|
||||
Return Material Authorization
|
||||
*/
|
||||
public void setM_RMA_ID (int M_RMA_ID)
|
||||
{
|
||||
if (M_RMA_ID < 1)
|
||||
set_Value (COLUMNNAME_M_RMA_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_M_RMA_ID, Integer.valueOf(M_RMA_ID));
|
||||
}
|
||||
|
||||
/** Get RMA.
|
||||
@return Return Material Authorization
|
||||
*/
|
||||
public int getM_RMA_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_M_RMA_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_Shipper getM_Shipper() throws Exception
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_M_Shipper.Table_Name);
|
||||
I_M_Shipper result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (I_M_Shipper)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Shipper_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set Shipper.
|
||||
@param M_Shipper_ID
|
||||
Method or manner of product delivery
|
||||
*/
|
||||
public void setM_Shipper_ID (int M_Shipper_ID)
|
||||
{
|
||||
if (M_Shipper_ID < 1)
|
||||
set_Value (COLUMNNAME_M_Shipper_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_M_Shipper_ID, Integer.valueOf(M_Shipper_ID));
|
||||
}
|
||||
|
||||
/** Get Shipper.
|
||||
@return Method or manner of product delivery
|
||||
*/
|
||||
public int getM_Shipper_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_M_Shipper_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_Warehouse getM_Warehouse() throws Exception
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_M_Warehouse.Table_Name);
|
||||
I_M_Warehouse result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (I_M_Warehouse)constructor.newInstance(new Object[] {getCtx(), new Integer(getM_Warehouse_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set Warehouse.
|
||||
@param M_Warehouse_ID
|
||||
Storage Warehouse and Service Point
|
||||
*/
|
||||
public void setM_Warehouse_ID (int M_Warehouse_ID)
|
||||
{
|
||||
if (M_Warehouse_ID < 1)
|
||||
throw new IllegalArgumentException ("M_Warehouse_ID is mandatory.");
|
||||
set_ValueNoCheck (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID));
|
||||
}
|
||||
|
||||
/** Get Warehouse.
|
||||
@return Storage Warehouse and Service Point
|
||||
*/
|
||||
public int getM_Warehouse_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_M_Warehouse_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set No Packages.
|
||||
@param NoPackages
|
||||
Number of packages shipped
|
||||
|
@ -1225,23 +1312,6 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Pick Date.
|
||||
@param PickDate
|
||||
Date/Time when picked for Shipment
|
||||
*/
|
||||
public void setPickDate (Timestamp PickDate)
|
||||
{
|
||||
set_Value (COLUMNNAME_PickDate, PickDate);
|
||||
}
|
||||
|
||||
/** Get Pick Date.
|
||||
@return Date/Time when picked for Shipment
|
||||
*/
|
||||
public Timestamp getPickDate ()
|
||||
{
|
||||
return (Timestamp)get_Value(COLUMNNAME_PickDate);
|
||||
}
|
||||
|
||||
/** Set Order Reference.
|
||||
@param POReference
|
||||
Transaction Reference Number (Sales Order, Purchase Order) of your Business Partner
|
||||
|
@ -1259,6 +1329,23 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return (String)get_Value(COLUMNNAME_POReference);
|
||||
}
|
||||
|
||||
/** Set Pick Date.
|
||||
@param PickDate
|
||||
Date/Time when picked for Shipment
|
||||
*/
|
||||
public void setPickDate (Timestamp PickDate)
|
||||
{
|
||||
set_Value (COLUMNNAME_PickDate, PickDate);
|
||||
}
|
||||
|
||||
/** Get Pick Date.
|
||||
@return Date/Time when picked for Shipment
|
||||
*/
|
||||
public Timestamp getPickDate ()
|
||||
{
|
||||
return (Timestamp)get_Value(COLUMNNAME_PickDate);
|
||||
}
|
||||
|
||||
/** Set Posted.
|
||||
@param Posted
|
||||
Posting status
|
||||
|
@ -1378,8 +1465,6 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Reversal_ID AD_Reference_ID=337 */
|
||||
public static final int REVERSAL_ID_AD_Reference_ID=337;
|
||||
/** Set Reversal ID.
|
||||
@param Reversal_ID
|
||||
ID of document reversal
|
||||
|
@ -1403,8 +1488,6 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** SalesRep_ID AD_Reference_ID=190 */
|
||||
public static final int SALESREP_ID_AD_Reference_ID=190;
|
||||
/** Set Sales Representative.
|
||||
@param SalesRep_ID
|
||||
Sales Representative or Company Agent
|
||||
|
@ -1486,8 +1569,6 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return (String)get_Value(COLUMNNAME_TrackingNo);
|
||||
}
|
||||
|
||||
/** User1_ID AD_Reference_ID=134 */
|
||||
public static final int USER1_ID_AD_Reference_ID=134;
|
||||
/** Set User List 1.
|
||||
@param User1_ID
|
||||
User defined list element #1
|
||||
|
@ -1511,8 +1592,6 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** User2_ID AD_Reference_ID=137 */
|
||||
public static final int USER2_ID_AD_Reference_ID=137;
|
||||
/** Set User List 2.
|
||||
@param User2_ID
|
||||
User defined list element #2
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
*****************************************************************************/
|
||||
package org.compiere.process;
|
||||
|
||||
import java.awt.geom.IllegalPathStateException;
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
|
@ -26,6 +25,9 @@ import java.util.logging.Level;
|
|||
import org.compiere.model.MBPartner;
|
||||
import org.compiere.model.MOrder;
|
||||
import org.compiere.model.MOrderLine;
|
||||
import org.compiere.model.MOrgInfo;
|
||||
import org.compiere.model.MTable;
|
||||
import org.compiere.util.AdempiereUserError;
|
||||
import org.compiere.util.DB;
|
||||
|
||||
/**
|
||||
|
@ -47,7 +49,7 @@ public class OrderPOCreate extends SvrProcess
|
|||
/** Sales Order */
|
||||
private int p_C_Order_ID;
|
||||
/** Drop Ship */
|
||||
private String p_IsDropShip;
|
||||
private boolean p_IsDropShip = false;
|
||||
|
||||
/**
|
||||
* Prepare - e.g., get Parameters.
|
||||
|
@ -72,14 +74,19 @@ public class OrderPOCreate extends SvrProcess
|
|||
else if (name.equals("C_Order_ID"))
|
||||
p_C_Order_ID = ((BigDecimal)para[i].getParameter()).intValue();
|
||||
else if (name.equals("IsDropShip"))
|
||||
p_IsDropShip = (String)para[i].getParameter();
|
||||
p_IsDropShip = ((String) para[i].getParameter()).equals("Y");
|
||||
else
|
||||
log.log(Level.SEVERE, "Unknown Parameter: " + name);
|
||||
}
|
||||
|
||||
// called from order window w/o parameters
|
||||
if ( getTable_ID() == MOrder.Table_ID && getRecord_ID() > 0 )
|
||||
p_C_Order_ID = getRecord_ID();
|
||||
|
||||
} // prepare
|
||||
|
||||
/**
|
||||
* Perrform process.
|
||||
* Perform process.
|
||||
* @return Message
|
||||
* @throws Exception if not successful
|
||||
*/
|
||||
|
@ -88,10 +95,10 @@ public class OrderPOCreate extends SvrProcess
|
|||
log.info("DateOrdered=" + p_DateOrdered_From + " - " + p_DateOrdered_To
|
||||
+ " - C_BPartner_ID=" + p_C_BPartner_ID + " - Vendor_ID=" + p_Vendor_ID
|
||||
+ " - IsDropShip=" + p_IsDropShip + " - C_Order_ID=" + p_C_Order_ID);
|
||||
if (p_C_Order_ID == 0 && p_IsDropShip == null
|
||||
if (p_C_Order_ID == 0
|
||||
&& p_DateOrdered_From == null && p_DateOrdered_To == null
|
||||
&& p_C_BPartner_ID == 0 && p_Vendor_ID == 0)
|
||||
throw new IllegalPathStateException("You need to restrict selection");
|
||||
throw new AdempiereUserError("You need to restrict selection");
|
||||
//
|
||||
String sql = "SELECT * FROM C_Order o "
|
||||
+ "WHERE o.IsSOTrx='Y'"
|
||||
|
@ -105,8 +112,6 @@ public class OrderPOCreate extends SvrProcess
|
|||
{
|
||||
if (p_C_BPartner_ID != 0)
|
||||
sql += " AND o.C_BPartner_ID=?";
|
||||
if (p_IsDropShip != null)
|
||||
sql += " AND o.IsDropShip=?";
|
||||
if (p_Vendor_ID != 0)
|
||||
sql += " AND EXISTS (SELECT * FROM C_OrderLine ol"
|
||||
+ " INNER JOIN M_Product_PO po ON (ol.M_Product_ID=po.M_Product_ID) "
|
||||
|
@ -131,8 +136,6 @@ public class OrderPOCreate extends SvrProcess
|
|||
int index = 1;
|
||||
if (p_C_BPartner_ID != 0)
|
||||
pstmt.setInt (index++, p_C_BPartner_ID);
|
||||
if (p_IsDropShip != null)
|
||||
pstmt.setString(index++, p_IsDropShip);
|
||||
if (p_Vendor_ID != 0)
|
||||
pstmt.setInt (index++, p_Vendor_ID);
|
||||
if (p_DateOrdered_From != null && p_DateOrdered_To != null)
|
||||
|
@ -271,12 +274,26 @@ public class OrderPOCreate extends SvrProcess
|
|||
MBPartner vendor = new MBPartner (getCtx(), C_BPartner_ID, get_TrxName());
|
||||
po.setBPartner(vendor);
|
||||
// Drop Ship
|
||||
po.setIsDropShip(so.isDropShip());
|
||||
if (so.isDropShip())
|
||||
if ( p_IsDropShip )
|
||||
{
|
||||
po.setShip_BPartner_ID(so.getC_BPartner_ID());
|
||||
po.setShip_Location_ID(so.getC_BPartner_Location_ID());
|
||||
po.setShip_User_ID(so.getAD_User_ID());
|
||||
po.setIsDropShip(p_IsDropShip);
|
||||
|
||||
if (so.isDropShip() && so.getDropShip_BPartner_ID() != 0 ) {
|
||||
po.setDropShip_BPartner_ID(so.getDropShip_BPartner_ID());
|
||||
po.setDropShip_Location_ID(so.getDropShip_Location_ID());
|
||||
po.setDropShip_User_ID(so.getDropShip_User_ID());
|
||||
}
|
||||
else {
|
||||
po.setDropShip_BPartner_ID(so.getC_BPartner_ID());
|
||||
po.setDropShip_Location_ID(so.getC_BPartner_Location_ID());
|
||||
po.setDropShip_User_ID(so.getAD_User_ID());
|
||||
}
|
||||
// get default drop ship warehouse
|
||||
MOrgInfo orginfo = MOrgInfo.get(getCtx(), po.getAD_Org_ID());
|
||||
if (orginfo.getDropShip_Warehouse_ID() != 0 )
|
||||
po.setM_Warehouse_ID(orginfo.getDropShip_Warehouse_ID());
|
||||
else
|
||||
log.log(Level.SEVERE, "Must specify drop ship warehouse in org info.");
|
||||
}
|
||||
// References
|
||||
po.setC_Activity_ID(so.getC_Activity_ID());
|
||||
|
|
|
@ -663,6 +663,15 @@ public class VCreateFromShipment extends VCreateFrom implements VetoableChangeLi
|
|||
inout.setC_Activity_ID(p_order.getC_Activity_ID());
|
||||
inout.setUser1_ID(p_order.getUser1_ID());
|
||||
inout.setUser2_ID(p_order.getUser2_ID());
|
||||
|
||||
if ( p_order.isDropShip() )
|
||||
{
|
||||
inout.setM_Warehouse_ID( p_order.getM_Warehouse_ID() );
|
||||
inout.setIsDropShip(p_order.isDropShip());
|
||||
inout.setDropShip_BPartner_ID(p_order.getDropShip_BPartner_ID());
|
||||
inout.setDropShip_Location_ID(p_order.getDropShip_Location_ID());
|
||||
inout.setDropShip_User_ID(p_order.getDropShip_User_ID());
|
||||
}
|
||||
}
|
||||
if (m_invoice != null && m_invoice.getC_Invoice_ID() != 0)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,553 @@
|
|||
-- INSERTING into AD_ELEMENT
|
||||
Insert into AD_ELEMENT (AD_ELEMENT_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,COLUMNNAME,ENTITYTYPE,NAME,PRINTNAME,DESCRIPTION,HELP,PO_NAME,PO_PRINTNAME,PO_DESCRIPTION,PO_HELP) values (53460,0,0,'Y',to_date('01/MAY/08','DD/MON/RR'),100,to_date('01/MAY/08','DD/MON/RR'),100,'DropShip_User_ID','U','Drop Shipment Contact','Drop Shipment Contact','Business Partner Contact for drop shipment',null,null,null,null,null);
|
||||
Insert into AD_ELEMENT (AD_ELEMENT_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,COLUMNNAME,ENTITYTYPE,NAME,PRINTNAME,DESCRIPTION,HELP,PO_NAME,PO_PRINTNAME,PO_DESCRIPTION,PO_HELP) values (53459,0,0,'Y',to_date('01/MAY/08','DD/MON/RR'),100,to_date('07/MAY/08','DD/MON/RR'),100,'DropShip_Location_ID','D','Drop Shipment Location','Drop Shipment Location','Business Partner Location for shipping to',null,null,null,null,null);
|
||||
Insert into AD_ELEMENT (AD_ELEMENT_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,COLUMNNAME,ENTITYTYPE,NAME,PRINTNAME,DESCRIPTION,HELP,PO_NAME,PO_PRINTNAME,PO_DESCRIPTION,PO_HELP) values (53458,0,0,'Y',to_date('01/MAY/08','DD/MON/RR'),100,to_date('01/MAY/08','DD/MON/RR'),100,'DropShip_BPartner_ID','U','Drop Shipment Partner','Drop Shipment Partner','Business Partner to ship to','If empty the business partner will be shipped to.',null,null,null,null);
|
||||
|
||||
-- INSERTING into AD_Column
|
||||
Insert into AD_Column (AD_COLUMN_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,UPDATED,CREATEDBY,UPDATEDBY,NAME,DESCRIPTION,HELP,VERSION,ENTITYTYPE,COLUMNNAME,AD_TABLE_ID,AD_REFERENCE_ID,AD_REFERENCE_VALUE_ID,AD_VAL_RULE_ID,FIELDLENGTH,DEFAULTVALUE,ISKEY,ISPARENT,ISMANDATORY,ISUPDATEABLE,READONLYLOGIC,ISIDENTIFIER,SEQNO,ISTRANSLATED,ISENCRYPTED,CALLOUT,VFORMAT,VALUEMIN,VALUEMAX,ISSELECTIONCOLUMN,AD_ELEMENT_ID,AD_PROCESS_ID,ISSYNCDATABASE,ISALWAYSUPDATEABLE,COLUMNSQL,MANDATORYLOGIC,INFOFACTORYCLASS) values (55314,0,0,'Y',to_date('07/MAY/08','DD/MON/RR'),to_date('07/MAY/08','DD/MON/RR'),100,100,'Drop Shipment Partner','Business Partner to ship to','If empty the business partner will be shipped to.',1,'D','DropShip_BPartner_ID',259,30,138,230,22,null,'N','N','N','Y',null,'N',0,'N','N',null,null,null,null,'N',53458,null,'N','N',null,null,null);
|
||||
|
||||
-- 7/05/2008 11:35:44
|
||||
-- Drop shipment
|
||||
ALTER TABLE C_Order ADD DropShip_BPartner_ID NUMBER(10)
|
||||
;
|
||||
|
||||
-- 7/05/2008 11:40:02
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,52022,'C_BPartner_Location.C_BPartner_ID=@DropShip_BPartner_ID@ AND C_BPartner_Location.IsShipTo=''Y'' AND C_BPartner_Location.IsActive=''Y''',TO_DATE('2008-05-07 11:39:57','YYYY-MM-DD HH24:MI:SS'),100,'U','Y','C_BPartner_Loc Ship - Drop Ship BPartner','S',TO_DATE('2008-05-07 11:39:57','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- INSERTING into AD_Column
|
||||
Insert into AD_Column (AD_COLUMN_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,UPDATED,CREATEDBY,UPDATEDBY,NAME,DESCRIPTION,HELP,VERSION,ENTITYTYPE,
|
||||
COLUMNNAME,AD_TABLE_ID,AD_REFERENCE_ID,AD_REFERENCE_VALUE_ID,AD_VAL_RULE_ID,FIELDLENGTH,DEFAULTVALUE,ISKEY,ISPARENT,ISMANDATORY,
|
||||
ISUPDATEABLE,READONLYLOGIC,ISIDENTIFIER,SEQNO,ISTRANSLATED,ISENCRYPTED,CALLOUT,VFORMAT,VALUEMIN,VALUEMAX,ISSELECTIONCOLUMN,
|
||||
AD_ELEMENT_ID,AD_PROCESS_ID,ISSYNCDATABASE,ISALWAYSUPDATEABLE,COLUMNSQL,MANDATORYLOGIC,INFOFACTORYCLASS)
|
||||
values (55315,0,0,'Y',to_date('07/MAY/08','DD/MON/RR'),to_date('07/MAY/08','DD/MON/RR'),100,100,'Drop Shipment Location',
|
||||
'Business Partner Location for shipping to',null,1,'D','DropShip_Location_ID',259,18,159,52022,22,null,'N','N','N','Y',
|
||||
null,'N',0,'N','N',null,null,null,null,'N',53459,null,'N','N',null,null,null);
|
||||
|
||||
-- 7/05/2008 11:41:42
|
||||
-- Drop shipment
|
||||
ALTER TABLE C_Order ADD DropShip_Location_ID NUMBER(10)
|
||||
;
|
||||
|
||||
-- INSERTING
|
||||
Insert into AD_Column (AD_COLUMN_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,UPDATED,CREATEDBY,UPDATEDBY,NAME,DESCRIPTION,
|
||||
HELP,VERSION,ENTITYTYPE,COLUMNNAME,AD_TABLE_ID,AD_REFERENCE_ID,AD_REFERENCE_VALUE_ID,AD_VAL_RULE_ID,FIELDLENGTH,
|
||||
DEFAULTVALUE,ISKEY,ISPARENT,ISMANDATORY,ISUPDATEABLE,READONLYLOGIC,ISIDENTIFIER,SEQNO,ISTRANSLATED,ISENCRYPTED,
|
||||
CALLOUT,VFORMAT,VALUEMIN,VALUEMAX,ISSELECTIONCOLUMN,AD_ELEMENT_ID,AD_PROCESS_ID,ISSYNCDATABASE,ISALWAYSUPDATEABLE,
|
||||
COLUMNSQL,MANDATORYLOGIC,INFOFACTORYCLASS)
|
||||
values (55316,0,0,'Y',to_date('07/MAY/08','DD/MON/RR'),to_date('07/MAY/08','DD/MON/RR'),100,100,
|
||||
'Drop Shipment Contact','Business Partner Contact for drop shipment',null,1,'D','DropShip_User_ID',
|
||||
259,18,110,168,22,null,'N','N','N','Y',null,'N',0,'N','N',null,null,null,null,'N',53460,null,'N','N',null,null,null);
|
||||
|
||||
|
||||
-- 7/05/2008 11:42:43
|
||||
-- Drop shipment
|
||||
ALTER TABLE C_Order ADD DropShip_User_ID NUMBER(10)
|
||||
;
|
||||
|
||||
-- 7/05/2008 11:46:47
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,55317,2466,0,20,319,'IsDropShip',TO_DATE('2008-05-07 11:46:46','YYYY-MM-DD HH24:MI:SS'),100,'N','Drop Shipments are sent from the Vendor directly to the Customer','D',1,'Drop Shipments do not cause any Inventory reservations or movements as the Shipment is from the Vendor''s inventory. The Shipment of the Vendor to the Customer must be confirmed.','Y','N','N','N','N','N','N','N','N','N','Y','Drop Shipment',0,TO_DATE('2008-05-07 11:46:46','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- 7/05/2008 11:47:15
|
||||
-- Drop shipment
|
||||
ALTER TABLE M_InOut ADD IsDropShip CHAR(1) DEFAULT 'N' CHECK (IsDropShip IN ('Y','N'))
|
||||
;
|
||||
|
||||
-- 7/05/2008 11:48:17
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,55318,53458,0,18,138,319,'DropShip_BPartner_ID',TO_DATE('2008-05-07 11:48:16','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner to ship to','D',10,'If empty the business partner will be shipped to.','Y','N','N','N','N','N','N','N','N','N','Y','Drop Shipment Partner',0,TO_DATE('2008-05-07 11:48:16','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- 7/05/2008 11:48:21
|
||||
-- Drop shipment
|
||||
ALTER TABLE M_InOut ADD DropShip_BPartner_ID NUMBER(10)
|
||||
;
|
||||
|
||||
|
||||
-- 7/05/2008 11:49:16
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,55319,53459,0,18,159,319,120,'DropShip_Location_ID',TO_DATE('2008-05-07 11:49:15','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner Location for shipping to','D',10,'Y','N','N','N','N','N','N','N','N','N','Y','Drop Shipment Location',0,TO_DATE('2008-05-07 11:49:15','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- 7/05/2008 11:49:18
|
||||
-- Drop shipment
|
||||
ALTER TABLE M_InOut ADD DropShip_Location_ID NUMBER(10)
|
||||
;
|
||||
|
||||
|
||||
-- 7/05/2008 11:49:58
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,
|
||||
Created,CreatedBy,Description,EntityType,FieldLength,
|
||||
IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,
|
||||
IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,55320,53460,0,18,110,319,168,'DropShip_User_ID',
|
||||
TO_DATE('2008-05-07 11:49:57','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner Contact for drop shipment','D',10,
|
||||
'Y','N','N','N','N','N','N','N','N','N',
|
||||
'Y','Drop Shipment Contact',0,TO_DATE('2008-05-07 11:49:57','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- 7/05/2008 11:50:00
|
||||
-- Drop shipment
|
||||
ALTER TABLE M_InOut ADD DropShip_User_ID NUMBER(10)
|
||||
;
|
||||
|
||||
-- 7/05/2008 11:58:45
|
||||
-- Drop shipment
|
||||
UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_DATE('2008-05-07 11:58:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11580
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:03:04
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55314,55410,0,186,TO_DATE('2008-05-07 12:03:03','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner to ship to',14,'@IsDropShip@=''Y''','D','If empty the business partner will be shipped to.','Y','Y','Y','N','N','N','N','N','Drop Shipment Partner',192,0,TO_DATE('2008-05-07 12:03:03','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:03:04
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55410 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:04:09
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55315,130,55411,0,186,TO_DATE('2008-05-07 12:04:08','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner Location for shipping to',14,'@IsDropShip@=''Y''','D','Y','Y','Y','N','N','N','N','N','Drop Shipment Location',194,0,TO_DATE('2008-05-07 12:04:08','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:04:09
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55411 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:04:17
|
||||
-- Drop shipment
|
||||
UPDATE AD_Field SET AD_FieldGroup_ID=130,Updated=TO_DATE('2008-05-07 12:04:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=55410
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:05:27
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55316,130,55412,0,186,TO_DATE('2008-05-07 12:05:26','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner Contact for drop shipment',14,'@IsDropShip@=''Y''','D','Y','Y','Y','N','N','N','N','N','Drop Shipment Contact',196,0,TO_DATE('2008-05-07 12:05:26','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:05:27
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55412 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:08:49
|
||||
-- Drop shipment
|
||||
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2008-05-07 12:08:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=55411
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:15:15
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55314,124,55413,0,294,TO_DATE('2008-05-07 12:15:13','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner to ship to',14,'@IsDropShip@=''Y''','D','If empty the business partner will be shipped to.','Y','Y','Y','N','N','N','N','N','Drop Shipment Partner',402,0,TO_DATE('2008-05-07 12:15:13','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:15:15
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55413 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:16:35
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55315,124,55414,0,294,TO_DATE('2008-05-07 12:16:34','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner Location for shipping to',14,'@IsDropShip@=''Y''','D','Y','Y','Y','N','N','N','N','Y','Drop Shipment Location',404,0,TO_DATE('2008-05-07 12:16:34','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:16:35
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55414 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:17:34
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55316,124,55415,0,294,TO_DATE('2008-05-07 12:17:33','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner Contact for drop shipment',14,'@IsDropShip@=''Y''','D','Y','Y','Y','N','N','N','N','N','Drop Shipment Contact',406,0,TO_DATE('2008-05-07 12:17:33','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:17:34
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55415 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:17:50
|
||||
-- Drop shipment
|
||||
UPDATE AD_Field SET IsReadOnly='N',Updated=TO_DATE('2008-05-07 12:17:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10123
|
||||
;
|
||||
|
||||
|
||||
-- 8/05/2008 10:32:31
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53461,0,'DropShip_Warehouse_ID',TO_DATE('2008-05-08 10:32:26','YYYY-MM-DD HH24:MI:SS'),100,'The (logical) warehouse to use for recording drop ship receipts and shipments.','D','The drop ship warehouse will be used for recording material transactions relating to drop shipments to and from this organization.','Y','Drop Ship Warehouse','Drop Ship Warehouse',TO_DATE('2008-05-08 10:32:26','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- 8/05/2008 10:32:31
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53461 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- 8/05/2008 10:33:53
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,55321,53461,0,18,197,228,'DropShip_Warehouse_ID',TO_DATE('2008-05-08 10:33:51','YYYY-MM-DD HH24:MI:SS'),100,'The (logical) warehouse to use for recording drop ship receipts and shipments.','D',22,'The drop ship warehouse will be used for recording material transactions relating to drop shipments to and from this organization.','Y','N','N','N','N','N','N','N','N','N','Y','Drop Ship Warehouse',0,TO_DATE('2008-05-08 10:33:51','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- 8/05/2008 10:33:53
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=55321 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- 8/05/2008 10:33:56
|
||||
-- Drop shipment
|
||||
ALTER TABLE AD_OrgInfo ADD DropShip_Warehouse_ID NUMBER(10)
|
||||
;
|
||||
|
||||
-- 8/05/2008 10:35:33
|
||||
-- Drop shipment
|
||||
UPDATE AD_Field SET IsSameLine='N',Updated=TO_DATE('2008-05-08 10:35:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=9245
|
||||
;
|
||||
|
||||
-- 8/05/2008 10:36:37
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55321,55416,0,170,TO_DATE('2008-05-08 10:36:36','YYYY-MM-DD HH24:MI:SS'),100,'The (logical) warehouse to use for recording drop ship receipts and shipments.',22,'D','The drop ship warehouse will be used for recording material transactions relating to drop shipments to and from this organization.','Y','Y','Y','N','N','N','N','N','Drop Ship Warehouse',65,0,TO_DATE('2008-05-08 10:36:36','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- 8/05/2008 10:36:37
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55416 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- 8/05/2008 10:39:12
|
||||
-- Drop shipment
|
||||
UPDATE AD_Column SET AD_Val_Rule_ID=189,Updated=TO_DATE('2008-05-08 10:39:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55321
|
||||
;
|
||||
|
||||
-- 8/05/2008 10:39:12
|
||||
-- Drop shipment
|
||||
UPDATE AD_Field SET Name='Drop Ship Warehouse', Description='The (logical) warehouse to use for recording drop ship receipts and shipments.', Help='The drop ship warehouse will be used for recording material transactions relating to drop shipments to and from this organization.' WHERE AD_Column_ID=55321 AND IsCentrallyMaintained='Y'
|
||||
;
|
||||
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55317,124,55419,0,257,TO_DATE('2008-05-16 09:33:44','YYYY-MM-DD HH24:MI:SS'),100,'Drop Shipments are sent from the Vendor directly to the Customer',0,'D','Drop Shipments do not cause any Inventory reservations or movements as the Shipment is from the Vendor''s inventory. The Shipment of the Vendor to the Customer must be confirmed.','Y','Y','Y','N','N','N','N','N','Drop Shipment',282,0,TO_DATE('2008-05-16 09:33:44','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55419 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55319,55425,0,296,TO_DATE('2008-05-16 09:43:45','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner Location for shipping to',14,'@IsDropShip@=''Y''','D','Y','Y','Y','N','N','N','N','Y','Drop Shipment Location',246,0,TO_DATE('2008-05-16 09:43:45','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55425 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55317,55426,0,296,TO_DATE('2008-05-16 09:44:49','YYYY-MM-DD HH24:MI:SS'),100,'Drop Shipments are sent from the Vendor directly to the Customer',1,'D','Drop Shipments do not cause any Inventory reservations or movements as the Shipment is from the Vendor''s inventory. The Shipment of the Vendor to the Customer must be confirmed.','Y','Y','Y','N','N','N','N','N','Drop Shipment',242,0,TO_DATE('2008-05-16 09:44:49','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55426 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55318,55427,0,296,TO_DATE('2008-05-16 09:45:31','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner to ship to',14,'@IsDropShip@=Y''','D','If empty the business partner will be shipped to.','Y','Y','Y','N','N','N','N','N','Drop Shipment Partner',244,0,TO_DATE('2008-05-16 09:45:31','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55427 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55320,55428,0,296,TO_DATE('2008-05-16 09:46:13','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner Contact for drop shipment',14,'@IsDropShip@=''Y''','D','Y','Y','Y','N','N','N','N','N','Drop Shipment Contact',248,0,TO_DATE('2008-05-16 09:46:13','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55428 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
|
||||
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55318,124,55429,0,257,TO_DATE('2008-05-16 09:48:43','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner to ship to',0,'@IsDropShip@=''Y''','D','If empty the business partner will be shipped to.','Y','Y','Y','N','N','N','N','N','Drop Shipment Partner',284,0,TO_DATE('2008-05-16 09:48:43','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55429 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55319,124,55430,0,257,TO_DATE('2008-05-16 09:49:38','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner Location for shipping to',14,'@IsDropShip@=''Y''','D','Y','Y','Y','N','N','N','N','Y','Drop Shipment Location',286,0,TO_DATE('2008-05-16 09:49:38','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55430 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55320,124,55431,0,257,TO_DATE('2008-05-16 09:50:20','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner Contact for drop shipment',14,'@IsDropShip@=''Y''','D','Y','Y','Y','N','N','N','N','N','Drop Shipment Contact',288,0,TO_DATE('2008-05-16 09:50:20','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55431 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
CREATE OR REPLACE VIEW "M_INOUT_CANDIDATE_V"
|
||||
AS
|
||||
SELECT
|
||||
o.AD_Client_ID, o.AD_Org_ID, o.C_BPartner_ID, o.C_Order_ID,
|
||||
o.DocumentNo, o.DateOrdered, o.C_DocType_ID,
|
||||
o.POReference, o.Description, o.SalesRep_ID,
|
||||
l.M_Warehouse_ID,
|
||||
SUM((l.QtyOrdered-l.QtyDelivered)*l.PriceActual) AS TotalLines
|
||||
FROM C_Order o
|
||||
INNER JOIN C_OrderLine l ON (o.C_Order_ID=l.C_Order_ID)
|
||||
WHERE (o.DocStatus = 'CO' AND o.IsDelivered='N') -- Status must be CO - not CL/RE
|
||||
-- not Offers and open Walkin-Receipts
|
||||
AND o.C_DocType_ID IN (SELECT C_DocType_ID FROM C_DocType
|
||||
WHERE DocBaseType='SOO' AND DocSubTypeSO NOT IN ('ON','OB','WR'))
|
||||
-- Delivery Rule - not manual
|
||||
AND o.DeliveryRule<>'M'
|
||||
AND (l.M_Product_ID IS NULL OR EXISTS
|
||||
(SELECT * FROM M_Product p
|
||||
WHERE l.M_Product_ID=p.M_Product_ID AND p.IsExcludeAutoDelivery='N'))
|
||||
-- we need to ship
|
||||
AND l.QtyOrdered <> l.QtyDelivered
|
||||
-- AND o.IsDropShip='N'
|
||||
-- no vendor drop shipment order has been raised
|
||||
AND NOT EXISTS (SELECT 1 FROM C_Order lo
|
||||
INNER JOIN C_OrderLine ll ON (ll.C_Order_ID=lo.C_Order_ID)
|
||||
WHERE ll.C_Orderline_ID=l.Link_OrderLine_ID
|
||||
AND lo.IsDropShip = 'Y')
|
||||
AND (l.M_Product_ID IS NOT NULL OR l.C_Charge_ID IS NOT NULL)
|
||||
-- Not confirmed shipment
|
||||
AND NOT EXISTS (SELECT * FROM M_InOutLine iol
|
||||
INNER JOIN M_InOut io ON (iol.M_InOut_ID=io.M_InOut_ID)
|
||||
WHERE iol.C_OrderLine_ID=l.C_OrderLine_ID AND io.DocStatus IN ('IP','WC'))
|
||||
--
|
||||
GROUP BY o.AD_Client_ID, o.AD_Org_ID, o.C_BPartner_ID, o.C_Order_ID,
|
||||
o.DocumentNo, o.DateOrdered, o.C_DocType_ID,
|
||||
o.POReference, o.Description, o.SalesRep_ID, l.M_Warehouse_ID;
|
||||
|
||||
|
||||
|
||||
CREATE OR REPLACE VIEW "C_ORDER_HEADER_V"
|
||||
AS
|
||||
SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy,
|
||||
'en_US' AS AD_Language,
|
||||
o.C_Order_ID, o.IsSOTrx, o.DocumentNo, o.DocStatus, o.C_DocType_ID,
|
||||
o.C_BPartner_ID, bp.Value AS BPValue, bp.TaxID AS BPTaxID, bp.NAICS, bp.DUNS,
|
||||
oi.C_Location_ID AS Org_Location_ID, oi.TaxID,
|
||||
o.M_Warehouse_ID, wh.C_Location_ID AS Warehouse_Location_ID,
|
||||
dt.PrintName AS DocumentType, dt.DocumentNote AS DocumentTypeNote,
|
||||
o.SalesRep_ID, COALESCE(ubp.Name, u.Name) AS SalesRep_Name,
|
||||
o.DateOrdered, o.DatePromised,
|
||||
bpg.Greeting AS BPGreeting,
|
||||
bp.Name, bp.Name2,
|
||||
bpcg.Greeting AS BPContactGreeting,
|
||||
bpc.Title, bpc.Phone,
|
||||
NULLIF (bpc.Name, bp.Name) AS ContactName,
|
||||
bpl.C_Location_ID, l.Postal || l.Postal_Add AS Postal,
|
||||
bp.ReferenceNo,
|
||||
-- Bill to
|
||||
o.Bill_BPartner_ID, o.Bill_Location_ID, o.Bill_User_ID,
|
||||
bbp.Value AS Bill_BPValue, bbp.TaxID AS Bill_BPTaxID,
|
||||
bbp.Name AS Bill_Name, bbp.Name2 AS Bill_Name2,
|
||||
bbpc.Title AS Bill_Title, bbpc.Phone AS Bill_Phone,
|
||||
NULLIF (bbpc.Name, bbp.Name) AS Bill_ContactName,
|
||||
bbpl.C_Location_ID AS Bill_C_Location_ID,
|
||||
-- Ship to
|
||||
o.IsDropShip,
|
||||
COALESCE(o.DropShip_BPartner_ID, o.C_BPartner_ID) AS Ship_BPartner_ID,
|
||||
COALESCE(o.DropShip_Location_ID, o.C_BPartner_Location_ID) AS Ship_Location_ID,
|
||||
COALESCE(o.DropShip_User_ID, o.AD_User_ID) AS Ship_User_ID,
|
||||
COALESCE(dsbp.Value, bp.Value) AS Ship_BPValue, COALESCE(dsbp.TaxID, bp.TaxID) AS Ship_BPTaxID,
|
||||
COALESCE(dsbp.Name, bp.Name) AS Ship_Name, COALESCE(dsbp.Name2, bp.Name2) AS Ship_Name2,
|
||||
COALESCE(dsbpc.Title, bpc.Title) AS Ship_Title, COALESCE(dsbpc.Phone, bpc.Phone) AS Ship_Phone,
|
||||
NULLIF (COALESCE(dsbpc.Name, bpc.Name),COALESCE(dsbp.Name, bp.Name)) AS Ship_ContactName,
|
||||
COALESCE(dsbpl.C_Location_ID, bpl.C_Location_ID) AS Ship_C_Location_ID,
|
||||
o.Description,
|
||||
o.POReference,
|
||||
o.C_Currency_ID,
|
||||
pt.Name AS PaymentTerm, pt.DocumentNote AS PaymentTermNote,
|
||||
o.C_Charge_ID, o.ChargeAmt,
|
||||
o.TotalLines,
|
||||
o.GrandTotal, o.GrandTotal AS AmtInWords,
|
||||
o.M_PriceList_ID,
|
||||
o.IsTaxIncluded, o.Volume, o.Weight,
|
||||
o.C_Campaign_ID, o.C_Project_ID, o.C_Activity_ID,
|
||||
o.M_Shipper_ID, o.DeliveryRule, o.DeliveryViaRule, o.PriorityRule, o.InvoiceRule
|
||||
FROM C_Order o
|
||||
INNER JOIN C_DocType dt ON (o.C_DocType_ID=dt.C_DocType_ID)
|
||||
INNER JOIN M_Warehouse wh ON (o.M_Warehouse_ID=wh.M_Warehouse_ID)
|
||||
INNER JOIN C_PaymentTerm pt ON (o.C_PaymentTerm_ID=pt.C_PaymentTerm_ID)
|
||||
INNER JOIN C_BPartner bp ON (o.C_BPartner_ID=bp.C_BPartner_ID)
|
||||
LEFT OUTER JOIN C_Greeting bpg ON (bp.C_Greeting_ID=bpg.C_Greeting_ID)
|
||||
INNER JOIN C_BPartner_Location bpl ON (o.C_BPartner_Location_ID=bpl.C_BPartner_Location_ID)
|
||||
INNER JOIN C_Location l ON (bpl.C_Location_ID=l.C_Location_ID)
|
||||
LEFT OUTER JOIN AD_User bpc ON (o.AD_User_ID=bpc.AD_User_ID)
|
||||
LEFT OUTER JOIN C_Greeting bpcg ON (bpc.C_Greeting_ID=bpcg.C_Greeting_ID)
|
||||
INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID)
|
||||
LEFT OUTER JOIN AD_User u ON (o.SalesRep_ID=u.AD_User_ID)
|
||||
LEFT OUTER JOIN C_BPartner ubp ON (u.C_BPartner_ID=ubp.C_BPartner_ID)
|
||||
INNER JOIN C_BPartner bbp ON (o.Bill_BPartner_ID=bbp.C_BPartner_ID)
|
||||
INNER JOIN C_BPartner_Location bbpl ON (o.Bill_Location_ID=bbpl.C_BPartner_Location_ID)
|
||||
LEFT OUTER JOIN AD_User bbpc ON (o.Bill_User_ID=bbpc.AD_User_ID)
|
||||
LEFT OUTER JOIN C_BPartner dsbp ON (o.DropShip_BPartner_ID=dsbp.C_BPartner_ID)
|
||||
LEFT OUTER JOIN C_BPartner_Location dsbpl ON (o.DropShip_Location_ID=dsbpl.C_BPartner_Location_ID)
|
||||
LEFT OUTER JOIN AD_User dsbpc ON (o.DropShip_User_ID=dsbpc.AD_User_ID);
|
||||
|
||||
CREATE OR REPLACE VIEW "C_ORDER_HEADER_VT"
|
||||
AS
|
||||
SELECT o.AD_Client_ID, o.AD_Org_ID, o.IsActive, o.Created, o.CreatedBy, o.Updated, o.UpdatedBy,
|
||||
dt.AD_Language,
|
||||
o.C_Order_ID, o.IsSOTrx, o.DocumentNo, o.DocStatus, o.C_DocType_ID,
|
||||
o.C_BPartner_ID, bp.Value AS BPValue, bp.TaxID AS BPTaxID, bp.NAICS, bp.DUNS,
|
||||
oi.C_Location_ID AS Org_Location_ID, oi.TaxID,
|
||||
o.M_Warehouse_ID, wh.C_Location_ID AS Warehouse_Location_ID,
|
||||
dt.PrintName AS DocumentType, dt.DocumentNote AS DocumentTypeNote,
|
||||
o.SalesRep_ID, COALESCE(ubp.Name, u.Name) AS SalesRep_Name,
|
||||
o.DateOrdered, o.DatePromised,
|
||||
bpg.Greeting AS BPGreeting,
|
||||
bp.Name, bp.Name2,
|
||||
bpcg.Greeting AS BPContactGreeting,
|
||||
bpc.Title, bpc.Phone,
|
||||
NULLIF (bpc.Name, bp.Name) AS ContactName,
|
||||
bpl.C_Location_ID, l.Postal || l.Postal_Add AS Postal,
|
||||
bp.ReferenceNo,
|
||||
-- Bill to
|
||||
o.Bill_BPartner_ID, o.Bill_Location_ID, o.Bill_User_ID,
|
||||
bbp.Value AS Bill_BPValue, bbp.TaxID AS Bill_BPTaxID,
|
||||
bbp.Name AS Bill_Name, bbp.Name2 AS Bill_Name2,
|
||||
bbpc.Title AS Bill_Title, bbpc.Phone AS Bill_Phone,
|
||||
NULLIF (bbpc.Name, bbp.Name) AS Bill_ContactName,
|
||||
bbpl.C_Location_ID AS Bill_C_Location_ID,
|
||||
-- Ship to
|
||||
o.IsDropShip,
|
||||
COALESCE(o.DropShip_BPartner_ID, o.C_BPartner_ID) AS Ship_BPartner_ID,
|
||||
COALESCE(o.DropShip_Location_ID, o.C_BPartner_Location_ID) AS Ship_Location_ID,
|
||||
COALESCE(o.DropShip_User_ID, o.AD_User_ID) AS Ship_User_ID,
|
||||
COALESCE(dsbp.Value, bp.Value) AS Ship_BPValue, COALESCE(dsbp.TaxID, bp.TaxID) AS Ship_BPTaxID,
|
||||
COALESCE(dsbp.Name, bp.Name) AS Ship_Name, COALESCE(dsbp.Name2, bp.Name2) AS Ship_Name2,
|
||||
COALESCE(dsbpc.Title, bpc.Title) AS Ship_Title, COALESCE(dsbpc.Phone, bpc.Phone) AS Ship_Phone,
|
||||
NULLIF (COALESCE(dsbpc.Name, bpc.Name),COALESCE(dsbp.Name, bp.Name)) AS Ship_ContactName,
|
||||
COALESCE(dsbpl.C_Location_ID, bpl.C_Location_ID) AS Ship_C_Location_ID,
|
||||
o.Description,
|
||||
o.POReference,
|
||||
o.C_Currency_ID,
|
||||
pt.Name AS PaymentTerm, pt.DocumentNote AS PaymentTermNote,
|
||||
o.C_Charge_ID, o.ChargeAmt,
|
||||
o.TotalLines,
|
||||
o.GrandTotal, o.GrandTotal AS AmtInWords,
|
||||
o.M_PriceList_ID,
|
||||
o.IsTaxIncluded, o.Volume, o.Weight,
|
||||
o.C_Campaign_ID, o.C_Project_ID, o.C_Activity_ID,
|
||||
o.M_Shipper_ID, o.DeliveryRule, o.DeliveryViaRule, o.PriorityRule, o.InvoiceRule
|
||||
FROM C_Order o
|
||||
INNER JOIN C_DocType_Trl dt ON (o.C_DocType_ID=dt.C_DocType_ID)
|
||||
INNER JOIN M_Warehouse wh ON (o.M_Warehouse_ID=wh.M_Warehouse_ID)
|
||||
INNER JOIN C_PaymentTerm_Trl pt ON (o.C_PaymentTerm_ID=pt.C_PaymentTerm_ID AND dt.AD_Language=pt.AD_Language)
|
||||
INNER JOIN C_BPartner bp ON (o.C_BPartner_ID=bp.C_BPartner_ID)
|
||||
LEFT OUTER JOIN C_Greeting_Trl bpg ON (bp.C_Greeting_ID=bpg.C_Greeting_ID AND dt.AD_Language=bpg.AD_Language)
|
||||
INNER JOIN C_BPartner_Location bpl ON (o.C_BPartner_Location_ID=bpl.C_BPartner_Location_ID)
|
||||
INNER JOIN C_Location l ON (bpl.C_Location_ID=l.C_Location_ID)
|
||||
LEFT OUTER JOIN AD_User bpc ON (o.AD_User_ID=bpc.AD_User_ID)
|
||||
LEFT OUTER JOIN C_Greeting_Trl bpcg ON (bpc.C_Greeting_ID=bpcg.C_Greeting_ID AND dt.AD_Language=bpcg.AD_Language)
|
||||
INNER JOIN AD_OrgInfo oi ON (o.AD_Org_ID=oi.AD_Org_ID)
|
||||
LEFT OUTER JOIN AD_User u ON (o.SalesRep_ID=u.AD_User_ID)
|
||||
LEFT OUTER JOIN C_BPartner ubp ON (u.C_BPartner_ID=ubp.C_BPartner_ID)
|
||||
INNER JOIN C_BPartner bbp ON (o.Bill_BPartner_ID=bbp.C_BPartner_ID)
|
||||
INNER JOIN C_BPartner_Location bbpl ON (o.Bill_Location_ID=bbpl.C_BPartner_Location_ID)
|
||||
LEFT OUTER JOIN AD_User bbpc ON (o.Bill_User_ID=bbpc.AD_User_ID)
|
||||
LEFT OUTER JOIN C_BPartner dsbp ON (o.DropShip_BPartner_ID=dsbp.C_BPartner_ID)
|
||||
LEFT OUTER JOIN C_BPartner_Location dsbpl ON (o.DropShip_Location_ID=dsbpl.C_BPartner_Location_ID)
|
||||
LEFT OUTER JOIN AD_User dsbpc ON (o.DropShip_User_ID=dsbpc.AD_User_ID);
|
||||
|
||||
CREATE OR REPLACE VIEW "M_INOUT_HEADER_V"
|
||||
AS
|
||||
SELECT io.AD_Client_ID, io.AD_Org_ID, io.IsActive, io.Created, io.CreatedBy, io.Updated, io.UpdatedBy,
|
||||
'en_US' AS AD_Language,
|
||||
io.M_InOut_ID, io.IsSOTrx, io.DocumentNo, io.DocStatus, io.C_DocType_ID,
|
||||
io.C_BPartner_ID, bp.Value AS BPValue, bp.TaxID AS BPTaxID, bp.NAICS, bp.DUNS,
|
||||
oi.C_Location_ID AS Org_Location_ID, oi.TaxID,
|
||||
io.M_Warehouse_ID, wh.C_Location_ID AS Warehouse_Location_ID,
|
||||
dt.PrintName AS DocumentType, dt.DocumentNote AS DocumentTypeNote,
|
||||
io.C_Order_ID,
|
||||
io.MovementDate, io.MovementType,
|
||||
bpg.Greeting AS BPGreeting,
|
||||
bp.Name, bp.Name2,
|
||||
bpcg.Greeting AS BPContactGreeting,
|
||||
bpc.Title, bpc.Phone,
|
||||
NULLIF (bpc.Name, bp.Name) AS ContactName,
|
||||
bpl.C_Location_ID, l.Postal || l.Postal_Add AS Postal,
|
||||
bp.ReferenceNo,
|
||||
io.Description,
|
||||
io.POReference,
|
||||
io.DateOrdered, io.Volume, io.Weight,
|
||||
io.M_Shipper_ID, io.DeliveryRule, io.DeliveryViaRule, io.PriorityRule,
|
||||
-- Ship to
|
||||
io.IsDropShip,
|
||||
COALESCE(io.DropShip_BPartner_ID, io.C_BPartner_ID) AS Ship_BPartner_ID,
|
||||
COALESCE(io.DropShip_Location_ID, io.C_BPartner_Location_ID) AS Ship_Location_ID,
|
||||
COALESCE(io.DropShip_User_ID, io.AD_User_ID) AS Ship_User_ID,
|
||||
COALESCE(dsbp.Value, bp.Value) AS Ship_BPValue, COALESCE(dsbp.TaxID, bp.TaxID) AS Ship_BPTaxID,
|
||||
COALESCE(dsbp.Name, bp.Name) AS Ship_Name, COALESCE(dsbp.Name2, bp.Name2) AS Ship_Name2,
|
||||
COALESCE(dsbpc.Title, bpc.Title) AS Ship_Title, COALESCE(dsbpc.Phone, bpc.Phone) AS Ship_Phone,
|
||||
NULLIF (COALESCE(dsbpc.Name, bpc.Name),COALESCE(dsbp.Name, bp.Name)) AS Ship_ContactName,
|
||||
COALESCE(dsbpl.C_Location_ID, bpl.C_Location_ID) AS Ship_C_Location_ID
|
||||
FROM M_InOut io
|
||||
INNER JOIN C_DocType dt ON (io.C_DocType_ID=dt.C_DocType_ID)
|
||||
INNER JOIN C_BPartner bp ON (io.C_BPartner_ID=bp.C_BPartner_ID)
|
||||
LEFT OUTER JOIN C_Greeting bpg ON (bp.C_Greeting_ID=bpg.C_Greeting_ID)
|
||||
INNER JOIN C_BPartner_Location bpl ON (io.C_BPartner_Location_ID=bpl.C_BPartner_Location_ID)
|
||||
INNER JOIN C_Location l ON (bpl.C_Location_ID=l.C_Location_ID)
|
||||
LEFT OUTER JOIN AD_User bpc ON (io.AD_User_ID=bpc.AD_User_ID)
|
||||
LEFT OUTER JOIN C_Greeting bpcg ON (bpc.C_Greeting_ID=bpcg.C_Greeting_ID)
|
||||
INNER JOIN AD_OrgInfo oi ON (io.AD_Org_ID=oi.AD_Org_ID)
|
||||
INNER JOIN M_Warehouse wh ON (io.M_Warehouse_ID=wh.M_Warehouse_ID)
|
||||
LEFT OUTER JOIN C_BPartner dsbp ON (io.DropShip_BPartner_ID=dsbp.C_BPartner_ID)
|
||||
LEFT OUTER JOIN C_BPartner_Location dsbpl ON (io.DropShip_Location_ID=dsbpl.C_BPartner_Location_ID)
|
||||
LEFT OUTER JOIN AD_User dsbpc ON (io.DropShip_User_ID=dsbpc.AD_User_ID);
|
||||
|
||||
CREATE OR REPLACE VIEW "M_INOUT_HEADER_VT"
|
||||
AS
|
||||
SELECT io.AD_Client_ID, io.AD_Org_ID, io.IsActive, io.Created, io.CreatedBy, io.Updated, io.UpdatedBy,
|
||||
dt.AD_Language,
|
||||
io.M_InOut_ID, io.IsSOTrx, io.DocumentNo, io.DocStatus, io.C_DocType_ID,
|
||||
io.C_BPartner_ID, bp.Value AS BPValue, bp.TaxID AS BPTaxID, bp.NAICS, bp.DUNS,
|
||||
oi.C_Location_ID AS Org_Location_ID, oi.TaxID,
|
||||
io.M_Warehouse_ID, wh.C_Location_ID AS Warehouse_Location_ID,
|
||||
dt.PrintName AS DocumentType, dt.DocumentNote AS DocumentTypeNote,
|
||||
io.C_Order_ID, bpc.Phone,
|
||||
io.MovementDate, io.MovementType,
|
||||
bpg.Greeting AS BPGreeting,
|
||||
bp.Name, bp.Name2,
|
||||
bpcg.Greeting AS BPContactGreeting,
|
||||
bpc.Title,
|
||||
NULLIF (bpc.Name, bp.Name) AS ContactName,
|
||||
bpl.C_Location_ID, l.Postal || l.Postal_Add AS Postal,
|
||||
bp.ReferenceNo,
|
||||
io.Description,
|
||||
io.POReference,
|
||||
io.DateOrdered, io.Volume, io.Weight,
|
||||
io.M_Shipper_ID, io.DeliveryRule, io.DeliveryViaRule, io.PriorityRule,
|
||||
-- Ship to
|
||||
io.IsDropShip,
|
||||
COALESCE(io.DropShip_BPartner_ID, io.C_BPartner_ID) AS Ship_BPartner_ID,
|
||||
COALESCE(io.DropShip_Location_ID, io.C_BPartner_Location_ID) AS Ship_Location_ID,
|
||||
COALESCE(io.DropShip_User_ID, io.AD_User_ID) AS Ship_User_ID,
|
||||
COALESCE(dsbp.Value, bp.Value) AS Ship_BPValue, COALESCE(dsbp.TaxID, bp.TaxID) AS Ship_BPTaxID,
|
||||
COALESCE(dsbp.Name, bp.Name) AS Ship_Name, COALESCE(dsbp.Name2, bp.Name2) AS Ship_Name2,
|
||||
COALESCE(dsbpc.Title, bpc.Title) AS Ship_Title, COALESCE(dsbpc.Phone, bpc.Phone) AS Ship_Phone,
|
||||
NULLIF (COALESCE(dsbpc.Name, bpc.Name),COALESCE(dsbp.Name, bp.Name)) AS Ship_ContactName,
|
||||
COALESCE(dsbpl.C_Location_ID, bpl.C_Location_ID) AS Ship_C_Location_ID
|
||||
FROM M_InOut io
|
||||
INNER JOIN C_DocType_Trl dt ON (io.C_DocType_ID=dt.C_DocType_ID)
|
||||
INNER JOIN C_BPartner bp ON (io.C_BPartner_ID=bp.C_BPartner_ID)
|
||||
LEFT OUTER JOIN C_Greeting_Trl bpg ON (bp.C_Greeting_ID=bpg.C_Greeting_ID AND dt.AD_Language=bpg.AD_Language)
|
||||
INNER JOIN C_BPartner_Location bpl ON (io.C_BPartner_Location_ID=bpl.C_BPartner_Location_ID)
|
||||
INNER JOIN C_Location l ON (bpl.C_Location_ID=l.C_Location_ID)
|
||||
LEFT OUTER JOIN AD_User bpc ON (io.AD_User_ID=bpc.AD_User_ID)
|
||||
LEFT OUTER JOIN C_Greeting_Trl bpcg ON (bpc.C_Greeting_ID=bpcg.C_Greeting_ID AND dt.AD_Language=bpcg.AD_Language)
|
||||
INNER JOIN AD_OrgInfo oi ON (io.AD_Org_ID=oi.AD_Org_ID)
|
||||
INNER JOIN M_Warehouse wh ON (io.M_Warehouse_ID=wh.M_Warehouse_ID)
|
||||
LEFT OUTER JOIN C_BPartner dsbp ON (io.DropShip_BPartner_ID=dsbp.C_BPartner_ID)
|
||||
LEFT OUTER JOIN C_BPartner_Location dsbpl ON (io.DropShip_Location_ID=dsbpl.C_BPartner_Location_ID)
|
||||
LEFT OUTER JOIN AD_User dsbpc ON (io.DropShip_User_ID=dsbpc.AD_User_ID);
|
||||
|
|
@ -0,0 +1,392 @@
|
|||
-- INSERTING into AD_ELEMENT
|
||||
Insert into AD_ELEMENT (AD_ELEMENT_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,COLUMNNAME,ENTITYTYPE,NAME,PRINTNAME,DESCRIPTION,HELP,PO_NAME,PO_PRINTNAME,PO_DESCRIPTION,PO_HELP) values (53460,0,0,'Y',TO_TIMESTAMP('01/MAY/08','DD/MON/RR'),100,TO_TIMESTAMP('01/MAY/08','DD/MON/RR'),100,'DropShip_User_ID','U','Drop Shipment Contact','Drop Shipment Contact','Business Partner Contact for drop shipment',null,null,null,null,null);
|
||||
Insert into AD_ELEMENT (AD_ELEMENT_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,COLUMNNAME,ENTITYTYPE,NAME,PRINTNAME,DESCRIPTION,HELP,PO_NAME,PO_PRINTNAME,PO_DESCRIPTION,PO_HELP) values (53459,0,0,'Y',TO_TIMESTAMP('01/MAY/08','DD/MON/RR'),100,TO_TIMESTAMP('07/MAY/08','DD/MON/RR'),100,'DropShip_Location_ID','D','Drop Shipment Location','Drop Shipment Location','Business Partner Location for shipping to',null,null,null,null,null);
|
||||
Insert into AD_ELEMENT (AD_ELEMENT_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,COLUMNNAME,ENTITYTYPE,NAME,PRINTNAME,DESCRIPTION,HELP,PO_NAME,PO_PRINTNAME,PO_DESCRIPTION,PO_HELP) values (53458,0,0,'Y',TO_TIMESTAMP('01/MAY/08','DD/MON/RR'),100,TO_TIMESTAMP('01/MAY/08','DD/MON/RR'),100,'DropShip_BPartner_ID','U','Drop Shipment Partner','Drop Shipment Partner','Business Partner to ship to','If empty the business partner will be shipped to.',null,null,null,null);
|
||||
|
||||
-- INSERTING into AD_Column
|
||||
Insert into AD_Column (AD_COLUMN_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,UPDATED,CREATEDBY,UPDATEDBY,NAME,DESCRIPTION,HELP,VERSION,ENTITYTYPE,COLUMNNAME,AD_TABLE_ID,AD_REFERENCE_ID,AD_REFERENCE_VALUE_ID,AD_VAL_RULE_ID,FIELDLENGTH,DEFAULTVALUE,ISKEY,ISPARENT,ISMANDATORY,ISUPDATEABLE,READONLYLOGIC,ISIDENTIFIER,SEQNO,ISTRANSLATED,ISENCRYPTED,CALLOUT,VFORMAT,VALUEMIN,VALUEMAX,ISSELECTIONCOLUMN,AD_ELEMENT_ID,AD_PROCESS_ID,ISSYNCDATABASE,ISALWAYSUPDATEABLE,COLUMNSQL,MANDATORYLOGIC,INFOFACTORYCLASS) values (55314,0,0,'Y',TO_TIMESTAMP('07/MAY/08','DD/MON/RR'),TO_TIMESTAMP('07/MAY/08','DD/MON/RR'),100,100,'Drop Shipment Partner','Business Partner to ship to','If empty the business partner will be shipped to.',1,'D','DropShip_BPartner_ID',259,30,138,230,22,null,'N','N','N','Y',null,'N',0,'N','N',null,null,null,null,'N',53458,null,'N','N',null,null,null);
|
||||
|
||||
-- 7/05/2008 11:35:44
|
||||
-- Drop shipment
|
||||
ALTER TABLE C_Order ADD DropShip_BPartner_ID NUMERIC(10)
|
||||
;
|
||||
|
||||
-- 7/05/2008 11:40:02
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,52022,'C_BPartner_Location.C_BPartner_ID=@DropShip_BPartner_ID@ AND C_BPartner_Location.IsShipTo=''Y'' AND C_BPartner_Location.IsActive=''Y''',TO_TIMESTAMP('2008-05-07 11:39:57','YYYY-MM-DD HH24:MI:SS'),100,'U','Y','C_BPartner_Loc Ship - Drop Ship BPartner','S',TO_TIMESTAMP('2008-05-07 11:39:57','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- INSERTING into AD_Column
|
||||
Insert into AD_Column (AD_COLUMN_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,UPDATED,CREATEDBY,UPDATEDBY,NAME,DESCRIPTION,HELP,VERSION,ENTITYTYPE,
|
||||
COLUMNNAME,AD_TABLE_ID,AD_REFERENCE_ID,AD_REFERENCE_VALUE_ID,AD_VAL_RULE_ID,FIELDLENGTH,DEFAULTVALUE,ISKEY,ISPARENT,ISMANDATORY,
|
||||
ISUPDATEABLE,READONLYLOGIC,ISIDENTIFIER,SEQNO,ISTRANSLATED,ISENCRYPTED,CALLOUT,VFORMAT,VALUEMIN,VALUEMAX,ISSELECTIONCOLUMN,
|
||||
AD_ELEMENT_ID,AD_PROCESS_ID,ISSYNCDATABASE,ISALWAYSUPDATEABLE,COLUMNSQL,MANDATORYLOGIC,INFOFACTORYCLASS)
|
||||
values (55315,0,0,'Y',TO_TIMESTAMP('07/MAY/08','DD/MON/RR'),TO_TIMESTAMP('07/MAY/08','DD/MON/RR'),100,100,'Drop Shipment Location',
|
||||
'Business Partner Location for shipping to',null,1,'D','DropShip_Location_ID',259,18,159,52022,22,null,'N','N','N','Y',
|
||||
null,'N',0,'N','N',null,null,null,null,'N',53459,null,'N','N',null,null,null);
|
||||
|
||||
-- 7/05/2008 11:41:42
|
||||
-- Drop shipment
|
||||
ALTER TABLE C_Order ADD DropShip_Location_ID NUMERIC(10)
|
||||
;
|
||||
|
||||
-- INSERTING
|
||||
Insert into AD_Column (AD_COLUMN_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,UPDATED,CREATEDBY,UPDATEDBY,NAME,DESCRIPTION,
|
||||
HELP,VERSION,ENTITYTYPE,COLUMNNAME,AD_TABLE_ID,AD_REFERENCE_ID,AD_REFERENCE_VALUE_ID,AD_VAL_RULE_ID,FIELDLENGTH,
|
||||
DEFAULTVALUE,ISKEY,ISPARENT,ISMANDATORY,ISUPDATEABLE,READONLYLOGIC,ISIDENTIFIER,SEQNO,ISTRANSLATED,ISENCRYPTED,
|
||||
CALLOUT,VFORMAT,VALUEMIN,VALUEMAX,ISSELECTIONCOLUMN,AD_ELEMENT_ID,AD_PROCESS_ID,ISSYNCDATABASE,ISALWAYSUPDATEABLE,
|
||||
COLUMNSQL,MANDATORYLOGIC,INFOFACTORYCLASS)
|
||||
values (55316,0,0,'Y',TO_TIMESTAMP('07/MAY/08','DD/MON/RR'),TO_TIMESTAMP('07/MAY/08','DD/MON/RR'),100,100,
|
||||
'Drop Shipment Contact','Business Partner Contact for drop shipment',null,1,'D','DropShip_User_ID',
|
||||
259,18,110,168,22,null,'N','N','N','Y',null,'N',0,'N','N',null,null,null,null,'N',53460,null,'N','N',null,null,null);
|
||||
|
||||
|
||||
-- 7/05/2008 11:42:43
|
||||
-- Drop shipment
|
||||
ALTER TABLE C_Order ADD DropShip_User_ID NUMERIC(10)
|
||||
;
|
||||
|
||||
-- 7/05/2008 11:46:47
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,55317,2466,0,20,319,'IsDropShip',TO_TIMESTAMP('2008-05-07 11:46:46','YYYY-MM-DD HH24:MI:SS'),100,'N','Drop Shipments are sent from the Vendor directly to the Customer','D',1,'Drop Shipments do not cause any Inventory reservations or movements as the Shipment is from the Vendor''s inventory. The Shipment of the Vendor to the Customer must be confirmed.','Y','N','N','N','N','N','N','N','N','N','Y','Drop Shipment',0,TO_TIMESTAMP('2008-05-07 11:46:46','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- 7/05/2008 11:47:15
|
||||
-- Drop shipment
|
||||
ALTER TABLE M_InOut ADD IsDropShip CHAR(1) DEFAULT 'N' CHECK (IsDropShip IN ('Y','N'))
|
||||
;
|
||||
|
||||
-- 7/05/2008 11:48:17
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,55318,53458,0,18,138,319,'DropShip_BPartner_ID',TO_TIMESTAMP('2008-05-07 11:48:16','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner to ship to','D',10,'If empty the business partner will be shipped to.','Y','N','N','N','N','N','N','N','N','N','Y','Drop Shipment Partner',0,TO_TIMESTAMP('2008-05-07 11:48:16','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- 7/05/2008 11:48:21
|
||||
-- Drop shipment
|
||||
ALTER TABLE M_InOut ADD DropShip_BPartner_ID NUMERIC(10)
|
||||
;
|
||||
|
||||
|
||||
-- 7/05/2008 11:49:16
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,55319,53459,0,18,159,319,120,'DropShip_Location_ID',TO_TIMESTAMP('2008-05-07 11:49:15','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner Location for shipping to','D',10,'Y','N','N','N','N','N','N','N','N','N','Y','Drop Shipment Location',0,TO_TIMESTAMP('2008-05-07 11:49:15','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- 7/05/2008 11:49:18
|
||||
-- Drop shipment
|
||||
ALTER TABLE M_InOut ADD DropShip_Location_ID NUMERIC(10)
|
||||
;
|
||||
|
||||
|
||||
-- 7/05/2008 11:49:58
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,
|
||||
Created,CreatedBy,Description,EntityType,FieldLength,
|
||||
IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,
|
||||
IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,55320,53460,0,18,110,319,168,'DropShip_User_ID',
|
||||
TO_TIMESTAMP('2008-05-07 11:49:57','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner Contact for drop shipment','D',10,
|
||||
'Y','N','N','N','N','N','N','N','N','N',
|
||||
'Y','Drop Shipment Contact',0,TO_TIMESTAMP('2008-05-07 11:49:57','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- 7/05/2008 11:50:00
|
||||
-- Drop shipment
|
||||
ALTER TABLE M_InOut ADD DropShip_User_ID NUMERIC(10)
|
||||
;
|
||||
|
||||
-- 7/05/2008 11:58:45
|
||||
-- Drop shipment
|
||||
UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_TIMESTAMP('2008-05-07 11:58:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11580
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:03:04
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55314,55410,0,186,TO_TIMESTAMP('2008-05-07 12:03:03','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner to ship to',14,'@IsDropShip@=''Y''','D','If empty the business partner will be shipped to.','Y','Y','Y','N','N','N','N','N','Drop Shipment Partner',192,0,TO_TIMESTAMP('2008-05-07 12:03:03','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:03:04
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55410 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:04:09
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55315,130,55411,0,186,TO_TIMESTAMP('2008-05-07 12:04:08','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner Location for shipping to',14,'@IsDropShip@=''Y''','D','Y','Y','Y','N','N','N','N','N','Drop Shipment Location',194,0,TO_TIMESTAMP('2008-05-07 12:04:08','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:04:09
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55411 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:04:17
|
||||
-- Drop shipment
|
||||
UPDATE AD_Field SET AD_FieldGroup_ID=130,Updated=TO_TIMESTAMP('2008-05-07 12:04:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=55410
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:05:27
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55316,130,55412,0,186,TO_TIMESTAMP('2008-05-07 12:05:26','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner Contact for drop shipment',14,'@IsDropShip@=''Y''','D','Y','Y','Y','N','N','N','N','N','Drop Shipment Contact',196,0,TO_TIMESTAMP('2008-05-07 12:05:26','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:05:27
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55412 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:08:49
|
||||
-- Drop shipment
|
||||
UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2008-05-07 12:08:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=55411
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:15:15
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55314,124,55413,0,294,TO_TIMESTAMP('2008-05-07 12:15:13','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner to ship to',14,'@IsDropShip@=''Y''','D','If empty the business partner will be shipped to.','Y','Y','Y','N','N','N','N','N','Drop Shipment Partner',402,0,TO_TIMESTAMP('2008-05-07 12:15:13','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:15:15
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55413 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:16:35
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55315,124,55414,0,294,TO_TIMESTAMP('2008-05-07 12:16:34','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner Location for shipping to',14,'@IsDropShip@=''Y''','D','Y','Y','Y','N','N','N','N','Y','Drop Shipment Location',404,0,TO_TIMESTAMP('2008-05-07 12:16:34','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:16:35
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55414 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:17:34
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55316,124,55415,0,294,TO_TIMESTAMP('2008-05-07 12:17:33','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner Contact for drop shipment',14,'@IsDropShip@=''Y''','D','Y','Y','Y','N','N','N','N','N','Drop Shipment Contact',406,0,TO_TIMESTAMP('2008-05-07 12:17:33','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:17:34
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55415 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- 7/05/2008 12:17:50
|
||||
-- Drop shipment
|
||||
UPDATE AD_Field SET IsReadOnly='N',Updated=TO_TIMESTAMP('2008-05-07 12:17:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10123
|
||||
;
|
||||
|
||||
|
||||
-- 8/05/2008 10:32:31
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,53461,0,'DropShip_Warehouse_ID',TO_TIMESTAMP('2008-05-08 10:32:26','YYYY-MM-DD HH24:MI:SS'),100,'The (logical) warehouse to use for recording drop ship receipts and shipments.','D','The drop ship warehouse will be used for recording material transactions relating to drop shipments to and from this organization.','Y','Drop Ship Warehouse','Drop Ship Warehouse',TO_TIMESTAMP('2008-05-08 10:32:26','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- 8/05/2008 10:32:31
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53461 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
|
||||
;
|
||||
|
||||
-- 8/05/2008 10:33:53
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,55321,53461,0,18,197,228,'DropShip_Warehouse_ID',TO_TIMESTAMP('2008-05-08 10:33:51','YYYY-MM-DD HH24:MI:SS'),100,'The (logical) warehouse to use for recording drop ship receipts and shipments.','D',22,'The drop ship warehouse will be used for recording material transactions relating to drop shipments to and from this organization.','Y','N','N','N','N','N','N','N','N','N','Y','Drop Ship Warehouse',0,TO_TIMESTAMP('2008-05-08 10:33:51','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||
;
|
||||
|
||||
-- 8/05/2008 10:33:53
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=55321 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
|
||||
;
|
||||
|
||||
-- 8/05/2008 10:33:56
|
||||
-- Drop shipment
|
||||
ALTER TABLE AD_OrgInfo ADD DropShip_Warehouse_ID NUMERIC(10)
|
||||
;
|
||||
|
||||
-- 8/05/2008 10:35:33
|
||||
-- Drop shipment
|
||||
UPDATE AD_Field SET IsSameLine='N',Updated=TO_TIMESTAMP('2008-05-08 10:35:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=9245
|
||||
;
|
||||
|
||||
-- 8/05/2008 10:36:37
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55321,55416,0,170,TO_TIMESTAMP('2008-05-08 10:36:36','YYYY-MM-DD HH24:MI:SS'),100,'The (logical) warehouse to use for recording drop ship receipts and shipments.',22,'D','The drop ship warehouse will be used for recording material transactions relating to drop shipments to and from this organization.','Y','Y','Y','N','N','N','N','N','Drop Ship Warehouse',65,0,TO_TIMESTAMP('2008-05-08 10:36:36','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
-- 8/05/2008 10:36:37
|
||||
-- Drop shipment
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55416 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
-- 8/05/2008 10:39:12
|
||||
-- Drop shipment
|
||||
UPDATE AD_Column SET AD_Val_Rule_ID=189,Updated=TO_TIMESTAMP('2008-05-08 10:39:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55321
|
||||
;
|
||||
|
||||
-- 8/05/2008 10:39:12
|
||||
-- Drop shipment
|
||||
UPDATE AD_Field SET Name='Drop Ship Warehouse', Description='The (logical) warehouse to use for recording drop ship receipts and shipments.', Help='The drop ship warehouse will be used for recording material transactions relating to drop shipments to and from this organization.' WHERE AD_Column_ID=55321 AND IsCentrallyMaintained='Y'
|
||||
;
|
||||
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55317,124,55419,0,257,TO_TIMESTAMP('2008-05-16 09:33:44','YYYY-MM-DD HH24:MI:SS'),100,'Drop Shipments are sent from the Vendor directly to the Customer',0,'D','Drop Shipments do not cause any Inventory reservations or movements as the Shipment is from the Vendor''s inventory. The Shipment of the Vendor to the Customer must be confirmed.','Y','Y','Y','N','N','N','N','N','Drop Shipment',282,0,TO_TIMESTAMP('2008-05-16 09:33:44','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55419 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55319,55425,0,296,TO_TIMESTAMP('2008-05-16 09:43:45','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner Location for shipping to',14,'@IsDropShip@=''Y''','D','Y','Y','Y','N','N','N','N','Y','Drop Shipment Location',246,0,TO_TIMESTAMP('2008-05-16 09:43:45','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55425 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55317,55426,0,296,TO_TIMESTAMP('2008-05-16 09:44:49','YYYY-MM-DD HH24:MI:SS'),100,'Drop Shipments are sent from the Vendor directly to the Customer',1,'D','Drop Shipments do not cause any Inventory reservations or movements as the Shipment is from the Vendor''s inventory. The Shipment of the Vendor to the Customer must be confirmed.','Y','Y','Y','N','N','N','N','N','Drop Shipment',242,0,TO_TIMESTAMP('2008-05-16 09:44:49','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55426 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55318,55427,0,296,TO_TIMESTAMP('2008-05-16 09:45:31','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner to ship to',14,'@IsDropShip@=Y''','D','If empty the business partner will be shipped to.','Y','Y','Y','N','N','N','N','N','Drop Shipment Partner',244,0,TO_TIMESTAMP('2008-05-16 09:45:31','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55427 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55320,55428,0,296,TO_TIMESTAMP('2008-05-16 09:46:13','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner Contact for drop shipment',14,'@IsDropShip@=''Y''','D','Y','Y','Y','N','N','N','N','N','Drop Shipment Contact',248,0,TO_TIMESTAMP('2008-05-16 09:46:13','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55428 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
|
||||
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55318,124,55429,0,257,TO_TIMESTAMP('2008-05-16 09:48:43','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner to ship to',0,'@IsDropShip@=''Y''','D','If empty the business partner will be shipped to.','Y','Y','Y','N','N','N','N','N','Drop Shipment Partner',284,0,TO_TIMESTAMP('2008-05-16 09:48:43','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55429 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55319,124,55430,0,257,TO_TIMESTAMP('2008-05-16 09:49:38','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner Location for shipping to',14,'@IsDropShip@=''Y''','D','Y','Y','Y','N','N','N','N','Y','Drop Shipment Location',286,0,TO_TIMESTAMP('2008-05-16 09:49:38','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55430 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,55320,124,55431,0,257,TO_TIMESTAMP('2008-05-16 09:50:20','YYYY-MM-DD HH24:MI:SS'),100,'Business Partner Contact for drop shipment',14,'@IsDropShip@=''Y''','D','Y','Y','Y','N','N','N','N','N','Drop Shipment Contact',288,0,TO_TIMESTAMP('2008-05-16 09:50:20','YYYY-MM-DD HH24:MI:SS'),100)
|
||||
;
|
||||
|
||||
|
||||
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=55431 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||
;
|
||||
|
||||
DROP VIEW m_inout_candidate_v;
|
||||
|
||||
CREATE OR REPLACE VIEW m_inout_candidate_v AS
|
||||
SELECT o.ad_client_id, o.ad_org_id, o.c_bpartner_id, o.c_order_id, o.documentno, o.dateordered, o.c_doctype_id, o.poreference, o.description, o.salesrep_id, l.m_warehouse_id, sum((l.qtyordered - l.qtydelivered) * l.priceactual) AS totallines
|
||||
FROM c_order o
|
||||
JOIN c_orderline l ON o.c_order_id = l.c_order_id
|
||||
WHERE o.docstatus = 'CO'::bpchar AND o.isdelivered = 'N'::bpchar AND (o.c_doctype_id IN ( SELECT c_doctype.c_doctype_id
|
||||
FROM c_doctype
|
||||
WHERE c_doctype.docbasetype = 'SOO'::bpchar AND (c_doctype.docsubtypeso <> ALL (ARRAY['ON'::bpchar, 'OB'::bpchar, 'WR'::bpchar])))) AND o.deliveryrule <> 'M'::bpchar AND (l.m_product_id IS NULL OR (EXISTS ( SELECT 1
|
||||
FROM m_product p
|
||||
WHERE l.m_product_id = p.m_product_id AND p.isexcludeautodelivery = 'N'::bpchar))) AND l.qtyordered <> l.qtydelivered AND (l.m_product_id IS NOT NULL OR l.c_charge_id IS NOT NULL) AND NOT (EXISTS ( SELECT 1
|
||||
FROM m_inoutline iol
|
||||
JOIN m_inout io ON iol.m_inout_id = io.m_inout_id
|
||||
WHERE iol.c_orderline_id = l.c_orderline_id AND (io.docstatus = ANY (ARRAY['IP'::bpchar, 'WC'::bpchar]))))
|
||||
GROUP BY o.ad_client_id, o.ad_org_id, o.c_bpartner_id, o.c_order_id, o.documentno, o.dateordered, o.c_doctype_id, o.poreference, o.description, o.salesrep_id, l.m_warehouse_id;
|
||||
|
||||
DROP VIEW c_order_header_v;
|
||||
|
||||
CREATE OR REPLACE VIEW c_order_header_v AS
|
||||
SELECT o.ad_client_id, o.ad_org_id, o.isactive, o.created, o.createdby, o.updated, o.updatedby, 'en_US'::character varying AS ad_language, o.c_order_id, o.issotrx, o.documentno, o.docstatus, o.c_doctype_id, o.c_bpartner_id, bp.value AS bpvalue, bp.taxid AS bptaxid, bp.naics, bp.duns, oi.c_location_id AS org_location_id, oi.taxid, o.m_warehouse_id, wh.c_location_id AS warehouse_location_id, dt.printname AS documenttype, dt.documentnote AS documenttypenote, o.salesrep_id, COALESCE(ubp.name, u.name) AS salesrep_name, o.dateordered, o.datepromised, bpg.greeting AS bpgreeting, bp.name, bp.name2, bpcg.greeting AS bpcontactgreeting, bpc.title, bpc.phone, NULLIF(bpc.name::text, bp.name::text) AS contactname, bpl.c_location_id, l.postal::text || l.postal_add::text AS postal, bp.referenceno, o.bill_bpartner_id, o.bill_location_id, o.bill_user_id, bbp.value AS bill_bpvalue, bbp.taxid AS bill_bptaxid, bbp.name AS bill_name, bbp.name2 AS bill_name2, bbpc.title AS bill_title, bbpc.phone AS bill_phone, NULLIF(bbpc.name::text, bbp.name::text) AS bill_contactname, bbpl.c_location_id AS bill_c_location_id, o.isdropship, COALESCE(o.dropship_bpartner_id, o.c_bpartner_id) AS ship_bpartner_id, COALESCE(o.dropship_location_id, o.c_bpartner_location_id) AS ship_location_id, COALESCE(o.dropship_user_id, o.ad_user_id) AS ship_user_id, COALESCE(dsbp.value, bp.value) AS ship_bpvalue, COALESCE(dsbp.taxid, bp.taxid) AS ship_bptaxid, COALESCE(dsbp.name, bp.name) AS ship_name, COALESCE(dsbp.name2, bp.name2) AS ship_name2, COALESCE(dsbpc.title, bpc.title) AS ship_title, COALESCE(dsbpc.phone, bpc.phone) AS ship_phone, NULLIF (COALESCE(dsbpc.name, bpc.name),COALESCE(dsbp.name, bp.name)) AS ship_contactname, COALESCE(dsbpl.c_location_id, bpl.c_location_id) AS ship_c_location_id, o.description, o.poreference, o.c_currency_id, pt.name AS paymentterm, pt.documentnote AS paymenttermnote, o.c_charge_id, o.chargeamt, o.totallines, o.grandtotal, o.grandtotal AS amtinwords, o.m_pricelist_id, o.istaxincluded, o.volume, o.weight, o.c_campaign_id, o.c_project_id, o.c_activity_id, o.m_shipper_id, o.deliveryrule, o.deliveryviarule, o.priorityrule, o.invoicerule
|
||||
FROM c_order o
|
||||
JOIN c_doctype dt ON o.c_doctype_id = dt.c_doctype_id
|
||||
JOIN m_warehouse wh ON o.m_warehouse_id = wh.m_warehouse_id
|
||||
JOIN c_paymentterm pt ON o.c_paymentterm_id = pt.c_paymentterm_id
|
||||
JOIN c_bpartner bp ON o.c_bpartner_id = bp.c_bpartner_id
|
||||
LEFT JOIN c_greeting bpg ON bp.c_greeting_id = bpg.c_greeting_id
|
||||
JOIN c_bpartner_location bpl ON o.c_bpartner_location_id = bpl.c_bpartner_location_id
|
||||
JOIN c_location l ON bpl.c_location_id = l.c_location_id
|
||||
LEFT JOIN ad_user bpc ON o.ad_user_id = bpc.ad_user_id
|
||||
LEFT JOIN c_greeting bpcg ON bpc.c_greeting_id = bpcg.c_greeting_id
|
||||
JOIN ad_orginfo oi ON o.ad_org_id = oi.ad_org_id
|
||||
LEFT JOIN ad_user u ON o.salesrep_id = u.ad_user_id
|
||||
LEFT JOIN c_bpartner ubp ON u.c_bpartner_id = ubp.c_bpartner_id
|
||||
JOIN c_bpartner bbp ON o.bill_bpartner_id = bbp.c_bpartner_id
|
||||
JOIN c_bpartner_location bbpl ON o.bill_location_id = bbpl.c_bpartner_location_id
|
||||
LEFT JOIN ad_user bbpc ON o.bill_user_id = bbpc.ad_user_id
|
||||
LEFT JOIN c_bpartner dsbp ON (o.dropship_bpartner_id=dsbp.c_bpartner_id)
|
||||
LEFT JOIN c_bpartner_location dsbpl ON (o.dropship_location_id=dsbpl.c_bpartner_location_id)
|
||||
LEFT JOIN ad_user dsbpc ON (o.dropship_user_id=dsbpc.ad_user_id);
|
||||
|
||||
DROP VIEW c_order_header_vt;
|
||||
|
||||
CREATE OR REPLACE VIEW c_order_header_vt AS
|
||||
SELECT o.ad_client_id, o.ad_org_id, o.isactive, o.created, o.createdby, o.updated, o.updatedby, dt.ad_language, o.c_order_id, o.issotrx, o.documentno, o.docstatus, o.c_doctype_id, o.c_bpartner_id, bp.value AS bpvalue, bp.taxid AS bptaxid, bp.naics, bp.duns, oi.c_location_id AS org_location_id, oi.taxid, o.m_warehouse_id, wh.c_location_id AS warehouse_location_id, dt.printname AS documenttype, dt.documentnote AS documenttypenote, o.salesrep_id, COALESCE(ubp.name, u.name) AS salesrep_name, o.dateordered, o.datepromised, bpg.greeting AS bpgreeting, bp.name, bp.name2, bpcg.greeting AS bpcontactgreeting, bpc.title, bpc.phone, NULLIF(bpc.name::text, bp.name::text) AS contactname, bpl.c_location_id, l.postal::text || l.postal_add::text AS postal, bp.referenceno, o.bill_bpartner_id, o.bill_location_id, o.bill_user_id, bbp.value AS bill_bpvalue, bbp.taxid AS bill_bptaxid, bbp.name AS bill_name, bbp.name2 AS bill_name2, bbpc.title AS bill_title, bbpc.phone AS bill_phone, NULLIF(bbpc.name::text, bbp.name::text) AS bill_contactname, bbpl.c_location_id AS bill_c_location_id, o.isdropship, COALESCE(o.dropship_bpartner_id, o.c_bpartner_id) AS ship_bpartner_id, COALESCE(o.dropship_location_id, o.c_bpartner_location_id) AS ship_location_id, COALESCE(o.dropship_user_id, o.ad_user_id) AS ship_user_id, COALESCE(dsbp.value, bp.value) AS ship_bpvalue, COALESCE(dsbp.taxid, bp.taxid) AS ship_bptaxid, COALESCE(dsbp.name, bp.name) AS ship_name, COALESCE(dsbp.name2, bp.name2) AS ship_name2, COALESCE(dsbpc.title, bpc.title) AS ship_title, COALESCE(dsbpc.phone, bpc.phone) AS ship_phone, NULLIF (COALESCE(dsbpc.name, bpc.name),COALESCE(dsbp.name, bp.name)) AS ship_contactname, COALESCE(dsbpl.c_location_id, bpl.c_location_id) AS ship_c_location_id, o.description, o.poreference, o.c_currency_id, pt.name AS paymentterm, pt.documentnote AS paymenttermnote, o.c_charge_id, o.chargeamt, o.totallines, o.grandtotal, o.grandtotal AS amtinwords, o.m_pricelist_id, o.istaxincluded, o.volume, o.weight, o.c_campaign_id, o.c_project_id, o.c_activity_id, o.m_shipper_id, o.deliveryrule, o.deliveryviarule, o.priorityrule, o.invoicerule
|
||||
FROM c_order o
|
||||
JOIN c_doctype_trl dt ON o.c_doctype_id = dt.c_doctype_id
|
||||
JOIN m_warehouse wh ON o.m_warehouse_id = wh.m_warehouse_id
|
||||
JOIN c_paymentterm_trl pt ON o.c_paymentterm_id = pt.c_paymentterm_id AND dt.ad_language::text = pt.ad_language::text
|
||||
JOIN c_bpartner bp ON o.c_bpartner_id = bp.c_bpartner_id
|
||||
LEFT JOIN c_greeting_trl bpg ON bp.c_greeting_id = bpg.c_greeting_id AND dt.ad_language::text = bpg.ad_language::text
|
||||
JOIN c_bpartner_location bpl ON o.c_bpartner_location_id = bpl.c_bpartner_location_id
|
||||
JOIN c_location l ON bpl.c_location_id = l.c_location_id
|
||||
LEFT JOIN ad_user bpc ON o.ad_user_id = bpc.ad_user_id
|
||||
LEFT JOIN c_greeting_trl bpcg ON bpc.c_greeting_id = bpcg.c_greeting_id AND dt.ad_language::text = bpcg.ad_language::text
|
||||
JOIN ad_orginfo oi ON o.ad_org_id = oi.ad_org_id
|
||||
LEFT JOIN ad_user u ON o.salesrep_id = u.ad_user_id
|
||||
LEFT JOIN c_bpartner ubp ON u.c_bpartner_id = ubp.c_bpartner_id
|
||||
JOIN c_bpartner bbp ON o.bill_bpartner_id = bbp.c_bpartner_id
|
||||
JOIN c_bpartner_location bbpl ON o.bill_location_id = bbpl.c_bpartner_location_id
|
||||
LEFT JOIN ad_user bbpc ON o.bill_user_id = bbpc.ad_user_id
|
||||
LEFT JOIN c_bpartner dsbp ON (o.dropship_bpartner_id=dsbp.c_bpartner_id)
|
||||
LEFT JOIN c_bpartner_location dsbpl ON (o.dropship_location_id=dsbpl.c_bpartner_location_id)
|
||||
LEFT JOIN ad_user dsbpc ON (o.dropship_user_id=dsbpc.ad_user_id);
|
||||
|
||||
DROP VIEW m_inout_header_v;
|
||||
|
||||
CREATE OR REPLACE VIEW m_inout_header_v AS
|
||||
SELECT io.ad_client_id, io.ad_org_id, io.isactive, io.created, io.createdby, io.updated, io.updatedby, 'en_US'::character varying AS ad_language, io.m_inout_id, io.issotrx, io.documentno, io.docstatus, io.c_doctype_id, io.c_bpartner_id, bp.value AS bpvalue, bp.taxid AS bptaxid, bp.naics, bp.duns, oi.c_location_id AS org_location_id, oi.taxid, io.m_warehouse_id, wh.c_location_id AS warehouse_location_id, dt.printname AS documenttype, dt.documentnote AS documenttypenote, io.c_order_id, io.movementdate, io.movementtype, bpg.greeting AS bpgreeting, bp.name, bp.name2, bpcg.greeting AS bpcontactgreeting, bpc.title, bpc.phone, NULLIF(bpc.name::text, bp.name::text) AS contactname, bpl.c_location_id, l.postal::text || l.postal_add::text AS postal, bp.referenceno, io.description, io.poreference, io.dateordered, io.volume, io.weight, io.m_shipper_id, io.deliveryrule, io.deliveryviarule, io.priorityrule, io.isdropship, COALESCE(io.dropship_bpartner_id, io.c_bpartner_id) AS ship_bpartner_id, COALESCE(io.dropship_location_id, io.c_bpartner_location_id) AS ship_location_id, COALESCE(io.dropship_user_id, io.ad_user_id) AS ship_user_id, COALESCE(dsbp.value, bp.value) AS ship_bpvalue, COALESCE(dsbp.taxid, bp.taxid) AS ship_bptaxid, COALESCE(dsbp.name, bp.name) AS ship_name, COALESCE(dsbp.name2, bp.name2) AS ship_name2, COALESCE(dsbpc.title, bpc.title) AS ship_title, COALESCE(dsbpc.phone, bpc.phone) AS ship_phone, NULLIF (COALESCE(dsbpc.name, bpc.name),COALESCE(dsbp.name, bp.name)) AS ship_contactname, COALESCE(dsbpl.c_location_id, bpl.c_location_id) AS ship_c_location_id
|
||||
FROM m_inout io
|
||||
JOIN c_doctype dt ON io.c_doctype_id = dt.c_doctype_id
|
||||
JOIN c_bpartner bp ON io.c_bpartner_id = bp.c_bpartner_id
|
||||
LEFT JOIN c_greeting bpg ON bp.c_greeting_id = bpg.c_greeting_id
|
||||
JOIN c_bpartner_location bpl ON io.c_bpartner_location_id = bpl.c_bpartner_location_id
|
||||
JOIN c_location l ON bpl.c_location_id = l.c_location_id
|
||||
LEFT JOIN ad_user bpc ON io.ad_user_id = bpc.ad_user_id
|
||||
LEFT JOIN c_greeting bpcg ON bpc.c_greeting_id = bpcg.c_greeting_id
|
||||
JOIN ad_orginfo oi ON io.ad_org_id = oi.ad_org_id
|
||||
JOIN m_warehouse wh ON io.m_warehouse_id = wh.m_warehouse_id
|
||||
LEFT JOIN c_bpartner dsbp ON (io.dropship_bpartner_id=dsbp.c_bpartner_id)
|
||||
LEFT JOIN c_bpartner_location dsbpl ON (io.dropship_location_id=dsbpl.c_bpartner_location_id)
|
||||
LEFT JOIN ad_user dsbpc ON (io.dropship_user_id=dsbpc.ad_user_id);
|
||||
|
||||
DROP VIEW m_inout_header_vt;
|
||||
|
||||
CREATE OR REPLACE VIEW m_inout_header_vt AS
|
||||
SELECT io.ad_client_id, io.ad_org_id, io.isactive, io.created, io.createdby, io.updated, io.updatedby, dt.ad_language, io.m_inout_id, io.issotrx, io.documentno, io.docstatus, io.c_doctype_id, io.c_bpartner_id, bp.value AS bpvalue, bp.taxid AS bptaxid, bp.naics, bp.duns, oi.c_location_id AS org_location_id, oi.taxid, io.m_warehouse_id, wh.c_location_id AS warehouse_location_id, dt.printname AS documenttype, dt.documentnote AS documenttypenote, io.c_order_id, bpc.phone, io.movementdate, io.movementtype, bpg.greeting AS bpgreeting, bp.name, bp.name2, bpcg.greeting AS bpcontactgreeting, bpc.title, NULLIF(bpc.name::text, bp.name::text) AS contactname, bpl.c_location_id, l.postal::text || l.postal_add::text AS postal, bp.referenceno, io.description, io.poreference, io.dateordered, io.volume, io.weight, io.m_shipper_id, io.deliveryrule, io.deliveryviarule, io.priorityrule, io.isdropship, COALESCE(io.dropship_bpartner_id, io.c_bpartner_id) AS ship_bpartner_id, COALESCE(io.dropship_location_id, io.c_bpartner_location_id) AS ship_location_id, COALESCE(io.dropship_user_id, io.ad_user_id) AS ship_user_id, COALESCE(dsbp.value, bp.value) AS ship_bpvalue, COALESCE(dsbp.taxid, bp.taxid) AS ship_bptaxid, COALESCE(dsbp.name, bp.name) AS ship_name, COALESCE(dsbp.name2, bp.name2) AS ship_name2, COALESCE(dsbpc.title, bpc.title) AS ship_title, COALESCE(dsbpc.phone, bpc.phone) AS ship_phone, NULLIF (COALESCE(dsbpc.name, bpc.name),COALESCE(dsbp.name, bp.name)) AS ship_contactname, COALESCE(dsbpl.c_location_id, bpl.c_location_id) AS ship_c_location_id
|
||||
FROM m_inout io
|
||||
JOIN c_doctype_trl dt ON io.c_doctype_id = dt.c_doctype_id
|
||||
JOIN c_bpartner bp ON io.c_bpartner_id = bp.c_bpartner_id
|
||||
LEFT JOIN c_greeting_trl bpg ON bp.c_greeting_id = bpg.c_greeting_id AND dt.ad_language::text = bpg.ad_language::text
|
||||
JOIN c_bpartner_location bpl ON io.c_bpartner_location_id = bpl.c_bpartner_location_id
|
||||
JOIN c_location l ON bpl.c_location_id = l.c_location_id
|
||||
LEFT JOIN ad_user bpc ON io.ad_user_id = bpc.ad_user_id
|
||||
LEFT JOIN c_greeting_trl bpcg ON bpc.c_greeting_id = bpcg.c_greeting_id AND dt.ad_language::text = bpcg.ad_language::text
|
||||
JOIN ad_orginfo oi ON io.ad_org_id = oi.ad_org_id
|
||||
JOIN m_warehouse wh ON io.m_warehouse_id = wh.m_warehouse_id
|
||||
LEFT JOIN c_bpartner dsbp ON (io.dropship_bpartner_id=dsbp.c_bpartner_id)
|
||||
LEFT JOIN c_bpartner_location dsbpl ON (io.dropship_location_id=dsbpl.c_bpartner_location_id)
|
||||
LEFT JOIN ad_user dsbpc ON (io.dropship_user_id=dsbpc.ad_user_id);
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue