Invoice upload by robot

This commit is contained in:
th.guenther committed 2026-02-14 00:04:00 +01:00
1 parent 4f4dff2edd
commit 2b458eccd7
15 files changed
+278 -6

No files matched your search

+4
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) {