From 731be89883f2cf86aecb0193368d55729ffd62b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Mon, 23 Oct 2017 19:17:21 +0300 Subject: [PATCH] close #58 Fixed: Bill & Invoice payment delete not working --- resources/views/customers/invoices/show.blade.php | 2 +- resources/views/expenses/bills/show.blade.php | 2 +- resources/views/incomes/invoices/show.blade.php | 2 +- routes/web.php | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/views/customers/invoices/show.blade.php b/resources/views/customers/invoices/show.blade.php index e4b5fc52d..9d6927521 100644 --- a/resources/views/customers/invoices/show.blade.php +++ b/resources/views/customers/invoices/show.blade.php @@ -228,7 +228,7 @@ {!! Form::open([ 'id' => 'invoice-payment-' . $payment->id, 'method' => 'DELETE', - 'url' => ['incomes/invoices/paymentDestroy', $payment->id], + 'url' => ['incomes/invoices/payment', $payment->id], 'style' => 'display:inline' ]) !!} {!! Form::button(' ' . trans('general.delete'), array( diff --git a/resources/views/expenses/bills/show.blade.php b/resources/views/expenses/bills/show.blade.php index 36b6d31f8..bdad1bb82 100644 --- a/resources/views/expenses/bills/show.blade.php +++ b/resources/views/expenses/bills/show.blade.php @@ -229,7 +229,7 @@ {!! Form::open([ 'id' => 'bill-payment-' . $payment->id, 'method' => 'DELETE', - 'url' => ['expenses/bills/paymentDestroy', $payment->id], + 'url' => ['expenses/bills/payment', $payment->id], 'style' => 'display:inline' ]) !!} {!! Form::button(' ' . trans('general.delete'), array( diff --git a/resources/views/incomes/invoices/show.blade.php b/resources/views/incomes/invoices/show.blade.php index bc54be783..583e86cc1 100644 --- a/resources/views/incomes/invoices/show.blade.php +++ b/resources/views/incomes/invoices/show.blade.php @@ -232,7 +232,7 @@ {!! Form::open([ 'id' => 'invoice-payment-' . $payment->id, 'method' => 'DELETE', - 'url' => ['incomes/invoices/paymentDestroy', $payment->id], + 'url' => ['incomes/invoices/payment', $payment->id], 'style' => 'display:inline' ]) !!} {!! Form::button(' ' . trans('general.delete'), array( diff --git a/routes/web.php b/routes/web.php index f614b803a..500b775de 100644 --- a/routes/web.php +++ b/routes/web.php @@ -47,7 +47,7 @@ Route::group(['middleware' => 'language'], function () { Route::get('invoices/{id}/print', 'Incomes\Invoices@printInvoice'); Route::get('invoices/{id}/pdf', 'Incomes\Invoices@pdfInvoice'); Route::post('invoices/payment', 'Incomes\Invoices@payment'); - Route::delete('invoices/{id}/paymentDestroy', 'Incomes\Invoices@paymentDestroy'); + Route::delete('invoices/payment/{payment}', 'Incomes\Invoices@paymentDestroy'); Route::resource('invoices', 'Incomes\Invoices'); Route::resource('revenues', 'Incomes\Revenues'); }); @@ -57,7 +57,7 @@ Route::group(['middleware' => 'language'], function () { Route::get('bills/{id}/print', 'Expenses\Bills@printBill'); Route::get('bills/{id}/pdf', 'Expenses\Bills@pdfBill'); Route::post('bills/payment', 'Expenses\Bills@payment'); - Route::delete('bills/{id}/paymentDestroy', 'Expenses\Bills@paymentDestroy'); + Route::delete('bills/payment/{payment}', 'Expenses\Bills@paymentDestroy'); Route::resource('bills', 'Expenses\Bills'); Route::get('vendors/currency', 'Expenses\Vendors@currency'); Route::resource('vendors', 'Expenses\Vendors');