class AVAPurchPurchaseOrderControllerExt extends PurchPurchaseOrderController
{ public static void main(Args _args) { SrsReportRunController formLetterController = AVAPurchPurchaseOrderControllerExt::construct(); AVAPurchPurchaseOrderControllerExt controller = formLetterController; controller.parmReportName(ssrsReportStr(AVAPurchPurchaseOrder, Report)); controller.parmArgs(_args); controller.parmShowDialog(false); controller.startOperation(); } public static AVAPurchPurchaseOrderControllerExt construct() { return new AVAPurchPurchaseOrderControllerExt(); } public static SrsReportDataContract newDataContract(Args _args) { AVAPurchPurchaseOrderControllerExt formLetterController = AVAPurchPurchaseOrderControllerExt::construct(); if (_args.dataset() != tableNum(VendPurchOrderJour)) { throw error(strFmt("@SYS19306",funcName())); } formLetterController.initDataContract(_args, PrintMgmtDocType::construct(PrintMgmtDocumentType::PurchaseOrderConfirmationRequest).getDefaultReportFormat()); return formLetterController.parmReportContract(); } /// <summary> /// 34124 - add the PO number in the email subject /// </summary> public void runReport() { PurchaseOrderId purchId = vendPurchOrderJour::findByPurchId(vendPurchOrderJour.PurchId).PurchOrderDocNum; if (reportContract.parmPrintSettings().printMediumType() == SRSPrintMediumType::Email) { reportContract.parmPrintSettings().emailSubject(Global::strReplace(reportContract.parmPrintSettings().emailSubject(),"@PurchId@",purchId)); } super(); } }
No comments:
Post a Comment