Sales

Edit and Reconcile a Saved Sale

Editing a saved sale is a financial and inventory correction, not a display-only change. Posnic rebuilds the sale from the submitted cart, adjusts tracked stock by line differences, updates its register entry and can change the period used by reports.

Menu path
Home -> Sales History -> select sale -> Edit
Verified from
Posnic demo and current POS source reviewed on 2026-09-08
Technical source evidence

frontend/modules/sales_read.html saved-sale selection and detail pane, frontend/static/script/js/modules/js/sales.js showEdit editItems dataEdit submission success routing and manager approval retry, api/src/controllers/sales.controller.js update access validation audit and approval boundary, api/src/services/sale.service.js edit document rebuild stock deltas register update and transaction handling, demo.posnic.io populated saved-sale edit captured on 2026-09-11

Verify the saved bill firstLive demo captured 2026-09-11. Open the exact bill and verify its customer, lines, total, payment and status before selecting Edit.
Edit the saved saleThe current edit workspace reloads the saved customer and item lines into the normal sale surface. The bill date is read-only; quantity, lines, notes, discounts and tender can be changed before Update.

Before You Edit

  • Prefer correcting the cart before the original sale is saved.
  • Use Edit only for a genuine correction to the same transaction; create a return or exchange when goods came back after completion.
  • Locate the exact Bill # in Sales History and open its invoice pane.
  • Verify customer, item lines, quantities, total, payment mode and status before selecting the pencil icon.
  • Record the reason and obtain manager authorization according to shop policy, especially after money or goods have changed hands.
  • Capture the original receipt or values when your audit policy requires before-and-after evidence.

Open the Edit Workspace

  1. Open Home, then Sales History.
  2. Search for the exact Bill # and select its row.
  3. Read the invoice pane and confirm it is not merely a similar total or customer.
  4. Select the Edit pencil. Sales Write permission is required.
  5. Wait for the customer and every saved item line to load.
  6. Confirm the heading says Edit Sale and the displayed total still matches the source bill before changing anything.

What You Can Change

AreaCurrent edit behaviorCheck before Update
CustomerThe saved customer fields are repopulated and can be replaced through the customer picker.Credit, wallet, GST identity and contact details belong to the intended customer.
ItemsAdd catalog items, remove existing lines or change quantities.Every tracked-item difference moves stock after a successful update.
PriceThe line pencil can change editable price values.Price overrides are written to the sale audit when they differ from the original.
DiscountLine discount and extra discount controls are available.A discount change is audited and can require manager approval.
TaxLine tax is rebuilt through the normal sale calculation.Confirm inclusive or exclusive treatment and the final tax amount.
NotesPayment, sale and discount notes can be changed.Write a concise correction reason without sensitive customer data.
PaymentPAY opens the normal tender flow and sends payment mode, multi-payment, partial balance, wallet and denomination values.Reconcile against money already collected; editing the label does not reverse an external card or UPI transaction.
DateThe normal saved-sale date field is read-only and the existing value is submitted.Reports using updated_date can still be affected because the record is rewritten with the submitted date value.

Update the Sale

  1. Make the smallest required correction.
  2. Recheck each line's quantity, unit, price, discount, tax and total.
  3. Confirm customer and note fields.
  4. Select PAY and reconcile the complete tender state, even when the correction appears item-only.
  5. If Posnic requests manager approval for a discount, provide an authorized PIN or card; the browser retries the update once with that approval token.
  6. Complete Update and wait for a success response.
  7. Posnic clears its item cache and returns a normal saved-sale edit to Sales History.
  8. Reopen the same Bill # and verify the corrected invoice.

Stock Consequences

ChangeTracked-stock actionStock log when enabled
Increase an existing quantitySubtract the positive quantity difference.Edit Sale with Subtract and the bill reference.
Reduce an existing quantityAdd the quantity difference back.Edit Sale with Add and the bill reference.
Add a new tracked itemSubtract its full submitted quantity.Edit Sale with opening and closing balances.
Remove a tracked itemAdd its old full quantity back.Edit Sale records the cancelled line difference.
Untracked itemNo inventory movement.No tracked-stock adjustment is expected.

Financial and Record Consequences

  • The existing sale document is updated in place; the human-readable Bill # is retained.
  • The sale process becomes Edit for a normal completed sale. A held sale is converted to Add, while dedicated KOT edit paths follow separate KOT rules.
  • Server-side totals are recalculated from normalized submitted items, with payload totals used only as fallback when server values are unavailable.
  • The linked register_sales entry is updated with the corrected total, discount, tax and payment information when a register ID is supplied.
  • Customer partial-payment or wallet transaction data can also be updated when the sale belongs to that flow.
  • The edit payload sets return totals, return tax, return discount and returned-item arrays back to empty or zero. Do not use Edit as a substitute for changing a completed return record.
  • The update emits sync activity after the sale is saved so offline/cloud copies can receive the corrected transaction.

Permissions, Approval and Audit

ControlEnforcementEvidence
Open source billSales Read permission.The original invoice and Bill #.
Submit editSales Write permission; missing permission returns 403.Updated sale with the same record ID.
Discount changeManager approval can be required by role policy.Discount audit event and approval context.
Price changeCompared with the original sale on the server.Price override audit event with changed lines.
Stock movementOnly tracked items move; detailed logging follows stock-management settings.Inventory Logs with Edit Sale reference.
Register movementExisting register entry is replaced when linked.Register session and close reconciliation.

Verify After Update

  1. Search the same Bill # in Sales History and open it.
  2. Compare customer, every line, subtotal, discount, tax, total and payment with the intended correction.
  3. Open Inventory Logs and verify one Explainable Edit Sale delta for every tracked item changed.
  4. Check the current register and payment reports for the corrected tender and amount.
  5. Check customer dues or wallet when partial payment or customer balance was involved.
  6. Check price-change and discount audit records when those values changed.
  7. Print or share a replacement receipt only after the corrected bill passes these checks.

Troubleshooting

ProblemCheckAction
Edit pencil is absent or disabledSales Write permission and whether the record is already a return contextAsk an authorized role; do not work around access with a duplicate sale.
At least one valid sale item requiredWhether every line was removed or became invalidKeep the required corrected lines or use the return/void workflow.
Discount needs manager approvalRole discount policy and changed discount valuesObtain a valid manager approval and submit once.
Stock changed unexpectedlyOld versus new quantities, track_inventory and duplicate item linesReconcile Inventory Logs against the exact Bill # and each item delta.
Tender no longer matches the processorEdited payment mode versus external card, UPI or gateway settlementCorrect the POS record under policy and reconcile the external transaction separately.
Return information disappearedWhether Edit was used on a returned transactionUse return-specific history and audit evidence; Edit resets return-specific fields in the submitted update.
Sale moved into a different report periodWhich report filters date versus updated_dateReconcile the original business date and the report's eligibility field.
Update succeeded but item search looks staleWhether the client cache refreshedReturn to Sales History or reload; successful edits clear the item cache.