Wizard on Invoice and Bill work flow
This commit is contained in:
@ -14,6 +14,7 @@ use App\Models\Expense\BillStatus;
|
||||
use App\Models\Expense\Vendor;
|
||||
use App\Models\Expense\Bill;
|
||||
use App\Models\Expense\BillItem;
|
||||
use App\Models\Expense\BillItemTax;
|
||||
use App\Models\Expense\BillTotal;
|
||||
use App\Models\Expense\BillHistory;
|
||||
use App\Models\Expense\BillPayment;
|
||||
@ -224,7 +225,7 @@ class Bills extends Controller
|
||||
|
||||
if ($bill_item_taxes) {
|
||||
foreach ($bill_item_taxes as $bill_item_tax) {
|
||||
$bill_item_tax['invoice_item_id'] = $bill_item_created->id;
|
||||
$bill_item_tax['bill_item_id'] = $bill_item_created->id;
|
||||
|
||||
BillItemTax::create($bill_item_tax);
|
||||
|
||||
@ -460,7 +461,7 @@ class Bills extends Controller
|
||||
|
||||
if ($bill_item_taxes) {
|
||||
foreach ($bill_item_taxes as $bill_item_tax) {
|
||||
$bill_item_tax['invoice_item_id'] = $bill_item_created->id;
|
||||
$bill_item_tax['bill_item_id'] = $bill_item_created->id;
|
||||
|
||||
BillItemTax::create($bill_item_tax);
|
||||
|
||||
@ -548,7 +549,7 @@ class Bills extends Controller
|
||||
\Excel::create('bills', function ($excel) {
|
||||
$bills = Bill::with(['items', 'histories', 'payments', 'totals'])->filter(request()->input())->get();
|
||||
|
||||
$excel->sheet('invoices', function ($sheet) use ($bills) {
|
||||
$excel->sheet('bills', function ($sheet) use ($bills) {
|
||||
$sheet->fromModel($bills->makeHidden([
|
||||
'company_id', 'parent_id', 'created_at', 'updated_at', 'deleted_at', 'attachment', 'discount', 'items', 'histories', 'payments', 'totals', 'media'
|
||||
]));
|
||||
|
Reference in New Issue
Block a user