diff --git a/app/Http/Controllers/Customers/Payments.php b/app/Http/Controllers/Customers/Payments.php index f908a29e4..8ddadde3e 100644 --- a/app/Http/Controllers/Customers/Payments.php +++ b/app/Http/Controllers/Customers/Payments.php @@ -23,7 +23,7 @@ class Payments extends Controller { $payments = Payment::with(['account', 'category'])->where('customer_id', '=', Auth::user()->customer->id)->paginate(); - $payment_methods = Modules::getPaymentMethods(); + $payment_methods = Modules::getPaymentMethods('all'); $categories = collect(Category::enabled()->type('income')->pluck('name', 'id')) ->prepend(trans('general.all_type', ['type' => trans_choice('general.categories', 2)]), ''); diff --git a/app/Http/Controllers/Expenses/Vendors.php b/app/Http/Controllers/Expenses/Vendors.php index 829f6682c..6b06d28be 100644 --- a/app/Http/Controllers/Expenses/Vendors.php +++ b/app/Http/Controllers/Expenses/Vendors.php @@ -166,4 +166,11 @@ class Vendors extends Controller return response()->json($vendor); } + + public function vendor(Request $request) + { + $vendor = Vendor::create($request->all()); + + return response()->json($vendor); + } } diff --git a/app/Http/Controllers/Incomes/Customers.php b/app/Http/Controllers/Incomes/Customers.php index dc0e3841c..8ed42c8aa 100644 --- a/app/Http/Controllers/Incomes/Customers.php +++ b/app/Http/Controllers/Incomes/Customers.php @@ -213,4 +213,11 @@ class Customers extends Controller return response()->json($customer); } + + public function customer(Request $request) + { + $customer = Customer::create($request->all()); + + return response()->json($customer); + } } diff --git a/app/Utilities/Modules.php b/app/Utilities/Modules.php index 9d773da17..f36adb8ce 100644 --- a/app/Utilities/Modules.php +++ b/app/Utilities/Modules.php @@ -11,14 +11,14 @@ use App\Events\PaymentGatewayListing; class Modules { - public static function getPaymentMethods() + public static function getPaymentMethods($type = null) { $payment_methods = Cache::get('payment_methods.admin'); $customer = auth()->user()->customer; - if ($customer) { + if ($customer && $type != 'all') { $payment_methods = Cache::get('payment_methods.customer'); } @@ -38,7 +38,7 @@ class Modules continue; } - if ($customer && empty($gateway['customer'])) { + if (($customer && empty($gateway['customer'])) && $type != 'all') { continue; } diff --git a/modules/OfflinePayment/Resources/lang/en-GB/offlinepayment.php b/modules/OfflinePayment/Resources/lang/en-GB/offlinepayment.php index 9b702ed82..541a5c57c 100644 --- a/modules/OfflinePayment/Resources/lang/en-GB/offlinepayment.php +++ b/modules/OfflinePayment/Resources/lang/en-GB/offlinepayment.php @@ -10,4 +10,7 @@ return [ 'order' => 'Order', 'payment_gateways' => 'Offline Payment Methods', + 'confirm' => 'Confirm', + 'loading' => 'Loading', + ]; diff --git a/resources/lang/en-GB/bills.php b/resources/lang/en-GB/bills.php index 407cfc8e5..60a32652f 100644 --- a/resources/lang/en-GB/bills.php +++ b/resources/lang/en-GB/bills.php @@ -27,6 +27,8 @@ return [ 'download_pdf' => 'Download PDF', 'send_mail' => 'Send Email', + 'create_vendor' => 'Vendor Create', + 'status' => [ 'draft' => 'Draft', 'received' => 'Received', diff --git a/resources/lang/en-GB/invoices.php b/resources/lang/en-GB/invoices.php index 7f52a170f..3aa7bc692 100644 --- a/resources/lang/en-GB/invoices.php +++ b/resources/lang/en-GB/invoices.php @@ -27,6 +27,8 @@ return [ 'download_pdf' => 'Download PDF', 'send_mail' => 'Send Email', + 'create_customer' => 'Customer Create', + 'status' => [ 'draft' => 'Draft', 'sent' => 'Sent', diff --git a/resources/views/customers/invoices/show.blade.php b/resources/views/customers/invoices/show.blade.php index c4a9cf3be..f693346b7 100644 --- a/resources/views/customers/invoices/show.blade.php +++ b/resources/views/customers/invoices/show.blade.php @@ -142,17 +142,20 @@