Conflict resolutions:
- composer.lock: regenerated via composer update
- Language/**/Config.php (10 files): kept branch's table_polling_frequency_*
keys; took master's removal of English placeholders in non-EN locales
- Controllers/Customers.php: kept branch's batch-queue import body; applied
master's getInfo/saveCustomer PSR renames to surrounding methods
- Jobs/Support/CustomerCsvRowProcessor.php: save_customer → saveCustomer
(PSR rename from master, missed by auto-merge)
- Models/Stock_location.php: took all master PSR renames and new
setDefaultLocation/saveSortOrder/sort_order logic; re-applied branch's
?int $personId = null param to getUndeletedAll and get_allowed_locations
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Introduce a CashupAmounts transfer object and break down large Cashups
controller methods into focused private helpers. Includes a breaking
change to constructor parameter order.
- Add CashupAmounts (TransferObjects/Cashups) to bundle open/transfer/
closed cash, due, card, and check amounts; reorder constructor params
to cash-before-due sequence
- Replace positional _calculate_total() with calculateTotal(CashupAmounts),
eliminating argument-order errors
- Decompose getView() into buildEmployeeLookup(), normalizeCashupInfo(),
initializeNewCashup(), isPendingClose(), closeCashup(),
buildReportDateRangeInputs(), applyPaymentTotals(), subtractCashExpenses()
- Decompose postSave() with parseCashupDate() and getCashupAmountsFromPost()
helpers; update both CashupAmounts call sites to new param order
- Rename snake_case vars/params to camelCase throughout Cashups controller
- Drop stale TODO comments in OSPOS.php and Cashups::getIndex filter block
- Scope escape => false to cashup_headers() note column rather than a
broad regex exclusion in transform_headers()
- Add CashupFixtureTrait and ExpenseFixtureTrait under tests/Support;
tighten cashup view test to assertSeeInField on specific form fields
BREAKING CHANGE: CashupAmounts constructor positional argument order
changed — closedAmountCash now precedes closedAmountDue; any callers
passing positional args must swap those two arguments.
Signed-off-by: objecttothis <17935339+objecttothis@users.noreply.github.com>
Adds DatabaseBootstrapTrait and OsposConfigFixtureTrait to replace
duplicated per-file setUp()/tearDown() bootstrap and OSPOS config mock
boilerplate across test classes, bringing them in line with the
ItemsControllerTest gold-standard shape.
Fixes the real root cause of tabular_helperTest's suite-order-dependent
failure: dropAllForeignKeyConstraints()/foreignKeyExists()/
dropColumnIfExists() temporarily blank the shared connection's DBPrefix
via overridePrefix() but never restored it if the query between the two
calls threw (e.g. migration_helperTest's mocked-failure tests) -
permanently corrupting prefixed table lookups for the rest of the
process. Wrapped each in try/finally. Also widens executeScript() to
accept an explicit connection so migration SQL can't silently run
against the wrong DB group.
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
These landed on master by accident via a local branch that was
mistakenly created tracking OpensourcePOS/master directly, rather than
pushed as its own branch. Reverting to restore master to its prior
state; the reverted work will come back through a proper PR instead.
This reverts commit 00bf4cb8af.
This reverts commit 37cc1b15e7.
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Adds DatabaseBootstrapTrait and OsposConfigFixtureTrait to replace
duplicated per-file setUp()/tearDown() bootstrap and OSPOS config mock
boilerplate across test classes, bringing them in line with the
ItemsControllerTest gold-standard shape.
Fixes the real root cause of tabular_helperTest's suite-order-dependent
failure: dropAllForeignKeyConstraints()/foreignKeyExists()/
dropColumnIfExists() temporarily blank the shared connection's DBPrefix
via overridePrefix() but never restored it if the query between the two
calls threw (e.g. migration_helperTest's mocked-failure tests) -
permanently corrupting prefixed table lookups for the rest of the
process. Wrapped each in try/finally. Also widens executeScript() to
accept an explicit connection so migration SQL can't silently run
against the wrong DB group.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Add import_batch_contexts table plus ImportBatchContext model so
per-batch data (e.g. Items CSV attribute definitions) is stored
once and referenced by context_id, instead of duplicated into
every queued row's job payload.
- Extend queue_jobs, queue_jobs_failed, and new queue_paused_jobs
tables with batch_id/context_id columns and FKs (ON DELETE
RESTRICT) back to import_batch_contexts, so context rows cannot
be purged while any job still references them.
- Introduce ImportBatchService.pushRow() to centralize queuing a
batch row with batch/context stamping and priority; update
Customers and Items controllers to use it instead of calling
importBatch->create() and queue->push() separately.
- Add queue_paused_jobs table and Jobs::postPauseJobs()/pauseQueues()
to move pending jobs out of queue_jobs into a paused table per
queue (all core queues or a selected subset), leaving in-flight
jobs untouched (issue #3833 pause/resume design).
- Change Jobs::getEditJob()/postSaveJob() routes to accept separate
source/id path segments instead of a combined uid string.
- Add test coverage for ImportBatchContext, ImportBatchService, and
ImportBatch (including purge-retains-while-referenced guards).
Signed-off-by: objecttothis <17935339+objecttothis@users.noreply.github.com>