fixed bug [ 1653683 ] Printing Copy and Original

http://sourceforge.net/tracker/index.php?func=detail&aid=1653683&group_id=176962&atid=879332
This commit is contained in:
vpj-cd 2007-02-15 18:39:37 +00:00
parent f1bda072be
commit 63af6c42cd
1 changed files with 33 additions and 0 deletions

View File

@ -155,6 +155,7 @@ public class ReportCtl
*/
public static boolean startDocumentPrint (int type, int Record_ID, boolean IsDirectPrint)
{
ReportEngine re = ReportEngine.get (Env.getCtx(), type, Record_ID);
if (re == null)
{
@ -168,6 +169,38 @@ public class ReportCtl
}
else
preview(re);
//vpj-cd e-evolution 15022007
if(type == ReportEngine.INVOICE)
{
MInvoice m_invoice = new MInvoice(Env.getCtx(), Record_ID,null);
if(!m_invoice.isPrinted())
{
m_invoice.setIsPrinted(true);
m_invoice.save();
}
}
else if (type == ReportEngine.SHIPMENT)
{
MInOut m_inout = new MInOut(Env.getCtx(), Record_ID,null);
if(!m_inout.isPrinted())
{
m_inout.setIsPrinted(true);
m_inout.save();
}
}
else if (type == ReportEngine.ORDER)
{
MOrder m_order = new MOrder(Env.getCtx(), Record_ID,null);
if(!m_order.isPrinted())
{
m_order.setIsPrinted(true);
m_order.save();
}
}
//vpj-cd e-evolution 15022007
return true;
} // StartDocumentPrint