Skip to main content

Charge codes: setting them up

A charge code is a charge or a discount that is not a product: freight, handling, a pallet fee, a rush fee, a returned-payment fee, a deal on the whole order. Each code says, once:

  • what the charge earns into;
  • how it is taxed;
  • which invoice bills it when an order ships in parts;
  • the amount offered when somebody picks it.

A line that names a code copies these when it is keyed. Changing a code later changes nothing on orders and invoices already keyed.

Charge codes are part of receivables, so they are there whenever invoices are. There is no app to switch on.

Settings → Charge codes is the screen (/settings/charge-types), under Sales → Configure next to order types:

  • Opening it needs charge_type.read; changing anything needs charge_type.manage.
  • Switched-off codes show when Show switched-off codes is on.
  • Add charge code asks for the code and the name customers read, then the rest.
  • A code you added can be deleted. A product code (see below) can only be switched off.

What a new company starts with​

Every company starts with these codes. They are a starting list: rename, re-map, switch off or add to them.

CodeNameEarns into
FREIGHTFreightFreight recovered (4270)
DELIVERYDeliveryFreight recovered (4270)
FUELFuel surchargeFreight recovered (4270)
HANDLINGHandlingHandling charges (4280)
SMALL_ORDERSmall order feeOrder fees (4290)
PALLETPallet feeOrder fees (4290)
CODCash on delivery feeOrder fees (4290)
RUSHRush order feeOrder fees (4290)
INSURANCEShipping insuranceOrder fees (4290)
RESTOCKRestocking fee (product)Restocking fees (4310)
NSFReturned payment fee (product)Returned payment fees (4320)
LATE_FEELate payment fee (product)Finance charge income
DISCOUNTDiscountReduces sales revenue
COUPONCouponReduces sales revenue

Product codes are written by the product itself:

  • LATE_FEE is put on the lines of finance-charge invoices.
  • RESTOCK and NSF are set aside for restocking and returned-payment fees.

They can be renamed, re-mapped or switched off, but not deleted.

What a code holds​

FieldWhat it does
CodeLetters, digits and underscores; what imports and people name it by. Never changes once added.
NameWhat the customer reads on the line. A line keyed with this code and no description takes it.
KindCharge adds to what the customer owes. Discount takes off it and is spread over the other lines, lowering their tax.
Earns intoThe income role the charge posts to. If the role has no account mapped yet, the charge earns into Other sales income (4250) instead, so an invoice is never stopped. Map the role under Accounting → Chart → Roles.
Or this accountAn income account of your own, used instead of the role's.
Billed onWhen an order ships in parts: the first invoice, the last invoice, each invoice, its share, each invoice, its shipments' actual freight, or every delivery, in full (the whole charge once for each shipment an invoice bills: a handling or delivery fee per drop). Empty follows the company setting sales.charges.bill_on. A charge rule can name its own.
Tax categoryThe tax category the charge is taxed as. Empty is not taxed.
Default amountOffered when somebody picks the code. They can change it on the line.
Default percent of goodsOr offer a percentage of the goods instead of an amount: a 10% loyalty discount, a 2% handling fee. The line keeps the percentage and is worked out again on the goods whenever they change. A code offers an amount or a percentage, not both: setting one empties the other.
Shown to buyers by nameWhether the storefront may name this charge to a buyer.
Used onSales, Supplier bills, or Sales and supplier bills. Freight in and freight out can share one code. Sales screens offer only the codes for sales; a supplier bill offers only the codes for supplier bills. A discount is always a sales code, and the product's own codes (restocking, late and returned-payment fees) can be used on supplier bills only as well as on sales.
On a supplier bill, costs toFor a code used on supplier bills: the expense role (or an asset role, such as inventory, for freight you capitalise) a supplier's charge with this code costs to. Empty is Purchase expense.
OnA code switched off is not offered for new lines. Orders already keyed with it are still invoiced, and invoices already keyed with it can still be credited.

A supplier's own charges​

On a supplier bill with no order behind it, Supplier's charge keys the freight, fuel or handling the supplier billed under one of your codes: pick the code, type the amount, Add charge. On a carrier's bill, type the shipment number in For shipment as well, and the freight recovery report takes that shipment's cost from the bill. The line takes the code's name and costs to what the code says. A line keeps the role it was keyed with, so changing the code later does not change bills already keyed.

Your codes for freight, delivery, fuel, handling, pallets and shipping insurance start out used on both sides; every other code starts as a sales code.

In your customers' languages​

Translations, in a code's drawer, gives its name in other languages (it needs the right to translate). A line for a customer whose documents print in that language says the translated name: a Mexican customer's freight line reads Flete when you have given Spanish, the Mexican Spanish first where you have given that too. A customer with no language, or one you have not translated into, reads the name as you typed it, and a description typed on the line always wins.

Which invoice bills a charge​

An order's charge lines are never picked or shipped, so invoicing an order from its shipments decides where they go:

  • The first invoice: the whole charge, on the first invoice for the order's goods.

  • The last invoice: the whole charge, on the invoice after which every goods line is billed or let go.

  • Each invoice, its share: each invoice takes the charge times the share of the goods' value it bills, to the cent. The invoice that completes the goods takes what is left, so the parts always add up.

    For example, $25 of freight on $100 of goods shipped as $40 and then $60 is billed as $10 and then $15.

Each charge also takes its share of any discount on the order, the same way.

Billing the actual freight​

