Description
Count floor(returned/packSize) packs, retain leftover units and credit whole packs*price*(1-restockingFraction).
Agribusiness records use explicit price bases, commissions, returns, minimum charges, credits and tax assumptions. A supplied arithmetic rule can reconcile a scenario while actual acceptance, contractual rights and legal liability require the governing agreement. Signed residual balances can be useful evidence of overpayment or inconsistent inputs.
Count floor(returned/packSize) packs, retain leftover units and credit whole packs*price*(1-restockingFraction).
When to use this tool
Use Input Dealer Credit Note Quantity when checking the stated caller-defined price, fee, return or settlement convention.
How to use the tool and how it works
- Enter returned, packSize, pricePerPack, restockingFraction. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read wholePacks, remainderUnits, credit. Use the output convention below.
Require whole returned>=0 and packSize>=1, nonnegative pack price and restocking fraction in [0,1]. Count floor(returned/packSize) packs, retain leftover units and credit whole packs*price*(1-restockingFraction).1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| returned | Returned | Required. Safe integer; minimum 0. |
| packSize | Pack Size | Required. Safe integer; minimum 1. |
| pricePerPack | Price Per Pack | Required. Finite number; minimum 0. |
| restockingFraction | Restocking Fraction | Required. Finite number; minimum 0; maximum 1. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| wholePacks | Whole Packs | Required. Safe integer. |
| remainderUnits | Returned units outside complete packs; no credit is assigned to this remainder. | Required. Safe integer. |
| credit | Credit | Required. Finite number. |
{
"input": {
"returned": 25,
"packSize": 10,
"pricePerPack": 40,
"restockingFraction": 0.1
},
"output": {
"wholePacks": 2,
"remainderUnits": 5,
"credit": 72
}
} Limitations and assumptions
- Partial packs earn no credit under this convention; actual return acceptance and contractual rights are not determined.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Inspect original transaction records and applicable contracts/tax rules with the responsible financial/legal professionals for actual settlement or enforcement.
References
Similar or alternative tools
- Farm Market Unsold Return Credit
Return unaccounted units, delivered*unitPrice, returned*returnCredit and invoice-credit.
- Crate Deposit Reuse Credit
Charge only newly deposited issues, credit all returns and report the signed difference.