You can use this job to generate the sales Invoice Report.
SalesConfirm report can be done by replacing the reportname,salesformletter_confirm,and object shouldbe custconfirmJournal.
static krishh_TestSalesInvoiceReport(Args _args)
{
Args args;
ReportRun reportRun;
SalesFormLetter salesFormLetter;
PrintJobSettings printJobSettings;
CustInvoiceJour InvJTbl;
RecordSortedList list = new RecordSortedList(62);
SalesId Id ;
;
Id = "SO-0000123";
Select InvJTbl Where InvJTbl.SalesId == Id;
List.ins(InvJTbl);
args = new Args(ReportStr(SalesInvoice));
printJobSettings = new PrintJobSettings();
printJobSettings.SetTarget(PrintMedium::Printer);
printJobSettings.suppressScalingMessage(true);
salesFormLetter = new SalesFormLetter_Invoice(false);
salesFormLetter.updatePrinterSettingsFormLetter(printJobSettings.packPrintJobSettings());
args.designName("Standard");
args.caller(salesFormletter);
args.parmEnum(PrintCopyOriginal::Original);
args.parmEnumType(enumnum(PrintCopyOriginal));
args.object(list);
reportRun = new ReportRun(args);
reportRun.setTarget(PrintMedium::Printer);
reportRun.init();
reportRun.run();
}|
SalesConfirm report can be done by replacing the reportname,salesformletter_confirm,and object shouldbe custconfirmJournal.
static krishh_TestSalesInvoiceReport(Args _args)
{
Args args;
ReportRun reportRun;
SalesFormLetter salesFormLetter;
PrintJobSettings printJobSettings;
CustInvoiceJour InvJTbl;
RecordSortedList list = new RecordSortedList(62);
SalesId Id ;
;
Id = "SO-0000123";
Select InvJTbl Where InvJTbl.SalesId == Id;
List.ins(InvJTbl);
args = new Args(ReportStr(SalesInvoice));
printJobSettings = new PrintJobSettings();
printJobSettings.SetTarget(PrintMedium::Printer);
printJobSettings.suppressScalingMessage(true);
salesFormLetter = new SalesFormLetter_Invoice(false);
salesFormLetter.updatePrinterSettingsFormLetter(printJobSettings.packPrintJobSettings());
args.designName("Standard");
args.caller(salesFormletter);
args.parmEnum(PrintCopyOriginal::Original);
args.parmEnumType(enumnum(PrintCopyOriginal));
args.object(list);
reportRun = new ReportRun(args);
reportRun.setTarget(PrintMedium::Printer);
reportRun.init();
reportRun.run();
}|
How to print proform?
ReplyDelete