With Billed on set to each invoice, its shipments' actual freight (on the code, or for every code with sales.charges.bill_on), the order's freight is an estimate. Each invoice bills what its shipments actually cost to send, as recorded on the shipment under Weight and freight, plus sales.freight.actual_markup_percent (0 by default: the cost exactly). A shipment whose cost is not recorded yet bills its share of the estimate, so nothing goes unbilled. Record the cost before the shipment is invoiced: one recorded after is not billed again, and shows on the freight recovery report.

Charges and fees income​

Sales → Charges and fees lists what each charge code billed on posted invoices over a period, what credit memos gave back on the same code, and the net, by code, customer or month. Drafts do not count until they are posted, and a line with no code is not listed. It needs the right to read invoices. The assistant answers the same question by code. Click a column to sort by it (the amounts sort by what they are worth), and Export saves the table as a spreadsheet.

How discounts post​

Every kind of discount has a home in the ledger:

DiscountNet (as shipped)Gross
A product line's discountRevenue is booked after itRevenue at the price before it; the discount debited to Sales discounts (4900)
A discount line (deal, promotion code, rule, % of goods)Debits Sales revenueDebits Sales discounts, or the discount code's own account
A document discountComes off Sales revenueDebits Sales discounts
An early-payment discount taken on a receiptSettlement discounts given (6450), an expenseThe same

Choose under Settings → Receivables → Post discounts (receivables.discount_posting). Gross keeps "gross sales, less discounts" in the ledger, as SAP's sales deductions and NetSuite's discount items do, and is what an auditor asks for when discounts are material (ASC 606 / IFRS 15 treat them as a reduction of the transaction price; the contra account shows by how much). The receivable and the tax are the same either way: tax is always on the discounted price. Gross needs the Sales discounts role mapped to an account (Accounting → Chart → Roles; account 4900 has it in a new company); until it is, invoices post net rather than being refused, and the ledger health check names the role. A credit memo reverses the same way, and a restocking fee kept back from a credit is income under its own code, never a discount. Changing the setting restates nothing already posted.

To report promotions apart from other discounts, give the COUPON code (or the discount code a promotion code names) its own contra-revenue account: its lines post there, gross or net.

Discounts given​

Sales → Discounts given (/sales/discounts-given) answers "what did we give away" over a period, from posted invoices, credit memos and receipts:

  • line discounts: the percentage off a product's line;
  • each discount code: deals under DISCOUNT, promotion codes under COUPON, discounts added by rule, percentages of the goods;
  • document discounts: an invoice's own header amount;
  • early-payment discounts taken on receipts.

Shown by source, customer or month, with what credit memos took back and the net. A fee kept back from a credit memo (the restocking fee) is income, not a discount, and is left out. It needs customer_invoice.read, and exports to Excel.

Freight recovery​

Sales → Freight recovery sets what customers were charged for freight against what the carriers charged, over a period, by customer, carrier or month. Charged is what posted invoices billed on the codes that earn into Freight recovered, less credit memos. Cost is what the carrier billed for each shipment where its posted bill names the shipment (From carrier bills), less any credit from the carrier; otherwise the freight cost recorded on the shipment. A shipment with neither is counted under No cost recorded, not as free. A carrier's bill in another currency than the order's is not converted: the shipment's own figure stands. It needs the right to read invoices.

To tie a carrier's bill to a shipment, key its freight with Supplier's charge and type the shipment number the carrier's invoice quotes in For shipment. The line shows For shipment … under its description. Only a charge keyed under a code can name a shipment.

Freight on an invoice​

Freight on an invoice is a Freight line: add it in Adjustments with the Freight code, or send it as the invoice's freight through the API, and it lands on that line. It posts to the account the Freight code earns into and is taxed by its tax category, like any other charge. Clones and recurring invoices copy it as a Freight line. If you switch the Freight code off, freight sent as the invoice's freight goes back to the old field under the subtotal, which is never taxed.

Taxing a charge​

Choose a tax category on the code. Whether freight is taxable in a state is that state's rule for the category, from your tax packs and tax codes:

  • Taxable in a state: a category the state's sales tax reaches, for example one of your own called Freight that the state's catch-all rule covers.
  • Exempt in a state: a category the state exempts.
  • Never taxed: leave the category empty.

If tax.require_a_rule is on, a category with no rule at all in the state an order ships to is refused, as for a product. Add a rule (taxable or exempt) for it under Tax → Tax codes.

Who can do what​

PermissionRolesAllows
charge_type.readManager, Sales, AccountingSee the codes; pick one on a line
charge_type.manageManager, AccountingAdd, change, switch off, delete

How it interacts with other settings​

  • sales.charges.bill_on (Sales settings): the billing for a charge whose code says none, and for charge lines with no code.
  • Storefront delivery fee: a web order's delivery fee is a charge line named by the storefront's checkout.delivery_fee_label. It has no code, so it follows sales.charges.bill_on.
  • Restocking fees on returns are worked out by returns.restocking_fee_percent (and the rate for the return's reason), and kept back from the return's credit under the code in returns.restocking_fee_code, RESTOCK unless you change it. The fee takes the credit down, earns into that code's account (Restocking fees, 4310), and shows as billed under the code on the charges and fees report. returns.restocking_fee_minimum sets the smallest fee charged.

Common mistakes​

  • Mapping a role to an expense account. Only income accounts are offered. A charge earns income.
  • Expecting a code change to fix an order already taken. Lines copied the code when they were keyed. Change the line, or credit and re-bill.
  • Choosing a tax category no tax code covers. With tax.require_a_rule on, orders to states with no rule for it are refused until a rule is added.