laravel-shop/tests/Feature
Fabian @ Blax Software c170595ac8 feat(ledger): VAT per ledger row from Stripe's own data
stripe_transactions gets a nullable `tax` column: the VAT inside the
row's amount, in signed cents like amount, NULL = unknown.

- Charges/payments: the charge's invoice tax (tax, else total_tax_amounts
  / total_taxes) pro-rated by captured amount over invoice total, so a
  partly credit-paid invoice counts only the cash part; without an invoice,
  the Checkout Session of the payment intent (total_details.amount_tax).
- refund, payment_refund, payment_failure_refund, refund_failure carry the
  same share of the charge's VAT as their amount, signed like it.
- Fees, payouts, transfers, disputes and PayPal rows stay NULL.
- syncLedgerForCharge expands charge.invoice (falls back without it on API
  versions that lack Charge.invoice). A charge and its refunds share one
  lookup; refunds reuse the charge's ledger row; a re-import keeps a known
  value without a Stripe call. Stripe holding no VAT data is marked
  meta.tax_source=none and not asked again. A failed lookup leaves NULL and
  never breaks the import.
- shop:import-stripe-ledger --backfill-tax [--dry-run] [--since] [--recheck]
  and Shop::backfillLedgerTax() fill missing VAT read-only, idempotently.
- ledgerTotals, revenueLedgerByDay, ledgerTotalsByAccount and
  customerLedgerTotals gain a `tax` key (SUM(COALESCE(tax,0))); existing
  keys unchanged. Before the migration runs, rows save without tax and
  tax reads 0.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-02 12:10:11 +01:00
..
Booking BF edgecases, R structure, A tests 2026-05-18 13:05:38 +02:00
Cart IAM "max usage" feature 2026-05-19 14:01:52 +02:00
Checkout fix(stripe): name Checkout lines after the product, options only when there are some 2026-09-25 13:02:03 +02:00
Http BF edgecases, R structure, A tests 2026-05-18 13:05:38 +02:00
Ledger feat(ledger): VAT per ledger row from Stripe's own data 2026-11-02 12:10:11 +01:00
Loan R loan purchase to physical loan, A physical loan stuff 2026-05-17 15:20:58 +02:00
Pool feat: Enhance traits with strict types and improve method signatures 2026-05-15 20:26:24 +02:00
Pricing I loanable product type, tiered pricing, lifecycle events, host helpers 2026-05-15 10:27:59 +02:00
Product R loan purchase to physical loan, A physical loan stuff 2026-05-17 15:20:58 +02:00
ProductionBugs BF pool cart bug, R structure 2025-12-30 10:55:06 +01:00
Seats feat(seats): assignable license seats — buy N, assign/reassign/reclaim per user 2026-07-29 10:07:58 +02:00
ShopServiceProvider feat(i18n,stripe): de/pl translations + order address snapshots from Checkout Session 2026-09-21 13:39:40 +02:00
Stripe BF pool cart bug, R structure 2025-12-30 10:55:06 +01:00
Subscriptions feat(cost): royalty / minimum-licence-fee margin (Aircademy-style) 2026-08-28 16:03:04 +02:00
CommandActionsTest.php BF commands, A command tests, I traits 2026-05-17 13:25:34 +02:00
CommandAvailabilityTest.php A events, IA commands 2026-05-17 11:24:43 +02:00
CommandCleanupCartsTest.php BF commands, A command tests, I traits 2026-05-17 13:25:34 +02:00
CommandListProductsTest.php BF commands, A command tests, I traits 2026-05-17 13:25:34 +02:00
CommandListPurchasesTest.php BF commands, A command tests, I traits 2026-05-17 13:25:34 +02:00
CommandListTest.php BF commands, A command tests, I traits 2026-05-17 13:25:34 +02:00
CommandProductExamplesTest.php BFI cart single item 2025-12-24 19:40:10 +01:00
CommandReinstallTest.php BF commands, A command tests, I traits 2026-05-17 13:25:34 +02:00
CommandReleaseExpiredStocksTest.php BF commands, A command tests, I traits 2026-05-17 13:25:34 +02:00
CommandStatsTest.php BFI commands, A test 2026-05-17 14:09:03 +02:00
CommandStocksTest.php A events, IA commands 2026-05-17 11:24:43 +02:00
EventsWiredUpTest.php feat(fulfillment): add model-agnostic PurchaseCompleted event 2026-06-02 11:19:21 +02:00
GetHasMoreAttributeTest.php BFRI cart 2025-12-28 11:12:58 +01:00
HasShoppingCapabilitiesTest.php BFI cart / orders 2026-01-05 10:30:21 +01:00
NextAvailableAtTest.php BF commands, A command tests, I traits 2026-05-17 13:25:34 +02:00
ShopFacadeTest.php BFI cart single item 2025-12-24 19:40:10 +01:00