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');