Files
VSC/X++/PALDC_OCP/oldMain.xpo
T
claudio 368d6fafea Issue
Code backup
2026-05-10 16:59:01 +02:00

2255 lines
138 KiB
Plaintext

static void main( Args args
, RecId _recId = 0
, str optionalParms = ""
, FormDataSource _formDataSource = null
, boolean sendByEmail = false
, boolean printPrices = false
, boolean directPrint = false
, boolean printDrawings = false
, str orderBy = ""
, boolean sendToSharePoint = false
, boolean isProforma = false
, int nOfPrints = 1)
{
FormRun formRun;
FormDataSource formDs;
VendPackingSlipJour vendPackingSlipJour;
CustQuotationJour custQuotationJour;
SalesQuotationTable salesQuotationTable;
PALGeneralSettings palGeneralSettings;
DirPartyTable dirPartyTable;
ProjTable projTable;
InventJournalTable inventJournalTable;
MainAccount mainAccount;
LedgerTrialBalanceListPageTmp ledgerTrialBalanceListPageTmp;
ProdTable prodTable;
ProdTable prodTableToUpdate;
VendPurchOrderJour vendPurchOrderJour;
WMSPickingRoute wmsPickingRoute;
WMSOrderTrans wmsOrderTransLocal;
SalesTable salesTableLocal;
VendRFQJour vendRFQJour;
CustTable custTable;
CustPackingSlipJour custPackingListJour;
BFInventPackingSlipJour BFInventPackingSlipJour;
VendTable vendTable;
ProjInvoiceJour projInvoiceJour;
CustInvoiceJour custInvoiceJour;
LedgerJournalTrans ledgerJournalTrans;
ETOPackingList etoPackingList;
PurchTable purchTable;
PALEBI_ServiceOperationRevision serviceOperation;
HcmWorker hcmWorker;
PALEBI_DPIHcmWorkerVoucherLink DPIWorkerVoucher;
PAL002_DeliveryRequestHeader DeliveryRequest;
PALDC_SafetyDocuments safetyDocuments;
WMSJournalTrans wmsJournalTrans;
InventTrans inventTrans;
InventDim inventDim;
InventDim inventDimToFind;
InventTransOrigin inventTransOrigin;
WMSLocation wmsLocation;
InventTable inventTable;
CaseLog caseLog;
MultiSelectionHelper msh;
str recIds;
str docTemplate;
str environment;
str spBaseUrl;
// NEW PRINT SERVER - START
boolean useNewPrintServer = false;
RecId printType;
RecId recordToPrintRecId = 0;
Description printDescription = "";
List listOfRecIdsToPrint;
ListIterator liRecIdsToPrint;
boolean printDiscounts = false;
boolean optionalBoolean1 = false;
boolean optionalBoolean2 = false;
str optionalStr1 = "";
str optionalStr2 = "";
PALDC_OPC_DirectPrintOutput directPrintOutput = PALDC_OPC_DirectPrintOutput::Printer;
PALDC_OPC_DrawingsDownload drawingsDownload = PALDC_OPC_DrawingsDownload::None;
// NEW PRINT SERVER - END
Common record;
// PALLUD - 20201007 - USE NEW PRINT SERVER - START
VendPackingSlipVersion vendPackingSlipVersion;
// PALLUD - 20201007 - USE NEW PRINT SERVER - END
// PALLUD - 20201216 - fideiussioni copertina x sharepoint - start
PALDC_Sureties paldc_Sureties;
// PALLUD - 20201216 - fideiussioni copertina x sharepoint - end
PALImportInventTableFromPdm bomInvent;
formRun = args.caller();
palGeneralSettings = PALGeneralSettings::getFirstRecord();
environment = enum2str(palGeneralSettings.PALEnvironment);
if(formRun && args.caller() is FormRun)
{
formds = formRun.dataSource();
recIds = "";
}
if(_formDataSource)
{
formds = _formDataSource;
recIds = "";
}
switch(args.parmEnum())
{
case PALDC_OPC_PrintType::ProjQuotation:
//STAMPA OFFERTE DI PROGETTO
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
custQuotationJour = msh.getFirst();
salesQuotationTable = custQuotationJour.salesQuotationTable();
docTemplate = PALDocuProjQuotTemplateDetails::getTemplatePath(PALPrintDocumentType::CustQuotationJour, salesQuotationTable.DlvReason, salesQuotationTable.LanguageId);
while(custQuotationJour){
recIds += strFmt("%1", custQuotationJour.RecId) + ",";
/*
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( custQuotationJour.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::ProjQuotation).RecId,
"", // printerName
custQuotationJour.QuotationId, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
// NEW PRINT SERVER - END
*/
custQuotationJour = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
break;
case PALDC_OPC_PrintType::TaxReport_IT:
//STAMPA REGISTRO IVA ITALIA
docTemplate = PALAX2012PrinterClientTemplates::findByPrintType(args.parmEnum());
recIds = strFmt("%1", _recId);
break;
case PALDC_OPC_PrintType::VendPackingSlip:
// PALGUL - 20210604 - Add Conai Print - START
case PALDC_OPC_PrintType::Conai:
// PALGUL - 20210604 - Add Conai Print - END
//STAMPA DISTINTE DI PRELIEVO
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
vendPackingSlipJour = msh.getFirst();
while(vendPackingSlipJour){
recIds += strFmt("%1", vendPackingSlipJour.RecId) + ",";
// PALLUD - 20201007 - USE NEW PRINT SERVER - START
useNewPrintServer = true;
vendPackingSlipVersion = VendPackingSlipVersion::findLatest(vendPackingSlipJour.RecId);
//info(strFmt("%3: Created by %1 - %2 - %4", vendPackingSlipJour.createdBy, vendPackingSlipJour.createdDateTime, args.parmEnum(),
// PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::VendPackingSlip).RecId));
PALDC_OfficePrinterClient::AddToQueue( vendPackingSlipJour.RecId,
PALDC_OPC_PrintTypes::find(args.parmEnum()).RecId,
"", // printerName
vendPackingSlipVersion.InternalPackingSlipId, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
// PALLUD - 20201007 - USE NEW PRINT SERVER - END
vendPackingSlipJour = msh.getNext();
}
docTemplate = PALAX2012PrinterClientTemplates::findByPrintType(args.parmEnum());
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
break;
case PALDC_OPC_PrintType::DptPrivacyTerms:
//STAMPA DOCUMENTO SULLA PRIVACY
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
dirPartyTable = msh.getFirst();
while(dirPartyTable){
recIds += strFmt("%1", dirPartyTable.RecId) + ",";
dirPartyTable = msh.getNext();
}
docTemplate = PALAX2012PrinterClientTemplates::findByPrintType(args.parmEnum());
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
break;
case PALDC_OPC_PrintType::LabelPrinterSystem:
//STAMPA ETICHETTE
//recIds = args.parm();
useNewPrintServer = true;
optionalStr1 = args.parm();
printDescription = "Label Printer System";
printType = PALDC_OPC_PrintTypes::findRecId(str2int64(optionalParms)).RecId;
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId, // record to print
printType, // type of print
"", // printerName
printDescription, // printerDescription
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
break;
case PALDC_OPC_PrintType::ProjTable:
//CREAZIONE STRUTTURE IN SHAREPOINT
//TODO: Sistemare le stampe dei progetti
recIds = strFmt("%1", args.record().RecId);
projTable = args.record();
spBaseUrl = PALDC_SharepointEnvironment::getShrepointUrlByEnvironment(PALGeneralSettings::getFirstRecord().PALEnvironment);
docTemplate = strFmt("%1%2"
, spBaseUrl
, "/_vti_bin/PALSharepointWcfUtils/PALSpUtils.svc");
optionalParms = strFmt("%1Progetti/%2/%3"
, spBaseUrl + "/"
, subStr(projTable.ProjId, 2, 4)
, strReplace(projTable.ProjId, "-", ""));
break;
case PALDC_OPC_PrintType::ProdPickingList:
//STAMPA BUONI DI PRELIEVO
if (formDs)
{
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
inventJournalTable = msh.getFirst();
while(inventJournalTable){
recIds += strFmt("%1", inventJournalTable.RecId) + ",";
inventJournalTable = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
}
else
recIds = optionalParms;
// NEW PRINT SERVER - START
useNewPrintServer = true;
listOfRecIdsToPrint = strSplit(recIds, ",");
liRecIdsToPrint = new ListIterator(listOfRecIdsToPrint);
while(liRecIdsToPrint.more())
{
inventJournalTable.clear();
select inventJournalTable
where inventJournalTable.RecId == liRecIdsToPrint.value();
if (isProforma)
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::ProdPickingList, PALDC_OPC_PrintSubType::External).RecId;
else
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::ProdPickingList, PALDC_OPC_PrintSubType::Internal).RecId;
recordToPrintRecId = inventJournalTable.RecId;
printDescription = inventJournalTable.PALDC_ProdId() + " - " + inventJournalTable.JournalId;
optionalStr1 = optionalParms;
optionalStr2 = orderBy;
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId, // record to print
printType, // type of print
"", // printerName
printDescription, // printerDescription
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
liRecIdsToPrint.next();
}
// NEW PRINT SERVER - END
break;
case PALDC_OPC_PrintType::ProdStillToPickList:
//STAMPA RIMANENZE DA PRELEVARE PER ORDINE PRODUZIONE DA ENTRATA PRODOTTI
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
vendPackingSlipJour = msh.getFirst();
while(vendPackingSlipJour){
recIds += strFmt("%1", vendPackingSlipJour.RecId) + ",";
/*
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( vendPackingSlipJour.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::ProdStillToPickList).RecId,
"",
vendPackingSlipJour.PackingSlipId,
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
orderBy, // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
// NEW PRINT SERVER - END
*/
vendPackingSlipJour = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
break;
case PALDC_OPC_PrintType::AccountingBoard:
//STAMPA SCHEDA CONTABILE
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
switch(formDs.table())
{
case tableNum(MainAccount):
mainAccount = msh.getFirst();
while(mainAccount){
recIds += strFmt("%1", mainAccount.RecId) + ",";
mainAccount = msh.getNext();
}
break;
case tableNum(LedgerTrialBalanceListPageTmp):
ledgerTrialBalanceListPageTmp = msh.getFirst();
while(ledgerTrialBalanceListPageTmp){
recIds += strFmt("%1", MainAccount::findByMainAccountId(ledgerTrialBalanceListPageTmp.PrimaryFocus).RecId) + ",";
ledgerTrialBalanceListPageTmp = msh.getNext();
}
break;
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
optionalParms = args.parm();
break;
case PALDC_OPC_PrintType::ProdTable:
//STAMPA ORDINE PRODUZIONE
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
ttsBegin;
prodTable = msh.getFirst();
while(prodTable){
recIds += strFmt("%1", prodTable.RecId) + ",";
select forUpdate prodTableToUpdate where prodTableToUpdate.RecId == prodTable.RecId;
prodTableToUpdate.BFPrinted = true;
prodTableToUpdate.update();
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( prodTable.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::ProdTable).RecId,
"", // printerName
prodTable.ProdId, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString2
false, // optionalBoolean1
false); // optionalBoolean2
// NEW PRINT SERVER - END
prodTable = msh.getNext();
}
ttsCommit;
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
break;
case PALDC_OPC_PrintType::PurchConf:
//STAMPA CONFERMA ORDINE ACQUISTO
spBaseUrl = PALDC_SharepointEnvironment::getShrepointUrlByEnvironment(PALGeneralSettings::getFirstRecord().PALEnvironment);
docTemplate = strFmt("%1%2"
, spBaseUrl
, "/_vti_bin/PALSharepointWcfUtils/PALSpUtils.svc");
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
switch (formDs.table())
{
case tableNum(VendPurchOrderJour):
vendPurchOrderJour = msh.getFirst();
while(vendPurchOrderJour){
recIds += strFmt("%1", vendPurchOrderJour.RecId) + ",";
// NEW PRINT SERVER - START
if (optionalParms == "USENEWSERVER")
{
// ENTRA SOLO QUANDO CHIAMATO DAL BOTTONE "STAMPA GRUPPO CONFERME" E NON STAMPA LA PARTE DEL GDPR!!!
useNewPrintServer = true;
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::PurchConf).RecId;
recordToPrintRecId = vendPurchOrderJour.RecId;
printDescription = vendPurchOrderJour.PurchId + (vendPurchOrderJour.PALPurchOrderDocNum == "" ?
subStr(vendPurchOrderJour.PurchOrderDocNum, 11, strLen(vendPurchOrderJour.PurchOrderDocNum)) :
subStr(vendPurchOrderJour.PALPurchOrderDocNum, 11, strLen(vendPurchOrderJour.PALPurchOrderDocNum)));
optionalStr1 = optionalParms;
optionalBoolean1 = true; // Don't print GDPR stuff
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId,
printType,
"", // printerName
printDescription, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
}
// NEW PRINT SERVER - END
vendPurchOrderJour = msh.getNext();
}
break;
case tableNum(PurchTable):
purchTable = msh.getFirst();
while(purchTable){
recIds += strFmt("%1", purchTable.RecId) + ",";
// NEW PRINT SERVER - START
if (optionalParms == "USENEWSERVER")
{
// ENTRA SOLO QUANDO CHIAMATO DAL BOTTONE "STAMPA GRUPPO CONFERME" E NON STAMPA LA PARTE DEL GDPR!!!
useNewPrintServer = true;
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::PurchConf).RecId;
recordToPrintRecId = purchTable.RecId;
printDescription = purchTable.PurchId + ".PF";
optionalStr1 = optionalParms;
optionalBoolean1 = true; // Don't print GDPR stuff
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId,
printType,
"", // printerName
printDescription, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
}
// NEW PRINT SERVER - END
purchTable = msh.getNext();
}
break;
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
break;
case PALDC_OPC_PrintType::ProdTableBadge:
//STAMPA BADGE ORDINE PRODUZIONE
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
record = msh.getFirst();
switch(record.TableId)
{
case tableNum(ProdTable):
prodTable = record;
while(prodTable){
recIds += strFmt("%1", prodTable.RecId) + ",";
/*
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( prodTable.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::ProdTableBadge).RecId,
"", // printerName
prodTable.ProdId, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
// NEW PRINT SERVER - END
*/
prodTable = msh.getNext();
}
break;
case tableNum(WMSJournalTrans):
wmsJournalTrans = record;
while(wmsJournalTrans){
inventDimToFind = wmsJournalTrans.inventDim();
select firstOnly inventTrans
where inventTrans.ItemId == wmsJournalTrans.itemId
//&& inventTrans.StatusIssue == StatusIssue::OnOrder
// Sembra che non serva verificare lo stato della riga, è sicuramente questa la riga che contiene l'op
join inventTransOrigin
where inventTransOrigin.RecId == inventTrans.InventTransOrigin
&& inventTransOrigin.ReferenceCategory == InventTransType::ProdLine
join inventDim
where inventDim.inventDimId == inventTrans.inventDimId
&& inventDim.PbmProjectInventId == inventDimToFind.PbmProjectInventId;
if(inventTrans.RecId)
{
recIds += strFmt("%1", ProdTable::find(inventTransOrigin.ReferenceId).RecId) + ",";
optionalParms += strFmt("%1", ProdTable::find(inventTransOrigin.ReferenceId).RecId) + ",";
}
/*
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( prodTable.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::ProdTableBadge).RecId,
"", // printerName
prodTable.ProdId, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
// NEW PRINT SERVER - END
*/
wmsJournalTrans = msh.getNext();
}
if (optionalParms)
optionalParms = subStr(optionalParms, 0, strLen(optionalParms) -1);
break;
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
break;
case PALDC_OPC_PrintType::WMSPickingList:
//STAMPA DISTINTA DI PRELIEVO
if (formDs)
{
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
wmsPickingRoute = msh.getFirst();
while(wmsPickingRoute){
recIds += strFmt("%1", wmsPickingRoute.RecId) + ",";
wmsPickingRoute = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
}
else
recIds = optionalParms;
// NEW PRINT SERVER - START
useNewPrintServer = true;
listOfRecIdsToPrint = strSplit(recIds, ",");
liRecIdsToPrint = new ListIterator(listOfRecIdsToPrint);
while(liRecIdsToPrint.more())
{
wmsPickingRoute.clear();
select wmsPickingRoute
where wmsPickingRoute.RecId == liRecIdsToPrint.value();
recordToPrintRecId = wmsPickingRoute.RecId;
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::WMSPickingList).RecId;
printDescription = wmsPickingRoute.pickingRouteID;
optionalStr1 = optionalParms;
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId,
printType,
"", // printerName
printDescription, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean1); // optionalBoolean2
liRecIdsToPrint.next();
}
// NEW PRINT SERVER - END
/*msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
wmsPickingRoute = msh.getFirst();
while(wmsPickingRoute){
recIds += strFmt("%1", wmsPickingRoute.RecId) + ",";
recordToPrintRecId = wmsPickingRoute.RecId;
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::WMSPickingList).RecId;
printDescription = wmsPickingRoute.pickingRouteID;
optionalStr1 = optionalParms;
directPrint = true;
directPrintOutput = PALDC_OPC_DirectPrintOutput::Printer;
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId,
printType,
"", // printerName
printDescription, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean1); // optionalBoolean2
// NEW PRINT SERVER - END
wmsPickingRoute = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);*/
break;
case PALDC_OPC_PrintType::WMSPickingListPackages:
//STAMPA COLLI
if (formDs)
{
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
wmsPickingRoute = msh.getFirst();
while(wmsPickingRoute){
recIds += strFmt("%1", wmsPickingRoute.RecId) + ",";
wmsPickingRoute = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
}
else
recIds = optionalParms;
// NEW PRINT SERVER - START
useNewPrintServer = true;
listOfRecIdsToPrint = strSplit(recIds, ",");
liRecIdsToPrint = new ListIterator(listOfRecIdsToPrint);
while(liRecIdsToPrint.more())
{
wmsPickingRoute.clear();
select wmsPickingRoute
where wmsPickingRoute.RecId == liRecIdsToPrint.value();
recordToPrintRecId = wmsPickingRoute.RecId;
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::WMSPickingListPackages).RecId;
printDescription = wmsPickingRoute.pickingRouteID;
optionalStr1 = optionalParms;
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId,
printType,
"", // printerName
printDescription, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean1); // optionalBoolean2
liRecIdsToPrint.next();
}
// NEW PRINT SERVER - END
/*msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
wmsPickingRoute = msh.getFirst();
while(wmsPickingRoute){
recIds += strFmt("%1", wmsPickingRoute.RecId) + ",";
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( wmsPickingRoute.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::WMSPickingListPackages).RecId,
"", // printerName
wmsPickingRoute.pickingRouteID, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
// NEW PRINT SERVER - END
wmsPickingRoute = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);*/
break;
case PALDC_OPC_PrintType::WMSPickingListBoxLabel:
//STAMPA ETICHETTE SPEDIZIONE BOX
if (formDs)
{
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
wmsPickingRoute = msh.getFirst();
while(wmsPickingRoute){
recIds += strFmt("%1", wmsPickingRoute.RecId) + ",";
wmsPickingRoute = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
}
else
recIds = optionalParms;
// NEW PRINT SERVER - START
useNewPrintServer = true;
listOfRecIdsToPrint = strSplit(recIds, ",");
liRecIdsToPrint = new ListIterator(listOfRecIdsToPrint);
while(liRecIdsToPrint.more())
{
wmsPickingRoute.clear();
select wmsPickingRoute
where wmsPickingRoute.RecId == liRecIdsToPrint.value();
recordToPrintRecId = wmsPickingRoute.RecId;
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::WMSPickingListBoxLabel).RecId;
printDescription = wmsPickingRoute.pickingRouteID;
optionalStr1 = optionalParms;
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId,
printType,
"", // printerName
printDescription, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean1); // optionalBoolean2
liRecIdsToPrint.next();
}
// NEW PRINT SERVER - END
/*msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
wmsPickingRoute = msh.getFirst();
while(wmsPickingRoute){
recordToPrintRecId = wmsPickingRoute.RecId;
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::WMSPickingListBoxLabel).RecId;
printDescription = wmsPickingRoute.pickingRouteID;
optionalStr1 = optionalParms;
optionalStr2 = strFmt('%1', wmsOrderTransLocal.DeliveryPostalAddress);
directPrint = true;
directPrintOutput = PALDC_OPC_DirectPrintOutput::Printer;
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId,
printType,
"", // printerName
printDescription, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString2
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
// NEW PRINT SERVER - END
wmsPickingRoute = msh.getNext();
}*/
break;
case PALDC_OPC_PrintType::VendRFQJour:
//STAMPA RICHIESTA DI OFFERTA
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
vendRFQJour = msh.getFirst();
while(vendRFQJour){
recIds += strFmt("%1", vendRFQJour.RecId) + ",";
/*
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( vendRFQJour.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::VendRFQJour).RecId,
"", // printerName
vendRFQJour.RFQId, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
// NEW PRINT SERVER - END
*/
vendRFQJour = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
break;
case PALDC_OPC_PrintType::PurchConfWH:
//STAMPA CONFERMA ORDINE ACQUISTO MAGAZZINO
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
vendPurchOrderJour = msh.getFirst();
while(vendPurchOrderJour){
recIds += strFmt("%1", vendPurchOrderJour.RecId) + ",";
/*
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( vendPurchOrderJour.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::PurchConfWH).RecId,
"", // printerName
vendPurchOrderJour.PurchId, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
// NEW PRINT SERVER - END
*/
vendPurchOrderJour = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
break;
case PALDC_OPC_PrintType::ProjDorsal:
//STAMPA DORSALI
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
switch (formDs.table())
{
case tableNum(CustTable):
useNewPrintServer = true;
custTable = msh.getFirst();
while(custTable)
{
recIds += strFmt("%1", custTable.RecId) + ",";
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::ProjDorsal, PALDC_OPC_PrintSubType::Cust).RecId;
recordToPrintRecId = custTable.RecId;
printDescription = custTable.AccountNum;
optionalStr1 = optionalParms;
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId,
printType, // type of print
"", // printerName
printDescription, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
custTable = msh.getNext();
}
break;
case tableNum(ProjTable):
useNewPrintServer = true;
projTable = msh.getFirst();
while(projTable)
{
recIds += strFmt("%1", projTable.RecId) + ",";
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::ProjDorsal, PALDC_OPC_PrintSubType::Project).RecId;
recordToPrintRecId = projTable.RecId;
printDescription = projTable.ProjId;
optionalStr1 = optionalParms;
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId, // record to print
printType, // type of print
"", // printerName
printDescription, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
projTable = msh.getNext();
}
break;
case tableNum(PALDC_SafetyDocuments):
useNewPrintServer = true;
safetyDocuments = msh.getFirst();
while(safetyDocuments)
{
recIds += strFmt("%1", safetyDocuments.RecId) + ",";
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::ProjDorsal, PALDC_OPC_PrintSubType::FreeText).RecId;
recordToPrintRecId = safetyDocuments.RecId;
printDescription = safetyDocuments.SafetyDocId;
optionalStr1 = optionalParms;
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId, // record to print
printType, // type of print
"", // printerName
printDescription, // printerDescription
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
safetyDocuments = msh.getNext();
}
break;
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
break;
case PALDC_OPC_PrintType::OpenVaultFile:
//APRE UN FILE DA VAULT
recIds = optionalParms;
/*
// NEW PRINT SERVER - START
listOfRecIdsToPrint = strSplit(recIds, ",");
liRecIdsToPrint = new ListIterator(listOfRecIdsToPrint);
while(liRecIdsToPrint.more())
{
PALDC_OfficePrinterClient::AddToQueue( 0,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::OpenVaultFile).RecId,
"",
"",
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
orderBy, // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
liRecIdsToPrint.next();
}
// NEW PRINT SERVER - END
*/
break;
case PALDC_OPC_PrintType::ServiceDossierFrontPage:
//STAMPA PRIMA PAGINA DOSSIER SERVICE
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
projTable = msh.getFirst();
while(projTable){
recIds += strFmt("%1", projTable.RecId) + ",";
/*
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( projTable.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::ServiceDossierFrontPage).RecId,
"", // printerName
projTable.ProjId, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
// NEW PRINT SERVER - END
*/
projTable = msh.getNext();
}
docTemplate = PALAX2012PrinterClientTemplates::findByPrintType(args.parmEnum());
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
break;
case PALDC_OPC_PrintType::CustPackingSlip:
//STAMPA DOCUMENTO DI TRASPORTO
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
custPackingListJour = msh.getFirst();
while(custPackingListJour){
recIds += strFmt("%1", custPackingListJour.RecId) + ",";
// NEW PRINT SERVER - START
useNewPrintServer = true;
paldc_officeprinterclient::addtoqueue( custpackinglistjour.recid,
paldc_opc_printtypes::find(paldc_opc_printtype::custpackingslip).recid,
"", // printername
custpackinglistjour.packingslipid, // printid
directprint, // directprint
directprintoutput, // directprintoutput
drawingsdownload, // drawingsdownload
isproforma, // isproforma
false, // printdiscounts
printprices, // printprices
optionalparms, // optionalstring1
"", // optionalstring1
false, // optionalboolean1
false, // optionalBoolean2
// PALGUL - 20220504 - Add N Of Copies to direct Print - Start
nOfPrints // nOfPrints in direct Print
// PALGUL - 20220504 - Add N Of Copies to direct Print - End
);
// NEW PRINT SERVER - END
custPackingListJour = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
optionalParms = "";
break;
case PALDC_OPC_PrintType::CustPackingSlipWH:
//STAMPA DOCUMENTO DI TRASPORTO MAGAZZINO
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
BFInventPackingSlipJour = msh.getFirst();
while(BFInventPackingSlipJour){
recIds += strFmt("%1", BFInventPackingSlipJour.RecId) + ",";
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( BFInventPackingSlipJour.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::CustPackingSlipWH).RecId,
"", // printerName
BFInventPackingSlipJour.BFPackingSlipDocumentNum, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false,
nOfPrints
); // optionalBoolean2
// NEW PRINT SERVER - END
BFInventPackingSlipJour = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
optionalParms = "";
break;
case PALDC_OPC_PrintType::CustVendContacts:
//STAMPA CONTATTI CLIENTI FORNITORI
//usa il parametro sendByEmail per distinguere stampa contatti fornitori (false) e clienti (true)
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
if (sendByEmail)
{
custTable = msh.getFirst();
while(custTable){
recIds += strFmt("%1", custTable.RecId) + ",";
/*
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( custTable.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::CustVendContacts, PALDC_OPC_PrintSubType::Cust).RecId,
"", // printerName
dirPartyTable.PartyNumber, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
// NEW PRINT SERVER - END
*/
custTable = msh.getNext();
}
optionalParms = "CUSTTABLE";
}
else
{
vendTable = msh.getFirst();
while(vendTable){
recIds += strFmt("%1", vendTable.RecId) + ",";
/*
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( vendTable.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::CustVendContacts, PALDC_OPC_PrintSubType::Vend).RecId,
"", // printerName
dirPartyTable.PartyNumber, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
// NEW PRINT SERVER - END
*/
vendTable = msh.getNext();
}
optionalParms = "VENDTABLE";
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
break;
case PALDC_OPC_PrintType::GlobalAddressBookContacts:
//STAMPA CONTATTI RUBRICA GLOBALE
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
dirPartyTable = msh.getFirst();
while(dirPartyTable){
recIds += strFmt("%1", dirPartyTable.RecId) + ",";
/*
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( dirPartyTable.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::GlobalAddressBookContacts).RecId,
"", // printerName
dirPartyTable.PartyNumber, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
// NEW PRINT SERVER - END
*/
dirPartyTable = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
break;
case PALDC_OPC_PrintType::ProjInvoiceJour:
//STAMPA FATTURE DA PROGETTO
if(formDs)
{
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
projInvoiceJour = msh.getFirst();
while(projInvoiceJour){
recIds += strFmt("%1", projInvoiceJour.RecId) + ",";
projInvoiceJour = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
}
else
recIds = strFmt("%1", _recId);
/*
// NEW PRINT SERVER - START
listOfRecIdsToPrint = strSplit(recIds, ",");
liRecIdsToPrint = new ListIterator(listOfRecIdsToPrint);
while(liRecIdsToPrint.more())
{
projInvoiceJour.clear();
select projInvoiceJour
where projInvoiceJour.RecId == liRecIdsToPrint.value();
PALDC_OfficePrinterClient::AddToQueue( projInvoiceJour.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::ProjInvoiceJour).RecId,
"",
projInvoiceJour.ProjInvoiceId,
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
!printPrices, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
orderBy, // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
liRecIdsToPrint.next();
}
// NEW PRINT SERVER - END
*/
break;
case PALDC_OPC_PrintType::FreeTextInvoice:
//STAMPA FATTURE A TESTO LIBERO
if(formDs)
{
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
custInvoiceJour = msh.getFirst();
while(custInvoiceJour){
recIds += strFmt("%1", custInvoiceJour.RecId) + ",";
custInvoiceJour = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
}
else
recIds = strFmt("%1", _recId);
optionalParms = "";
/*
// NEW PRINT SERVER - START
listOfRecIdsToPrint = strSplit(recIds, ",");
liRecIdsToPrint = new ListIterator(listOfRecIdsToPrint);
while(liRecIdsToPrint.more())
{
custInvoiceJour.clear();
select custInvoiceJour
where custInvoiceJour.RecId == liRecIdsToPrint.value();
PALDC_OfficePrinterClient::AddToQueue( custInvoiceJour.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::FreeTextInvoice).RecId,
"",
custInvoiceJour.InvoiceId,
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
orderBy, // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
liRecIdsToPrint.next();
}
// NEW PRINT SERVER - END
*/
break;
case PALDC_OPC_PrintType::AutoInvoice:
//STAMPA AUTOFATTURE
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
ledgerJournalTrans = msh.getFirst();
while(ledgerJournalTrans){
recIds += strFmt("%1", ledgerJournalTrans.RecId) + ",";
/*
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( ledgerJournalTrans.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::AutoInvoice).RecId,
"", // printerName
ledgerJournalTrans.Voucher, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
// NEW PRINT SERVER - END
*/
ledgerJournalTrans = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
break;
case PALDC_OPC_PrintType::InvoiceFrontPage:
//STAMPA PRIMA PAGINA FATTURE
recIds = optionalParms;
/*
// NEW PRINT SERVER - START
useNewPrintServer = true;
listOfRecIdsToPrint = strSplit(recIds, ",");
liRecIdsToPrint = new ListIterator(listOfRecIdsToPrint);
while(liRecIdsToPrint.more())
{
PALDC_OfficePrinterClient::AddToQueue( 0,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::InvoiceFrontPage).RecId,
"", // printerName
"", // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
liRecIdsToPrint.next();
}
// NEW PRINT SERVER - END
*/
break;
case PALDC_OPC_PrintType::ETOPackingList:
//STAMPA PACKING LIST
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
etoPackingList = msh.getFirst();
while(etoPackingList){
recIds += strFmt("%1", etoPackingList.RecId) + ",";
/*
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( etoPackingList.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::ETOPackingList).RecId,
"", // printerName
etoPackingList.PackingListId, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
// NEW PRINT SERVER - END
*/
etoPackingList = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
optionalParms = "";
break;
case PALDC_OPC_PrintType::ETOPackingListLines:
//STAMPA BINDELLI PACKING LIST
recIds = strFmt("%1", _recId);
/*
// NEW PRINT SERVER - START
useNewPrintServer = true;
listOfRecIdsToPrint = strSplit(recIds, ",");
liRecIdsToPrint = new ListIterator(listOfRecIdsToPrint);
while(liRecIdsToPrint.more())
{
etoPackingList.clear();
select etoPackingList
where etoPackingList.RecId == liRecIdsToPrint.value();
PALDC_OfficePrinterClient::AddToQueue( etoPackingList.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::ETOPackingListLines).RecId,
"", // printerName
etoPackingList.PackingListId, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
liRecIdsToPrint.next();
}
// NEW PRINT SERVER - END
*/
break;
case PALDC_OPC_PrintType::CustPackingSlipPFInv:
//STAMPA FATTURA PROFORMA DDT
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
custPackingListJour = msh.getFirst();
while(custPackingListJour){
recIds += strFmt("%1", custPackingListJour.RecId) + ",";
/*
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( custPackingListJour.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::CustPackingSlipPFInv).RecId,
"", // printerName
strFmt("PFV%1", subStr(custPackingListJour.PackingSlipId, 4, 10)),
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
// NEW PRINT SERVER - END
*/
custPackingListJour = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
optionalParms = "";
break;
case PALDC_OPC_PrintType::MESWorkersBadges:
// STAMPA BADGE OPERATORI MES
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
hcmWorker = msh.getFirst();
while(hcmWorker){
recIds += strFmt("%1", hcmWorker.RecId) + ",";
hcmWorker = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
useNewPrintServer = true;
optionalParms = recIds;
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::MESWorkersBadges).RecId;
optionalStr1 = optionalParms;
optionalStr2 = strFmt("%1", _recId);
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId, // record to print
printType, // type of print
"", // printerName
printDescription , // printerDescription
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
break;
case PALDC_OPC_PrintType::SendLinkToSP:
//INVIA SITO A SHAREPOINT
if (optionalParms)
recIds = "0";
/*
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( 0,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::SendLinkToSP).RecId,
"", // printerName
"", // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
// NEW PRINT SERVER - END
*/
break;
case PALDC_OPC_PrintType::MESClosedProdOrders:
//STAMPA ORDINI PRODUZIONE MES
recIds = "0";
/*
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( 0,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::MESClosedProdOrders).RecId,
"", // printerName
"", // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
// NEW PRINT SERVER - END
*/
break;
case PALDC_OPC_PrintType::PALCaseDetail:
//STAMPA REPORT SERVICE
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
serviceOperation = msh.getFirst();
while(serviceOperation){
recIds += strFmt("%1", serviceOperation.RecId) + ",";
/*
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( serviceOperation.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::PALCaseDetail).RecId,
"", // printerName
strFmt("%1.%2", serviceOperation.PALEBI_ServiceOperationId, serviceOperation.PALEBI_ServiceOperationRevision),
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
// NEW PRINT SERVER - END
*/
serviceOperation = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
optionalParms = "";
break;
case PALDC_OPC_PrintType::MESProcessControlReport:
//REPORT CONTROLLO PROCESSO MES
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
prodTable = msh.getFirst();
while(prodTable){
recIds += strFmt("%1", prodTable.RecId) + ",";
/*
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( prodTable.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::MESProcessControlReport).RecId,
"", // printerName
prodTable.ProdId, // printId
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
false, // printDiscounts
printPrices, // printPrices
optionalParms, // optionalString1
"", // optionalString1
false, // optionalBoolean1
false); // optionalBoolean2
// NEW PRINT SERVER - END
*/
prodTable = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
optionalParms = "";
break;
case PALDC_OPC_PrintType::PrivacyInfCust:
useNewPrintServer = true;
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
custTable = msh.getFirst();
while(custTable)
{
printType = PALDC_OPC_PrintTypes::findByLangId(PALDC_OPC_PrintType::PrivacyInfCust, custTable.languageId(), PALDC_OPC_PrintSubType::None).RecId;
if(!printType)
printType = PALDC_OPC_PrintTypes::findByLangId(PALDC_OPC_PrintType::PrivacyInfCust, "it", PALDC_OPC_PrintSubType::None).RecId;
recordToPrintRecId = custTable.RecId;
printDescription = custTable.AccountNum;
optionalStr1 = (conPeek(xSysLastValue::getValue(curext(), curUserId(), UtilElementType::Form, "PALDC_DptPrivacyTermsSettingsFrm", int2str(tableNum(CustTable))), 2) != 0 ? int2str(conPeek(xSysLastValue::getValue(curext(),curUserId(), UtilElementType::Form, "PALDC_DptPrivacyTermsSettingsFrm", int2str(tableNum(CustTable))), 2)) : int2str(5));
optionalStr2 = orderBy;
directPrint = true;
directPrintOutput = PALDC_OPC_DirectPrintOutput::Email;
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId, // record to print
printType, // type of print
"", // printerName
printDescription, // printerDescription
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
custTable = msh.getNext();
}
break;
case PALDC_OPC_PrintType::PrivacyInfVend:
useNewPrintServer = true;
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
vendTable = msh.getFirst();
while(vendTable)
{
printType = PALDC_OPC_PrintTypes::findByLangId(PALDC_OPC_PrintType::PrivacyInfVend, custTable.languageId(), PALDC_OPC_PrintSubType::None).RecId;
if(!printType)
printType = PALDC_OPC_PrintTypes::findByLangId(PALDC_OPC_PrintType::PrivacyInfVend, "it", PALDC_OPC_PrintSubType::None).RecId;
recordToPrintRecId = vendTable.RecId;
printDescription = vendTable.AccountNum;
optionalStr1 = (conPeek(xSysLastValue::getValue(curext(), curUserId(), UtilElementType::Form, "PALDC_DptPrivacyTermsSettingsFrm", int2str(tableNum(VendTable))), 2) != 0 ? int2str(conPeek(xSysLastValue::getValue(curext(),curUserId(), UtilElementType::Form, "PALDC_DptPrivacyTermsSettingsFrm", int2str(tableNum(VendTable))), 2)) : int2str(5));
optionalStr2 = orderBy;
directPrint = true;
directPrintOutput = PALDC_OPC_DirectPrintOutput::Email;
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId, // record to print
printType, // type of print
"", // printerName
printDescription, // printerDescription
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
vendTable = msh.getNext();
}
break;
case PALDC_OPC_PrintType::DPIVoucher:
useNewPrintServer = true;
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
DPIWorkerVoucher = msh.getFirst();
while(DPIWorkerVoucher)
{
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::DPIVoucher).RecId;
recordToPrintRecId = DPIWorkerVoucher.RecId;
printDescription = strFmt("DPI-%1", DPIWorkerVoucher.RecId);
optionalStr1 = optionalParms;
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId, // record to print
printType, // type of print
"", // printerName
printDescription, // printerDescription
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
DPIWorkerVoucher = msh.getNext();
}
break;
case PALDC_OPC_PrintType::DeliveryNoteRequest:
useNewPrintServer = true;
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
DeliveryRequest = msh.getFirst();
while(DeliveryRequest)
{
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::DeliveryNoteRequest).RecId;
recordToPrintRecId = DeliveryRequest.RecId;
printDescription = strFmt("DPI-%1", DeliveryRequest.RecId);
optionalStr1 = optionalParms;
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId, // record to print
printType, // type of print
"", // printerName
printDescription, // printerDescription
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
DeliveryRequest = msh.getNext();
}
break;
case PALDC_OPC_PrintType::CanteenVouchers:
useNewPrintServer = true;
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::CanteenVouchers).RecId;
recordToPrintRecId = args.record().RecId;
printDescription = strFmt("Report buoni mensa %1", optionalParms);
optionalStr1 = optionalParms; // intervallo di date
optionalStr2 = orderBy; // ordinamento (nome o data)
optionalBoolean1 = sendByEmail; // se true stampa solo i buoni dei dipendenti PAL, altrimenti anche quelli dei terzisti
optionalBoolean2 = printPrices; // se true raggruppa per lavoratore
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId, // record to print
printType, // type of print
"", // printerName
printDescription, // printerDescription
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
break;
case PALDC_OPC_PrintType::WMSLocationBadge:
useNewPrintServer = true;
// la gestione di queste stampe si trova nella form PALEBI_OPC_InventTablePrint
optionalStr1 = args.parm();
printDescription = PALDC_OPC_PrintTypes::findRecId(str2int64(optionalParms)).Description;
printType = PALDC_OPC_PrintTypes::findRecId(str2int64(optionalParms)).RecId;
/*msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
wmsLocation = msh.getFirst();
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::WMSLocationBadge).RecId;
printDescription = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::WMSLocationBadge).Description;
while(wmsLocation)
{
optionalStr1 += strFmt("%1", wmsLocation.RecId) + ",";
wmsLocation = msh.getNext();
}
if(optionalStr1)
optionalStr1 = subStr(optionalStr1, 0, strLen(optionalStr1) -1);*/
PALDC_OfficePrinterClient::AddToQueue( 0, // record to print
printType, // type of print
"", // printerName
printDescription, // printerDescription
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
break;
case PALDC_OPC_PrintType::InventTableBadge:
useNewPrintServer = true;
// la gestione di queste stampe si trova nella form PALEBI_OPC_InventTablePrint
optionalStr1 = args.parm();
printDescription = PALDC_OPC_PrintTypes::findRecId(str2int64(optionalParms)).Description;
printType = PALDC_OPC_PrintTypes::findRecId(str2int64(optionalParms)).RecId;
PALDC_OfficePrinterClient::AddToQueue( 0, // record to print
printType, // type of print
"", // printerName
printDescription, // printerDescription
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
break;
case PALDC_OPC_PrintType::TTBProdOrder:
useNewPrintServer = true;
directPrint = true;
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
prodTable = msh.getFirst();
while(prodTable)
{
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::TTBProdOrder).RecId;
recordToPrintRecId = prodTable.RecId;
printDescription = prodTable.ProdId;
optionalStr1 = optionalParms;
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId, // record to print
printType, // type of print
"", // printerName
printDescription, // printerDescription
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
prodTable = msh.getNext();
}
break;
case PALDC_OPC_PrintType::InventTransAging:
useNewPrintServer = true;
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::InventTransAging).RecId;
printDescription = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::InventTransAging).Description;
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId, // record to print
printType, // type of print
"", // printerName
printDescription, // printerDescription
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
break;
case PALDC_OPC_PrintType::ServiceOperation03M:
//STAMPA REPORT SERVICE 03M
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
serviceOperation = msh.getFirst();
while(serviceOperation){
recIds += strFmt("%1", serviceOperation.RecId) + ",";
optionalStr1 = args.parm();
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( serviceOperation.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::ServiceOperation03M).RecId,
"", // printerName
strFmt("%1.%2", serviceOperation.PALEBI_ServiceOperationId, serviceOperation.PALEBI_ServiceOperationRevision),
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
// NEW PRINT SERVER - END
serviceOperation = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
optionalParms = "";
break;
case PALDC_OPC_PrintType::ServiceOperation02M:
//STAMPA REPORT SERVICE 02M
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
caseLog = msh.getFirst();
while(caseLog){
recIds += strFmt("%1", caseLog.RecId) + ",";
switch (caseLog.PALDC_RefTableId)
{
case (tableNum(ProjTable)):
printDescription = ProjTable::findRecId(caseLog.PALDC_RefRecId).ProjId;
break;
case (tableNum(InventNonConformanceTable)):
printDescription = InventNonConformanceTable::findRecId(caseLog.PALDC_RefRecId).InventNonConformanceID;
break;
}
// NEW PRINT SERVER - START
useNewPrintServer = true;
PALDC_OfficePrinterClient::AddToQueue( caseLog.RecId,
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::ServiceOperation02M).RecId,
"", // printerName
printDescription, // printDescription
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
// NEW PRINT SERVER - END
caseLog = msh.getNext();
}
if(recIds)
recIds = subStr(recIds, 0, strLen(recIds) -1);
optionalParms = "";
break;
case PALDC_OPC_PrintType::VisitorsBadges:
useNewPrintServer = true;
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::VisitorsBadges).RecId;
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId, // record to print
printType, // type of print
"", // printerName
printDescription , // printerDescription
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
break;
// PALLUD - 20201216 - fideiussioni copertina x sharepoint - start
case PALDC_OPC_PrintType::Sureties:
//FIDEIUSSIONI PDA
useNewPrintServer = true;
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
paldc_sureties = msh.getFirst();
while(paldc_sureties)
{
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::Sureties).RecId;
recordToPrintRecId = paldc_sureties.RecId;
printDescription = strFmt("%1", paldc_sureties.PALDC_SuretiesId);
optionalStr1 = optionalParms;
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId, // record to print
printType, // type of print
"", // printerName
printDescription, // printerDescription
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
paldc_sureties = msh.getNext();
}
break;
// PALLUD - 20201216 - fideiussioni copertina x sharepoint - end
// PALEDB - 20210115 - riepilogo Excel fideiussioni - start
case PALDC_OPC_PrintType::SuretiesExcel:
//FIDEIUSSIONI EXCEL
useNewPrintServer = true;
msh = MultiSelectionHelper::construct();
msh.parmDatasource(formDs);
paldc_sureties = msh.getFirst();
while(paldc_sureties)
{
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::SuretiesExcel).RecId;
recordToPrintRecId = 0; //paldc_sureties.RecId;
printDescription = ""; //strFmt("%1", paldc_sureties.PALDC_SuretiesId);
optionalStr1 = optionalParms;
PALDC_OfficePrinterClient::AddToQueue( recordToPrintRecId, // record to print
printType, // type of print
"", // printerName
printDescription, // printerDescription
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
paldc_sureties = msh.getNext();
}
break;
// PALEDB - 20210115 - riepilogo Excel fideiussioni - end
//PALGUL - 20210211 - Ticket #947182 - start
case PALDC_OPC_PrintType::VendInvoiceSummary:
useNewPrintServer = true;
printType = PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::VendInvoiceSummary).RecId;
optionalStr1 = "";
listOfRecIdsToPrint = strSplit(optionalParms, ",");
liRecIdsToPrint = new ListIterator(listOfRecIdsToPrint);
while(liRecIdsToPrint.more())
{
PALDC_OfficePrinterClient::AddToQueue( liRecIdsToPrint.value(), // record to print
printType, // type of print
"", // printerName
printDescription, // printerDescription
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
liRecIdsToPrint.next();
}
break;
//PALGUL - 20210211 - Ticket #947182 - end
case PALDC_OPC_PrintType::CommercialItemBomApprove:
useNewPrintServer = true;
bomInvent = args.record();
printDescription = strFmt("%1", "");
PALDC_OfficePrinterClient::AddToQueue( bomInvent.RecId, // record to print
PALDC_OPC_PrintTypes::find(PALDC_OPC_PrintType::CommercialItemBomApprove).RecId, // type of print
"", // printerName
strfmt("%1 in %2", bomInvent.ItemId ? bomInvent.ItemId : bomInvent.VaultItemId, "@PAL595"), // printerDescription
directPrint, // directPrint
directPrintOutput, // directPrintOutput
drawingsDownload, // drawingsDownload
isProforma, // isProforma
printDiscounts, // printDiscounts
printPrices, // printPrices
optionalStr1, // optionalString1
optionalStr2, // optionalString1
optionalBoolean1, // optionalBoolean1
optionalBoolean2); // optionalBoolean2
break;
}
if (!useNewPrintServer)
{
PALDC_OfficePrinterClient::printOut(recIds,
args.parmEnum(),
docTemplate,
environment,
optionalParms,
sendByEmail,
printPrices,
directPrint,
printDrawings,
orderBy,
curext(),
sendToSharePoint,
isProforma);
}
else
{
paldc_OfficePrinterClient::CallClient();
}
}