protected virtual void CABatchDetail_RowDeleted(PXCache sender, PXRowDeletedEventArgs e)
        {
            CABatchDetail row = (CABatchDetail)e.Row;

            if (!this._isMassDelete)
            {
                UpdateDocAmount(row, true);
            }
        }
Esempio n. 2
0
 public override void RowDeleted(PXCache sender, PXRowDeletedEventArgs e)
 {
     //the idea is not to decrement linecntr on deletion
     if (_justInserted.Contains(e.Row))
     {
         base.RowDeleted(sender, e);
         _justInserted.Remove(e.Row);
     }
 }
Esempio n. 3
0
        protected virtual void PMTran_RowDeleted(PXCache sender, PXRowDeletedEventArgs e)
        {
            PMTran row = e.Row as PMTran;

            if (row != null && row.BillableQty != 0)
            {
                SubtractUsage(sender, row.ProjectID, row.InventoryID, row.BillableQty ?? 0m, row.UOM);
            }
        }
Esempio n. 4
0
        protected virtual void DRScheduleTran_RowDeleted(PXCache sender, PXRowDeletedEventArgs e)
        {
            DRScheduleTran row = e.Row as DRScheduleTran;

            if (row != null && Components.Current != null && Components.Current.Status == DRScheduleStatus.Open)
            {
                Subtract(row);
            }
        }
        protected virtual void PaymentTypeInstanceDetail_RowDeleted(PXCache cache, PXRowDeletedEventArgs e)
        {
            PaymentTypeInstanceDetail row = (PaymentTypeInstanceDetail)e.Row;
            PaymentMethodDetail       def = this.FindTemplate(row);

            if (def.IsIdentifier ?? false)
            {
                this.PaymentTypeInstance.Current.Descr = null;
            }
        }
        protected virtual void ARDunningLetterDetail_RowDeleted(PXCache sender, PXRowDeletedEventArgs e)
        {
            int maxLevel = 0;

            foreach (ARDunningLetterDetail detail in Details.Select())
            {
                maxLevel = Math.Max(detail.DunningLetterLevel ?? 0, maxLevel);
            }
            Document.Current.DunningLetterLevel = maxLevel;
        }
        protected virtual void INCategory_RowDeleted(PXCache cache, PXRowDeletedEventArgs e)
        {
            INCategory row = e.Row as INCategory;

            if (row == null || row.CategoryID == null)
            {
                return;
            }
            deleteRecurring(row);
        }
Esempio n. 8
0
 protected virtual void TaxBucketLine_RowDeleted(PXCache sender, PXRowDeletedEventArgs e)
 {
     foreach (PXResult <TaxReportLine, TaxBucketLine> res in PXSelectJoin <TaxReportLine, LeftJoin <TaxBucketLine, On <TaxBucketLine.vendorID, Equal <TaxReportLine.vendorID>, And <TaxBucketLine.lineNbr, Equal <TaxReportLine.lineNbr> > > >, Where <TaxReportLine.vendorID, Equal <Required <TaxReportLine.vendorID> >, And <TaxReportLine.tempLineNbr, Equal <Required <TaxReportLine.tempLineNbr> >, And <TaxBucketLine.bucketID, Equal <Required <TaxBucketLine.bucketID> > > > > > .Select(this, ((TaxBucketLine)e.Row).VendorID, ((TaxBucketLine)e.Row).LineNbr, ((TaxBucketLine)e.Row).BucketID))
     {
         if (((TaxBucketLine)res).BucketID != null)
         {
             BucketLine.Cache.Delete((TaxBucketLine)res);
         }
     }
 }
        protected virtual void GLConsolAccount_RowDeleted(PXCache sender, PXRowDeletedEventArgs e)
        {
            GLConsolAccount consol = (GLConsolAccount)e.Row;

            foreach (Account acct in Accounts.Select(consol.AccountCD))
            {
                acct.GLConsolAccountCD = null;
                Accounts.Update(acct);
            }
        }
