mirror of
https://github.com/Karaka-Management/oms-Shop.git
synced 2026-01-11 18:48:41 +00:00
update
This commit is contained in:
parent
ef17a40bbe
commit
a60249050e
|
|
@ -79,18 +79,12 @@ final class ApiController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle private files
|
|
||||||
// @todo this is another example where it would be useful to have clients and items as models in the bill and bill element
|
|
||||||
/** @var \Modules\ClientManagement\Models\Client $client */
|
|
||||||
$client = ClientMapper::get()
|
|
||||||
->where('account', $request->header->account)
|
|
||||||
->execute();
|
|
||||||
|
|
||||||
// @todo only for sales invoice, currently also for offers
|
// @todo only for sales invoice, currently also for offers
|
||||||
/** @var \Modules\Billing\Models\Bill[] $bills */
|
/** @var \Modules\Billing\Models\Bill[] $bills */
|
||||||
$bills = BillMapper::getAll()
|
$bills = BillMapper::getAll()
|
||||||
|
->with('client')
|
||||||
->with('elements')
|
->with('elements')
|
||||||
->where('client', $client->id)
|
->where('client/account', $request->header->account)
|
||||||
->where('status', BillStatus::ARCHIVED)
|
->where('status', BillStatus::ARCHIVED)
|
||||||
->where('elements/item', $request->getDataInt('item'))
|
->where('elements/item', $request->getDataInt('item'))
|
||||||
->execute();
|
->execute();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user