Fix [ 2033791 ] No Document Print Format defined

[ 2033315 ] Oracle SQL error in ReportEngine.get()
This commit is contained in:
Carlos Ruiz 2008-07-31 17:48:26 +00:00
parent ac2e1f1f01
commit 6b49111199
3 changed files with 42 additions and 41 deletions

View File

@ -78,6 +78,19 @@ public interface I_AD_PrintForm
*/ */
public String getDescription(); public String getDescription();
/** Column name Distrib_Order_MailText_ID */
public static final String COLUMNNAME_Distrib_Order_MailText_ID = "Distrib_Order_MailText_ID";
/** Set Distribution Order Mail Text.
* Email text used for sending Distribution Order
*/
public void setDistrib_Order_MailText_ID (int Distrib_Order_MailText_ID);
/** Get Distribution Order Mail Text.
* Email text used for sending Distribution Order
*/
public int getDistrib_Order_MailText_ID();
/** Column name Distrib_Order_PrintFormat_ID */ /** Column name Distrib_Order_PrintFormat_ID */
public static final String COLUMNNAME_Distrib_Order_PrintFormat_ID = "Distrib_Order_PrintFormat_ID"; public static final String COLUMNNAME_Distrib_Order_PrintFormat_ID = "Distrib_Order_PrintFormat_ID";
@ -91,19 +104,6 @@ public interface I_AD_PrintForm
*/ */
public int getDistrib_Order_PrintFormat_ID(); public int getDistrib_Order_PrintFormat_ID();
/** Column name DistributionOrder_MailText_ID */
public static final String COLUMNNAME_DistributionOrder_MailText_ID = "DistributionOrder_MailText_ID";
/** Set Distribution Order Mail Text.
* Email text used for sending Distribution Order
*/
public void setDistributionOrder_MailText_ID (int DistributionOrder_MailText_ID);
/** Get Distribution Order Mail Text.
* Email text used for sending Distribution Order
*/
public int getDistributionOrder_MailText_ID();
/** Column name Invoice_MailText_ID */ /** Column name Invoice_MailText_ID */
public static final String COLUMNNAME_Invoice_MailText_ID = "Invoice_MailText_ID"; public static final String COLUMNNAME_Invoice_MailText_ID = "Invoice_MailText_ID";

View File

