public void GenerateChecks(APInvoice invoice, IReadOnlyCollection <APAdjust> adjustments, PayBillsFilter filter)
 {
     using (var scope = new PXTransactionScope())
     {
         LineNumbers = adjustments.Select(adj => adj.AdjdLineNbr);
         GenerateVendorCheck(invoice, adjustments);
         GenerateJointChecks(adjustments, filter, invoice);
         ComplianceDocumentsService.ClearLinkToPaymentFlag(ComplianceDocuments);
         OpenPaymentCycleWorkflow();
         InvoiceEntry.Caches <ComplianceDocumentReference>().Persist(PXDBOperation.Delete);
         scope.Complete();
     }
 }
Esempio n. 2
0
        private APPayment GenerateMultipleChecks()
        {
            CreatePaymentEntry();
            JointPayeePayments.Cache.Clear();
            ComplianceDocuments = ComplianceDocumentsService.GetComplianceDocumentsToLink();
            var vendorCheck = GenerateVendorCheck();
            var jointChecks = GenerateJointChecks();

            ComplianceDocumentsService.ClearLinkToPaymentFlag(ComplianceDocuments);
            InvoiceEntry.Views.Caches.Add(typeof(JointPayeePayment));
            InvoiceEntry.Persist();
            MarkPaymentForLienWaiverGeneration(true);
            PaymentEntry.Persist();
            return(vendorCheck ?? jointChecks.First());
        }