public override void Persist() { ValidateBucket(); TaxReportMaint.CheckReportSettingsEditable(this, Bucket.Current.VendorID); base.Persist(); }
protected virtual void TaxBucketMaster_RowSelected(PXCache cache, PXRowSelectedEventArgs e) { var taxBucket = e.Row as TaxBucketMaster; if (taxBucket == null) { return; } TaxReportMaint.CheckReportSettingsEditableAndSetWarningTo <TaxBucketMaster.vendorID>(this, cache, taxBucket, taxBucket.VendorID); }
public TaxBucketsCalculation(string taxTypeForCalculation, PXGraph aGraph, RoundingManager rmanager, Currency aCurrency, CurrencyRateByDate curyRateByDate, Func <TaxReportLine, bool> showTaxReportLine) { taxType = taxTypeForCalculation; roundingManager = rmanager; graph = aGraph; currency = aCurrency; rateByDate = curyRateByDate; int curVendorBaccountID = roundingManager.CurrentVendor.BAccountID.Value; aggregatesTable = TaxReportMaint.AnalyseBuckets(graph, curVendorBaccountID, taxTypeForCalculation, CalcWithZones, showTaxReportLine); linesWithRelatedAggregatesTable = TransposeDictionary(aggregatesTable); }
/// <summary> /// Initializes a new instance of the <see cref="TaxReportLinesByTaxZonesReloader"/> class. /// </summary> /// <param name="aTaxReportGraph">The tax report graph.</param> /// <param name="aMaxCountOfDisplayedLineNumbers">(Optional) The maximum count of displayed line numbers. /// Default is <see cref="DefaultMaxCountOfDisplayedLineNumbers"/></param> public TaxReportLinesByTaxZonesReloader(TaxReportMaint aTaxReportGraph, int?aMaxCountOfDisplayedLineNumbers = null) { if (aTaxReportGraph == null) { throw new ArgumentNullException(nameof(aTaxReportGraph)); } if (aMaxCountOfDisplayedLineNumbers <= 0) { throw new ArgumentOutOfRangeException(nameof(aMaxCountOfDisplayedLineNumbers), PM.Messages.ValueMustBeGreaterThanZero); } taxReportGraph = aTaxReportGraph; maxCountOfDisplayedLineNumbers = aMaxCountOfDisplayedLineNumbers ?? DefaultMaxCountOfDisplayedLineNumbers; }
public static PXResultset <TaxReportLine, TaxHistory> GetPreviewReport(PXGraph graph, Vendor vendor, PXResultset <TaxReportLine, TaxHistory> records, Func <TaxReportLine, bool> ShowTaxReportLine = null) { if (records.Count == 0) { return(records); } const bool calcWithZones = true; int vendorbAccountID = vendor.BAccountID.Value; RoundingManager rmanager = new RoundingManager(vendor); Dictionary <int, List <int> > taxAggregatesDict = TaxReportMaint.AnalyseBuckets(graph, vendorbAccountID, TaxReportLineType.TaxAmount, calcWithZones, ShowTaxReportLine) ?? new Dictionary <int, List <int> >(); Dictionary <int, List <int> > taxableAggregatesDict = TaxReportMaint.AnalyseBuckets(graph, vendorbAccountID, TaxReportLineType.TaxableAmount, calcWithZones, ShowTaxReportLine) ?? new Dictionary <int, List <int> >(); var recordsByLineNumberTable = new Dictionary <int, PXResult <TaxReportLine, TaxHistory> >(); foreach (PXResult <TaxReportLine, TaxHistory> record in records) { TaxReportLine taxLine = record; TaxHistory taxHistory = record; taxHistory.ReportUnfiledAmt = rmanager.Round(taxHistory.ReportUnfiledAmt); recordsByLineNumberTable[taxLine.LineNbr.Value] = record; } CalculateReportUnfiledAmtForAggregatedTaxLines(taxAggregatesDict, recordsByLineNumberTable); CalculateReportUnfiledAmtForAggregatedTaxLines(taxableAggregatesDict, recordsByLineNumberTable); return(records); }
public TaxReportLinesOrderedSelect(PXGraph graph, Delegate handler) : base(graph, handler) { RenumberTailOnDelete = false; taxReportGraph = graph as TaxReportMaint; }