# Billing measures

Measure | Source and/or calculation |
---|---|

BH Additional Discount Base Amount | BillingInvoice.AdditionalDiscountBaseAmount |

BH Additional Discount Currency Amount | BillingInvoice.AdditionalDiscountCurrencyAmount |

BH Additional Discount Currency Rate | BillingInvoice.EnteredDiscount.BaseAmount.EnteredCurrencyRate |

BH Billing Invoice Count | BillingInvoice.UniqueID |

BH Commission Rate 1 | BillingInvoice.CommissionRate1 |

BH Commission Rate 2 | BillingInvoice.CommissionRate2 |

BH Commission Split Percentage | BillingInvoice.CommissionSplitPercentage |

BH Currency Rate | BillingInvoice.CurrencyRate |

BH Customs Total | BillingInvoice.CustomsTotal |

BH Discount Base Amount | BillingInvoice.OrderDiscount.BaseAmount.EnteredCurrencyAmount |

BH Discount Currency Amount | BillingInvoice.OrderDiscount.TransactionAmount |

BH Discount Currency Rate | BillingInvoice.OrderDiscount.BaseAmount.EnteredCurrencyRate |

BH Discountable | BillingInvoice.Discountable |

BH Down Payment Base Amount | BillingInvoice.CashInAdvance.BaseAmount.EnteredCurrencyAmount |

BH Down Payment Currency Amount | BillingInvoice.CashInAdvance.TransactionAmount |

BH Down Payment Currency Rate | BillingInvoice.CashInAdvance.BaseAmount.EnteredCurrencyRate |

BH Electronic Payment Settlement Base Amount | BillingInvoice.ElectronicPaymentSettlementBaseAmount |

BH Freight Charge Base Amount | BillingInvoice.FreightChargeBaseAmount |

BH Freight Charge Currency Amount | BillingInvoice.FreightCharge.TransactionAmount |

BH Freight Charge Currency Rate | BillingInvoice.FreightCharge.BaseAmount.EnteredCurrencyRate |

BH Freight Total | BillingInvoice.FreightTotal |

BH Gross Base Amount |
IF [Grain(Billing Invoice Line).Sum: BL Entered Price] IS NOT NULL THEN [BH Gross Base Amount] = [BL Billing Invoice.Total Inventory Goods Base Amount] + [BL Billing Invoice.Total Non Inventory Goods Base Amount] + [Grain(Billing Invoice Line).Sum: BL Entered Price] + [BL Billing Invoice.Total Add On Base Amount] + [BL Billing Invoice.Freight Charge Base Amount] ELSE [BH Gross Base Amount] = [BL Billing Invoice.Total Inventory Goods Base Amount] + [BL Billing Invoice.Total Non Inventory Goods Base Amount] + [BL Billing Invoice.Total Add On Base Amount] + [BL Billing Invoice.Freight Charge Base Amount] END IF |

BH Insurance Total | BillingInvoice.InsuranceTotal |

BH Invoice Net Base Amount |
IF [Grain(Billing Invoice Line).Sum: BL Entered Price] IS NOT NULL THEN [BH Invoice Net Base Amount] = [BL Billing Invoice.Total Inventory Goods Base Amount] + [BL Billing Invoice.Total Non Inventory Goods Base Amount] + [Grain(Billing Invoice Line).Sum: BL Entered Price] + [BL Billing Invoice.Total Add On Base Amount] + [BL Billing Invoice.Freight Charge Base Amount] - [BL Billing Invoice.Discount Base Amount] - [BL Billing Invoice.Additional Discount Base Amount] ELSE [BH Invoice Net Base Amount] = [BL Billing Invoice.Total Inventory Goods Base Amount] + [BL Billing Invoice.Total Non Inventory Goods Base Amount] + [BL Billing Invoice.Total Add On Base Amount] + [BL Billing Invoice.Freight Charge Base Amount] - [BL Billing Invoice.Discount Base Amount] - [BL Billing Invoice.Additional Discount Base Amount] END IF |

