Skip to main content

Fuel Bill / Expense Bill

Fuel Bill / Expense Bill records vehicle fuel and operational expense bills. It captures vehicle/partner/account context, amount, bill date, evidence, branch/company data, transport linkage, and retry behavior for integration failures.

App Entry Points

AppTarget
MobileExpenseBillList -> ExpenseBillDetail
POS TerminalexpenseBill -> ExpenseBillDetailForm

Workflow

Data And API Rules

Form Validation And List Actions

ActionGuard / behavior
CreateRequires expense-bill create authority; Terminal additionally requires main-branch context unless the configured override applies.
Vehicle/account/companySelectors populate both codes and display names used by the payload and integration.
Company codeMust be BFPDB, BFP, NFFDB, or NFF (case-insensitive); other values show validation and stop submission.
EvidenceEvidence is part of the record lifecycle; deleting/replacing it must be followed by a server refresh.
Delete from listPermission-guarded, confirmed, and executed against the existing bill id.
RetryUses the failed bill id and must not create a duplicate accounting document.
Transport launchSuccessful save marks the fuel task handled on the linked transport before returning.
RuleBehavior
List sourceTerminal split list calls /bills with selected branchId, pageLimit: 200, ignoreDraft: true.
DedupeExpense bill list dedupes by billId, falling back to billNo.
Create/updateDetail form creates or updates expense bill payloads.
Company codeBefore saving, only BFPDB, BFP, NFFDB, or NFF is accepted. Other values, such as warehouse code SSK, are not sent to the API.
Transport company contextA new transport starts with BFPDB; selecting a vehicle uses the vehicle company code as the transport company before opening the fuel-bill form.
Transport linkWhen launched from transport, saving can update transport gas/fuel flags.
RetryRetry uses existing bill id to avoid duplicate expense records.
EvidenceSlip/photo/evidence belongs to the bill record and must refresh from server after save.

Permissions And Guards

TopicBehavior
Terminal menu keyexpenseBill
deptCode menu set-2, 1, 2, 3, 4, 7, 29, 21, 8, 9, 13, 16, 14, 27, 30
Branch ruleMain branch only in Terminal config (requiresMainBranch = true).
Create guardCreate button uses canCreateExpenseBill(...).

Mobile vs POS Terminal

TopicMobilePOS Terminal
NavigationExpense bill stack list/detailHomeScreen split-pane menu key expenseBill
DetailFull-screen expense bill formExpenseBillDetailForm
Vehicle/accountMobile form selectorsTerminal detail selectors/panels
RetryDetail/list actionSplit list/detail action

Developer Handoff Map

AreaCode
Mobile list/detailapps/mobile/src/screens/expenseBillStack/expenseBillListScreen, expenseBillDetailScreen
Terminal detailapps/pos-terminal/src/screens/HomeScreen/ExpenseBillDetailForm.tsx, ExpenseBillPanels.tsx
Serviceapps/*/src/services/expenseBill.ts / expense bill service module
Transport dependencyTransportDetailForm.tsx, transport update service