Esempio n. 10
0
        protected virtual void ARTran_RowDeleted(PXCache sender, PXRowDeletedEventArgs e)
        {
            if (Base.Document.Current.IsRetainageDocument != true && ((ARTran)e.Row).TaskID != null && Base.Document.Current.ProformaExists != true)
            {
                AddToInvoiced((ARTran)e.Row, GetProjectedAccountGroup((ARTran)e.Row), -1 * (int)ARDocType.SignAmount(((ARTran)e.Row).TranType).GetValueOrDefault(1));

                var select = new PXSelect <PMTran, Where <PMTran.aRTranType, Equal <Required <PMTran.aRTranType> >,
                                                          And <PMTran.aRRefNbr, Equal <Required <PMTran.aRRefNbr> >,
                                                               And <PMTran.refLineNbr, Equal <Required <PMTran.refLineNbr> > > > > >(Base);

                string tranType = ((ARTran)e.Row).TranType;
                string refNbr   = ((ARTran)e.Row).RefNbr;
                int?   lineNbr  = ((ARTran)e.Row).LineNbr;

                if (tranType == ARDocType.CreditMemo && !string.IsNullOrEmpty(Base.Document.Current.OrigRefNbr))
                {
                    tranType = Base.Document.Current.OrigDocType;
                    refNbr   = Base.Document.Current.OrigRefNbr;
                    lineNbr  = ((ARTran)e.Row).OrigLineNbr;
                }

                PMTran original = select.SelectWindowed(0, 1, tranType, refNbr, lineNbr);

                if (original == null)                                                                                                                                                 //progressive line
                {
                    SubtractAmountToInvoice(((ARTran)e.Row), GetProjectedAccountGroup((ARTran)e.Row), -1 * (int)ARDocType.SignAmount(((ARTran)e.Row).TranType).GetValueOrDefault(1)); //Restoring AmountToInvoice
                }
            }

            if (e.Row != null)
            {
                if (!isARInvoiceDeleting)
                {
                    foreach (PM.PMTran pMRef in Base.RefContractUsageTran.Select(((ARTran)e.Row).TranType, ((ARTran)e.Row).RefNbr, ((ARTran)e.Row).LineNbr))
                    {
                        if (pMRef != null)
                        {
                            pMRef.ARRefNbr   = null;
                            pMRef.ARTranType = null;
                            pMRef.RefLineNbr = null;
                            if (Base.Document.Current != null && Base.Document.Current.ProformaExists != true)
                            {
                                pMRef.Billed         = false;
                                pMRef.BilledDate     = null;
                                pMRef.InvoicedQty    = 0;
                                pMRef.InvoicedAmount = 0;
                                PM.RegisterReleaseProcess.AddToUnbilledSummary(Base, pMRef);
                            }

                            Base.RefContractUsageTran.Update(pMRef);
                        }
                    }
                }
            }
        }
Esempio n. 11
0
        protected virtual void EPExpenseClaimDetails_RowDeleted(PXCache cache, PXRowDeletedEventArgs e)
        {
            EPExpenseClaimDetails row = e.Row as EPExpenseClaimDetails;

            if (row == null)
            {
                return;
            }

            EPClaimReceiptController.DeleteLegacyTaxRows(this, row.RefNbr);
        }
        protected virtual void FSCustomerBillingSetup_RowDeleted(PXCache cache, PXRowDeletedEventArgs e)
        {
            if (e.Row == null)
            {
                return;
            }

            FSxCustomer fsxCustomerRow = PXCache <Customer> .GetExtension <FSxCustomer>(Base.BAccount.Current);

            fsxCustomerRow.BillingOptionsChanged = true;
        }
Esempio n. 13
0
        protected virtual void EPCompanyTreeMember_RowDeleted(PXCache cache, PXRowDeletedEventArgs e)
        {
            EPCompanyTreeMember row = e.Row as EPCompanyTreeMember;

            if (row == null || row.WorkGroupID == null)
            {
                return;
            }

            Items.Cache.IsDirty = true;
        }
 protected virtual void RelationGroup_RowDeleted(PXCache sender, PXRowDeletedEventArgs e)
 {
     PX.SM.RelationGroup group = (PX.SM.RelationGroup)e.Row;
     group.SpecificModule = null;
     group.SpecificType   = null;
     group.Active         = false;
     if (sender.GetStatus(group) != PXEntryStatus.InsertedDeleted)
     {
         sender.SetStatus(group, PXEntryStatus.Updated);
     }
 }
        protected virtual void FSWFStage_RowDeleted(PXCache cache, PXRowDeletedEventArgs e)
        {
            FSWFStage fsWFStageRow = e.Row as FSWFStage;

            if (fsWFStageRow == null || fsWFStageRow.WFStageID == null)
            {
                return;
            }

            deleteRecurring(fsWFStageRow);
        }
