Last active
April 9, 2019 15:39
-
-
Save smarenich/c9e94c556d6e0601d3d229d80e540bb7 to your computer and use it in GitHub Desktop.
Correcting Cash Discount calculation for non-inclusive taxes in AR and SO invoices and in purchase orders and AP bills.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using PX.Data; | |
using PX.Objects; | |
using PX.Common; | |
using PX.Objects.GL; | |
using PX.Objects.CM; | |
using PX.Objects.CS; | |
using PX.Objects.TX; | |
using PX.Objects.CR; | |
using PX.Objects.CA; | |
namespace PX.Objects.AP | |
{ | |
public class APInvoice_Extension : PXCacheExtension<APInvoice> | |
{ | |
#region CuryClientTotal | |
public abstract class curyClientTotal : PX.Data.IBqlField | |
{ | |
} | |
[PXCurrency(typeof(APInvoice.curyInfoID), typeof(APInvoice_Extension.clientTotal))] | |
[PXFormula(typeof(Sub<APInvoice.curyLineTotal, APInvoice.curyDiscTot>))] | |
public virtual Decimal? CuryClientTotal { get; set; } | |
#endregion | |
#region ClientTotal | |
public abstract class clientTotal : PX.Data.IBqlField { } | |
[PXDecimal(4)] | |
public virtual Decimal? ClientTotal { get; set; } | |
#endregion | |
#region TermsID | |
public abstract class termsID : PX.Data.IBqlField { } | |
[PXMergeAttributes(Method = MergeMethod.Merge)] | |
[Terms(typeof(APInvoice.docDate), typeof(APInvoice.dueDate), typeof(APInvoice.discDate), typeof(APInvoice_Extension.curyClientTotal), typeof(APInvoice.curyOrigDiscAmt))] | |
public virtual String TermsID { get; set; } | |
#endregion | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using PX.Data; | |
using PX.Objects; | |
using PX.Common; | |
using PX.Objects.GL; | |
using PX.Objects.CM; | |
using PX.Objects.CS; | |
using PX.Objects.TX; | |
using PX.Objects.CR; | |
using PX.Objects.CA; | |
namespace PX.Objects.AR | |
{ | |
public class ARInvoiceEntry_Extension : PXGraphExtension<ARInvoiceEntry> | |
{ | |
[PXMergeAttributes(Method = MergeMethod.Merge)] | |
[Terms(typeof(ARInvoice.docDate), typeof(ARInvoice.dueDate), typeof(ARInvoice.discDate), typeof(ARInvoice_Extension.curyClientTotal), typeof(ARInvoice.curyOrigDiscAmt))] | |
protected virtual void ARInvoice_TermsID_CacheAttached(PXCache sender) | |
{ | |
} | |
} | |
public class ARInvoice_Extension : PXCacheExtension<ARInvoice> | |
{ | |
#region CuryClientTotal | |
public abstract class curyClientTotal : PX.Data.IBqlField | |
{ | |
} | |
[PXCurrency(typeof(ARInvoice.curyInfoID), typeof(ARInvoice_Extension.clientTotal))] | |
[PXFormula(typeof(Sub<ARInvoice.curyLineTotal, ARInvoice.curyDiscTot>))] | |
public virtual Decimal? CuryClientTotal { get; set; } | |
#endregion | |
#region ClientTotal | |
public abstract class clientTotal : PX.Data.IBqlField { } | |
[PXDecimal(4)] | |
public virtual Decimal? ClientTotal { get; set; } | |
#endregion | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you please create as a customization package for Acumatica?