BH Invoice Net Due Base |
IF [Grain(Billing Invoice Line).Sum: BL Entered Price] IS NOT NULL THEN [BH Invoice Net Due Base] = [BL Billing Invoice.Total Inventory Goods Base Amount] + [BL Billing Invoice.Total Non Inventory Goods Base Amount] + [Grain(Billing Invoice Line).Sum: BL Entered Price] + [BL Billing Invoice.Total Add On Base Amount] + [BL Billing Invoice.Freight Charge Base Amount] - [BL Billing Invoice.Discount Base Amount] - [BL Billing Invoice.Additional Discount Base Amount] + [BL Billing Invoice.Tax Total Base Amount] - [BL Billing Invoice.Terms Discount Base Amount] - [BL Billing Invoice.Down Payment Base Amount] ELSE [BH Invoice Net Due Base] = [BL Billing Invoice.Total Inventory Goods Base Amount] + [BL Billing Invoice.Total Non Inventory Goods Base Amount] + [BL Billing Invoice.Total Add On Base Amount] + [BL Billing Invoice.Freight Charge Base Amount] - [BL Billing Invoice.Discount Base Amount] - [BL Billing Invoice.Additional Discount Base Amount] + [BL Billing Invoice.Tax Total Base Amount] - [BL Billing Invoice.Terms Discount Base Amount] - [BL Billing Invoice.Down Payment Base Amount] END IF |

BH Invoice Total Base Amount |
IF [Grain(Billing Invoice Line).Sum: BL Entered Price] IS NOT NULL THEN [BH Invoice Total Base Amount] = [BL Billing Invoice.Total Inventory Goods Base Amount] + [BL Billing Invoice.Total Non Inventory Goods Base Amount] + [Grain(Billing Invoice Line).Sum: BL Entered Price] + [BL Billing Invoice.Total Add On Base Amount] + [BL Billing Invoice.Freight Charge Base Amount] - [BL Billing Invoice.Discount Base Amount] - [BL Billing Invoice.Additional Discount Base Amount] + [BL Billing Invoice.Tax Total Base Amount] ELSE [BH Invoice Total Base Amount] = [BL Billing Invoice.Total Inventory Goods Base Amount] + [BL Billing Invoice.Total Non Inventory Goods Base Amount] + [BL Billing Invoice.Total Add On Base Amount] + [BL Billing Invoice.Freight Charge Base Amount] - [BL Billing Invoice.Discount Base Amount] - [BL Billing Invoice.Additional Discount Base Amount] + [BL Billing Invoice.Tax Total Base Amount] END IF |

BH Minimum Margin | BillingInvoice.MinimumMargin |

BH Minimum Margin Percent | BillingInvoice.MinimumMarginPercent |

BH Open Order Amount | BillingInvoice.OpenOrderAmount |

BH Other Add On Charges Total | BillingInvoice.OtherAddOnChargesTotal |

BH Proforma Prepay Amount | BillingInvoice.ProformaPrepayAmount |

BH Tax Total Base Amount | BillingInvoice.TaxTotalBaseAmount |

BH Tax Total Currency Amount | BillingInvoice.TaxTotal.TransactionAmount |

BH Tax Total Currency Rate | BillingInvoice.TaxTotal.BaseAmount.EnteredCurrencyRate |

BH Taxable Base Amount | BillingInvoice.DerivedTaxableTotalBaseAmount |

BH Taxable Total | BillingInvoice.TaxableTotal |

BH Terms Discount Base Amount | BillingInvoice.Terms DiscountBaseAmount |

BH Terms Discount Currency Amount | BillingInvoice.TermsDiscount.TransactionAmount |

BH Terms Discount Currency Rate | BillingInvoice.TermsDiscount.BaseAmount.EnteredCurrencyRate |

BH Total Add On Base Amount | BillingInvoice.TotalAddOnBaseAmount |

