moved core modules to separate repositories
This commit is contained in:
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Abstracts;
|
||||
|
||||
use App\Models\Document\Document;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Document
|
||||
*/
|
||||
abstract class DocumentModel extends Document
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Purchase;
|
||||
|
||||
use App\Events\Document\DocumentCancelled;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentCancelled
|
||||
*/
|
||||
class BillCancelled extends DocumentCancelled
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Purchase;
|
||||
|
||||
use App\Events\Document\DocumentCreated;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Document
|
||||
*/
|
||||
class BillCreated extends DocumentCreated
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Purchase;
|
||||
|
||||
use App\Events\Document\DocumentCreating;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentCreating
|
||||
*/
|
||||
class BillCreating extends DocumentCreating
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Purchase;
|
||||
|
||||
use App\Events\Document\DocumentReceived;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentReceived
|
||||
*/
|
||||
class BillReceived extends DocumentReceived
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Purchase;
|
||||
|
||||
use App\Events\Document\DocumentRecurring;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentRecurring
|
||||
*/
|
||||
class BillRecurring extends DocumentRecurring
|
||||
{
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Purchase;
|
||||
|
||||
use App\Events\Document\DocumentReminded;
|
||||
use App\Models\Document\Document;
|
||||
use App\Notifications\Purchase\Bill as Notification;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentReminded
|
||||
*/
|
||||
class BillReminded extends DocumentReminded
|
||||
{
|
||||
public function __construct(Document $document)
|
||||
{
|
||||
parent::__construct($document, Notification::class);
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Purchase;
|
||||
|
||||
use App\Events\Document\DocumentUpdated;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentUpdated
|
||||
*/
|
||||
class BillUpdated extends DocumentUpdated
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Purchase;
|
||||
|
||||
use App\Events\Document\DocumentUpdating;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentUpdating
|
||||
*/
|
||||
class BillUpdating extends DocumentUpdating
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Sale;
|
||||
|
||||
use App\Events\Document\DocumentCancelled;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentCancelled
|
||||
*/
|
||||
class InvoiceCancelled extends DocumentCancelled
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Sale;
|
||||
|
||||
use App\Events\Document\DocumentCreated;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentCreated
|
||||
*/
|
||||
class InvoiceCreated extends DocumentCreated
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Sale;
|
||||
|
||||
use App\Events\Document\DocumentCreating;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentCreating
|
||||
*/
|
||||
class InvoiceCreating extends DocumentCreating
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Sale;
|
||||
|
||||
use App\Events\Document\DocumentPrinting;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentPrinting
|
||||
*/
|
||||
class InvoicePrinting extends DocumentPrinting
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Sale;
|
||||
|
||||
use App\Events\Document\DocumentRecurring;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentRecurring
|
||||
*/
|
||||
class InvoiceRecurring extends DocumentRecurring
|
||||
{
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Sale;
|
||||
|
||||
use App\Events\Document\DocumentReminded;
|
||||
use App\Models\Document\Document;
|
||||
use App\Notifications\Sale\Invoice as Notification;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentReminded
|
||||
*/
|
||||
class InvoiceReminded extends DocumentReminded
|
||||
{
|
||||
public function __construct(Document $document)
|
||||
{
|
||||
parent::__construct($document, Notification::class);
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Sale;
|
||||
|
||||
use App\Events\Document\DocumentSent;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentSent
|
||||
*/
|
||||
class InvoiceSent extends DocumentSent
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Sale;
|
||||
|
||||
use App\Events\Document\DocumentUpdated;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentUpdated
|
||||
*/
|
||||
class InvoiceUpdated extends DocumentUpdated
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Sale;
|
||||
|
||||
use App\Events\Document\DocumentUpdating;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentUpdating
|
||||
*/
|
||||
class InvoiceUpdating extends DocumentUpdating
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Sale;
|
||||
|
||||
use App\Events\Document\DocumentViewed;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentViewed
|
||||
*/
|
||||
class InvoiceViewed extends DocumentViewed
|
||||
{
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Events\Sale;
|
||||
|
||||
class PaymentReceived extends \App\Events\Document\PaymentReceived
|
||||
{
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api\Purchases;
|
||||
|
||||
use App\Abstracts\Http\ApiController;
|
||||
use App\Http\Requests\Document\Document as Request;
|
||||
use App\Jobs\Document\CreateDocument;
|
||||
use App\Jobs\Document\DeleteDocument;
|
||||
use App\Jobs\Document\UpdateDocument;
|
||||
use App\Models\Document\Document;
|
||||
use App\Transformers\Purchase\Bill as Transformer;
|
||||
|
||||
class Bills extends ApiController
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Dingo\Api\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$bills = Document::bill()->with('contact', 'histories', 'items', 'transactions')->collect(['issued_at'=> 'desc']);
|
||||
|
||||
return $this->response->paginator($bills, new Transformer());
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param Document $bill
|
||||
*
|
||||
* @return \Dingo\Api\Http\Response
|
||||
*/
|
||||
public function show(Document $bill)
|
||||
{
|
||||
return $this->response->item($bill, new Transformer());
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param $request
|
||||
*
|
||||
* @return \Dingo\Api\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
$bill = $this->dispatch(new CreateDocument($request));
|
||||
|
||||
return $this->response->created(route('api.bills.show', $bill->id));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param $bill
|
||||
* @param $request
|
||||
*
|
||||
* @return \Dingo\Api\Http\Response
|
||||
*/
|
||||
public function update(Document $bill, Request $request)
|
||||
{
|
||||
$bill = $this->dispatch(new UpdateDocument($bill, $request));
|
||||
|
||||
return $this->item($bill->fresh(), new Transformer());
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param Document $bill
|
||||
*
|
||||
* @return \Dingo\Api\Http\Response
|
||||
*/
|
||||
public function destroy(Document $bill)
|
||||
{
|
||||
try {
|
||||
$this->dispatch(new DeleteDocument($bill));
|
||||
|
||||
return $this->response->noContent();
|
||||
} catch(\Exception $e) {
|
||||
$this->response->errorUnauthorized($e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api\Sales;
|
||||
|
||||
use App\Abstracts\Http\ApiController;
|
||||
use App\Http\Requests\Banking\Transaction as Request;
|
||||
use App\Jobs\Banking\CreateBankingDocumentTransaction;
|
||||
use App\Jobs\Banking\DeleteTransaction;
|
||||
use App\Models\Banking\Transaction;
|
||||
use App\Models\Document\Document;
|
||||
use App\Transformers\Banking\Transaction as Transformer;
|
||||
|
||||
class InvoiceTransactions extends ApiController
|
||||
{
|
||||
/**
|
||||
* Instantiate a new controller instance.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// Add CRUD permission check
|
||||
$this->middleware('permission:create-banking-transactions')->only('create', 'store', 'duplicate', 'import');
|
||||
$this->middleware('permission:read-banking-transactions')->only('index', 'show', 'edit', 'export');
|
||||
$this->middleware('permission:update-banking-transactions')->only('update', 'enable', 'disable');
|
||||
$this->middleware('permission:delete-banking-transactions')->only('destroy');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @param $invoice_id
|
||||
* @return \Dingo\Api\Http\Response
|
||||
*/
|
||||
public function index($invoice_id)
|
||||
{
|
||||
$transactions = Transaction::documentId($invoice_id)->get();
|
||||
|
||||
return $this->response->collection($transactions, new Transformer());
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param $invoice_id
|
||||
* @param $id
|
||||
* @return \Dingo\Api\Http\Response
|
||||
*/
|
||||
public function show($invoice_id, $id)
|
||||
{
|
||||
$transaction = Transaction::documentId($invoice_id)->find($id);
|
||||
|
||||
return $this->response->item($transaction, new Transformer());
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param $invoice_id
|
||||
* @param $request
|
||||
* @return \Dingo\Api\Http\Response
|
||||
*/
|
||||
public function store($invoice_id, Request $request)
|
||||
{
|
||||
$invoice = Document::find($invoice_id);
|
||||
|
||||
$transaction = $this->dispatch(new CreateBankingDocumentTransaction($invoice, $request));
|
||||
|
||||
return $this->response->created(url('api/invoices/' . $invoice_id . '/transactions/' . $transaction->id));
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param $invoice_id
|
||||
* @param $id
|
||||
* @return \Dingo\Api\Http\Response
|
||||
*/
|
||||
public function destroy($invoice_id, $id)
|
||||
{
|
||||
$transaction = Transaction::documentId($invoice_id)->find($id);
|
||||
|
||||
$this->dispatch(new DeleteTransaction($transaction));
|
||||
|
||||
return $this->response->noContent();
|
||||
}
|
||||
}
|
@ -1,91 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api\Sales;
|
||||
|
||||
use App\Abstracts\Http\ApiController;
|
||||
use App\Http\Requests\Document\Document as Request;
|
||||
use App\Jobs\Document\CreateDocument;
|
||||
use App\Jobs\Document\DeleteDocument;
|
||||
use App\Jobs\Document\UpdateDocument;
|
||||
use App\Models\Document\Document;
|
||||
use App\Transformers\Sale\Invoice as Transformer;
|
||||
|
||||
class Invoices extends ApiController
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Dingo\Api\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$invoices = Document::invoice()->with('contact', 'histories', 'items', 'transactions')->collect(['issued_at'=> 'desc']);
|
||||
|
||||
return $this->response->paginator($invoices, new Transformer());
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param $id
|
||||
* @return \Dingo\Api\Http\Response
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
// Check if we're querying by id or number
|
||||
if (is_numeric($id)) {
|
||||
$invoice = Document::find($id);
|
||||
} else {
|
||||
$invoice = Document::where('document_number', $id)->first();
|
||||
}
|
||||
|
||||
return $this->response->item($invoice, new Transformer());
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param $request
|
||||
*
|
||||
* @return \Dingo\Api\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
$invoice = $this->dispatch(new CreateDocument($request));
|
||||
|
||||
return $this->response->created(route('api.invoices.show', $invoice->id));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param $invoice
|
||||
* @param $request
|
||||
*
|
||||
* @return \Dingo\Api\Http\Response
|
||||
*/
|
||||
public function update(Document $invoice, Request $request)
|
||||
{
|
||||
$invoice = $this->dispatch(new UpdateDocument($invoice, $request));
|
||||
|
||||
return $this->response->item($invoice->fresh(), new Transformer());
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param Document $invoice
|
||||
*
|
||||
* @return \Dingo\Api\Http\Response
|
||||
*/
|
||||
public function destroy(Document $invoice)
|
||||
{
|
||||
try {
|
||||
$this->dispatch(new DeleteDocument($invoice));
|
||||
|
||||
return $this->response->noContent();
|
||||
} catch(\Exception $e) {
|
||||
$this->response->errorUnauthorized($e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Purchase;
|
||||
|
||||
use App\Http\Requests\Document\Document;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Document
|
||||
*/
|
||||
class Bill extends Document
|
||||
{
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Document::rules()
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
$rules = parent::rules();
|
||||
|
||||
$rules['bill_number'] = $rules['document_number'];
|
||||
$rules['billed_at'] = $rules['issued_at'];
|
||||
|
||||
unset($rules['document_number'], $rules['issued_at']);
|
||||
|
||||
return $rules;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Document::withValidator()
|
||||
*/
|
||||
public function withValidator($validator)
|
||||
{
|
||||
parent::withValidator($validator);
|
||||
|
||||
if ($validator->errors()->count()) {
|
||||
$this->request->set('billed_at', $this->request->get('issued_at'));
|
||||
$this->request->remove('issued_at');
|
||||
}
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Purchase;
|
||||
|
||||
use App\Http\Requests\Document\DocumentAddItem;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentAddItem
|
||||
*/
|
||||
class BillAddItem extends DocumentAddItem
|
||||
{
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Purchase;
|
||||
|
||||
use App\Http\Requests\Document\DocumentHistory;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentHistory
|
||||
*/
|
||||
class BillHistory extends DocumentHistory
|
||||
{
|
||||
public function rules()
|
||||
{
|
||||
$rules = parent::rules();
|
||||
|
||||
$rules['bill_id'] = $rules['document_id'];
|
||||
|
||||
unset($rules['document_id'], $rules['type']);
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Purchase;
|
||||
|
||||
use App\Http\Requests\Document\DocumentItem;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentItem
|
||||
*/
|
||||
class BillItem extends DocumentItem
|
||||
{
|
||||
public function rules()
|
||||
{
|
||||
$rules = parent::rules();
|
||||
|
||||
$rules['bill_id'] = $rules['document_id'];
|
||||
|
||||
unset($rules['document_id'], $rules['type']);
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Purchase;
|
||||
|
||||
use App\Http\Requests\Document\DocumentItemTax;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentItemTax
|
||||
*/
|
||||
class BillItemTax extends DocumentItemTax
|
||||
{
|
||||
public function rules()
|
||||
{
|
||||
$rules = parent::rules();
|
||||
|
||||
$rules['bill_id'] = $rules['document_id'];
|
||||
$rules['bill_item_id'] = $rules['document_item_id'];
|
||||
|
||||
unset($rules['document_id'], $rules['document_item_id'], $rules['type']);
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Purchase;
|
||||
|
||||
use App\Http\Requests\Document\DocumentTotal;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentTotal
|
||||
*/
|
||||
class BillTotal extends DocumentTotal
|
||||
{
|
||||
public function rules()
|
||||
{
|
||||
$rules = parent::rules();
|
||||
|
||||
$rules['bill_id'] = $rules['document_id'];
|
||||
|
||||
unset($rules['document_id'], $rules['type']);
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Sale;
|
||||
|
||||
use App\Http\Requests\Document\Document;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Document
|
||||
*/
|
||||
class Invoice extends Document
|
||||
{
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Document::rules()
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
$rules = parent::rules();
|
||||
|
||||
$rules['invoice_number'] = $rules['document_number'];
|
||||
$rules['invoiced_at'] = $rules['issued_at'];
|
||||
|
||||
unset($rules['document_number'], $rules['issued_at']);
|
||||
|
||||
return $rules;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Document::withValidator()
|
||||
*/
|
||||
public function withValidator($validator)
|
||||
{
|
||||
parent::withValidator($validator);
|
||||
|
||||
if ($validator->errors()->count()) {
|
||||
$this->request->set('invoiced_at', $this->request->get('issued_at'));
|
||||
$this->request->remove('issued_at');
|
||||
}
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Sale;
|
||||
|
||||
use App\Http\Requests\Document\DocumentAddItem;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentAddItem
|
||||
*/
|
||||
class InvoiceAddItem extends DocumentAddItem
|
||||
{
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Sale;
|
||||
|
||||
use App\Http\Requests\Document\DocumentHistory;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentHistory
|
||||
*/
|
||||
class InvoiceHistory extends DocumentHistory
|
||||
{
|
||||
public function rules()
|
||||
{
|
||||
$rules = parent::rules();
|
||||
|
||||
$rules['invoice_id'] = $rules['document_id'];
|
||||
|
||||
unset($rules['document_id'], $rules['type']);
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Sale;
|
||||
|
||||
use App\Http\Requests\Document\DocumentItem;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentItem
|
||||
*/
|
||||
class InvoiceItem extends DocumentItem
|
||||
{
|
||||
public function rules()
|
||||
{
|
||||
$rules = parent::rules();
|
||||
|
||||
$rules['invoice_id'] = $rules['document_id'];
|
||||
|
||||
unset($rules['document_id'], $rules['type']);
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Sale;
|
||||
|
||||
use App\Http\Requests\Document\DocumentItemTax;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentItemTax
|
||||
*/
|
||||
class InvoiceItemTax extends DocumentItemTax
|
||||
{
|
||||
public function rules()
|
||||
{
|
||||
$rules = parent::rules();
|
||||
|
||||
$rules['invoice_id'] = $rules['document_id'];
|
||||
$rules['invoice_item_id'] = $rules['document_item_id'];
|
||||
|
||||
unset($rules['document_id'], $rules['document_item_id'], $rules['type']);
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Sale;
|
||||
|
||||
use App\Http\Requests\Document\DocumentTotal;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentTotal
|
||||
*/
|
||||
class InvoiceTotal extends DocumentTotal
|
||||
{
|
||||
public function rules()
|
||||
{
|
||||
$rules = parent::rules();
|
||||
|
||||
$rules['invoice_id'] = $rules['document_id'];
|
||||
|
||||
unset($rules['document_id'], $rules['type']);
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Banking;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see CreateBankingDocumentTransaction
|
||||
*/
|
||||
class CreateDocumentTransaction extends CreateBankingDocumentTransaction
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Purchase;
|
||||
|
||||
use App\Jobs\Document\CancelDocument;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see CancelDocument
|
||||
*/
|
||||
class CancelBill extends CancelDocument
|
||||
{
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Purchase;
|
||||
|
||||
use App\Abstracts\Http\FormRequest;
|
||||
use App\Jobs\Document\CreateDocument;
|
||||
use App\Models\Document\Document;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see CreateDocument
|
||||
*/
|
||||
class CreateBill extends CreateDocument
|
||||
{
|
||||
protected $bill;
|
||||
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param FormRequest|array $request
|
||||
*/
|
||||
public function __construct($request)
|
||||
{
|
||||
parent::__construct($request);
|
||||
|
||||
$this->request->merge(
|
||||
[
|
||||
'type' => Document::BILL_TYPE,
|
||||
'document_number' => $this->request->get('bill_number'),
|
||||
'issued_at' => $this->request->get('billed_at'),
|
||||
]
|
||||
);
|
||||
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Purchase;
|
||||
|
||||
use App\Jobs\Document\CreateDocumentHistory;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see CreateDocumentHistory
|
||||
*/
|
||||
class CreateBillHistory extends CreateDocumentHistory
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Purchase;
|
||||
|
||||
use App\Jobs\Document\CreateDocumentItem;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see CreateDocumentItem
|
||||
*/
|
||||
class CreateBillItem extends CreateDocumentItem
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Purchase;
|
||||
|
||||
use App\Jobs\Document\CreateDocumentItemsAndTotals;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see CreateDocumentItemsAndTotals
|
||||
*/
|
||||
class CreateBillItemsAndTotals extends CreateDocumentItemsAndTotals
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Purchase;
|
||||
|
||||
use App\Jobs\Document\DeleteDocument;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DeleteDocument
|
||||
*/
|
||||
class DeleteBill extends DeleteDocument
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Purchase;
|
||||
|
||||
use App\Jobs\Document\DuplicateDocument;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DuplicateDocument
|
||||
*/
|
||||
class DuplicateBill extends DuplicateDocument
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Purchase;
|
||||
|
||||
use App\Jobs\Document\UpdateDocument;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see UpdateDocument
|
||||
*/
|
||||
class UpdateBill extends UpdateDocument
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Sale;
|
||||
|
||||
use App\Jobs\Document\CancelDocument;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see CancelDocument
|
||||
*/
|
||||
class CancelInvoice extends CancelDocument
|
||||
{
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Sale;
|
||||
|
||||
use App\Abstracts\Http\FormRequest;
|
||||
use App\Jobs\Document\CreateDocument;
|
||||
use App\Models\Document\Document;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see CreateDocument
|
||||
*/
|
||||
class CreateInvoice extends CreateDocument
|
||||
{
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param FormRequest|array $request
|
||||
*/
|
||||
public function __construct($request)
|
||||
{
|
||||
parent::__construct($request);
|
||||
|
||||
$this->request->merge(
|
||||
[
|
||||
'type' => Document::INVOICE_TYPE,
|
||||
'document_number' => $this->request->get('invoice_number'),
|
||||
'issued_at' => $this->request->get('invoiced_at'),
|
||||
]
|
||||
);
|
||||
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Sale;
|
||||
|
||||
use App\Jobs\Document\CreateDocumentHistory;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see CreateDocumentHistory
|
||||
*/
|
||||
class CreateInvoiceHistory extends CreateDocumentHistory
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Sale;
|
||||
|
||||
use App\Jobs\Document\CreateDocumentItem;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see CreateDocumentItem
|
||||
*/
|
||||
class CreateInvoiceItem extends CreateDocumentItem
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Sale;
|
||||
|
||||
use App\Jobs\Document\CreateDocumentItemsAndTotals;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see CreateDocumentItemsAndTotals
|
||||
*/
|
||||
class CreateInvoiceItemsAndTotals extends CreateDocumentItemsAndTotals
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Sale;
|
||||
|
||||
use App\Jobs\Document\DeleteDocument;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DeleteDocument
|
||||
*/
|
||||
class DeleteInvoice extends DeleteDocument
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Sale;
|
||||
|
||||
use App\Jobs\Document\DuplicateDocument;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DuplicateDocument
|
||||
*/
|
||||
class DuplicateInvoice extends DuplicateDocument
|
||||
{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Sale;
|
||||
|
||||
use App\Jobs\Document\UpdateDocument;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see UpdateDocument
|
||||
*/
|
||||
class UpdateInvoice extends UpdateDocument
|
||||
{
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Purchase;
|
||||
|
||||
use App\Models\Document\Document;
|
||||
use App\Scopes\ReplaceDeprecatedColumns;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Document
|
||||
*/
|
||||
class Bill extends Document
|
||||
{
|
||||
protected static function booted()
|
||||
{
|
||||
static::addGlobalScope(new ReplaceDeprecatedColumns);
|
||||
}
|
||||
|
||||
public function getBillNumberAttribute($value)
|
||||
{
|
||||
return $this->document_number;
|
||||
}
|
||||
|
||||
public function setBillNumberAttribute($value)
|
||||
{
|
||||
$this->attributes['document_number'] = $value;
|
||||
}
|
||||
|
||||
public function getBilledAtAttribute($value)
|
||||
{
|
||||
return $this->issued_at;
|
||||
}
|
||||
|
||||
public function setBilledAtAttribute($value)
|
||||
{
|
||||
$this->attributes['issued_at'] = $value;
|
||||
}
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Purchase;
|
||||
|
||||
use App\Models\Document\DocumentHistory;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentHistory
|
||||
*/
|
||||
class BillHistory extends DocumentHistory
|
||||
{
|
||||
public function getBillIdAttribute($value)
|
||||
{
|
||||
return $this->document_id;
|
||||
}
|
||||
|
||||
public function setBillIdAttribute($value)
|
||||
{
|
||||
$this->attributes['document_id'] = $value;
|
||||
}
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Purchase;
|
||||
|
||||
use App\Models\Document\DocumentItem;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentItem
|
||||
*/
|
||||
class BillItem extends DocumentItem
|
||||
{
|
||||
public function getBillIdAttribute($value)
|
||||
{
|
||||
return $this->document_id;
|
||||
}
|
||||
|
||||
public function setBillIdAttribute($value)
|
||||
{
|
||||
$this->attributes['document_id'] = $value;
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Purchase;
|
||||
|
||||
use App\Models\Document\DocumentItemTax;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentItemTax
|
||||
*/
|
||||
class BillItemTax extends DocumentItemTax
|
||||
{
|
||||
public function getBillIdAttribute($value)
|
||||
{
|
||||
return $this->document_id;
|
||||
}
|
||||
|
||||
public function setBillIdAttribute($value)
|
||||
{
|
||||
$this->attributes['document_id'] = $value;
|
||||
}
|
||||
|
||||
public function getBillItemIdAttribute($value)
|
||||
{
|
||||
return $this->document_item_id;
|
||||
}
|
||||
|
||||
public function setBillItemIdAttribute($value)
|
||||
{
|
||||
$this->attributes['document_item_id'] = $value;
|
||||
}
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Purchase;
|
||||
|
||||
use App\Models\Document\DocumentTotal;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentTotal
|
||||
*/
|
||||
class BillTotal extends DocumentTotal
|
||||
{
|
||||
public function getBillIdAttribute($value)
|
||||
{
|
||||
return $this->document_id;
|
||||
}
|
||||
|
||||
public function setBillIdAttribute($value)
|
||||
{
|
||||
$this->attributes['document_id'] = $value;
|
||||
}
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Sale;
|
||||
|
||||
use App\Models\Document\Document;
|
||||
use App\Scopes\ReplaceDeprecatedColumns;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Document
|
||||
*/
|
||||
class Invoice extends Document
|
||||
{
|
||||
protected static function booted()
|
||||
{
|
||||
static::addGlobalScope(new ReplaceDeprecatedColumns);
|
||||
}
|
||||
|
||||
public function setInvoiceNumberAttribute($value)
|
||||
{
|
||||
$this->attributes['document_number'] = $value;
|
||||
}
|
||||
|
||||
public function getInvoiceNumberAttribute($value)
|
||||
{
|
||||
return $this->document_number;
|
||||
}
|
||||
|
||||
public function setInvoicedAtAttribute($value)
|
||||
{
|
||||
$this->attributes['issued_at'] = $value;
|
||||
}
|
||||
|
||||
public function getInvoicedAtAttribute($value)
|
||||
{
|
||||
return $this->issued_at;
|
||||
}
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Sale;
|
||||
|
||||
use App\Models\Document\DocumentHistory;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentHistory
|
||||
*/
|
||||
class InvoiceHistory extends DocumentHistory
|
||||
{
|
||||
public function getInvoiceIdAttribute($value)
|
||||
{
|
||||
return $this->document_id;
|
||||
}
|
||||
|
||||
public function setInvoiceIdAttribute($value)
|
||||
{
|
||||
$this->attributes['document_id'] = $value;
|
||||
}
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Sale;
|
||||
|
||||
use App\Models\Document\DocumentItem;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentItem
|
||||
*/
|
||||
class InvoiceItem extends DocumentItem
|
||||
{
|
||||
public function getInvoiceIdAttribute($value)
|
||||
{
|
||||
return $this->document_id;
|
||||
}
|
||||
|
||||
public function setInvoiceIdAttribute($value)
|
||||
{
|
||||
$this->attributes['document_id'] = $value;
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Sale;
|
||||
|
||||
use App\Models\Document\DocumentItemTax;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentItemTax
|
||||
*/
|
||||
class InvoiceItemTax extends DocumentItemTax
|
||||
{
|
||||
public function getInvoiceIdAttribute($value)
|
||||
{
|
||||
return $this->document_id;
|
||||
}
|
||||
|
||||
public function setInvoiceIdAttribute($value)
|
||||
{
|
||||
$this->attributes['document_id'] = $value;
|
||||
}
|
||||
|
||||
public function getInvoiceItemIdAttribute($value)
|
||||
{
|
||||
return $this->document_item_id;
|
||||
}
|
||||
|
||||
public function setInvoiceItemIdAttribute($value)
|
||||
{
|
||||
$this->attributes['document_item_id'] = $value;
|
||||
}
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Sale;
|
||||
|
||||
use App\Models\Document\DocumentTotal;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see DocumentTotal
|
||||
*/
|
||||
class InvoiceTotal extends DocumentTotal
|
||||
{
|
||||
public function getInvoiceIdAttribute($value)
|
||||
{
|
||||
return $this->document_id;
|
||||
}
|
||||
|
||||
public function setInvoiceIdAttribute($value)
|
||||
{
|
||||
$this->attributes['document_id'] = $value;
|
||||
}
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\BC21\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider as Provider;
|
||||
|
||||
class Main extends Provider
|
||||
{
|
||||
/**
|
||||
* Boot the application events.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->loadRoutes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Load routes.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function loadRoutes()
|
||||
{
|
||||
if (app()->routesAreCached()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$routes = ['api.php'];
|
||||
|
||||
foreach ($routes as $route) {
|
||||
$this->loadRoutesFrom(__DIR__ . '/../Routes/' . $route);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the services provided by the provider.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provides()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
/**
|
||||
* 'api' prefix applied to all routes
|
||||
*
|
||||
* @see \App\Providers\Route::mapApiRoutes
|
||||
*/
|
||||
|
||||
$api = app('Dingo\Api\Routing\Router');
|
||||
|
||||
$api->version('v2', ['middleware' => ['api']], function($api) {
|
||||
$api->group(['namespace' => 'App\Http\Controllers\Api'], function($api) {
|
||||
// Companies
|
||||
$api->get('companies/{company}/owner', 'Common\Companies@owner')->name('companies.owner');
|
||||
$api->get('companies/{company}/enable', 'Common\Companies@enable')->name('companies.enable');
|
||||
$api->get('companies/{company}/disable', 'Common\Companies@disable')->name('companies.disable');
|
||||
$api->resource('companies', 'Common\Companies');
|
||||
|
||||
// Items
|
||||
$api->get('items/{item}/enable', 'Common\Items@enable')->name('items.enable');
|
||||
$api->get('items/{item}/disable', 'Common\Items@disable')->name('items.disable');
|
||||
$api->resource('items', 'Common\Items');
|
||||
|
||||
// Contacts
|
||||
$api->get('contacts/{contact}/enable', 'Common\Contacts@enable')->name('contacts.enable');
|
||||
$api->get('contacts/{contact}/disable', 'Common\Contacts@disable')->name('contacts.disable');
|
||||
$api->resource('contacts', 'Common\Contacts');
|
||||
|
||||
// Sales
|
||||
$api->resource('invoices', 'Sales\Invoices');
|
||||
$api->resource('invoices.transactions', 'Sales\InvoiceTransactions');
|
||||
|
||||
// Purchases
|
||||
$api->get('bills/{bill}/received', 'Purchases\Bills@received')->name('bills.received');
|
||||
$api->resource('bills', 'Purchases\Bills');
|
||||
|
||||
// Banking
|
||||
$api->get('accounts/{account}/enable', 'Banking\Accounts@enable')->name('accounts.enable');
|
||||
$api->get('accounts/{account}/disable', 'Banking\Accounts@disable')->name('accounts.disable');
|
||||
$api->resource('accounts', 'Banking\Accounts');
|
||||
$api->resource('reconciliations', 'Banking\Reconciliations');
|
||||
$api->resource('transactions', 'Banking\Transactions');
|
||||
$api->resource('transfers', 'Banking\Transfers');
|
||||
|
||||
// Reports
|
||||
$api->resource('reports', 'Common\Reports');
|
||||
|
||||
// Settings
|
||||
$api->get('categories/{category}/enable', 'Settings\Categories@enable')->name('categories.enable');
|
||||
$api->get('categories/{category}/disable', 'Settings\Categories@disable')->name('categories.disable');
|
||||
$api->resource('categories', 'Settings\Categories');
|
||||
$api->get('currencies/{currency}/enable', 'Settings\Currencies@enable')->name('currencies.enable');
|
||||
$api->get('currencies/{currency}/disable', 'Settings\Currencies@disable')->name('currencies.disable');
|
||||
$api->resource('currencies', 'Settings\Currencies');
|
||||
$api->resource('settings', 'Settings\Settings');
|
||||
$api->get('taxes/{tax}/enable', 'Settings\Taxes@enable')->name('taxes.enable');
|
||||
$api->get('taxes/{tax}/disable', 'Settings\Taxes@disable')->name('taxes.disable');
|
||||
$api->resource('taxes', 'Settings\Taxes');
|
||||
|
||||
// Common
|
||||
$api->resource('ping', 'Common\Ping');
|
||||
|
||||
// Auth
|
||||
$api->resource('permissions', 'Auth\Permissions');
|
||||
$api->resource('roles', 'Auth\Roles');
|
||||
$api->get('users/{user}/enable', 'Auth\Users@enable')->name('users.enable');
|
||||
$api->get('users/{user}/disable', 'Auth\Users@disable')->name('users.disable');
|
||||
$api->resource('users', 'Auth\Users');
|
||||
});
|
||||
});
|
@ -1,79 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Scopes;
|
||||
|
||||
|
||||
use App\Models\Purchase\Bill;
|
||||
use App\Models\Sale\Invoice;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Scope;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
class ReplaceDeprecatedColumns implements Scope
|
||||
{
|
||||
/**
|
||||
* Apply the scope to a given Eloquent query builder.
|
||||
*
|
||||
* @param Builder $builder
|
||||
* @param Model $model
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function apply(Builder $builder, Model $model)
|
||||
{
|
||||
switch (get_class($model)) {
|
||||
case Invoice::class:
|
||||
$replacements = [
|
||||
'invoiced_at' => 'issued_at',
|
||||
'invoice_number' => 'document_number',
|
||||
];
|
||||
break;
|
||||
case Bill::class:
|
||||
$replacements = [
|
||||
'billed_at' => 'issued_at',
|
||||
'bill_number' => 'document_number',
|
||||
];
|
||||
break;
|
||||
}
|
||||
|
||||
if (false === isset($replacements)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$query = $builder->getQuery();
|
||||
|
||||
foreach ($replacements as $column => $replace) {
|
||||
if ($query->orders !== null) {
|
||||
$query->orders = $this->replaceColumn($query->orders, $column, $replace);
|
||||
}
|
||||
|
||||
if ($query->wheres !== null) {
|
||||
$query->wheres = $this->replaceColumn($query->wheres, $column, $replace);
|
||||
}
|
||||
|
||||
if ($query->havings !== null) {
|
||||
$query->havings = $this->replaceColumn($query->havings, $column, $replace);
|
||||
}
|
||||
|
||||
if ($query->unionOrders !== null) {
|
||||
$query->unionOrders = $this->replaceColumn($query->unionOrders, $column, $replace);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function replaceColumn(array $columns, string $column, string $replace): array
|
||||
{
|
||||
return Collection::make($columns)
|
||||
->transform(
|
||||
function ($item) use ($column, $replace) {
|
||||
if (isset($item['column']) && $item['column'] === $column) {
|
||||
$item['column'] = $replace;
|
||||
}
|
||||
|
||||
return $item;
|
||||
}
|
||||
)->values()->all();
|
||||
}
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Traits;
|
||||
|
||||
use App\Models\Document\Document;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Documents
|
||||
*/
|
||||
trait Purchases
|
||||
{
|
||||
use Documents;
|
||||
/**
|
||||
* Generate next bill number
|
||||
*
|
||||
* @deprecated
|
||||
* @see Documents::getNextDocumentNumber()
|
||||
*/
|
||||
public function getNextBillNumber(): string
|
||||
{
|
||||
return $this->getNextDocumentNumber(Document::BILL_TYPE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Increase the next bill number
|
||||
*
|
||||
* @deprecated`1
|
||||
* @see Documents::increaseNextDocumentNumber()
|
||||
*/
|
||||
public function increaseNextBillNumber(): void
|
||||
{
|
||||
$this->increaseNextDocumentNumber(Document::BILL_TYPE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a collection bill statuses
|
||||
*
|
||||
* @deprecated
|
||||
* @see Documents::getBillStatuses()
|
||||
*/
|
||||
public function getBillStatuses(): Collection
|
||||
{
|
||||
return $this->getDocumentStatuses(Document::BILL_TYPE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Documents::getDocumentFileName()
|
||||
*/
|
||||
public function getBillFileName(Document $bill, string $separator = '-', string $extension = 'pdf'): string
|
||||
{
|
||||
return $this->getDocumentFileName($bill, $separator, $extension);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Documents::getSafeDocumentNumber()
|
||||
*/
|
||||
public function getSafeBillNumber(Document $bill, string $separator = '-'): string
|
||||
{
|
||||
return $this->getSafeDocumentNumber($bill, $separator);
|
||||
}
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Traits;
|
||||
|
||||
use App\Models\Document\Document;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Documents
|
||||
*/
|
||||
trait Sales
|
||||
{
|
||||
use Documents;
|
||||
/**
|
||||
* Generate next invoice number
|
||||
*
|
||||
* @deprecated
|
||||
* @see Documents::getNextDocumentNumber()
|
||||
*/
|
||||
public function getNextInvoiceNumber(): string
|
||||
{
|
||||
return $this->getNextDocumentNumber(Document::INVOICE_TYPE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Increase the next invoice number
|
||||
*
|
||||
* @deprecated
|
||||
* @see Documents::increaseNextDocumentNumber()
|
||||
*/
|
||||
public function increaseNextInvoiceNumber(): void
|
||||
{
|
||||
$this->increaseNextDocumentNumber(Document::INVOICE_TYPE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a collection invoice statuses
|
||||
*
|
||||
* @deprecated
|
||||
* @see Documents::getInvoiceStatuses()
|
||||
*/
|
||||
public function getInvoiceStatuses(): Collection
|
||||
{
|
||||
return $this->getDocumentStatuses(Document::INVOICE_TYPE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Documents::getDocumentFileName()
|
||||
*/
|
||||
public function getInvoiceFileName(Document $invoice, string $separator = '-', string $extension = 'pdf'): string
|
||||
{
|
||||
return $this->getDocumentFileName($invoice, $separator, $extension);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Documents::getSafeDocumentNumber()
|
||||
*/
|
||||
public function getSafeInvoiceNumber(Document $invoice, string $separator = '-'): string
|
||||
{
|
||||
return $this->getSafeDocumentNumber($invoice, $separator);
|
||||
}
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Transformers\Purchase;
|
||||
|
||||
use App\Transformers\Banking\Transaction;
|
||||
use App\Transformers\Common\Contact;
|
||||
use App\Transformers\Setting\Currency;
|
||||
use App\Models\Document\Document as Model;
|
||||
use League\Fractal\TransformerAbstract;
|
||||
|
||||
class Bill extends TransformerAbstract
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $defaultIncludes = ['contact', 'currency', 'histories', 'items', 'transactions'];
|
||||
|
||||
/**
|
||||
* @param Model $model
|
||||
* @return array
|
||||
*/
|
||||
public function transform(Model $model)
|
||||
{
|
||||
return [
|
||||
'id' => $model->id,
|
||||
'company_id' => $model->company_id,
|
||||
'bill_number' => $model->document_number,
|
||||
'order_number' => $model->order_number,
|
||||
'status' => $model->status,
|
||||
'billed_at' => $model->issued_at ? $model->issued_at->toIso8601String() : '',
|
||||
'due_at' => $model->due_at ? $model->due_at->toIso8601String() : '',
|
||||
'amount' => $model->amount,
|
||||
'currency_code' => $model->currency_code,
|
||||
'currency_rate' => $model->currency_rate,
|
||||
'contact_id' => $model->contact_id,
|
||||
'contact_name' => $model->contact_name,
|
||||
'contact_email' => $model->contact_email,
|
||||
'contact_tax_number' => $model->contact_tax_number,
|
||||
'contact_phone' => $model->contact_phone,
|
||||
'contact_address' => $model->contact_address,
|
||||
'notes' => $model->notes,
|
||||
'attachment' => $model->attachment,
|
||||
'created_at' => $model->created_at ? $model->created_at->toIso8601String() : '',
|
||||
'updated_at' => $model->updated_at ? $model->updated_at->toIso8601String() : '',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model $model
|
||||
* @return \League\Fractal\Resource\Item
|
||||
*/
|
||||
public function includeContact(Model $model)
|
||||
{
|
||||
return $this->item($model->contact, new Contact());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model $model
|
||||
* @return \League\Fractal\Resource\Item
|
||||
*/
|
||||
public function includeCurrency(Model $model)
|
||||
{
|
||||
return $this->item($model->currency, new Currency());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model $model
|
||||
* @return \League\Fractal\Resource\Collection
|
||||
*/
|
||||
public function includeHistories(Model $model)
|
||||
{
|
||||
return $this->collection($model->histories, new BillHistories());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model $model
|
||||
* @return \League\Fractal\Resource\Collection
|
||||
*/
|
||||
public function includeItems(Model $model)
|
||||
{
|
||||
return $this->collection($model->items, new BillItems());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model $model
|
||||
* @return \League\Fractal\Resource\Collection
|
||||
*/
|
||||
public function includeTransactions(Model $model)
|
||||
{
|
||||
return $this->collection($model->transactions, new Transaction());
|
||||
}
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Transformers\Purchase;
|
||||
|
||||
use App\Models\Document\DocumentHistory as Model;
|
||||
use League\Fractal\TransformerAbstract;
|
||||
|
||||
class BillHistories extends TransformerAbstract
|
||||
{
|
||||
/**
|
||||
* @param Model $model
|
||||
* @return array
|
||||
*/
|
||||
public function transform(Model $model)
|
||||
{
|
||||
return [
|
||||
'id' => $model->id,
|
||||
'company_id' => $model->company_id,
|
||||
'bill_id' => $model->bill_id,
|
||||
'status' => $model->status,
|
||||
'notify' => $model->notify,
|
||||
'description' => $model->description,
|
||||
'created_at' => $model->created_at ? $model->created_at->toIso8601String() : '',
|
||||
'updated_at' => $model->updated_at ? $model->updated_at->toIso8601String() : '',
|
||||
];
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Transformers\Purchase;
|
||||
|
||||
use App\Models\Document\DocumentItem as Model;
|
||||
use League\Fractal\TransformerAbstract;
|
||||
|
||||
class BillItems extends TransformerAbstract
|
||||
{
|
||||
/**
|
||||
* @param Model $model
|
||||
* @return array
|
||||
*/
|
||||
public function transform(Model $model)
|
||||
{
|
||||
return [
|
||||
'id' => $model->id,
|
||||
'company_id' => $model->company_id,
|
||||
'bill_id' => $model->bill_id,
|
||||
'item_id' => $model->item_id,
|
||||
'name' => $model->name,
|
||||
'price' => $model->price,
|
||||
'total' => $model->total,
|
||||
'tax' => $model->tax,
|
||||
'tax_id' => $model->tax_id,
|
||||
'created_at' => $model->created_at ? $model->created_at->toIso8601String() : '',
|
||||
'updated_at' => $model->updated_at ? $model->updated_at->toIso8601String() : '',
|
||||
];
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Transformers\Purchase;
|
||||
|
||||
use App\Models\Document\DocumentTotal as Model;
|
||||
use League\Fractal\TransformerAbstract;
|
||||
|
||||
class BillTotals extends TransformerAbstract
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Model $model
|
||||
* @return array
|
||||
*/
|
||||
public function transform(Model $model)
|
||||
{
|
||||
return [
|
||||
'id' => $model->id,
|
||||
'company_id' => $model->company_id,
|
||||
'bill_id' => $model->bill_id,
|
||||
'code' => $model->code,
|
||||
'name' => $model->name,
|
||||
'amount' => $model->amount,
|
||||
'sort_order' => $model->sort_order,
|
||||
'created_at' => $model->created_at ? $model->created_at->toIso8601String() : '',
|
||||
'updated_at' => $model->updated_at ? $model->updated_at->toIso8601String() : '',
|
||||
];
|
||||
}
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Transformers\Sale;
|
||||
|
||||
use App\Transformers\Banking\Transaction;
|
||||
use App\Transformers\Common\Contact;
|
||||
use App\Transformers\Setting\Currency;
|
||||
use App\Models\Document\Document as Model;
|
||||
use League\Fractal\TransformerAbstract;
|
||||
|
||||
class Invoice extends TransformerAbstract
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $defaultIncludes = ['contact', 'currency', 'histories', 'items', 'transactions'];
|
||||
|
||||
/**
|
||||
* @param Model $model
|
||||
* @return array
|
||||
*/
|
||||
public function transform(Model $model)
|
||||
{
|
||||
return [
|
||||
'id' => $model->id,
|
||||
'company_id' => $model->company_id,
|
||||
'invoice_number' => $model->document_number,
|
||||
'order_number' => $model->order_number,
|
||||
'status' => $model->status,
|
||||
'invoiced_at' => $model->issued_at ? $model->issued_at->toIso8601String() : '',
|
||||
'due_at' => $model->due_at ? $model->due_at->toIso8601String() : '',
|
||||
'amount' => $model->amount,
|
||||
'currency_code' => $model->currency_code,
|
||||
'currency_rate' => $model->currency_rate,
|
||||
'contact_id' => $model->contact_id,
|
||||
'contact_name' => $model->contact_name,
|
||||
'contact_email' => $model->contact_email,
|
||||
'contact_tax_number' => $model->contact_tax_number,
|
||||
'contact_phone' => $model->contact_phone,
|
||||
'contact_address' => $model->contact_address,
|
||||
'notes' => $model->notes,
|
||||
'attachment' => $model->attachment,
|
||||
'created_at' => $model->created_at ? $model->created_at->toIso8601String() : '',
|
||||
'updated_at' => $model->updated_at ? $model->updated_at->toIso8601String() : '',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model $model
|
||||
* @return \League\Fractal\Resource\Item
|
||||
*/
|
||||
public function includeContact(Model $model)
|
||||
{
|
||||
return $this->item($model->contact, new Contact());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model $model
|
||||
* @return \League\Fractal\Resource\Item
|
||||
*/
|
||||
public function includeCurrency(Model $model)
|
||||
{
|
||||
return $this->item($model->currency, new Currency());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model $model
|
||||
* @return \League\Fractal\Resource\Collection
|
||||
*/
|
||||
public function includeHistories(Model $model)
|
||||
{
|
||||
return $this->collection($model->histories, new InvoiceHistories());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model $model
|
||||
* @return \League\Fractal\Resource\Collection
|
||||
*/
|
||||
public function includeItems(Model $model)
|
||||
{
|
||||
return $this->collection($model->items, new InvoiceItems());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Model $model
|
||||
* @return \League\Fractal\Resource\Collection
|
||||
*/
|
||||
public function includeTransactions(Model $model)
|
||||
{
|
||||
return $this->collection($model->transactions, new Transaction());
|
||||
}
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Transformers\Sale;
|
||||
|
||||
use App\Models\Document\DocumentHistory as Model;
|
||||
use League\Fractal\TransformerAbstract;
|
||||
|
||||
class InvoiceHistories extends TransformerAbstract
|
||||
{
|
||||
/**
|
||||
* @param Model $model
|
||||
* @return array
|
||||
*/
|
||||
public function transform(Model $model)
|
||||
{
|
||||
return [
|
||||
'id' => $model->id,
|
||||
'company_id' => $model->company_id,
|
||||
'invoice_id' => $model->invoice_id,
|
||||
'status' => $model->status,
|
||||
'notify' => $model->notify,
|
||||
'description' => $model->description,
|
||||
'created_at' => $model->created_at ? $model->created_at->toIso8601String() : '',
|
||||
'updated_at' => $model->updated_at ? $model->updated_at->toIso8601String() : '',
|
||||
];
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Transformers\Sale;
|
||||
|
||||
use App\Models\Document\DocumentItem as Model;
|
||||
use League\Fractal\TransformerAbstract;
|
||||
|
||||
class InvoiceItems extends TransformerAbstract
|
||||
{
|
||||
/**
|
||||
* @param Model $model
|
||||
* @return array
|
||||
*/
|
||||
public function transform(Model $model)
|
||||
{
|
||||
return [
|
||||
'id' => $model->id,
|
||||
'company_id' => $model->company_id,
|
||||
'invoice_id' => $model->invoice_id,
|
||||
'item_id' => $model->item_id,
|
||||
'name' => $model->name,
|
||||
'price' => $model->price,
|
||||
'total' => $model->total,
|
||||
'tax' => $model->tax,
|
||||
'tax_id' => $model->tax_id,
|
||||
'created_at' => $model->created_at ? $model->created_at->toIso8601String() : '',
|
||||
'updated_at' => $model->updated_at ? $model->updated_at->toIso8601String() : '',
|
||||
];
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Transformers\Sale;
|
||||
|
||||
use App\Models\Document\DocumentTotal as Model;
|
||||
use League\Fractal\TransformerAbstract;
|
||||
|
||||
class InvoiceTotals extends TransformerAbstract
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Model $model
|
||||
* @return array
|
||||
*/
|
||||
public function transform(Model $model)
|
||||
{
|
||||
return [
|
||||
'id' => $model->id,
|
||||
'company_id' => $model->company_id,
|
||||
'invoice_id' => $model->invoice_id,
|
||||
'code' => $model->code,
|
||||
'name' => $model->name,
|
||||
'amount' => $model->amount,
|
||||
'sort_order' => $model->sort_order,
|
||||
'created_at' => $model->created_at ? $model->created_at->toIso8601String() : '',
|
||||
'updated_at' => $model->updated_at ? $model->updated_at->toIso8601String() : '',
|
||||
];
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
{
|
||||
"alias": "bc21",
|
||||
"icon": "fa fa-cog",
|
||||
"version": "1.0.0",
|
||||
"active": 1,
|
||||
"providers": [
|
||||
"Modules\\BC21\\Providers\\Main"
|
||||
],
|
||||
"aliases": {},
|
||||
"files": [],
|
||||
"requires": [],
|
||||
"reports": [],
|
||||
"widgets": [],
|
||||
"settings": [],
|
||||
"extra-modules": {}
|
||||
}
|
@ -1,96 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\OfflinePayments\Http\Controllers;
|
||||
|
||||
use App\Abstracts\Http\PaymentController;
|
||||
use \App\Events\Document\PaymentReceived;
|
||||
use App\Http\Requests\Portal\InvoicePayment as PaymentRequest;
|
||||
use App\Models\Document\Document;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
|
||||
class Payment extends PaymentController
|
||||
{
|
||||
public $alias = 'offline-payments';
|
||||
|
||||
public $type = 'redirect';
|
||||
|
||||
public function show(Document $invoice, PaymentRequest $request)
|
||||
{
|
||||
$setting = [];
|
||||
|
||||
$payment_methods = json_decode(setting('offline-payments.methods'), true);
|
||||
|
||||
foreach ($payment_methods as $payment_method) {
|
||||
if ($payment_method['code'] == $request['payment_method']) {
|
||||
$setting = $payment_method;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$html = view('offline-payments::show', compact('setting', 'invoice'))->render();
|
||||
|
||||
return response()->json([
|
||||
'code' => $setting['code'],
|
||||
'name' => $setting['name'],
|
||||
'description' => $setting['description'],
|
||||
'redirect' => false,
|
||||
'html' => $html,
|
||||
]);
|
||||
}
|
||||
|
||||
public function signed(Document $invoice, PaymentRequest $request)
|
||||
{
|
||||
$setting = [];
|
||||
|
||||
$payment_methods = json_decode(setting('offline-payments.methods'), true);
|
||||
|
||||
foreach ($payment_methods as $payment_method) {
|
||||
if ($payment_method['code'] == $request['payment_method']) {
|
||||
$setting = $payment_method;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$confirm_url = URL::signedRoute('signed.invoices.offline-payments.confirm', [$invoice->id, 'company_id' => session('company_id')]);
|
||||
|
||||
$html = view('offline-payments::signed', compact('setting', 'invoice', 'confirm_url'))->render();
|
||||
|
||||
return response()->json([
|
||||
'code' => $setting['code'],
|
||||
'name' => $setting['name'],
|
||||
'description' => $setting['description'],
|
||||
'redirect' => false,
|
||||
'html' => $html,
|
||||
]);
|
||||
}
|
||||
|
||||
public function confirm(Document $invoice, Request $request)
|
||||
{
|
||||
try {
|
||||
event(new PaymentReceived($invoice, $request));
|
||||
|
||||
$message = trans('messages.success.added', ['type' => trans_choice('general.payments', 1)]);
|
||||
|
||||
$response = [
|
||||
'success' => true,
|
||||
'error' => false,
|
||||
'message' => $message,
|
||||
'data' => false,
|
||||
];
|
||||
} catch(\Exception $e) {
|
||||
$message = $e->getMessage();
|
||||
|
||||
$response = [
|
||||
'success' => false,
|
||||
'error' => true,
|
||||
'message' => $message,
|
||||
'data' => false,
|
||||
];
|
||||
}
|
||||
|
||||
return response()->json($response);
|
||||
}
|
||||
}
|
@ -1,130 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\OfflinePayments\Http\Controllers;
|
||||
|
||||
use App\Abstracts\Http\Controller;
|
||||
use Illuminate\Http\Response;
|
||||
use Modules\OfflinePayments\Http\Requests\Setting as Request;
|
||||
use Modules\OfflinePayments\Http\Requests\SettingGet as GRequest;
|
||||
use Modules\OfflinePayments\Http\Requests\SettingDelete as DRequest;
|
||||
use Modules\OfflinePayments\Jobs\CreatePaymentMethod;
|
||||
use Modules\OfflinePayments\Jobs\DeletePaymentMethod;
|
||||
use Modules\OfflinePayments\Jobs\UpdatePaymentMethod;
|
||||
|
||||
class Settings extends Controller
|
||||
{
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$methods = json_decode(setting('offline-payments.methods'));
|
||||
|
||||
return view('offline-payments::edit', compact('methods'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function update(Request $request)
|
||||
{
|
||||
$code_exists = true;
|
||||
$methods = json_decode(setting('offline-payments.methods'), true);
|
||||
|
||||
if (array_search($request->update_code, array_column($methods, 'code')) == false) {
|
||||
$code_exists = false;
|
||||
}
|
||||
|
||||
if (!empty($request->get('update_code')) && $code_exists == true) {
|
||||
$payment_method = $this->dispatch(new UpdatePaymentMethod($request));
|
||||
|
||||
$message = trans('messages.success.updated', ['type' => $payment_method['name']]);
|
||||
} else {
|
||||
$payment_method = $this->dispatch(new CreatePaymentMethod($request));
|
||||
|
||||
$message = trans('messages.success.added', ['type' => $payment_method['name']]);
|
||||
}
|
||||
|
||||
flash($message)->success();
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'error' => false,
|
||||
'message' => $message,
|
||||
'redirect' => route('offline-payments.settings.edit'),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param GRequest $request
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function get(GRequest $request)
|
||||
{
|
||||
$data = [];
|
||||
|
||||
$code = $request->get('code');
|
||||
|
||||
$methods = json_decode(setting('offline-payments.methods'), true);
|
||||
|
||||
foreach ($methods as $key => $method) {
|
||||
if ($method['code'] != $code) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$method['title'] = trans('offline-payments::offline-payments.edit', ['method' => $method['name']]);
|
||||
$method['update_code'] = $code;
|
||||
|
||||
$code = explode('.', $method['code']);
|
||||
|
||||
$method['code'] = $code[1];
|
||||
|
||||
$data = $method;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'errors' => false,
|
||||
'success' => true,
|
||||
'data' => $data,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param DRequest $request
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function destroy(DRequest $request)
|
||||
{
|
||||
$response = $this->ajaxDispatch(new DeletePaymentMethod($request));
|
||||
|
||||
if ($response['success']) {
|
||||
//$response['redirect'] = route('offline-payments.settings.edit');
|
||||
|
||||
$response['message'] = trans('messages.success.deleted', ['type' => $response['data']['name']]);
|
||||
|
||||
//flash($message)->success();
|
||||
} else {
|
||||
//$response['redirect'] = route('offline-payments.settings.edit');
|
||||
|
||||
$message = $response['message'];
|
||||
|
||||
//flash($message)->error()->important();
|
||||
}
|
||||
|
||||
return response()->json($response);
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\OfflinePayments\Http\Requests;
|
||||
|
||||
use App\Abstracts\Http\FormRequest as Request;
|
||||
|
||||
class Setting extends Request
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'name' => 'required|string',
|
||||
'code' => 'required|string',
|
||||
];
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\OfflinePayments\Http\Requests;
|
||||
|
||||
use App\Abstracts\Http\FormRequest as Request;
|
||||
|
||||
class SettingDelete extends Request
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'code' => 'required|string',
|
||||
];
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\OfflinePayments\Http\Requests;
|
||||
|
||||
use App\Abstracts\Http\FormRequest as Request;
|
||||
|
||||
class SettingGet extends Request
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'code' => 'required|string',
|
||||
];
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\OfflinePayments\Http\Requests;
|
||||
|
||||
use App\Abstracts\Http\FormRequest as Request;
|
||||
|
||||
class Show extends Request
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'payment_method' => 'required|string',
|
||||
];
|
||||
}
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\OfflinePayments\Jobs;
|
||||
|
||||
use App\Abstracts\Job;
|
||||
use App\Utilities\Modules;
|
||||
|
||||
class CreatePaymentMethod extends Job
|
||||
{
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param $request
|
||||
*/
|
||||
public function __construct($request)
|
||||
{
|
||||
$this->request = $this->getRequestInstance($request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$methods = json_decode(setting('offline-payments.methods'), true);
|
||||
|
||||
$payment_method = [
|
||||
'code' => 'offline-payments.' . $this->request->get('code') . '.' . (count($methods) + 1),
|
||||
'name' => $this->request->get('name'),
|
||||
'customer' => $this->request->get('customer'),
|
||||
'order' => $this->request->get('order'),
|
||||
'description' => $this->request->get('description'),
|
||||
];
|
||||
|
||||
$methods[] = $payment_method;
|
||||
|
||||
setting()->set('offline-payments.methods', json_encode($methods));
|
||||
|
||||
setting()->save();
|
||||
|
||||
Modules::clearPaymentMethodsCache();
|
||||
|
||||
return $payment_method;
|
||||
}
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\OfflinePayments\Jobs;
|
||||
|
||||
use App\Abstracts\Job;
|
||||
use App\Utilities\Modules;
|
||||
use App\Models\Banking\Transaction;
|
||||
|
||||
class DeletePaymentMethod extends Job
|
||||
{
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param $request
|
||||
*/
|
||||
public function __construct($request)
|
||||
{
|
||||
$this->request = $this->getRequestInstance($request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->authorize();
|
||||
|
||||
$methods = json_decode(setting('offline-payments.methods'), true);
|
||||
|
||||
$payment_method = [];
|
||||
|
||||
$code = $this->request->get('code');
|
||||
|
||||
foreach ($methods as $key => $method) {
|
||||
if ($method['code'] != $code) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$payment_method = $methods[$key];
|
||||
|
||||
unset($methods[$key]);
|
||||
}
|
||||
|
||||
setting()->set('offline-payments.methods', json_encode($methods));
|
||||
|
||||
setting()->save();
|
||||
|
||||
Modules::clearPaymentMethodsCache();
|
||||
|
||||
return $payment_method;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if this action is applicable.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
if ($relationships = $this->getRelationships()) {
|
||||
$message = trans('messages.warning.deleted', ['name' => $this->request->get('code'), 'text' => implode(', ', $relationships)]);
|
||||
|
||||
throw new \Exception($message);
|
||||
}
|
||||
}
|
||||
|
||||
public function getRelationships()
|
||||
{
|
||||
$counter = [];
|
||||
|
||||
if (!$c = Transaction::where('payment_method', $this->request->get('code'))->get()->count()) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$counter[] = $c . ' ' . strtolower(trans_choice('general.transactions', ($c > 1) ? 2 : 1));
|
||||
|
||||
return $counter;
|
||||
}
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\OfflinePayments\Jobs;
|
||||
|
||||
use App\Abstracts\Job;
|
||||
use App\Utilities\Modules;
|
||||
|
||||
class UpdatePaymentMethod extends Job
|
||||
{
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param $request
|
||||
*/
|
||||
public function __construct($request)
|
||||
{
|
||||
$this->request = $this->getRequestInstance($request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$methods = json_decode(setting('offline-payments.methods'), true);
|
||||
|
||||
$payment_method = [];
|
||||
|
||||
$code = $this->request->get('update_code');
|
||||
|
||||
foreach ($methods as $key => $method) {
|
||||
if ($method['code'] != $code) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$method = explode('.', $code);
|
||||
|
||||
$payment_method = [
|
||||
'code' => 'offline-payments.' . $this->request->get('code') . '.' . $method[2],
|
||||
'name' => $this->request->get('name'),
|
||||
'customer' => $this->request->get('customer'),
|
||||
'order' => $this->request->get('order'),
|
||||
'description' => $this->request->get('description'),
|
||||
];
|
||||
|
||||
$methods[$key] = $payment_method;
|
||||
}
|
||||
|
||||
setting()->set('offline-payments.methods', json_encode($methods));
|
||||
|
||||
setting()->save();
|
||||
|
||||
Modules::clearPaymentMethodsCache();
|
||||
|
||||
return $payment_method;
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\OfflinePayments\Listeners;
|
||||
|
||||
use App\Events\Auth\LandingPageShowing as Event;
|
||||
|
||||
class AddLandingPage
|
||||
{
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param Event $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(Event $event)
|
||||
{
|
||||
$event->user->landing_pages['offline-payments.settings.edit'] = trans('offline-payments::general.name');
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\OfflinePayments\Listeners;
|
||||
|
||||
use App\Events\Module\Installed as Event;
|
||||
use App\Traits\Permissions;
|
||||
|
||||
class FinishInstallation
|
||||
{
|
||||
use Permissions;
|
||||
|
||||
public $alias = 'offline-payments';
|
||||
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param Event $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(Event $event)
|
||||
{
|
||||
if ($event->alias != $this->alias) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->updatePermissions();
|
||||
}
|
||||
|
||||
protected function updatePermissions()
|
||||
{
|
||||
// c=create, r=read, u=update, d=delete
|
||||
$this->attachPermissionsToAdminRoles([
|
||||
$this->alias . '-settings' => 'r,u,d',
|
||||
]);
|
||||
}
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\OfflinePayments\Listeners;
|
||||
|
||||
use App\Events\Module\PaymentMethodShowing as Event;
|
||||
|
||||
class ShowAsPaymentMethod
|
||||
{
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param Event $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(Event $event)
|
||||
{
|
||||
$methods = json_decode(setting('offline-payments.methods'), true);
|
||||
|
||||
if (empty($methods)) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($methods as $method) {
|
||||
$event->modules->payment_methods[] = $method;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\OfflinePayments\Listeners;
|
||||
|
||||
use App\Events\Module\SettingShowing as Event;
|
||||
|
||||
class ShowInSettingsPage
|
||||
{
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param Event $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(Event $event)
|
||||
{
|
||||
$event->modules->settings['offline-payments'] = [
|
||||
'name' => trans('offline-payments::general.name'),
|
||||
'description' => trans('offline-payments::general.description'),
|
||||
'url' => route('offline-payments.settings.edit'),
|
||||
'icon' => 'fas fa-credit-card',
|
||||
];
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\OfflinePayments\Providers;
|
||||
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as Provider;
|
||||
|
||||
class Event extends Provider
|
||||
{
|
||||
/**
|
||||
* Determine if events and listeners should be automatically discovered.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function shouldDiscoverEvents()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the listener directories that should be used to discover events.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function discoverEventsWithin()
|
||||
{
|
||||
return [
|
||||
__DIR__ . '/../Listeners',
|
||||
];
|
||||
}
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\OfflinePayments\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider as Provider;
|
||||
|
||||
class Main extends Provider
|
||||
{
|
||||
/**
|
||||
* Boot the application events.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->loadTranslations();
|
||||
$this->loadViews();
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->loadRoutes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Load views.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function loadViews()
|
||||
{
|
||||
$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'offline-payments');
|
||||
}
|
||||
|
||||
/**
|
||||
* Load translations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function loadTranslations()
|
||||
{
|
||||
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'offline-payments');
|
||||
}
|
||||
|
||||
/**
|
||||
* Load routes.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function loadRoutes()
|
||||
{
|
||||
if (app()->routesAreCached()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$routes = [
|
||||
'admin.php',
|
||||
'portal.php',
|
||||
'signed.php',
|
||||
];
|
||||
|
||||
foreach ($routes as $route) {
|
||||
$this->loadRoutesFrom(__DIR__ . '/../Routes/' . $route);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the services provided by the provider.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provides()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
@ -1,132 +0,0 @@
|
||||
/**
|
||||
* First we will load all of this project's JavaScript dependencies which
|
||||
* includes Vue and other libraries. It is a great starting point when
|
||||
* building robust, powerful web applications using Vue and Laravel.
|
||||
*/
|
||||
|
||||
require('./../../../../../resources/assets/js/bootstrap');
|
||||
|
||||
import Vue from 'vue';
|
||||
|
||||
import Global from './../../../../../resources/assets/js/mixins/global';
|
||||
import Form from './../../../../../resources/assets/js/plugins/form';
|
||||
import DashboardPlugin from './../../../../../resources/assets/js/plugins/dashboard-plugin';
|
||||
|
||||
// plugin setup
|
||||
Vue.use(DashboardPlugin);
|
||||
|
||||
const app = new Vue({
|
||||
el: '#app',
|
||||
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
|
||||
data() {
|
||||
return {
|
||||
form: new Form('offline-payment'),
|
||||
update_code: null,
|
||||
form_loading: '',
|
||||
}
|
||||
},
|
||||
|
||||
methods:{
|
||||
onEdit(event) {
|
||||
var code = event.target.dataset.code;
|
||||
|
||||
this.form_loading = '<span class="form-loading-bar"><span class="form-loading-spin"><i class="fa fa-spinner fa-spin"></i></span></span>';
|
||||
|
||||
this.form.loading = true;
|
||||
|
||||
axios.post('offline-payments/settings/get', {
|
||||
code: code
|
||||
})
|
||||
.then(response => {
|
||||
this.form.name = response.data.data.name;
|
||||
this.form.code = response.data.data.code;
|
||||
this.form.customer = response.data.data.customer;
|
||||
this.form.order = response.data.data.order;
|
||||
this.form.description = response.data.data.description;
|
||||
this.form.update_code = response.data.data.update_code;
|
||||
this.update_code = response.data.data.update_code;
|
||||
this.form.loading = false;
|
||||
this.form_loading = '';
|
||||
})
|
||||
.catch(error => {
|
||||
this.form.loading = false;
|
||||
this.form_loading = '';
|
||||
});
|
||||
},
|
||||
|
||||
// Actions > Delete
|
||||
confirmDelete(code, title, message, button_cancel, button_delete) {
|
||||
let confirm = {
|
||||
code: code,
|
||||
url: url,
|
||||
title: title,
|
||||
message: message,
|
||||
button_cancel: button_cancel,
|
||||
button_delete: button_delete,
|
||||
show: true
|
||||
};
|
||||
|
||||
this.component = Vue.component('add-new-component', (resolve, reject) => {
|
||||
resolve({
|
||||
template : '<div id="dynamic-delete-component"><akaunting-modal v-if="confirm.show" :show="confirm.show" :title="confirm.title" :message="confirm.message" :button_cancel="confirm.button_cancel" :button_delete="confirm.button_delete" @confirm="onDelete" @cancel="cancelDelete"></akaunting-modal></div>',
|
||||
|
||||
mixins: [
|
||||
Global
|
||||
],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
confirm: confirm,
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
// Delete action post
|
||||
async onDelete() {
|
||||
let promise = Promise.resolve(axios({
|
||||
method: 'DELETE',
|
||||
url: 'offline-payments/settings/delete',
|
||||
data: {
|
||||
code: this.confirm.code
|
||||
}
|
||||
}));
|
||||
|
||||
promise.then(response => {
|
||||
var type = (response.data.success) ? 'success' : 'warning';
|
||||
|
||||
if (response.data.success) {
|
||||
if (response.data.redirect) {
|
||||
//window.location.href = response.data.redirect;
|
||||
}
|
||||
|
||||
document.getElementById('method-' + this.confirm.code).remove();
|
||||
}
|
||||
|
||||
this.confirm.show = false;
|
||||
|
||||
this.$notify({
|
||||
message: response.data.message,
|
||||
timeout: 5000,
|
||||
icon: 'fas fa-bell',
|
||||
type
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
this.success = false;
|
||||
});
|
||||
},
|
||||
|
||||
// Close modal empty default value
|
||||
cancelDelete() {
|
||||
this.confirm.show = false;
|
||||
},
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
File diff suppressed because one or more lines are too long
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'name' => 'المدفوعات بدون الإتصال بالأنترنت',
|
||||
'description' => 'إنشاء خيارات دفع غير محدودة لاستخدام المسؤول',
|
||||
|
||||
'add_new' => 'إضافة جديد',
|
||||
'edit' => 'تعديل: :method',
|
||||
|
||||
'form' => [
|
||||
'code' => 'الكود',
|
||||
'customer' => 'إظهار للعميل',
|
||||
'order' => 'طلب'
|
||||
],
|
||||
|
||||
'methods' => 'طريقة | طرق',
|
||||
|
||||
'payment_gateways' => 'طرق الدفع بدون أنترنت',
|
||||
|
||||
];
|
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'name' => 'Offline betalinger',
|
||||
'description' => 'Opret ubegrænsede betalingsmuligheder til admin-brug',
|
||||
|
||||
'add_new' => 'Tilføj ny',
|
||||
'edit' => 'Rediger: :method',
|
||||
|
||||
'form' => [
|
||||
'code' => 'Kode',
|
||||
'customer' => 'Vis til kunde',
|
||||
'order' => 'Bestille'
|
||||
],
|
||||
|
||||
'methods' => 'Metode|Metoder',
|
||||
|
||||
'payment_gateways' => 'Offline betalingsmetoder',
|
||||
|
||||
];
|
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'name' => 'Offline-Zahlungen',
|
||||
'description' => 'Erstelle unbegrenzte Zahlungsoptionen für Adminnutzung',
|
||||
|
||||
'add_new' => 'Neu hinzufügen',
|
||||
'edit' => 'Bearbeiten: :method',
|
||||
|
||||
'form' => [
|
||||
'code' => 'Code',
|
||||
'customer' => 'Dem Kunden zeigen',
|
||||
'order' => 'Bestellung'
|
||||
],
|
||||
|
||||
'methods' => 'Methode|Methoden',
|
||||
|
||||
'payment_gateways' => 'Offline-Zahlungen-Methoden',
|
||||
|
||||
];
|
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'name' => 'Offline Payments',
|
||||
'description' => 'Create unlimited payment options for admin usage',
|
||||
|
||||
'add_new' => 'Add New',
|
||||
'edit' => 'Edit: :method',
|
||||
|
||||
'form' => [
|
||||
'code' => 'Code',
|
||||
'customer' => 'Show to Customer',
|
||||
'order' => 'Order'
|
||||
],
|
||||
|
||||
'methods' => 'Method|Methods',
|
||||
|
||||
'payment_gateways' => 'Offline Payment Methods',
|
||||
|
||||
];
|
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'name' => 'پرداخت های آفلاین',
|
||||
'description' => 'ساخت گزینه پرداخت نامحدود برای استفاده مدیر',
|
||||
|
||||
'add_new' => 'افزودن جدید',
|
||||
'edit' => 'ویرایش: :method',
|
||||
|
||||
'form' => [
|
||||
'code' => 'کد',
|
||||
'customer' => 'نمایش به مشتری',
|
||||
'order' => 'سفارش'
|
||||
],
|
||||
|
||||
'methods' => 'روش|روش ها',
|
||||
|
||||
'payment_gateways' => 'روش های پرداخت آفلاین',
|
||||
|
||||
];
|
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'name' => 'Paiements hors-ligne',
|
||||
'description' => 'Créez un nombre illimité d\'options de paiement à usage administratif',
|
||||
|
||||
'add_new' => 'Ajouter un nouveau',
|
||||
'edit' => 'Modifier : :method',
|
||||
|
||||
'form' => [
|
||||
'code' => 'Code',
|
||||
'customer' => 'Montrer au client',
|
||||
'order' => 'Ordre'
|
||||
],
|
||||
|
||||
'methods' => 'Méthode|Méthodes',
|
||||
|
||||
'payment_gateways' => 'Méthodes de paiement hors ligne',
|
||||
|
||||
];
|
@ -1,21 +0,0 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'name' => 'Pembayaran Offline',
|
||||
'description' => 'Buat opsi pembayaran tak terbatas untuk admin gunakan',
|
||||
|
||||
'add_new' => 'Tambah Baru',
|
||||
'edit' => 'Edit:: metode',
|
||||
|
||||
'form' => [
|
||||
'code' => 'Kode',
|
||||
'customer' => 'Tunjukkan kepada Pelanggan',
|
||||
'order' => 'Pesanan'
|
||||
],
|
||||
|
||||
'methods' => 'Metode|Metode',
|
||||
|
||||
'payment_gateways' => 'Metode Pembayaran Offline',
|
||||
|
||||
];
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user