Esempio n. 16
0
        protected virtual void POVendorInventory_RowDeleted(PXCache sender, PXRowDeletedEventArgs e)
        {
            POVendorInventory vendor = e.Row as POVendorInventory;
            APSalesPrice      price  = getAPSalesPrice(vendor);

            if (price != null)
            {
                VendorPrice.Delete(price);
            }
            this.VendorCatalogue.View.RequestRefresh();
        }
        protected virtual void EPAssignmentRoute_RowDeleted(PXCache sender, PXRowDeletedEventArgs e)
        {
            IList <EPAssignmentRoute> routes = GetSortedItems();
            int i = 1;

            foreach (var route in routes)
            {
                route.Sequence = i++;
                Items.Update(route);
            }
            Items.View.RequestRefresh();
        }
Esempio n. 18
0
 protected virtual void TaxZone_RowDeleted(PXCache sender, PXRowDeletedEventArgs e)
 {
     if (!(e.Row is TaxZone row))
     {
         return;
     }
     if (row.TaxZoneID == "Channel")
     {
         TaxZoneDet det = KCTaxItem.SelectSingle(row.TaxZoneID);
         KCTaxItem.Delete(det);
     }
 }
        protected virtual void EPCompanyTreeMaster_RowDeleted(PXCache cache, PXRowDeletedEventArgs e)
        {
            EPCompanyTreeMaster row = e.Row as EPCompanyTreeMaster;

            if (row == null || row.WorkGroupID == null)
            {
                return;
            }

            deleteHRecords(row.WorkGroupID);
            deleteRecurring(row);
        }
Esempio n. 20
0
        protected virtual void Users_RowDeleted(PXCache sender, PXRowDeletedEventArgs e)
        {
            Contact c = (Contact)contact.View.SelectSingleBound(new object[] { e.Row });

            if (c == null)
            {
                return;
            }

            c.UserID = null;
            contact.Update(c);
        }
 protected virtual void TaxTotal_RowDeleted(PXCache sender, PXRowDeletedEventArgs e)
 {
     if ((CurrentDocument.TaxCalc != TaxCalc.NoCalc && e.ExternalCall || CurrentDocument.TaxCalc == TaxCalc.ManualCalc))
     {
         TaxTotal row = sender.GetExtension <TaxTotal>(e.Row);
         foreach (Detail det in Details.Select())
         {
             DelOneTax(det, row.RefTaxID);
         }
         CalcTaxes(null);
     }
 }
        public virtual void ARStatement_RowDeleted(PXCache cache, PXRowDeletedEventArgs e)
        {
            ARStatement row = (ARStatement)e.Row;

            foreach (Customer iCstm in this.Customer.Select(row.CustomerID))
            {
                if (row.StatementDate == iCstm.StatementLastDate)
                {
                    iCstm.StatementLastDate = this.FindLastCstmStatementDate(row.CustomerID, row.StatementDate);
                    this.Customer.Update(iCstm);
                }
            }
        }
        public virtual void ARStatementDetail_RowDeleted(PXCache cache, PXRowDeletedEventArgs e)
        {
            ARStatementDetail row = (ARStatementDetail)e.Row;

            foreach (ARRegister iDoc in this.Docs.Select(row.DocType, row.RefNbr))
            {
                if (row.StatementDate == iDoc.StatementDate)
                {
                    iDoc.StatementDate = null;
                    this.Docs.Update(iDoc);
                }
            }
        }
        protected virtual void SOLine_RowDeleted(PXCache sender, PXRowDeletedEventArgs e, PXRowDeleted del)
        {
            del?.Invoke(sender, e);

            var row = (SOLine)e.Row;

            if (row == null || IsBlanketOrder)
            {
                return;
            }

            UpdateParentBlanketOrderLine(row, row.OrderQty.GetValueOrDefault() * -1);
        }
Esempio n. 25
0
        public virtual void RowDeleted(PXCache sender, PXRowDeletedEventArgs e)
        {
            CATran tran = (CATran)e.Row;

            if (tran.CashAccountID != null && tran.TranDate != null)
            {
                CADailySummary summary = new CADailySummary();
                summary.CashAccountID = tran.CashAccountID;
                summary.TranDate      = tran.TranDate;
                summary = (CADailySummary)sender.Graph.Caches[typeof(CADailySummary)].Insert(summary);
                update(tran, summary, -1);
            }
        }
Esempio n. 26
0
        protected virtual void ShipmentLine_RowDeleted(PXCache sender, PXRowDeletedEventArgs e)
        {
            ShipmentLine line = (ShipmentLine)e.Row;
            Shipment     row  = Shipments.Current;

            if (line.Cancelled != true &&
                Shipments.Cache.GetStatus(row) != PXEntryStatus.InsertedDeleted &&
                Shipments.Cache.GetStatus(row) != PXEntryStatus.Deleted)
            {
                row.TotalQty -= line.LineQty;
                Shipments.Update(row);
            }
        }
