Record charges, invoice the customer, and bill vendors¶
Guide information
Requirements
This tutorial requires the installation of the following applications/modules:
Freight Forwarder Management (installs Logistics Accounting automatically)
Freight Sale - the shipment in this guide comes from a sales order, and the customer invoice is created through it.
Freight Booking & Purchase Integration - the vendor bills of a shipment are created from its purchase orders (see Buy subcontracted services with purchase orders). It may install automatically when its dependencies are present; check Installed Apps.
Every shipment carries two financial sides: what Hai Long Logistics charges the customer (sell) and what it pays carriers, agents and terminals (buy). A missing cost line, or a cost left blank, does not just look wrong on screen - it lets a shipment close as profitable when it is not, and the gap only surfaces once a real vendor invoice arrives. The main carriage charge already carries both prices (see Book carrier space for a shipment leg); this guide adds the remaining charges, puts them on the sales order, checks the resulting gross profit, and creates the draft documents Accounting posts. For terms such as THC or D/O, see the Freight forwarding glossary.
Running scenario: Hai Long Logistics has confirmed the booking for Nhat Long Footwear’s 2 x 40HC shipment, Hai Phong Port to Port of Los Angeles, carrier ONE Line, Incoterm CFR (Port of Los Angeles), Freight Prepaid. The sales order S00001 is in USD, and the company currency is VND, so the totals of the shipment read in VND at a rate of 26,000 VND per USD. The Charges tab has one Ocean Freight - FCL line with both prices; Tuan (Accounting) adds the local charges and checks gross profit, Lan (Sales) puts the local charges on the sales order, Minh (Operations) raises the purchase orders, and Tuan creates the customer invoice. A Purchase user creates the vendor bills from the confirmed purchase orders, and Tuan posts them.
Role handoff in this example: Sales/Pricing confirms the agreed customer selling prices; Operations confirms supplier costs; Tuan (Accounting) records the approved charge amounts, prepares the draft invoice and posts the vendor bills that a Purchase user creates from the confirmed purchase orders. Your approval process may assign data entry differently.
Before you start¶
The shipment is Confirmed and its booking is confirmed - the Charges tab only appears once the shipment has left Draft (see Book carrier space for a shipment leg).
To edit charges on any shipment you need User: All Shipments (User: Own Shipments only edits the shipments you are responsible for, see Grant freight access by role).
The customer invoice is created through the sales order, so Create Customer Invoice is shown to users with a Sales access right (here Tuan has Sales: User: All Documents), and Add to Sales Order to Sales users such as Lan. Creating the vendor bills is a Purchase-side action: Create Bills sits on the Purchase Orders list, so it needs access to the Purchase app (Minh or a buyer has it, Tuan does not). Tuan then posts the draft bills with the Accounting access right Invoicing. The Draft Invoices / Draft Bills buttons need Invoicing (or higher), while Customer Invoices / Vendor Bills only need read access to accounting. Your administrator sets all of these under .
Step 1: Check the Ocean Freight line¶
The Ocean Freight - FCL line came from the sales order and already carries its cost, so this step is a check, not data entry - a blank cost price here quietly overstates gross profit.
Go to and open the shipment for Nhat Long Footwear. Open the Charges tab.
On the Ocean Freight - FCL row, check:
Unit Price: 2,150 (USD) - the price sold to Nhat Long Footwear. It is read-only because the line belongs to the sales order.
Cost Price: 1,850 (USD) - the buy rate of ONE Line’s rate card.
Qty: 2.
Buy Cost Status: Estimated - the cost comes from the vendor rate card and is not yet confirmed by a vendor bill.
Note
If this shipment had been created directly, without a sales order, this line would instead show Unit Price = 0.00 and you would have to enter the sell price yourself - see Known limitations.
Tip
Step 1 is done when: the Ocean Freight - FCL row shows Unit Price = 2,150 USD and Cost Price = 1,850 USD on the same row - not two separate rows.
Step 2: Add the local charges¶
Ocean freight is not the only cost on this shipment - a missing local charge makes gross profit look better than it really is.
Before adding a line, decide which price combination fits it:
Type |
Use when |
What changes |
|---|---|---|
Buy + Sell (both charges below) |
The customer is charged and a vendor or agent is paid for the same service |
Both Unit Price and Cost Price are set; the charge counts toward both Total Revenue and Total Cost |
Sell-only |
The customer is charged and no vendor is involved |
Vendor/Agent stay empty, only Unit Price is set |
Buy-only |
The supplier cost is known and Sales has approved that the customer will not be charged |
Set Vendor or Agent, Currency and Qty; enter the known Cost Price and explicitly set Unit Price to 0 after selecting the product |
Enter the buy rate in Cost Price and set Vendor or Agent and the currency. Use Unit Price = 0 only if the customer will not be charged, as agreed by Sales or under company pricing policy. Use Buy + Sell when Sales/Pricing has approved a customer price.
Warning
A line with a Vendor but an empty Cost Price gets the Buy Cost Status Missing buy cost: the sell price never stands in for the missing buy price, so the shipment shows no profit on that line and the Charges tab warns you (see Step 4). Fill in both prices on every Buy + Sell line.
A newly selected charge may still show Unit Price 0.00, or the product’s list price. Replace it with the agreed customer price before the charge goes on the sales order, otherwise the customer is billed that price.
See also
The buy and sell rate cards these prices come from are set up before any shipment exists - see Maintain carrier rates and vessel schedules.
On the Charges tab, click Add a line and fill in:
Charge: Terminal Handling Charge (THC) - HPH (the product catalog also holds other port-specific THC products, see Set up freight services and local charges), Vendor: ONE Line (the carrier collects the origin THC), Currency: VND, Qty: 2, Unit Price: 3,200,000, Cost Price: 2,800,000.
Charge: Delivery Order (D/O) Fee, Vendor: Pacific Coast Forwarding Agency, Inc., Currency: USD, Qty: 1, Unit Price: 180, Cost Price: 150.
Note
Each charge line has its own Currency field. A new line takes the currency of the shipment’s sales order (USD here), so change the THC line to VND before entering its prices; do not type a USD amount into a line still set to VND. The two lines you just added are highlighted: they are not on the sales order yet (Step 5).
Tip
Step 2 is done when: the Charges tab has exactly 3 rows (Ocean Freight - FCL, THC, D/O Fee) and no row shows Amount = 0 that you did not intend.
Step 3: Read Total Revenue, Total Cost and Gross Profit¶
This is the number that decides whether the shipment is profitable - read it before generating any invoice or bill.
Above the charge table, Total Revenue, Total Cost and Gross Profit show every line in the company currency (VND in this guide). Total Revenue reads the lines of the sales order and adds the charges that are not on an order yet, Total Cost reads the vendor bills that are posted and, until then, the best estimate. A line in another currency is converted at the exchange rate of that line’s own document date: the invoice date (sell side) or the bill date (cost side) once it is posted, otherwise the booking date, otherwise the date the charge was created. The totals therefore do not change from one day or user to the next. With 1 USD = 26,000 VND on those dates, the three lines of this shipment add up as follows:
Figure |
Calculation |
Result |
|---|---|---|
Total Revenue |
111,800,000 (4,300 USD) + 6,400,000 (THC) + 4,680,000 (180 USD) |
122,880,000 VND |
Total Cost |
96,200,000 (3,700 USD) + 5,600,000 (THC) + 3,900,000 (150 USD) |
105,700,000 VND |
Gross Profit |
122,880,000 - 105,700,000 |
17,180,000 VND |
Warning
Two things to keep separate here. First, if the exchange rate configured on this instance is not 26,000 VND/USD, these three figures will not match this guide’s numbers - that is not a bug, only a different rate. Second, a line that is not yet posted is converted at the booking date’s rate; when Accounting posts the customer invoice or vendor bill, the line is converted again at the posted document’s date, which can give a slightly different figure. Treat the figure as a working estimate until the invoice and bills are posted.
Tip
Step 3 is done when: Gross Profit reads 17,180,000 VND, positive, and consistent with the buy/sell spread agreed with Nhat Long Footwear.
Step 4: Handle the missing buy cost warning, if it appears¶
If a booking is confirmed but the carrier’s rate card has no rate for the lane, the charge keeps a Cost Price of 0 and its Buy Cost Status reads Missing buy cost. Viindoo does not let that zero inflate the gross profit unnoticed: a red banner above the charge table reads “Some charges have no buy cost yet.”
The figure below is not the Nhat Long shipment: it comes from a second export shipment (SHP/2610/00009) booked with a carrier that has no rate card.
The figure below is not the Nhat Long shipment: it comes from a second export shipment (SHP/2610/00009) booked with a carrier that has no rate card.
When a cost is worked out at the time you read the tab (for example a booking floor or a quotation buy price) instead of coming from a buy price on the charge or a vendor bill, a yellow banner starts with “This gross profit includes a cost worked out at read time” and asks you to review the buy rate before relying on the margin.
Important
The estimate is used only for the Gross Profit display. Enter the real buy rate from the vendor on the charge, or on the draft vendor bill when it arrives: a charge bought at a zero price is created on the purchase order at 0 with a note asking you to price it before you confirm.
Tip
Step 4 is done when: no charge shows Missing buy cost and the banners are gone, or you understand the current Gross Profit is a working estimate, not a confirmed number.
Step 5: Put the local charges on the sales order¶
The customer is invoiced from the sales order, so a charge Tuan typed on the shipment reaches the invoice only after it sits on that order.
Lan (Sales) opens the shipment and clicks Add to Sales Order in the header. The Add to Sales Order window lists the charges that are not on an order yet, ticked under Apply: the THC (2.00 Container) and the D/O Fee (1.00 Shipment). Joins Order Line stays empty, so each charge becomes a new line of S00001. Unit Price reads 0.00 in USD, and Ops Price shows the price Operations typed on the charge, converted to the order currency: 123.08 for the THC (3,200,000 VND at 26,000) and 180.00 for the D/O Fee. Click Confirm, then enter the agreed Unit Price on each new order line: 123.076923 USD per container for the THC and 180 USD for the D/O Fee.
Note
A line created from a charge takes its price from the pricelist, not from the price Operations typed, so do not skip the price check: the sales order is what the customer sees. Once a charge is on the order, its Unit Price, Currency and Charge are read-only on the Charges tab and the Sale Order column shows S00001.
Tip
Step 5 is done when: the Charges tab shows S00001 in the Sale Order column of all three rows, and the order totals USD 4,726.15 (4,300 + 246.15 + 180). Total Revenue now reads 122,879,900 VND, because the revenue comes from the order lines.
Step 6: Create the customer invoice¶
This creates a draft only - posting it and issuing the VAT e-invoice required under Vietnamese tax law happens afterward, in Accounting, outside the Freight app.
Tuan clicks Create Customer Invoice. The button opens the standard Create invoice(s) window of Sales, for the orders of this shipment that still have something to invoice. Keep Regular invoice and click Create Draft.
The invoice follows the sales order, so there is one draft invoice in the currency of the order, not one per currency: Nhat Long Footwear, USD: Ocean Freight - FCL (4,300) + THC (246.15) + D/O Fee (180) = 4,726.15 USD before tax. The THC, priced in VND on the charge, is already converted to USD on the order line. The Draft Invoices button at the top of the shipment lists it.
Note
To get an invoice in another currency, put those charges on a separate sales order, as the trucking order in Buy subcontracted services with purchase orders.
Tip
Step 6 is done when: exactly one draft invoice exists for Nhat Long Footwear for 4,726.15 USD, and the Draft Invoices button counts 1.
Step 7: Raise the purchase orders and create the vendor bills¶
A vendor bill comes from a purchase order. The shipment’s Charges tab has no Create Vendor Bill button, so the cost side takes three actions: raise the POs, confirm them, create the bills.
Minh (Operations) clicks Create Purchase Orders on the Charges tab. It buys every charge that is not yet on a purchase order, as draft POs grouped by (vendor, currency). The ONE Line PO in USD for the ocean freight is raised from the booking with Generate PO (see Buy subcontracted services with purchase orders); this click adds the ONE Line, VND PO for the THC and the Pacific Coast Forwarding Agency, Inc., USD PO for the D/O Fee. The shipment’s chatter lists the POs it created.
A buyer with the Purchase: User access right opens each draft PO under and clicks Confirm Order. Where the company requires approval above a limit, the PO waits for a Purchase manager first.
A user with Purchase access (Minh or the buyer) selects the three confirmed POs in the same list and clicks Create Bills. Tuan then opens the three draft bills, sets the Bill Date and posts them.
ONE Line is the vendor on both the Ocean Freight - FCL line and the THC line, but in two different currencies, so this run creates three draft bills, not two:
ONE Line, USD: Ocean Freight - FCL cost = 3,700 USD before tax.
ONE Line, VND: THC cost = 5,600,000 VND before tax.
Pacific Coast Forwarding Agency, Inc., USD: D/O Fee cost = 150 USD before tax.
Note
The Bills list displays signed accounting amounts, so these vendor bills appear as negative amounts. That sign alone does not mean they are refunds. Open the bill to check its document type and positive total; the profitability report records its posted cost as a positive amount.
Note
Three kinds of charge never reach a purchase order. On-behalf charges are not bought from a vendor, so they are left out (and an on-behalf line with no partner yet does not generate a purchase order). A charge already on a purchase order, a draft, posted or cancelled bill is skipped, so the vendor is never paid twice for the same cost. Costs split from a consolidated master shipment (see Allocate shared master costs to house shipments) carry no vendor on the house: the carrier is bought and billed once, on the master shipment, and a house grouped under a master has no Create Purchase Orders button.
Tip
Step 7 is done when: exactly three draft bills exist, as listed above - Ocean Freight - FCL and THC do NOT merge into one bill even though both name ONE Line as vendor, because their currencies differ. Once a bill is posted, its charge reads Buy Cost Status Confirmed by vendor bill and the profit counts the cost of the bill.
Known limitations¶
Step |
What Viindoo does today |
What you do instead |
|---|---|---|
Step 1 (shipment created directly, no sales order) |
The auto-generated Ocean Freight line always has Unit Price = 0.00 |
Treat “enter the sell price” as a required step after opening the Charges tab |
Step 5 (price of the new order line) |
A line created with Add to Sales Order takes its price from the pricelist, so it can read 0.00 or the list price, not the price Operations typed on the charge |
Enter the agreed Unit Price on each new order line before you create the invoice |
Step 6-7 (VAT e-invoice) |
Create Customer Invoice and Create Bills only create a draft invoice or bill |
Post the draft, then issue the VAT e-invoice through your accounting software - outside the Freight app |
Troubleshooting¶
Create Customer Invoice reports an error¶
Symptom: “The sales orders of this shipment have nothing left to invoice.”
Cause: every order of the shipment is fully invoiced, or the charge you expect to bill is not on an order yet.
Fix: if the charge is not on the order, put it there first with Add to Sales Order (or Create Quotation when the shipment has no order yet), set its Unit Price, then click Create Customer Invoice again.
Create Purchase Orders reports an error¶
Symptom: “No charge of <shipment> is left to order …”, followed by the reason.
Cause: every charge is already on a purchase order or a bill, has only an Agent, or has no Vendor.
Fix: follow the reason in the message; the shipment’s chatter names the charges that were left out. Fill in the Vendor of a charge you want to buy.
Create Bills reports an error¶
Symptom: “Purchase order <number> is not confirmed yet or waits for approval …” or “There is no line left to bill on the selected purchase orders.”
Cause: the order was not confirmed yet (or waits for a Purchase manager’s approval), or all its lines are already billed.
Fix: confirm the order, or get it approved, then click Create Bills again. If no line is left to bill, check that the charge is not already on another bill.
Fewer charges appear on the order than expected¶
Symptom: clicking Create Purchase Orders produces a draft order with 1-2 fewer lines than expected.
Cause: the missing charge is on-behalf, or it already sits on a draft, posted or cancelled vendor bill or purchase order, so Viindoo leaves it out rather than pay the vendor twice for the same debt. The shipment’s chatter says why.
Fix: do not add the line back by hand. If it must be bought on a new document, release it on the document that carries it first (see “A charge cannot be deleted” below).
A charge cannot be deleted¶
Symptom: deleting a charge line shows an error that names a customer invoice, vendor bill or purchase order.
Cause: a charge that sits on an invoice, a bill or a purchase order cannot be deleted, even on a draft or an RFQ. A Master shipment’s ocean freight charge that was already allocated to house shipments cannot be deleted either.
Fix: follow the message: remove the line from the document that carries it (or delete the whole draft document), then delete the charge. To change an allocated Master charge, run Allocate Costs again (see Allocate shared master costs to house shipments).
A vendor’s real invoice does not match the recorded Cost Price¶
Symptom: ONE Line’s real invoice for the ocean freight differs from the 1,850 USD/container Cost Price on the charge line (a rate change, or a surcharge such as a GRI).
Cause: Cost Price is looked up from the rate card at booking confirmation and does not refresh later when the rate card changes or a surcharge is added.
Fix: correct Cost Price on the charge before you confirm the purchase order, or correct the price on the draft bill line when the bill is already created. Once the bill is posted, the charge reads the amount of the bill (Cost for Profit) and Buy Cost Status reads Confirmed by vendor bill.
See also
Related articles
Book carrier space for a shipment leg - confirming the booking that fills in the Ocean Freight line used in this guide