mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-23 14:33:59 +00:00
E-Invoice - API, Sales Invoice Report (update to exclude data that is marked not to be imported)
This commit is contained in:
@@ -61,8 +61,13 @@ class DateRange implements Filter
|
||||
ApprovalStatus::SUSPENDED,
|
||||
])
|
||||
->where(function ($q) use ($startDate, $endDate) {
|
||||
$q->where(function ($q) {
|
||||
$q->whereDoesntHave('company', function ($query) {
|
||||
$query->where('debtor', 'N/A NO NEED TO IMPORT');
|
||||
});
|
||||
})
|
||||
// Bookings without refunds
|
||||
$q->where(function ($q1) use ($startDate, $endDate) {
|
||||
->where(function ($q1) use ($startDate, $endDate) {
|
||||
$q1->where('status', ApprovalStatus::COMPLETED)
|
||||
->whereHas('transactions', function ($query) use ($startDate, $endDate){
|
||||
$query->payments()
|
||||
|
||||
@@ -77,8 +77,13 @@ class DateRangeNoData implements Filter
|
||||
ApprovalStatus::SUSPENDED,
|
||||
])
|
||||
->where(function ($q) use ($startDate, $endDate) {
|
||||
$q->where(function ($q) {
|
||||
$q->whereDoesntHave('company', function ($query) {
|
||||
$query->where('debtor', 'N/A NO NEED TO IMPORT');
|
||||
});
|
||||
})
|
||||
// Bookings without refunds
|
||||
$q->where(function ($q1) use ($startDate, $endDate) {
|
||||
->where(function ($q1) use ($startDate, $endDate) {
|
||||
$q1->where('status', ApprovalStatus::COMPLETED)
|
||||
->whereHas('transactions', function ($query) use ($startDate, $endDate){
|
||||
$query->payments()
|
||||
|
||||
@@ -78,8 +78,13 @@ class DateRangeWithData implements Filter
|
||||
ApprovalStatus::SUSPENDED,
|
||||
])
|
||||
->where(function ($q) use ($startDate, $endDate) {
|
||||
$q->where(function ($q) {
|
||||
$q->whereDoesntHave('company', function ($query) {
|
||||
$query->where('debtor', 'N/A NO NEED TO IMPORT');
|
||||
});
|
||||
})
|
||||
// Bookings without refunds
|
||||
$q->where(function ($q1) use ($startDate, $endDate) {
|
||||
->where(function ($q1) use ($startDate, $endDate) {
|
||||
$q1->where('status', ApprovalStatus::COMPLETED)
|
||||
->whereHas('transactions', function ($query) use ($startDate, $endDate){
|
||||
$query->payments()
|
||||
|
||||
Reference in New Issue
Block a user