Invoice upload by robot

This commit is contained in:
2026-02-14 00:04:00 +01:00
parent 4f4dff2edd
commit 2b458eccd7
15 changed files with 278 additions and 6 deletions

View File

@@ -39,6 +39,10 @@ class InvoiceRepository {
return $invoices;
}
public function getUnexportedInvoices() : Collection {
return Invoice::where(['tenant' => app('tenant')->slug, 'status' => InvoiceStatus::INVOICE_STATUS_EXPORTED, 'upload_required' => true])->get();
}
public function getByStatus(CostUnit $costUnit, string $status, bool $forDisplay = true) : array {
$returnData = [];
foreach ($costUnit->invoices()->where('status', $status)->get() as $invoice) {