accountingSalesReceiptsCreate
Creates sales receipts for what shipped within a date range and is not yet on a invoice or sales receipt.
Each unbilled shipment gets its own sales receipt, dated to the day it shipped. Orders are processed as background jobs, so completion is asynchronous. Nothing is sent to the accounting integration.
Business Rules
- The date range spans at most 31 days and cannot end in the future
- At least one sales channel is required
- Dates use the company timezone, defaulting to UTC
- Shipped shipments use their ship date, falling back to shipment creation date when the ship date is missing, for range selection and receipt dating
- Quantities already on an invoice or a sales receipt are left out, so running the same range again creates receipts only for what is still missing
Error Scenarios
- **
VALIDATION**: the date range is invalid, no sales channel was given, or a sales channel does not belong to the company
Permissions Required
accounting:create_order_financial
accountingSalesReceiptsCreate(
input: AccountingSalesReceiptsCreateInput!
): AccountingSalesReceiptsCreatePayload
Arguments
accountingSalesReceiptsCreate.input ● AccountingSalesReceiptsCreateInput! non-null input common
Parameters for AccountingSalesReceiptsCreate
Type
AccountingSalesReceiptsCreatePayload object common
Autogenerated return type of AccountingSalesReceiptsCreate.