Home / Sankhya work

Workforce outsourcing, SQL Server, 2026

Contract billing, from proposal to invoice

An outsourcing company bills every month for each assigned worker, plus payroll charges, fees and taxes. This used to go through spreadsheets at several steps. Now the price is set in the proposal, carried into the contract, calculated monthly from payroll and timesheets, turned into orders and service invoices and audited in a single dashboard, all inside Sankhya.

50+custom tables
20+procedures
15+triggers
6billing sources
  1. 1ProposalPrice per role, with gross-up
  2. 2ContractHeadcount, assignments and adjustments
  3. 3Monthly calculationPayroll, timesheets, work orders and pass-throughs
  4. 4InvoicingBilling lines, orders and service invoices
  5. 5AnalysisConsolidation and audit

What each stage solves

1. Proposal

Pricing instead of the sales spreadsheet

A screen calculates the cost of each role and the final contract price: salary, allowances, benefits, uniforms and safety gear, equipment with depreciation, housing and vehicles. Payroll charge tables by employment type and tax tables by margin band are kept as master data.

  • Change a rate or an item and every total is recalculated instantly.
  • Proposal versions with history and an approval flow.
  • A button that validates the approved proposal and creates the contract.
The core rule: gross-up
(Base + Payroll charges + Operating fee) ÷ (1 − %Admin − %Profit − %Taxes)
Base (salary and allowances)R$ 2,000.00
+ Payroll charges 70%R$ 1,400.00
+ Operating fee 5%R$ 170.00
÷ (1 − 8% − 10% − 14.25%)÷ 0.6775
Billed amountR$ 5,269.37

Illustrative example.

2. Contract

Contract linked to HR, no retyping

The contract always points to the final proposal version and follows the employee records. When HR changes someone's assignment, the link moves to the right contract on its own.

  • Contracted headcount compared with who is assigned to each role.
  • Index-based adjustments create a new proposal version with updated amounts.
  • Housing with check-in and check-out control and an overbooking lock.
3. Monthly calculation

An engine that assembles everything billed in the month

A procedure walks through active contracts and feeds six billing sources: personnel (from payroll), timesheet overages, housing work orders, additional services, pass-through of expenses already paid and fixed contract amounts.

  • Supplies prorated by hiring and termination dates.
  • Billing month kept separate from payroll month, for contracts billed in advance or in arrears.
  • Running again updates what changed, without duplicating or touching what was already billed.
4. Invoicing

Two-phase billing, through to the service invoice

One button turns the calculation into reviewable billing lines, traceable down to the employee. Another creates orders by source and document type (service invoice or debit note) with taxes calculated, and the invoices go on to confirmation and NFS-e issuance with receivables created alongside.

  • Validates operation type, product and template before saving, and says where to fix the setup.
  • Summary per order with a direct link to the invoice in the ERP.
  • When there is nothing to bill, it explains why instead of showing "0 orders".
5. Analysis

Billing consolidation dashboard

A dashboard inside the ERP shows, by contract and source, what still needs to be generated, what is pending and what has been billed. It also compares proposal, contract, calculated and billed amounts down to the role, supply item or receivable.

  • Setup alerts: proposal not approved, role outside the proposal, more people assigned than positions.
  • Pass-through audit: expenses paid with no contract or with a mismatched fee.
  • Export of pending items to CSV.

Results

What changed for the billing team.

No spreadsheet in between

From the price sold to the invoice issued, every figure is calculated in the ERP.

Reruns are safe

Running again fixes what changed and preserves what was already billed.

Every amount has a source

From the contract total down to the employee, supply item or expense.

History preserved

Rates and charges have effective dates, so past months remain queryable.