fixing the structure of export receipt to autocount and import receipt to exchange map failed

This commit is contained in:
Steve Ng
2023-10-29 08:44:31 +08:00
parent f47c3c9ecc
commit 5b681ac8c0
6 changed files with 158 additions and 22 deletions
@@ -17,6 +17,7 @@ use Illuminate\Support\Facades\Auth;
use Maatwebsite\Excel\Excel;
use App\Classes\Modules\Exports\Services\ExportsImportedInvoiceMappeds;
use App\Models\TransactionMappingLog;
use App\Classes\Modules\Exports\Services\ExportsReceiptTransactions;
class ExportCustomersToExcelController
{
@@ -61,7 +62,14 @@ class ExportCustomersToExcelController
public function invoiceTransactions(Request $request){
$exportsTransactions = new ExportsInvoiceTransactions($request);
$response = $exportsTransactions->download(($request->input('type') == 'invoices' ? 'invoice-transactions' : 'receipt-transactions').'.xls', Excel::XLS, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
$response = $exportsTransactions->download('invoice-transactions.xls', Excel::XLS, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
ob_end_clean();
return $response;
}
public function receiptTransactions(Request $request){
$exportsTransactions = new ExportsReceiptTransactions($request);
$response = $exportsTransactions->download('receipt-transactions.xls', Excel::XLS, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
ob_end_clean();
return $response;
}