fixed #391
This commit is contained in:
parent
409f83ae54
commit
474cf929e6
@ -509,14 +509,14 @@ class Bills extends Controller
|
|||||||
|
|
||||||
$excel->sheet('invoices', function($sheet) use ($bills) {
|
$excel->sheet('invoices', function($sheet) use ($bills) {
|
||||||
$sheet->fromModel($bills->makeHidden([
|
$sheet->fromModel($bills->makeHidden([
|
||||||
'company_id', 'parent_id', 'created_at', 'updated_at', 'deleted_at', 'attachment', 'discount', 'items', 'payments', 'totals', 'media'
|
'company_id', 'parent_id', 'created_at', 'updated_at', 'deleted_at', 'attachment', 'discount', 'items', 'histories', 'payments', 'totals', 'media'
|
||||||
]));
|
]));
|
||||||
});
|
});
|
||||||
|
|
||||||
$tables = ['items', 'histories', 'payments', 'totals'];
|
$tables = ['items', 'histories', 'payments', 'totals'];
|
||||||
foreach ($tables as $table) {
|
foreach ($tables as $table) {
|
||||||
$excel->sheet('bill_' . $table, function($sheet) use ($bills, $table) {
|
$excel->sheet('bill_' . $table, function($sheet) use ($bills, $table) {
|
||||||
$hidden_fields = ['id', 'company_id', 'created_at', 'updated_at', 'deleted_at'];
|
$hidden_fields = ['id', 'company_id', 'created_at', 'updated_at', 'deleted_at', 'title'];
|
||||||
|
|
||||||
$i = 1;
|
$i = 1;
|
||||||
foreach ($bills as $bill) {
|
foreach ($bills as $bill) {
|
||||||
|
@ -530,14 +530,14 @@ class Invoices extends Controller
|
|||||||
|
|
||||||
$excel->sheet('invoices', function($sheet) use ($invoices) {
|
$excel->sheet('invoices', function($sheet) use ($invoices) {
|
||||||
$sheet->fromModel($invoices->makeHidden([
|
$sheet->fromModel($invoices->makeHidden([
|
||||||
'company_id', 'parent_id', 'created_at', 'updated_at', 'deleted_at', 'attachment', 'discount', 'items', 'payments', 'totals', 'media'
|
'company_id', 'parent_id', 'created_at', 'updated_at', 'deleted_at', 'attachment', 'discount', 'items', 'histories', 'payments', 'totals', 'media'
|
||||||
]));
|
]));
|
||||||
});
|
});
|
||||||
|
|
||||||
$tables = ['items', 'histories', 'payments', 'totals'];
|
$tables = ['items', 'histories', 'payments', 'totals'];
|
||||||
foreach ($tables as $table) {
|
foreach ($tables as $table) {
|
||||||
$excel->sheet('invoice_' . $table, function($sheet) use ($invoices, $table) {
|
$excel->sheet('invoice_' . $table, function($sheet) use ($invoices, $table) {
|
||||||
$hidden_fields = ['id', 'company_id', 'created_at', 'updated_at', 'deleted_at'];
|
$hidden_fields = ['id', 'company_id', 'created_at', 'updated_at', 'deleted_at', 'title'];
|
||||||
|
|
||||||
$i = 1;
|
$i = 1;
|
||||||
foreach ($invoices as $invoice) {
|
foreach ($invoices as $invoice) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user