code for import receipts

This commit is contained in:
Steve Ng
2023-10-16 10:25:02 +08:00
parent 72f4fee864
commit 4ceeb6a317
5 changed files with 124 additions and 37 deletions
@@ -61,7 +61,7 @@ class ExportCustomersToExcelController
public function invoiceTransactions(Request $request){
$exportsTransactions = new ExportsInvoiceTransactions($request);
$response = $exportsTransactions->download('invoice-transactions.xls', Excel::XLS, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
$response = $exportsTransactions->download(($request->input('type') == 'invoices' ? 'invoice-transactions' : 'receipt-transactions').'.xls', Excel::XLS, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
ob_end_clean();
return $response;
}
@@ -79,7 +79,7 @@ class ExportCustomersToExcelController
}
public function importedInvoiceMapped(ExportsImportedInvoiceMappeds $exportsImportedInvoiceMappeds, Request $request) {
$response = $exportsImportedInvoiceMappeds->download('InvoiceMapped.xls', Excel::XLS, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
$response = $exportsImportedInvoiceMappeds->download($request->input('fileName').'.xls', Excel::XLS, ['Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet']);
ob_end_clean();
return $response;
}