BH Total Goods Base Amount |
IF [Grain(Billing Invoice Line).Sum: BL Entered Price] IS NOT NULL THEN [BH Total Goods Base Amount] = [BL Billing Invoice.Total Inventory Goods Base Amount] + [BL Billing Invoice.Total Non Inventory Goods Base Amount] + [Grain(Billing Invoice Line).Sum: BL Entered Price] ELSE [BH Total Goods Base Amount] = [BL Billing Invoice.Total Inventory Goods Base Amount] + [BL Billing Invoice.Total Non Inventory Goods Base Amount] END IF |

BH Total Inventory Goods Base Amount | BillingInvoice.TotalInventoryGoodsBaseAmount |

BH Total Non Inventory Goods Base Amount | BillingInvoice.Total Non Inventory Goods Base Amount |

Line 1 Entered Price |
IF [Grain(Billing Invoice Line).Sum: BL Entered Price] IS NOT NULL THEN [Line 1 Entered Price] = [Grain(Billing Invoice Line).Sum: BL Entered Price] ELSE [Line 1 Entered Price] = 0 END IF |

Released Invoice Count |
IF [BL Billing Invoice.Status] != 'Unreleased' THEN [Released Invoice Count] = 1 ELSE [Released Invoice Count] = 0 END IF |

BL Add On Discount | BillingInvoiceLine.AddOnDiscount |

BL Allocated Discount | BillingInvoiceLine.AllocatedDiscount |

BL Commission Rate 1 | BillingInvoiceLine.CommissionRate1 |

BL Commission Rate 2 | BillingInvoiceLine.CommissionRate2 |

BL Commission Split Percentage | BillingInvoiceLine.CommissionSplitPercentage |

BL Current Cost | BillingInvoiceLine.CurrentCost |

BL Discount Amount 1 | BillingInvoiceLine.DiscountAccountArray.DiscountAccountGroup[1].DscAmt |

BL Discount Amount 2 | BillingInvoiceLine.DiscountAccountArray.DiscountAccountGroup[2].DscAmt |

BL Discount Amount 3 | BillingInvoiceLine.DiscountAccountArray.DiscountAccountGroup[3].DscAmt |

BL Discount Base Amounts | BillingInvoiceLine.DiscountBaseAmounts |

BL Entered Discount | BillingInvoiceLine.EnteredDiscount |

BL Entered Price | BillingInvoiceLine.EnteredPrice |

BL Gross Amount | BillingInvoiceLine.LineGrossAmount |

BL Gross Base Amount | BillingInvoiceLine.LineGrossBaseAmount |

BL Invoice Catch Weight Quantity | BillingInvoiceLine.InvoiceCatchWeightQuantity |

BL Line Net Amount Currency Rate | BillingInvoiceLine.LineNetAmount.BaseAmount.EnteredCurrencyRate |

BL Line Net Base Amount | BillingInvoiceLine.LineNetAmount_BaseAmount_EnteredCurrencyAmount |

BL Line Net Currency Amount | BillingInvoiceLine.LineNetAmount.TransactionAmount |

BL Line Total Base | ([BL Billing Invoice Line.Tax Total] + [BL Billing Invoice Line.Line Net Currency Amount]) * [BL Billing Invoice Line.Currency Rate] |

BL Price In Selling Unit Of Measure | BillingInvoiceLine.PriceInSellingUnitOfMeasure |

BL Quantity | BillingInvoiceLine.Quantity |

BL Sell To Stock | BillingInvoiceLine.SellToStock |

BL Selling Price | BillingInvoiceLine.SellingPrice |

BL Selling Price To Stock Conversion Factor | BillingInvoiceLine.SellingPriceToStockConversionFactor |

BL Tax Total | BillingInvoiceLine.TaxTotal |

BL Taxable Base Amount | BillingInvoiceLine.TaxableBaseAmount |

BL Taxable Base Currency Amount | BillingInvoiceLine.TaxableBaseCurrencyAmount |

BL Total Discount Base | ([BL Billing Invoice Line.Discount Amount 1] + [BL Billing Invoice Line.Discount Amount 2] + [BL Billing Invoice Line.Discount Amount 3]) * [BL Billing Invoice Line.Currency Rate] |

BL Unit Cost | BillingInvoiceLine.UnitCost |

BL Unit Price | BillingInvoiceLine.UnitPrice |