public virtual void _(Events.RowSelected <ARInvoice> e)
        {
            var _library          = new LumLibrary();
            var baseCompanyCuryID = _library.GetCompanyBaseCuryID();

            // Setting LineTotal
            PXUIFieldAttribute.SetDisplayName <ARInvoice.lineTotal>(e.Cache, $"Total in {baseCompanyCuryID}");
            PXUIFieldAttribute.SetVisible <ARInvoice.lineTotal>(e.Cache, null, _library.GetShowingTotalInHome);
            PXUIFieldAttribute.SetEnabled <ARInvoice.lineTotal>(e.Cache, null, false);
            // Hide CuryOrigDiscAmt
            PXUIFieldAttribute.SetVisible <ARInvoice.curyOrigDiscAmt>(e.Cache, null, !_library.GetShowingTotalInHome);

            //controll customize button based on country ID
            if (!_library.isCNorHK())
            {
                CommercialInvoiceReport.SetVisible(false);
                CreditNoteReport.SetVisible(false);
            }
        }
Example #2
0
        public virtual void _(Events.RowSelected <ARInvoice> e)
        {
            var library           = new LumLibrary();
            var BaseComapnyCuryID = library.GetCompanyBaseCuryID();

            PXUIFieldAttribute.SetDisplayName <ARInvoice.lineTotal>(e.Cache, $"Total in {BaseComapnyCuryID}");
            PXUIFieldAttribute.SetEnabled <ARInvoice.lineTotal>(e.Cache, null, false);
            // Defaul Visiable is false
            PXUIFieldAttribute.SetVisible <ARInvoice.lineTotal>(e.Cache, null, library.GetShowingTotalInHome);

            //controll customize button based on country ID
            var _lumLibrary = new LumLibrary();

            if (!_lumLibrary.isCNorHK())
            {
                CommercialInvoiceReport.SetVisible(false);
                CreditNoteReport.SetVisible(false);
                CommercialInvoiceFromDGReport.SetVisible(false);
            }
        }