mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
Merge branch 'dillon/90-e-invoice-f-2' into vapor/development
This commit is contained in:
@@ -92,14 +92,14 @@ class DateRangeNoData implements Filter
|
||||
$q->where('created_at', '<', '2025-07-01 00:00:00');
|
||||
});
|
||||
})
|
||||
->whereHas('transactions', function ($query) {
|
||||
$query->where('type', TransactionType::INVOICE)
|
||||
->whereDoesntHave('attributesKVP', function ($invoiceQuery) {
|
||||
$invoiceQuery->where('key', KVPKey::AUTOCOUNT_DOCNO_INVOICE);
|
||||
->where(function ($query){
|
||||
$query
|
||||
->whereDoesntHave('transactions.attributesKVP', function ($subQuery) {
|
||||
$subQuery->where('key', KVPKey::AUTOCOUNT_DOCNO_INVOICE);
|
||||
})
|
||||
->whereDoesntHave('attributesKVP', function ($subQuery) {
|
||||
$subQuery->where('key', KVPKey::AUTOCOUNT_DOCNO_INVOICE);
|
||||
});
|
||||
})
|
||||
->whereDoesntHave('attributesKVP', function ($invoiceQuery) {
|
||||
$invoiceQuery->where('key', KVPKey::AUTOCOUNT_DOCNO_INVOICE);
|
||||
});
|
||||
})
|
||||
// OR bookings with refunds
|
||||
@@ -119,14 +119,15 @@ class DateRangeNoData implements Filter
|
||||
$q->where('created_at', '<', '2025-07-01 00:00:00');
|
||||
});
|
||||
})
|
||||
->whereHas('transactions', function ($query) {
|
||||
$query->where('type', TransactionType::INVOICE)
|
||||
->whereDoesntHave('attributesKVP', function ($invoiceQuery) {
|
||||
$invoiceQuery->where('key', KVPKey::AUTOCOUNT_DOCNO_INVOICE);
|
||||
->where(function ($query){
|
||||
$query
|
||||
->whereDoesntHave('transactions.attributesKVP', function ($subQuery) {
|
||||
$subQuery->where('key', KVPKey::AUTOCOUNT_DOCNO_INVOICE);
|
||||
})
|
||||
|
||||
->whereDoesntHave('attributesKVP', function ($subQuery) {
|
||||
$subQuery->where('key', KVPKey::AUTOCOUNT_DOCNO_INVOICE);
|
||||
});
|
||||
})
|
||||
->whereDoesntHave('attributesKVP', function ($invoiceQuery) {
|
||||
$invoiceQuery->where('key', KVPKey::AUTOCOUNT_DOCNO_INVOICE);
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user