Exemplo n.º 1
0
        private void SetPurchaseOrderLine()
        {
            var purchaseOrderLines = CommitmentDataProvider.GetCommitmentLines(Graph, generationKey.OrderNumber,
                                                                               POOrderType.RegularOrder, generationKey.ProjectId);
            var purchaseOrderLineItem = purchaseOrderLines.SingleOrNull()?.LineNbr;

            Cache.SetValueExt <ComplianceDocument.purchaseOrderLineItem>(lienWaiver, purchaseOrderLineItem);
        }
Exemplo n.º 2
0
        private void SetSubcontractLine()
        {
            var subcontractOrderLines = CommitmentDataProvider.GetCommitmentLines(Graph, generationKey.OrderNumber,
                                                                                  POOrderType.RegularSubcontract, generationKey.ProjectId);
            var subcontractLineItem = subcontractOrderLines.SingleOrNull()?.LineNbr;

            Cache.SetValueExt <ComplianceDocument.subcontractLineItem>(lienWaiver, subcontractLineItem);
        }
        protected POOrder GetCommitment(APTran transaction)
        {
            var originalTransaction  = TransactionDataProvider.GetOriginalTransaction(Graph, transaction);
            var transactionExtension = PXCache <APTran> .GetExtension <ApTranExt>(originalTransaction);

            return(transactionExtension.SubcontractNbr != null
                ? CommitmentDataProvider.GetCommitment(Graph, transactionExtension.SubcontractNbr,
                                                       POOrderType.RegularSubcontract)
                : originalTransaction.PONbr != null
                    ? CommitmentDataProvider.GetCommitment(Graph, originalTransaction.PONbr, POOrderType.RegularOrder)
                    : null);
        }
Exemplo n.º 4
0
        private void SetPurchaseOrder()
        {
            var purchaseOrder =
                CommitmentDataProvider.GetCommitment(Graph, generationKey.OrderNumber, POOrderType.RegularOrder);

            if (purchaseOrder == null)
            {
                return;
            }
            ComplianceDocumentRefNoteAttribute.SetComplianceDocumentReference <ComplianceDocument.purchaseOrder>(
                Cache, lienWaiver, purchaseOrder.OrderType, purchaseOrder.OrderNbr, purchaseOrder.NoteID);
            Cache.Update(lienWaiver);
        }
        private object[] AppendCommitmentCondition(string commitmentNumber, PXSelectBase <ComplianceDocument> query,
                                                   object[] parameters)
        {
            var purchaseOrder =
                CommitmentDataProvider.GetCommitment(graph, commitmentNumber, POOrderType.RegularOrder);

            if (purchaseOrder == null)
            {
                query.WhereAnd <Where <ComplianceDocument.subcontract.IsEqual <P.AsString> > >();
                return(parameters.Append(commitmentNumber));
            }
            query.Join <InnerJoin <ComplianceDocumentReference, On <ComplianceDocumentReference.
                                                                    complianceDocumentReferenceId.IsEqual <ComplianceDocument.purchaseOrder> > > >();
            query.WhereAnd <Where <ComplianceDocumentReference.refNoteId.IsEqual <P.AsGuid> > >();
            return(parameters.Append(purchaseOrder.NoteID));
        }