@ -110,6 +110,31 @@ public class X_AD_PrintForm extends PO implements I_AD_PrintForm, I_Persistent
return (String)get_Value(COLUMNNAME_Description); return (String)get_Value(COLUMNNAME_Description);
} }
/** Distrib_Order_MailText_ID AD_Reference_ID=274 */
public static final int DISTRIB_ORDER_MAILTEXT_ID_AD_Reference_ID=274;
/** Set Distribution Order Mail Text.
@param Distrib_Order_MailText_ID
Email text used for sending Distribution Order
*/
public void setDistrib_Order_MailText_ID (int Distrib_Order_MailText_ID)
{
if (Distrib_Order_MailText_ID < 1)
set_Value (COLUMNNAME_Distrib_Order_MailText_ID, null);
else
set_Value (COLUMNNAME_Distrib_Order_MailText_ID, Integer.valueOf(Distrib_Order_MailText_ID));
}
/** Get Distribution Order Mail Text.
@return Email text used for sending Distribution Order
*/
public int getDistrib_Order_MailText_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Distrib_Order_MailText_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Distrib_Order_PrintFormat_ID AD_Reference_ID=53282 */ /** Distrib_Order_PrintFormat_ID AD_Reference_ID=53282 */
public static final int DISTRIB_ORDER_PRINTFORMAT_ID_AD_Reference_ID=53282; public static final int DISTRIB_ORDER_PRINTFORMAT_ID_AD_Reference_ID=53282;
/** Set Distribution Order Print Format. /** Set Distribution Order Print Format.
@ -135,31 +160,6 @@ public class X_AD_PrintForm extends PO implements I_AD_PrintForm, I_Persistent
return ii.intValue(); return ii.intValue();
} }
/** DistributionOrder_MailText_ID AD_Reference_ID=274 */
public static final int DISTRIBUTIONORDER_MAILTEXT_ID_AD_Reference_ID=274;
/** Set Distribution Order Mail Text.
@param DistributionOrder_MailText_ID
Email text used for sending Distribution Order
*/
public void setDistributionOrder_MailText_ID (int DistributionOrder_MailText_ID)
{
if (DistributionOrder_MailText_ID < 1)
set_Value (COLUMNNAME_DistributionOrder_MailText_ID, null);
else
set_Value (COLUMNNAME_DistributionOrder_MailText_ID, Integer.valueOf(DistributionOrder_MailText_ID));
}
/** Get Distribution Order Mail Text.
@return Email text used for sending Distribution Order
*/
public int getDistributionOrder_MailText_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_DistributionOrder_MailText_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Invoice_MailText_ID AD_Reference_ID=274 */ /** Invoice_MailText_ID AD_Reference_ID=274 */
public static final int INVOICE_MAILTEXT_ID_AD_Reference_ID=274; public static final int INVOICE_MAILTEXT_ID_AD_Reference_ID=274;
/** Set Invoice Mail Text. /** Set Invoice Mail Text.

View File

@ -1182,7 +1182,7 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
+ "WHERE d.C_Project_ID=?" // info from PrintForm + "WHERE d.C_Project_ID=?" // info from PrintForm
+ " AND pf.AD_Org_ID IN (0,d.AD_Org_ID) ORDER BY pf.AD_Org_ID DESC"; + " AND pf.AD_Org_ID IN (0,d.AD_Org_ID) ORDER BY pf.AD_Org_ID DESC";
else if (type == MANUFACTURING_ORDER) else if (type == MANUFACTURING_ORDER)
sql = "SELECT ManufacturingOrder_PrintFormat_ID," sql = "SELECT pf.Manuf_Order_PrintFormat_ID,"
+ " c.IsMultiLingualDocument,bp.AD_Language, 0 , d.DocumentNo " + " c.IsMultiLingualDocument,bp.AD_Language, 0 , d.DocumentNo "
+ "FROM PP_Order d" + "FROM PP_Order d"
+ " INNER JOIN AD_Client c ON (d.AD_Client_ID=c.AD_Client_ID)" + " INNER JOIN AD_Client c ON (d.AD_Client_ID=c.AD_Client_ID)"
@ -1190,7 +1190,7 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
+ "WHERE d.PP_Order_ID=?" // info from PrintForm + "WHERE d.PP_Order_ID=?" // info from PrintForm
+ " AND pf.AD_Org_ID IN (0,d.AD_Org_ID) ORDER BY pf.AD_Org_ID DESC"; + " AND pf.AD_Org_ID IN (0,d.AD_Org_ID) ORDER BY pf.AD_Org_ID DESC";
else if (type == DISTRIBUTION_ORDER) else if (type == DISTRIBUTION_ORDER)
sql = "SELECT DistributionOrder_PrintFormat_ID," sql = "SELECT pf.Distrib_Order_PrintFormat_ID,"
+ " c.IsMultiLingualDocument,bp.AD_Language, bp.C_BPartner_ID , d.DocumentNo " + " c.IsMultiLingualDocument,bp.AD_Language, bp.C_BPartner_ID , d.DocumentNo "
+ "FROM DD_Order d" + "FROM DD_Order d"
+ " INNER JOIN AD_Client c ON (d.AD_Client_ID=c.AD_Client_ID)" + " INNER JOIN AD_Client c ON (d.AD_Client_ID=c.AD_Client_ID)"
@ -1218,7 +1218,8 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
+ " pf.Project_PrintFormat_ID, pf.Remittance_PrintFormat_ID," // 4..5 + " pf.Project_PrintFormat_ID, pf.Remittance_PrintFormat_ID," // 4..5
+ " c.IsMultiLingualDocument, bp.AD_Language," // 6..7 + " c.IsMultiLingualDocument, bp.AD_Language," // 6..7
+ " COALESCE(dt.DocumentCopies,0)+COALESCE(bp.DocumentCopies,1), " // 8 + " COALESCE(dt.DocumentCopies,0)+COALESCE(bp.DocumentCopies,1), " // 8
+ " dt.AD_PrintFormat_ID,bp.C_BPartner_ID,d.DocumentNo , ManufacturingOrder_PrintFormat_ID , pf.DistributionOrder_PrintFormat_ID " // 9..11 , 12 ,13 + " dt.AD_PrintFormat_ID,bp.C_BPartner_ID,d.DocumentNo, " // 9..11
+ " pf.Manuf_Order_PrintFormat_ID, pf.Distrib_Order_PrintFormat_ID " // 12..13
+ "FROM " + DOC_BASETABLES[type] + " d" + "FROM " + DOC_BASETABLES[type] + " d"
+ " INNER JOIN AD_Client c ON (d.AD_Client_ID=c.AD_Client_ID)" + " INNER JOIN AD_Client c ON (d.AD_Client_ID=c.AD_Client_ID)"
+ " INNER JOIN AD_PrintForm pf ON (c.AD_Client_ID=pf.AD_Client_ID)" + " INNER JOIN AD_PrintForm pf ON (c.AD_Client_ID=pf.AD_Client_ID)"