Esempio n. 27
0
        protected virtual void APSalesPrice_RowDeleted(PXCache sender, PXRowDeletedEventArgs e)
        {
            APSalesPrice price = e.Row as APSalesPrice;

            if (price.IsPromotionalPrice == false && price.PendingBreakQty == 0 && price.BreakQty == 0)
            {
                POVendorInventory vi = getPOVendorInventory(price);
                if (vi != null)
                {
                    VendorItems.Delete(vi);
                }
            }
        }
Esempio n. 28
0
        public virtual void CROpportunityProbability_RowDeleted(PXCache sender, PXRowDeletedEventArgs e)
        {
            CROpportunityProbability probability = e.Row as CROpportunityProbability;

            if (probability == null || OpportunityClass.Current == null)
            {
                return;
            }
            foreach (CROpportunityClassProbability link in PXSelect <CROpportunityClassProbability, Where <CROpportunityClassProbability.stageID, Equal <Required <CROpportunityProbability.stageCode> > > > .Select(this, probability.StageCode))
            {
                OpportunityClassActiveProbabilities.Delete(link);
            }
        }
Esempio n. 29
0
        protected virtual void FATran_RowDeleted(PXCache sender, PXRowDeletedEventArgs e)
        {
            FATran tran = e.Row as FATran;

            if (tran != null && tran.TranType == FATran.tranType.TransferPurchasing && tran.Released != true)
            {
                SetCurrentAsset(tran);
                FixedAsset asset = PXCache <FixedAsset> .CreateCopy(Asset.Current);

                FADetails details = PXCache <FADetails> .CreateCopy(assetdetails.Current);

                FALocationHistory lastLocation = locationHistory.SelectSingle(tran.AssetID);
                locationHistory.Delete(lastLocation);

                FALocationHistory restoringLocation = locationHistory.SelectSingle(tran.AssetID);
                if (restoringLocation == null)
                {
                    throw new PXException(Messages.PrevLocationRevisionNotFound, asset.AssetID);
                }

                details.LocationRevID = restoringLocation.RevisionID;
                assetdetails.Update(details);

                asset.ClassID     = restoringLocation.ClassID ?? asset.ClassID;
                asset.BranchID    = restoringLocation.BranchID ?? asset.BranchID;
                asset.FAAccountID = restoringLocation.FAAccountID ?? asset.FAAccountID;
                asset.FASubID     = restoringLocation.FASubID ?? asset.FASubID;
                asset.AccumulatedDepreciationAccountID = restoringLocation.AccumulatedDepreciationAccountID ?? asset.AccumulatedDepreciationAccountID;
                asset.AccumulatedDepreciationSubID     = restoringLocation.AccumulatedDepreciationSubID ?? asset.AccumulatedDepreciationSubID;
                asset.DepreciatedExpenseAccountID      = restoringLocation.DepreciatedExpenseAccountID ?? asset.DepreciatedExpenseAccountID;
                asset.DepreciatedExpenseSubID          = restoringLocation.DepreciatedExpenseSubID ?? asset.DepreciatedExpenseSubID;
                asset.DisposalAccountID = restoringLocation.DisposalAccountID;
                asset.DisposalSubID     = restoringLocation.DisposalSubID;
                asset.GainAcctID        = restoringLocation.GainAcctID ?? asset.GainAcctID;
                asset.GainSubID         = restoringLocation.GainSubID ?? asset.GainSubID;
                asset.LossAcctID        = restoringLocation.LossAcctID ?? asset.LossAcctID;
                asset.LossSubID         = restoringLocation.LossSubID ?? asset.LossSubID;
                Asset.Update(asset);
            }

            if (tran != null && tran.TranType == FATran.tranType.PurchasingPlus && tran.Released != true)
            {
                var lastLocation = locationHistory.SelectSingle(tran.AssetID);
                if (lastLocation?.RefNbr != null)
                {
                    lastLocation.RefNbr = null;
                    locationHistory.Update(lastLocation);
                }
            }
        }
Esempio n. 30
0
        protected virtual void PmRegister_RowDeleted(PXCache cache, PXRowDeletedEventArgs arguments)
        {
            if (!(arguments.Row is PMRegister))
            {
                return;
            }
            var documents = GetComplianceDocuments();

            foreach (var document in documents)
            {
                document.ProjectTransactionID = null;
                ComplianceDocuments.Update(document);
            }
        }