void IPXRowInsertedSubscriber.RowInserted(PXCache sender, PXRowInsertedEventArgs e)
 {
     if (this.CheckOnInserted)
     {
         try
         {
             Verifying(sender, e.Row);
         }
         catch (PXSetPropertyException ex)
         {
             var newValue = sender.GetValue(e.Row, _FieldName);
             sender.RaiseExceptionHandling(_FieldName, e.Row, newValue, ex);
         }
     }
 }
		protected virtual void LocationAPPaymentInfo_RowInserted(PXCache sender, PXRowInsertedEventArgs e)
		{
			LocationAPPaymentInfo record = (LocationAPPaymentInfo)e.Row;

			record.IsRemitAddressSameAsMain = object.Equals(record.VDefAddressID, record.VRemitAddressID);
			record.IsRemitContactSameAsMain = object.Equals(record.VDefContactID, record.VRemitContactID);
		}
		protected override void Location_RowInserted(PXCache sender, PXRowInsertedEventArgs e)
		{
			Location record = (Location)e.Row;

			record.IsAPAccountSameAsMain = !object.Equals(record.LocationID, record.VAPAccountLocationID);
			record.IsAPPaymentInfoSameAsMain = !object.Equals(record.LocationID, record.VPaymentInfoLocationID);

			base.Location_RowInserted(sender, e);
		}
Exemple #4
0
		protected virtual void Customer_RowInserted(PXCache sender, PXRowInsertedEventArgs e)
		{
			if (e.Row != null)
			{
				Customer cust = PXSelectorAttribute.Select<Customer.acctCD>(sender, e.Row) as Customer;
				if (cust != null)
				{
					cust.Included = true;
					PXCache<Customer>.RestoreCopy((Customer)e.Row, cust);
					sender.SetStatus(e.Row, PXEntryStatus.Updated);
				}
				else
				{
					sender.Delete(e.Row);
				}
			}
		}
Exemple #5
0
		protected virtual void InventoryItem_RowInserted(PXCache sender, PXRowInsertedEventArgs e)
		{
			if (e.Row != null)
			{
				InventoryItem item = PXSelectorAttribute.Select<InventoryItem.inventoryCD>(sender, e.Row) as InventoryItem;
				if (item != null)
				{
					item.Included = true;
					PXCache<InventoryItem>.RestoreCopy((InventoryItem)e.Row, item);
					sender.SetStatus(e.Row, PXEntryStatus.Updated);
				}
				else
				{
					sender.Delete(e.Row);
				}
			}
		}
Exemple #6
0
		protected override void RelationGroup_RowInserted(PXCache cache, PXRowInsertedEventArgs e)
		{
			base.RelationGroup_RowInserted(cache, e);
			PX.SM.RelationGroup group = (PX.SM.RelationGroup)e.Row;
			group.SpecificModule = typeof(accountsReceivableModule).Namespace;
		}
Exemple #7
0
		protected override void RelationGroup_RowInserted(PXCache cache, PXRowInsertedEventArgs e)
		{
			base.RelationGroup_RowInserted(cache, e);
			PX.SM.RelationGroup group = (PX.SM.RelationGroup)e.Row;
			group.SpecificModule = typeof(inventoryModule).Namespace;
			group.SpecificType = typeof(InventoryItem).FullName;
		}
Exemple #8
0
		protected virtual void Vendor_RowInserted(PXCache sender, PXRowInsertedEventArgs e)
		{
			if (e.Row != null)
			{
				Vendor vend = PXSelectorAttribute.Select<Vendor.acctCD>(sender, e.Row) as Vendor;
				if (vend != null)
				{
					vend.Included = true;
					PXCache<Vendor>.RestoreCopy((Vendor)e.Row, vend);
					sender.SetStatus(e.Row, PXEntryStatus.Updated);
				}
				else
				{
					sender.Delete(e.Row);
				}
			}
		}
		protected override void ARInvoice_RowInserted(PXCache sender, PXRowInsertedEventArgs e)
		{
			base.ARInvoice_RowInserted(sender, e);

			SODocument.Cache.Insert();
			SODocument.Cache.IsDirty = false;

			SODocument.Current.AdjDate = ((ARInvoice)e.Row).DocDate;
			SODocument.Current.AdjFinPeriodID = ((ARInvoice)e.Row).FinPeriodID;
			SODocument.Current.AdjTranPeriodID = ((ARInvoice)e.Row).TranPeriodID;
			
		}
		protected virtual void SOFreightDetail_RowInserted(PXCache sender, PXRowInsertedEventArgs e)
		{
			SOFreightDetail row = e.Row as SOFreightDetail;
			if (row != null)
			{
				if (row.CuryTotalFreightAmt > 0)
					AddFreightTransaction(row);
			}
		}
        protected override void ARTran_RowInserted(PXCache sender, PXRowInsertedEventArgs e)
        {
            if (e.ExternalCall)
                RecalculateDiscounts(sender, (ARTran)e.Row);
            TaxAttribute.Calculate<ARTran.taxCategoryID>(sender, e);

            if (SODocument.Current != null)
            {
                SODocument.Current.IsTaxValid = false;
                if (SODocument.Cache.GetStatus(SODocument.Current) == PXEntryStatus.Notchanged)
                    SODocument.Cache.SetStatus(SODocument.Current, PXEntryStatus.Updated);
            }

            if (Document.Current != null)
            {
                Document.Current.IsTaxValid = false;
                if (SODocument.Cache.GetStatus(SODocument.Current) == PXEntryStatus.Notchanged)
                    SODocument.Cache.SetStatus(SODocument.Current, PXEntryStatus.Updated);
            }
        }