Transfer Show page file updates..

This commit is contained in:
Cüneyt Şentürk 2021-07-09 23:36:41 +03:00
parent 153844ca56
commit deda93e8a1
37 changed files with 2357 additions and 509 deletions

View File

@ -0,0 +1,723 @@
<?php
namespace App\Abstracts\View\Components;
use App\Models\Common\Media;
use App\Traits\DateTime;
use App\Traits\Transactions;
use App\Utilities\Modules;
use File;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\Str;
use Image;
use Intervention\Image\Exception\NotReadableException;
use Illuminate\Support\Facades\Storage;
use Illuminate\View\Component;
abstract class TransferShow extends Component
{
use DateTime, Transactions;
public $transfer;
/** @var string */
public $transferTemplate;
/** @var array */
public $payment_methods;
public $date_format;
/** @var bool */
public $hideButtonAddNew;
/** @var bool */
public $hideButtonMoreActions;
/** @var bool */
public $hideButtonEdit;
/** @var bool */
public $hideButtonDuplicate;
/** @var bool */
public $hideButtonPrint;
/** @var bool */
public $hideButtonShare;
/** @var bool */
public $hideButtonEmail;
/** @var bool */
public $hideButtonPdf;
/** @var bool */
public $hideButtonDelete;
/** @var bool */
public $hideButtonGroupDivider1;
/** @var bool */
public $hideButtonGroupDivider2;
/** @var bool */
public $hideButtonGroupDivider3;
/** @var string */
public $permissionCreate;
/** @var string */
public $permissionUpdate;
/** @var string */
public $permissionDelete;
/** @var string */
public $routeButtonAddNew;
/** @var string */
public $routeButtonEdit;
/** @var string */
public $routeButtonDuplicate;
/** @var string */
public $routeButtonPrint;
/** @var string */
public $signedUrl;
/** @var string */
public $routeButtonEmail;
/** @var string */
public $routeButtonPdf;
/** @var string */
public $hideButtonTemplate;
/** @var string */
public $routeButtonDelete;
/** @var string */
public $textDeleteModal;
/** @var bool */
public $hideHeader;
/** @var bool */
public $hideHeaderFromAccount;
/** @var bool */
public $hideHeaderToAccount;
/** @var bool */
public $hideHeaderAmount;
/** @var bool */
public $hideHeaderPaidAt;
/** @var string */
public $textHeaderFromAccount;
/** @var string */
public $textHeaderToAccount;
/** @var string */
public $textHeaderAmount;
/** @var string */
public $textHeaderPaidAt;
/** @var string */
public $classHeaderFromAccount;
/** @var string */
public $classHeaderToAccount;
/** @var string */
public $classHeaderAmount;
/** @var string */
public $classHeaderPaidAt;
/** @var bool */
public $hideFromAccount;
/** @var bool */
public $hideFromAccountTitle;
/** @var bool */
public $hideFromAccountName;
/** @var bool */
public $hideFromAccountNumber;
/** @var bool */
public $hideFromAccountBankName;
/** @var bool */
public $hideFromAccountBankPhone;
/** @var bool */
public $hideFromAccountBankAddress;
/** @var string */
public $textFromAccountTitle;
/** @var string */
public $textFromAccountNumber;
/** @var bool */
public $hideToAccount;
/** @var bool */
public $hideToAccountTitle;
/** @var bool */
public $hideToAccountName;
/** @var bool */
public $hideToAccountNumber;
/** @var bool */
public $hideToAccountBankName;
/** @var bool */
public $hideToAccountBankPhone;
/** @var bool */
public $hideToAccountBankAddress;
/** @var string */
public $textToAccountTitle;
/** @var string */
public $textToAccountNumber;
/** @var bool */
public $hideDetails;
/** @var bool */
public $hideDetailTitle;
/** @var bool */
public $hideDetailDate;
/** @var bool */
public $hideDetailPaymentMethod;
/** @var bool */
public $hideDetailReference;
/** @var bool */
public $hideDetailDescription;
/** @var bool */
public $hideDetailAmount;
/** @var string */
public $textDetailTitle;
/** @var string */
public $textDetailDate;
/** @var string */
public $textDetailPaymentMethod;
/** @var string */
public $textDetailReference;
/** @var string */
public $textDetailDescription;
/** @var string */
public $textDetailAmount;
/** @var bool */
public $hideAttachment;
public $attachment;
/** @var bool */
public $hideFooter;
/** @var bool */
public $hideFooterHistories;
public $histories;
/** @var string */
public $textHistories;
/** @var string */
public $classFooterHistories;
/**
* Create a new component instance.
*
* @return void
*/
public function __construct(
$transfer, $transferTemplate = '', array $payment_methods = [],
bool $hideButtonAddNew = false, bool $hideButtonMoreActions = false, bool $hideButtonEdit = false, bool $hideButtonDuplicate = false, bool $hideButtonPrint = false, bool $hideButtonShare = false,
bool $hideButtonEmail = false, bool $hideButtonPdf = false, bool $hideButtonTemplate = false, bool $hideButtonDelete = false,
bool $hideButtonGroupDivider1 = false, bool $hideButtonGroupDivider2 = false, bool $hideButtonGroupDivider3 = false,
string $permissionCreate = '', string $permissionUpdate = '', string $permissionDelete = '',
string $routeButtonAddNew = '', string $routeButtonEdit = '', string $routeButtonDuplicate = '', string $routeButtonPrint = '', string $signedUrl = '',
string $routeButtonEmail = '', string $routeButtonPdf = '', string $routeButtonDelete = '',
string $textDeleteModal = '',
bool $hideHeader = false, bool $hideHeaderFromAccount = false, bool $hideHeaderToAccount = false, bool $hideHeaderAmount = false, bool $hideHeaderPaidAt = false,
string $textHeaderFromAccount = '', string $textHeaderToAccount = '', string $textHeaderAmount = '', string $textHeaderPaidAt = '',
string $classHeaderFromAccount = '', string $classHeaderToAccount = '', string $classHeaderAmount = '', string $classHeaderPaidAt = '',
bool $hideFromAccount = false, bool $hideFromAccountTitle = false, bool $hideFromAccountName = false, bool $hideFromAccountNumber = false,
bool $hideFromAccountBankName = false, bool $hideFromAccountBankPhone = false, bool $hideFromAccountBankAddress = false,
string $textFromAccountTitle = '', string $textFromAccountNumber = '',
bool $hideToAccount = false, bool $hideToAccountTitle = false, bool $hideToAccountName = false, bool $hideToAccountNumber = false,
bool $hideToAccountBankName = false, bool $hideToAccountBankPhone = false, bool $hideToAccountBankAddress = false,
string $textToAccountTitle = '', string $textToAccountNumber = '',
bool $hideDetails = false, bool $hideDetailTitle = false, bool $hideDetailDate = false, bool $hideDetailPaymentMethod = false,
bool $hideDetailReference = false, bool $hideDetailDescription = false, bool $hideDetailAmount = false,
string $textDetailTitle = '', string $textDetailDate = '', string $textDetailPaymentMethod = '', string $textDetailReference = '',
string $textDetailDescription = '', string $textDetailAmount = '',
bool $hideAttachment = false, $attachment = [],
bool $hideFooter = false, bool $hideFooterHistories = false, $histories = [],
string $textHistories = '', string $classFooterHistories = ''
) {
$this->transfer = $transfer;
$this->transferTemplate = $this->getTransferTemplate($transferTemplate);
$this->payment_methods = ($payment_methods) ?: Modules::getPaymentMethods('all');
$this->date_format = $this->getCompanyDateFormat();
// Navbar Hide
$this->hideButtonAddNew = $hideButtonAddNew;
$this->hideButtonMoreActions = $hideButtonMoreActions;
$this->hideButtonEdit = $hideButtonEdit;
$this->hideButtonDuplicate = $hideButtonDuplicate;
$this->hideButtonPrint = $hideButtonPrint;
$this->hideButtonShare = $hideButtonShare;
$this->hideButtonEmail = $hideButtonEmail;
$this->hideButtonPdf = $hideButtonPdf;
$this->hideButtonTemplate = $hideButtonTemplate;
$this->hideButtonDelete = $hideButtonDelete;
$this->hideButtonGroupDivider1 = $hideButtonGroupDivider1;
$this->hideButtonGroupDivider2 = $hideButtonGroupDivider2;
$this->hideButtonGroupDivider3 = $hideButtonGroupDivider3;
// Navbar Permission
$this->permissionCreate = $this->getPermissionCreate($permissionCreate);
$this->permissionUpdate = $this->getPermissionUpdate($permissionUpdate);
$this->permissionDelete = $this->getPermissionDelete($permissionDelete);
// Navbar route
$this->routeButtonAddNew = $this->getRouteButtonAddNew($routeButtonAddNew);
$this->routeButtonEdit = $this->getRouteButtonEdit($routeButtonEdit);
$this->routeButtonDuplicate = $this->getRouteButtonDuplicate($routeButtonDuplicate);
$this->routeButtonPrint = $this->getRouteButtonPrint($routeButtonPrint);
$this->signedUrl = $this->getSignedUrl($signedUrl);
$this->routeButtonEmail = $this->getRouteButtonEmail($routeButtonEmail);
$this->routeButtonPdf = $this->getRouteButtonPdf($routeButtonPdf);
$this->routeButtonDelete = $this->getRouteButtonDelete($routeButtonDelete);
// Navbar Text
$this->textDeleteModal = $textDeleteModal;
// Header Hide
$this->hideHeader = $hideHeader;
$this->hideHeaderFromAccount = $hideHeaderFromAccount;
$this->hideHeaderToAccount = $hideHeaderToAccount;
$this->hideHeaderToAccount = $hideHeaderToAccount;
$this->hideHeaderAmount = $hideHeaderAmount;
$this->hideHeaderPaidAt = $hideHeaderPaidAt;
// Header Text
$this->textHeaderFromAccount = $this->getTextHeaderFromAccount($textHeaderFromAccount);
$this->textHeaderToAccount = $this->getTextHeaderToAccount($textHeaderToAccount);
$this->textHeaderAmount = $this->getTextHeaderAmount($textHeaderAmount);
$this->textHeaderPaidAt = $this->gettextHeaderPaidAt($textHeaderPaidAt);
// Header Class
$this->classHeaderFromAccount = $this->getclassHeaderFromAccount($classHeaderFromAccount);
$this->classHeaderToAccount = $this->getClassHeaderToAccount($classHeaderToAccount);
$this->classHeaderAmount = $this->getClassHeaderAmount($classHeaderAmount);
$this->classHeaderPaidAt = $this->getclassHeaderPaidAt($classHeaderPaidAt);
// From account Hide
$this->hideFromAccount = $hideFromAccount;
$this->hideFromAccountTitle = $hideFromAccountTitle;
$this->hideFromAccountName = $hideFromAccountName;
$this->hideFromAccountNumber = $hideFromAccountNumber;
$this->hideFromAccountBankName = $hideFromAccountBankName;
$this->hideFromAccountBankPhone = $hideFromAccountBankPhone;
$this->hideFromAccountBankAddress = $hideFromAccountBankAddress;
// From account text
$this->textFromAccountTitle = $this->getTextFromAccountTitle($textFromAccountTitle);
$this->textFromAccountNumber = $this->getTextFromAccountNumber($textFromAccountNumber);
// To account Hide
$this->hideToAccount = $hideToAccount;
$this->hideToAccountTitle = $hideToAccountTitle;
$this->hideToAccountName = $hideToAccountName;
$this->hideToAccountNumber = $hideToAccountNumber;
$this->hideToAccountBankName = $hideToAccountBankName;
$this->hideToAccountBankPhone = $hideToAccountBankPhone;
$this->hideToAccountBankAddress = $hideToAccountBankAddress;
// To account text
$this->textToAccountTitle = $this->getTextToAccountTitle($textToAccountTitle);
$this->textToAccountNumber = $this->getTextToAccountNumber($textToAccountNumber);
// Detail Information Hide checker
$this->hideDetails = $hideDetails;
$this->hideDetailTitle = $hideDetailTitle;
$this->hideDetailDate = $hideDetailDate;
$this->hideDetailPaymentMethod = $hideDetailPaymentMethod;
$this->hideDetailReference = $hideDetailReference;
$this->hideDetailDescription = $hideDetailDescription;
$this->hideDetailAmount = $hideDetailAmount;
// Releated Information Text
$this->textDetailTitle = $this->getTextDetailTitle($textDetailTitle);
$this->textDetailDate = $this->getTextDetailDate($textDetailDate);
$this->textDetailPaymentMethod = $this->getTextDetailPaymentMethod($textDetailPaymentMethod);
$this->textDetailReference = $this->getTextDetailReference($textDetailReference);
$this->textDetailDescription = $this->getTextDetailDescription($textDetailDescription);
$this->textDetailAmount = $this->getTextDetailAmount($textDetailAmount);
// Hide Attachment
$this->hideAttachment = $hideAttachment;
// Attachment data..
$this->attachment = '';
if (!empty($attachment)) {
$this->attachment = $attachment;
} else if (!empty($transfer)) {
$this->attachment = $transfer->attachment;
}
// Histories Hide
$this->hideFooter = $hideFooter;
$this->hideFooterHistories = $hideFooterHistories;
// Histories
$this->histories = $this->getHistories($histories);
$this->textHistories = $this->getTextHistories($textHistories);
$this->classFooterHistories = $this->getClassFooterHistories($classFooterHistories);
}
protected function getTransferTemplate($transferTemplate)
{
if (!empty($transferTemplate)) {
return $transferTemplate;
}
$transferTemplate = setting('transfer.template') ?: 'default';
return $transferTemplate;
}
protected function getRouteButtonAddNew($routeButtonAddNew)
{
if (!empty($routeButtonAddNew)) {
return $routeButtonAddNew;
}
return 'transfers.create';
}
protected function getRouteButtonEdit($routeButtonEdit)
{
if (!empty($routeButtonEdit)) {
return $routeButtonEdit;
}
return 'transfers.edit';
}
protected function getRouteButtonDuplicate($routeButtonDuplicate)
{
if (!empty($routeButtonDuplicate)) {
return $routeButtonDuplicate;
}
return 'transfers.duplicate';
}
protected function getRouteButtonPrint($routeButtonPrint)
{
if (!empty($routeButtonPrint)) {
return $routeButtonPrint;
}
return 'transfers.print';
}
protected function getSignedUrl($signedUrl)
{
if (!empty($signedUrl)) {
return $signedUrl;
}
try {
$signedUrl = URL::signedRoute('signed.transfer.show', [$this->transfer->id]);
} catch (\Exception $e) {
$signedUrl = false;
}
return $signedUrl;
}
protected function getRouteButtonEmail($routeButtonEmail)
{
if (!empty($routeButtonEmail)) {
return $routeButtonEmail;
}
return 'transfers.email';
}
protected function getRouteButtonPdf($routeButtonPdf)
{
if (!empty($routeButtonPdf)) {
return $routeButtonPdf;
}
return 'transfers.pdf';
}
protected function getRouteButtonDelete($routeButtonDelete)
{
if (!empty($routeButtonDelete)) {
return $routeButtonDelete;
}
return 'transfers.destroy';
}
protected function getPermissionCreate($permissionCreate)
{
if (!empty($permissionCreate)) {
return $permissionCreate;
}
return 'create-banking-transfers';
}
protected function getPermissionUpdate($permissionUpdate)
{
if (!empty($permissionUpdate)) {
return $permissionUpdate;
}
return 'update-banking-transfers';
}
protected function getPermissionDelete($permissionDelete)
{
if (!empty($permissionDelete)) {
return $permissionDelete;
}
return 'delete-banking-transfers';
}
protected function getTextHeaderFromAccount($textHeaderFromAccount)
{
if (!empty($textHeaderFromAccount)) {
return $textHeaderFromAccount;
}
return 'transfers.from_account';
}
protected function getTextHeaderToAccount($textHeaderToAccount)
{
if (!empty($textHeaderToAccount)) {
return $textHeaderToAccount;
}
return 'transfers.to_account';
}
protected function getTextHeaderAmount($textHeaderAmount)
{
if (!empty($textHeaderAmount)) {
return $textHeaderAmount;
}
return 'general.amount';
}
protected function getTextHeaderPaidAt($textHeaderPaidAt)
{
if (!empty($textHeaderPaidAt)) {
return $textHeaderPaidAt;
}
return 'general.date';
}
protected function getClassHeaderFromAccount($classHeaderFromAccount)
{
if (!empty($classHeaderFromAccount)) {
return $classHeaderFromAccount;
}
return 'col-4 col-lg-2';
}
protected function getClassHeaderToAccount($classHeaderToAccount)
{
if (!empty($classHeaderToAccount)) {
return $classHeaderToAccount;
}
return 'col-4 col-lg-6';
}
protected function getClassHeaderAmount($classHeaderAmount)
{
if (!empty($classHeaderAmount)) {
return $classHeaderAmount;
}
return 'col-4 col-lg-2 float-right';
}
protected function getClassHeaderPaidAt($classHeaderPaidAt)
{
if (!empty($classHeaderPaidAt)) {
return $classHeaderPaidAt;
}
return 'col-4 col-lg-2';
}
protected function getTextFromAccountTitle($textToAccountTitle)
{
if (!empty($textToAccountTitle)) {
return $textToAccountTitle;
}
return 'transfers.from_account';
}
protected function getTextFromAccountNumber($textFromAccountNumber)
{
if (!empty($textFromAccountNumber)) {
return $textFromAccountNumber;
}
return 'accounts.number';
}
protected function getTextToAccountTitle($textFromAccountTitle)
{
if (!empty($textFromAccountTitle)) {
return $textFromAccountTitle;
}
return 'transfers.to_account';
}
protected function getTextToAccountNumber($textToAccountNumber)
{
if (!empty($textToAccountNumber)) {
return $textToAccountNumber;
}
return 'accounts.number';
}
protected function getTextDetailTitle($textDetailTitle)
{
if (!empty($textDetailTitle)) {
return $textDetailTitle;
}
return 'transfers.details';
}
protected function getTextDetailDate($textDetailDate)
{
if (!empty($textDetailDate)) {
return $textDetailDate;
}
return 'general.date';
}
protected function getTextDetailPaymentMethod($textDetailPaymentMethod)
{
if (!empty($textDetailPaymentMethod)) {
return $textDetailPaymentMethod;
}
return 'general.payment_methods';
}
protected function getTextDetailReference($textDetailReference)
{
if (!empty($textDetailReference)) {
return $textDetailReference;
}
return 'general.reference';
}
protected function getTextDetailDescription($textDetailDescription)
{
if (!empty($textDetailDescription)) {
return $textDetailDescription;
}
return 'general.description';
}
protected function getTextDetailAmount($textDetailAmount)
{
if (!empty($textDetailAmount)) {
return $textDetailAmount;
}
return 'general.amount';
}
protected function getHistories($histories)
{
if (!empty($histories)) {
return $histories;
}
$histories[] = $this->transfer;
return $histories;
}
protected function getTextHistories($textHistories)
{
if (!empty($textHistories)) {
return $textHistories;
}
return 'invoices.histories';
}
protected function getClassFooterHistories($classFooterHistories)
{
if (!empty($classFooterHistories)) {
return $classFooterHistories;
}
return 'col-sm-6 col-md-6 col-lg-6 col-xl-6';
}
}

View File

@ -0,0 +1,278 @@
<?php
namespace App\Abstracts\View\Components;
use App\Abstracts\View\Components\Transfer as Base;
use App\Models\Common\Media;
use App\Traits\DateTime;
use App\Traits\Transactions;
use App\Utilities\Modules;
use File;
use Illuminate\Support\Facades\Log;
use Image;
use Intervention\Image\Exception\NotReadableException;
use Storage;
use Illuminate\Support\Str;
use Illuminate\View\Component;
abstract class TransferTemplate extends Component
{
use DateTime;
use Transactions;
public $transfer;
/** @var array */
public $payment_methods;
/** @var bool */
public $hideFromAccount;
/** @var bool */
public $hideFromAccountTitle;
/** @var bool */
public $hideFromAccountName;
/** @var bool */
public $hideFromAccountNumber;
/** @var bool */
public $hideFromAccountBankName;
/** @var bool */
public $hideFromAccountBankPhone;
/** @var bool */
public $hideFromAccountBankAddress;
/** @var string */
public $textFromAccountTitle;
/** @var string */
public $textFromAccountNumber;
/** @var bool */
public $hideToAccount;
/** @var bool */
public $hideToAccountTitle;
/** @var bool */
public $hideToAccountName;
/** @var bool */
public $hideToAccountNumber;
/** @var bool */
public $hideToAccountBankName;
/** @var bool */
public $hideToAccountBankPhone;
/** @var bool */
public $hideToAccountBankAddress;
/** @var string */
public $textToAccountTitle;
/** @var string */
public $textToAccountNumber;
/** @var bool */
public $hideDetails;
/** @var bool */
public $hideDetailTitle;
/** @var bool */
public $hideDetailDate;
/** @var bool */
public $hideDetailPaymentMethod;
/** @var bool */
public $hideDetailReference;
/** @var bool */
public $hideDetailDescription;
/** @var bool */
public $hideDetailAmount;
/** @var string */
public $textDetailTitle;
/** @var string */
public $textDetailDate;
/** @var string */
public $textDetailPaymentMethod;
/** @var string */
public $textDetailReference;
/** @var string */
public $textDetailDescription;
/** @var string */
public $textDetailAmount;
/**
* Create a new component instance.
*
* @return void
*/
public function __construct(
$transfer, array $payment_methods = [],
bool $hideFromAccount = false, bool $hideFromAccountTitle = false, bool $hideFromAccountName = false, bool $hideFromAccountNumber = false,
bool $hideFromAccountBankName = false, bool $hideFromAccountBankPhone = false, bool $hideFromAccountBankAddress = false,
string $textFromAccountTitle = '', string $textFromAccountNumber = '',
bool $hideToAccount = false, bool $hideToAccountTitle = false, bool $hideToAccountName = false, bool $hideToAccountNumber = false,
bool $hideToAccountBankName = false, bool $hideToAccountBankPhone = false, bool $hideToAccountBankAddress = false,
string $textToAccountTitle = '', string $textToAccountNumber = '',
bool $hideDetails = false, bool $hideDetailTitle = false, bool $hideDetailDate = false, bool $hideDetailPaymentMethod = false,
bool $hideDetailReference = false, bool $hideDetailDescription = false, bool $hideDetailAmount = false,
string $textDetailTitle = '', string $textDetailDate = '', string $textDetailPaymentMethod = '', string $textDetailReference = '',
string $textDetailDescription = '', string $textDetailAmount = ''
) {
$this->transfer = $transfer;
$this->payment_methods = ($payment_methods) ?: Modules::getPaymentMethods('all');
// From account Hide
$this->hideFromAccount = $hideFromAccount;
$this->hideFromAccountTitle = $hideFromAccountTitle;
$this->hideFromAccountName = $hideFromAccountName;
$this->hideFromAccountNumber = $hideFromAccountNumber;
$this->hideFromAccountBankName = $hideFromAccountBankName;
$this->hideFromAccountBankPhone = $hideFromAccountBankPhone;
$this->hideFromAccountBankAddress = $hideFromAccountBankAddress;
// From account text
$this->textFromAccountTitle = $this->getTextFromAccountTitle($textFromAccountTitle);
$this->textFromAccountNumber = $this->getTextFromAccountNumber($textFromAccountNumber);
// To account Hide
$this->hideToAccount = $hideToAccount;
$this->hideToAccountTitle = $hideToAccountTitle;
$this->hideToAccountName = $hideToAccountName;
$this->hideToAccountNumber = $hideToAccountNumber;
$this->hideToAccountBankName = $hideToAccountBankName;
$this->hideToAccountBankPhone = $hideToAccountBankPhone;
$this->hideToAccountBankAddress = $hideToAccountBankAddress;
// To account text
$this->textToAccountTitle = $this->getTextToAccountTitle($textToAccountTitle);
$this->textToAccountNumber = $this->getTextToAccountNumber($textToAccountNumber);
// Detail Information Hide checker
$this->hideDetails = $hideDetails;
$this->hideDetailTitle = $hideDetailTitle;
$this->hideDetailDate = $hideDetailDate;
$this->hideDetailPaymentMethod = $hideDetailPaymentMethod;
$this->hideDetailReference = $hideDetailReference;
$this->hideDetailDescription = $hideDetailDescription;
$this->hideDetailAmount = $hideDetailAmount;
// Releated Information Text
$this->textDetailTitle = $this->getTextDetailTitle($textDetailTitle);
$this->textDetailDate = $this->getTextDetailDate($textDetailDate);
$this->textDetailPaymentMethod = $this->getTextDetailPaymentMethod($textDetailPaymentMethod);
$this->textDetailReference = $this->getTextDetailReference($textDetailReference);
$this->textDetailDescription = $this->getTextDetailDescription($textDetailDescription);
$this->textDetailAmount = $this->getTextDetailAmount($textDetailAmount);
}
protected function getTextFromAccountTitle($textToAccountTitle)
{
if (!empty($textToAccountTitle)) {
return $textToAccountTitle;
}
return 'transfers.from_account';
}
protected function getTextFromAccountNumber($textFromAccountNumber)
{
if (!empty($textFromAccountNumber)) {
return $textFromAccountNumber;
}
return 'accounts.number';
}
protected function getTextToAccountTitle($textFromAccountTitle)
{
if (!empty($textFromAccountTitle)) {
return $textFromAccountTitle;
}
return 'transfers.to_account';
}
protected function getTextToAccountNumber($textToAccountNumber)
{
if (!empty($textToAccountNumber)) {
return $textToAccountNumber;
}
return 'accounts.number';
}
protected function getTextDetailTitle($textDetailTitle)
{
if (!empty($textDetailTitle)) {
return $textDetailTitle;
}
return 'transfers.details';
}
protected function getTextDetailDate($textDetailDate)
{
if (!empty($textDetailDate)) {
return $textDetailDate;
}
return 'general.date';
}
protected function getTextDetailPaymentMethod($textDetailPaymentMethod)
{
if (!empty($textDetailPaymentMethod)) {
return $textDetailPaymentMethod;
}
return 'general.payment_methods';
}
protected function getTextDetailReference($textDetailReference)
{
if (!empty($textDetailReference)) {
return $textDetailReference;
}
return 'general.reference';
}
protected function getTextDetailDescription($textDetailDescription)
{
if (!empty($textDetailDescription)) {
return $textDetailDescription;
}
return 'general.description';
}
protected function getTextDetailAmount($textDetailAmount)
{
if (!empty($textDetailAmount)) {
return $textDetailAmount;
}
return 'general.amount';
}
}

View File

@ -0,0 +1,22 @@
<?php
namespace App\Events\Banking;
use Illuminate\Queue\SerializesModels;
class TransferPrinting
{
use SerializesModels;
public $transfer;
/**
* Create a new event instance.
*
* @param $transfer
*/
public function __construct($transfer)
{
$this->transfer = $transfer;
}
}

View File

@ -15,6 +15,7 @@ use App\Models\Banking\Transfer;
use App\Models\Setting\Currency;
use App\Utilities\Modules;
use Date;
use Illuminate\Support\Str;
class Transfers extends Controller
{
@ -39,8 +40,6 @@ class Transfers extends Controller
*/
public function show(Transfer $transfer)
{
$this->itemData($transfer);
return view('banking.transfers.show', compact('transfer'));
}
@ -55,11 +54,19 @@ class Transfers extends Controller
$payment_methods = Modules::getPaymentMethods();
$currencies = Currency::enabled()->orderBy('name')->get()->makeHidden(['id', 'company_id', 'created_at', 'updated_at', 'deleted_at']);
$currency = Currency::where('code', setting('default.currency'))->first();
return view('banking.transfers.create', compact('accounts', 'payment_methods', 'currencies', 'currency'));
$file_type_mimes = explode(',', config('filesystems.mimes'));
$file_types = [];
foreach ($file_type_mimes as $mime) {
$file_types[] = '.' . $mime;
}
$file_types = implode(',', $file_types);
return view('banking.transfers.create', compact('accounts', 'payment_methods', 'currency', 'file_types'));
}
/**
@ -159,11 +166,19 @@ class Transfers extends Controller
$account = $transfer->expense_transaction->account;
$currencies = Currency::enabled()->orderBy('name')->get()->makeHidden(['id', 'company_id', 'created_at', 'updated_at', 'deleted_at']);
$currency = Currency::where('code', $account->currency_code)->first();
return view('banking.transfers.edit', compact('transfer', 'accounts', 'payment_methods', 'currencies', 'currency'));
$file_type_mimes = explode(',', config('filesystems.mimes'));
$file_types = [];
foreach ($file_type_mimes as $mime) {
$file_types[] = '.' . $mime;
}
$file_types = implode(',', $file_types);
return view('banking.transfers.edit', compact('transfer', 'accounts', 'payment_methods', 'currency', 'file_types'));
}
/**
@ -238,9 +253,9 @@ class Transfers extends Controller
*
* @return Response
*/
public function printRevenue(Transfer $transfer)
public function printTransfer(Transfer $transfer)
{
//event(new \App\Events\Banking\TransactionPrinting($transfer));
event(new \App\Events\Banking\TransferPrinting($transfer));
$view = view($transfer->template_path, compact('transfer'));
@ -254,9 +269,9 @@ class Transfers extends Controller
*
* @return Response
*/
public function pdfRevenue(Transfer $transfer)
public function pdfTransfer(Transfer $transfer)
{
//event(new \App\Events\Banking\TransactionPrinting($transfer));
event(new \App\Events\Banking\TransferPrinting($transfer));
$currency_style = true;
@ -268,28 +283,8 @@ class Transfers extends Controller
//$pdf->setPaper('A4', 'portrait');
$file_name = $this->getTransactionFileName($transfer);
$file_name = trans_choice('general.transfers', 1) . '-' . Str::slug($transfer->id, '-', language()->getShortCode()) . '-' . time() . '.pdf';
return $pdf->download($file_name);
}
/**
* Display a datas of show.
*
* @return Response
*/
public function itemData($transfer) {
$transfer['from_account_id'] = $transfer->expense_transaction->account_id;
$transfer['from_currency_code'] = $transfer->expense_transaction->currency_code;
$transfer['from_account_rate'] = $transfer->expense_transaction->currency_rate;
$transfer['to_account_id'] = $transfer->income_transaction->account_id;
$transfer['to_currency_code'] = $transfer->income_transaction->currency_code;
$transfer['to_account_rate'] = $transfer->income_transaction->currency_rate;
$transfer['description'] = $transfer->expense_transaction->description;
$transfer['amount'] = $transfer->expense_transaction->amount;
$transfer['payment_method'] = $transfer->expense_transaction->payment_method;
$transfer['reference'] = $transfer->expense_transaction->reference;
$transfer['transferred_at'] = Date::parse($transfer->expense_transaction->paid_at)->format('Y-m-d');
}
}

View File

@ -84,6 +84,15 @@ class CreateTransfer extends Job
'expense_transaction_id' => $expense_transaction->id,
'income_transaction_id' => $income_transaction->id,
]);
// Upload attachment
if ($this->request->file('attachment')) {
foreach ($this->request->file('attachment') as $attachment) {
$media = $this->getMedia($attachment, 'transfers');
$this->transfer->attachMedia($media, 'attachment');
}
}
});
return $this->transfer;

View File

@ -38,6 +38,19 @@ class UpdateTransfer extends Job
public function handle()
{
\DB::transaction(function () {
// Upload attachment
if ($this->request->file('attachment')) {
$this->deleteMediaModel($this->transfer, 'attachment', $this->request);
foreach ($this->request->file('attachment') as $attachment) {
$media = $this->getMedia($attachment, 'transfers');
$this->transfer->attachMedia($media, 'attachment');
}
} elseif (!$this->request->file('attachment') && $this->transfer->attachment) {
$this->deleteMediaModel($this->transfer, 'attachment', $this->request);
}
$expense_currency_code = $this->getCurrencyCode('from');
$income_currency_code = $this->getCurrencyCode('to');

View File

@ -3,16 +3,20 @@
namespace App\Models\Banking;
use App\Abstracts\Model;
use App\Models\Common\Media as MediaModel;
use App\Traits\Currencies;
use App\Traits\Media;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Znck\Eloquent\Traits\BelongsToThrough;
class Transfer extends Model
{
use BelongsToThrough, Currencies, HasFactory;
use BelongsToThrough, Currencies, HasFactory, Media;
protected $table = 'transfers';
protected $appends = ['attachment'];
/**
* Attributes that should be mass-assignable.
*
@ -59,6 +63,36 @@ class Transfer extends Model
)->withDefault(['name' => trans('general.na')]);
}
/**
* Get the current balance.
*
* @return string
*/
public function getAttachmentAttribute($value = null)
{
if (!empty($value) && !$this->hasMedia('attachment')) {
return $value;
} elseif (!$this->hasMedia('attachment')) {
return false;
}
return $this->getMedia('attachment')->all();
}
public function delete_attachment()
{
if ($attachments = $this->attachment) {
foreach ($attachments as $file) {
MediaModel::where('id', $file->id)->delete();
}
}
}
public function getTemplatePathAttribute($value = null)
{
return $value ?: 'banking.transfers.print_' . setting('transfer.template');
}
/**
* Create a new factory instance for the model.
*

View File

@ -0,0 +1,55 @@
<?php
namespace App\View\Components\Transfers;
use Illuminate\View\Component;
class Script extends Component
{
/** @var string */
public $type;
/** @var string */
public $scriptFile;
/** @var string */
public $version;
public $transfer;
/**
* Create a new component instance.
*
* @return void
*/
public function __construct(string $type = '', string $scriptFile = '', string $version = '', $transfer = false)
{
$this->type = $type;
$this->scriptFile = ($scriptFile) ? $scriptFile : 'public/js/banling/transfers.js';
$this->version = $this->getVersion($version);
$this->transfer = $transfer;
}
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.transfers.script');
}
protected function getVersion($version)
{
if (!empty($version)) {
return $version;
}
if ($alias = config('type.' . $this->type . '.alias')) {
return module_version($alias);
}
return version('short');
}
}

View File

@ -0,0 +1,18 @@
<?php
namespace App\View\Components\Transfers\Show;
use App\Abstracts\View\Components\TransferShow as Component;
class Attachment extends Component
{
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.transfers.show.attachment');
}
}

View File

@ -0,0 +1,18 @@
<?php
namespace App\View\Components\Transfers\Show;
use App\Abstracts\View\Components\TransferShow as Component;
class Content extends Component
{
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.transfers.show.content');
}
}

View File

@ -0,0 +1,18 @@
<?php
namespace App\View\Components\Transfers\Show;
use App\Abstracts\View\Components\TransferShow as Component;
class Footer extends Component
{
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.transfers.show.footer');
}
}

View File

@ -0,0 +1,18 @@
<?php
namespace App\View\Components\Transfers\Show;
use App\Abstracts\View\Components\TransferShow as Component;
class Header extends Component
{
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.transfers.show.header');
}
}

View File

@ -0,0 +1,18 @@
<?php
namespace App\View\Components\Transfers\Show;
use App\Abstracts\View\Components\TransferShow as Component;
class Histories extends Component
{
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.transfers.show.histories');
}
}

View File

@ -0,0 +1,18 @@
<?php
namespace App\View\Components\Transfers\Show;
use App\Abstracts\View\Components\TransferShow as Component;
class TopButtons extends Component
{
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.transfers.show.top-buttons');
}
}

View File

@ -0,0 +1,18 @@
<?php
namespace App\View\Components\Transfers\Show;
use App\Abstracts\View\Components\TransferShow as Component;
class Transfer extends Component
{
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.transfers.show.transfer');
}
}

View File

@ -0,0 +1,18 @@
<?php
namespace App\View\Components\Transfers\Template;
use App\Abstracts\View\Components\TransferTemplate as Component;
class Ddefault extends Component
{
/**
* Get the view / contents that represent the component.
*
* @return \Illuminate\Contracts\View\View|string
*/
public function render()
{
return view('components.transfers.template.default');
}
}

View File

@ -164,6 +164,9 @@ return [
'expense' => env('SETTING_FALLBACK_TRANSACTION_TYPE_EXPENSE', 'expense'),
],
],
'transfer' => [
'template' => env('SETTING_FALLBACK_BANKING_TEMPLATE', 'default'),
],
],
/*

View File

@ -6,6 +6,7 @@ return [
'from_account_rate' => 'From Account Rate',
'to_account' => 'To Account',
'to_account_rate' => 'To Account Rate',
'details' => 'Detail|Details',
'messages' => [
'delete' => ':from to :to (:amount)',

View File

@ -1,167 +0,0 @@
@extends('layouts.admin')
@section('content')
<div class="row" style="font-size: inherit !important;">
<div class="col-4 col-lg-2">
From Account
<br> <strong><span class="float-left long-texts mwpx-200 transaction-head-text">
{{ $transfer->expense_transaction->account->name }}
</span></strong> <br><br>
</div>
<div class="col-4 col-lg-6">
To Account
<br> <strong><span class="float-left long-texts mwpx-300 transaction-head-text">
{{ $transfer->income_transaction->account->name }}
</span></strong> <br><br>
</div>
<div class="col-4 col-lg-2">
Amount
<br> <strong><span class="float-left long-texts mwpx-100 transaction-head-text">
@money($transfer->amount, $transfer->from_currency_code, true)
</span></strong> <br><br>
</div>
<div class="col-4 col-lg-2">
Date
<br> <strong><span class="float-left long-texts mwpx-100 transaction-head-text">
{{ $transfer->transferred_at }}
</span></strong> <br><br>
</div>
</div>
<div class="card show-card" style="padding: 0px 15px; border-radius: 0px; box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 16px;">
<div class="card-body show-card-body">
<table class="border-bottom-1" style="width: 100%;">
<tbody>
<tr>
<td style="width: 50%; padding-bottom: 15px;" valign="top">
<table>
<tbody>
<tr>
<td>
<h2 class="mb-1" style="font-size: 16px;">
Sender Account
</h2>
<p style="margin: 0px; padding: 0px; font-size: 14px;">{{ $transfer->expense_transaction->account->name }}</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">
Account Number: {{ $transfer->from_account_id}}
</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">{{ $transfer->expense_transaction->account->bank_name }}</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->expense_transaction->account->bank_phone }}
</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">{{ $transfer->expense_transaction->account->bank_address }}</p>
</td>
</tr>
</tbody>
</table>
</td>
<td style="width: 50%; padding-bottom: 15px;" valign="top">
<table>
<tbody>
<tr>
<td style="text-align: right;">
<h2 class="mb-1" style="font-size: 16px;">
Recipient Account
</h2>
<p style="margin: 0px; padding: 0px; font-size: 14px;">{{ $transfer->income_transaction->account->name }}</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">
Account Number: {{ $transfer->to_account_id }}
</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">{{ $transfer->income_transaction->account->bank_name }}</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->income_transaction->account->bank_phone }}
</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">{{ $transfer->income_transaction->account->bank_address }}</p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table>
<tr>
<td style="padding-bottom: 0; padding-top: 32px;">
<h2 class="text-center text-uppercase" style="font-size: 16px;">
TRANSFER DETAIL
</h2>
</td>
</tr>
</table>
<table>
<tr>
<td style="width: 70%; padding-top:0; padding-bottom:0;">
<table>
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
Date:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $transfer->transferred_at }}
</td>
</tr>
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
Payment Method:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $transfer->payment_method }}
</td>
</tr>
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
Reference:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $transfer->reference }}
</td>
</tr>
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
Description:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $transfer->description }}
</td>
</tr>
</table>
</td>
<td style="width:30%; padding-top:32px; padding-left: 25px;" valign="top">
<table>
<tr>
<td style="background-color: #6da252; -webkit-print-color-adjust: exact; font-weight:bold !important; display:block;">
<h5 class="text-muted mb-0 text-white" style="font-size: 20px; color:#ffffff; text-align:center; margin-top: 16px;">
Amount
</h5>
<p class="font-weight-bold mb-0 text-white" style="font-size: 26px; color:#ffffff; text-align:center;">
@money($transfer->amount, $transfer->from_currency_code, true)
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
<div class="card show-card" style="padding: 0px 15px; border-radius: 0px; box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 16px;">
<div class="card-body show-card-body">
<div class="form-group col-md-6">
{!! Form::label('invoice_template', trans_choice('general.templates', 1), ['class' => 'form-control-label']) !!}
<div class="input-group">
<button type="button" class="btn btn-block btn-outline-primary" @click="onTemplate">
{{ trans('settings.invoice.choose_template') }}
</button>
</div>
</div>
</div>
</div>
@endsection
@push('scripts_start')
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
@endpush

View File

@ -41,6 +41,8 @@
{{ Form::textGroup('reference', trans('general.reference'), 'file', []) }}
{{ Form::fileGroup('attachment', trans('general.attachment'), '', ['dropzone-class' => 'w-100', 'multiple' => 'multiple', 'options' => ['acceptedFiles' => $file_types]], null , 'col-md-12') }}
{!! Form::hidden('currency_code', null, ['id' => 'currency_code', 'v-model' => 'form.currency_code']) !!}
{!! Form::hidden('currency_rate', null, ['id' => 'currency_rate', 'v-model' => 'form.currency_rate']) !!}
</div>

View File

@ -42,6 +42,8 @@
{{ Form::textGroup('reference', trans('general.reference'), 'file', []) }}
{{ Form::fileGroup('attachment', trans('general.attachment'), '', ['dropzone-class' => 'w-100', 'multiple' => 'multiple', 'options' => ['acceptedFiles' => $file_types]], !empty($transfer) ? $transfer->attachment : null , 'col-md-12') }}
{!! Form::hidden('currency_code', $currency->code, ['id' => 'currency_code', 'v-model' => 'form.currency_code']) !!}
{!! Form::hidden('currency_rate', $currency->rate, ['id' => 'currency_rate', 'v-model' => 'form.currency_rate']) !!}
</div>

View File

@ -0,0 +1,9 @@
@extends('layouts.print')
@section('title', trans_choice('general.transfers', 1))
@section('content')
<x-transfers.template.ddefault
:transfer="$transfer"
/>
@endsection

View File

@ -0,0 +1,9 @@
@extends('layouts.print')
@section('title', trans_choice('general.transfers', 1))
@section('content')
<x-trasnfers.template.second
:transfer="$transfer"
/>
@endsection

View File

@ -0,0 +1,9 @@
@extends('layouts.print')
@section('title', trans_choice('general.transfers', 1))
@section('content')
<x-transfers.template.third
:transfer="$transfer"
/>
@endsection

View File

@ -1,157 +0,0 @@
@extends('layouts.admin')
@section('content')
<div class="row" style="font-size: inherit !important;">
<div class="col-4 col-lg-2">
From Account
<br> <strong><span class="float-left long-texts mwpx-200 transaction-head-text">
{{ $transfer->expense_transaction->account->name }}
</span></strong> <br><br>
</div>
<div class="col-4 col-lg-6">
To Account
<br> <strong><span class="float-left long-texts mwpx-300 transaction-head-text">
{{ $transfer->income_transaction->account->name }}
</span></strong> <br><br>
</div>
<div class="col-4 col-lg-2">
Amount
<br> <strong><span class="float-left long-texts mwpx-100 transaction-head-text">
@money($transfer->amount, $transfer->from_currency_code, true)
</span></strong> <br><br>
</div>
<div class="col-4 col-lg-2">
Date
<br> <strong><span class="float-left long-texts mwpx-100 transaction-head-text">
{{ $transfer->transferred_at }}
</span></strong> <br><br>
</div>
</div>
<div class="card show-card" style="padding: 0px 15px; border-radius: 0px; box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 16px;">
<div class="card-body show-card-body">
<table>
<tr>
<td style="padding-bottom: 0; padding-top: 32px;">
<h2 class="text-center text-uppercase" style="font-size: 16px;">
TRANSFER DETAIL
</h2>
</td>
</tr>
</table>
<table class="border-bottom-1">
<tr>
<td style="width: 70%; padding-top:0; padding-bottom:45px;">
<table>
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
Date:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $transfer->transferred_at }}
</td>
</tr>
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
Payment Method:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $transfer->payment_method }}
</td>
</tr>
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
Reference:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $transfer->reference }}
</td>
</tr>
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
Description:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $transfer->description }}
</td>
</tr>
</table>
</td>
<td style="width:30%; padding-top:32px; padding-left: 25px;" valign="top">
<table>
<tr>
<td style="background-color: #6da252; -webkit-print-color-adjust: exact; font-weight:bold !important; display:block;">
<h5 class="text-muted mb-0 text-white" style="font-size: 20px; color:#ffffff; text-align:center; margin-top: 16px;">
Amount
</h5>
<p class="font-weight-bold mb-0 text-white" style="font-size: 26px; color:#ffffff; text-align:center;">
@money($transfer->amount, $transfer->from_currency_code, true)
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table class="border-bottom-1" style="width: 100%;">
<tbody>
<tr>
<td style="width: 60%; padding-bottom: 15px;">
<h2 class="mb-1" style="font-size: 16px;">
Sender Account
</h2>
<p style="margin: 0px; padding: 0px; font-size: 14px;">{{ $transfer->expense_transaction->account->name }}</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">
Account Number: {{ $transfer->from_account_id}}
</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">{{ $transfer->expense_transaction->account->bank_name }}</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->expense_transaction->account->bank_phone }}
</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">{{ $transfer->expense_transaction->account->bank_address }}</p>
</td>
</tr>
</tbody>
</table>
<table style="width: 100%; margin-top:15px;">
<tbody>
<tr>
<td style="width: 60%; padding-bottom: 15px;">
<h2 class="mb-1" style="font-size: 16px;">
Recipient Account
</h2>
<p style="margin: 0px; padding: 0px; font-size: 14px;">{{ $transfer->income_transaction->account->name }}</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">
Account Number: {{ $transfer->to_account_id }}
</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">{{ $transfer->income_transaction->account->bank_name }}</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->income_transaction->account->bank_phone }}
</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">{{ $transfer->income_transaction->account->bank_address }}</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="card show-card" style="padding: 0px 15px; border-radius: 0px; box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 16px;">
<div class="card-body show-card-body">
<div class="form-group col-md-6">
{!! Form::label('invoice_template', trans_choice('general.templates', 1), ['class' => 'form-control-label']) !!}
<div class="input-group">
<button type="button" class="btn btn-block btn-outline-primary" @click="onTemplate">
{{ trans('settings.invoice.choose_template') }}
</button>
</div>
</div>
</div>
</div>
@endsection
@push('scripts_start')
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
@endpush

View File

@ -1,157 +1,17 @@
@extends('layouts.admin')
@section('title', trans_choice('general.transfers', 1))
@section('new_button')
<x-transfers.show.top-buttons :transfer="$transfer" />
@endsection
@section('content')
<div class="row" style="font-size: inherit !important;">
<div class="col-4 col-lg-2">
<span>From Account</span>
<br> <strong><span class="float-left long-texts mwpx-200 transaction-head-text">
{{ $transfer->expense_transaction->account->name }}
</span></strong> <br><br>
</div>
<div class="col-4 col-lg-6">
<span>To Account</span>
<br> <strong><span class="float-left long-texts mwpx-300 transaction-head-text">
{{ $transfer->income_transaction->account->name }}
</span></strong> <br><br>
</div>
<div class="col-4 col-lg-2">
<span class="float-right">Amount</span>
<br> <strong><span class="float-right long-texts mwpx-100 transaction-head-text">
@money($transfer->amount, $transfer->from_currency_code, true)
</span></strong> <br><br>
</div>
<div class="col-4 col-lg-2 float-right">
<span class="float-right">Date</span>
<br> <strong><span class="float-right long-texts mwpx-100 transaction-head-text">
@date($transfer->transferred_at)
</span></strong> <br><br>
</div>
</div>
<div class="card show-card" style="padding: 0px 15px; border-radius: 0px; box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 16px;">
<div class="card-body show-card-body">
<table class="border-bottom-1" style="width: 100%;">
<tbody>
<tr>
<td style="width: 60%; padding-bottom: 15px;">
<h2 class="mb-1" style="font-size: 16px;">
Sender Account
</h2>
<p style="margin: 0px; padding: 0px; font-size: 14px;">{{ $transfer->expense_transaction->account->name }}</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">
Account Number: {{ $transfer->from_account_id}}
</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">{{ $transfer->expense_transaction->account->bank_name }}</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->expense_transaction->account->bank_phone }}
</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">{{ $transfer->expense_transaction->account->bank_address }}</p>
</td>
</tr>
</tbody>
</table>
<table class="border-bottom-1" style="width: 100%; margin-top:15px;">
<tbody>
<tr>
<td style="width: 60%; padding-bottom: 15px;">
<h2 class="mb-1" style="font-size: 16px;">
Recipient Account
</h2>
<p style="margin: 0px; padding: 0px; font-size: 14px;">{{ $transfer->income_transaction->account->name }}</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">
Account Number: {{ $transfer->to_account_id }}
</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">{{ $transfer->income_transaction->account->bank_name }}</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->income_transaction->account->bank_phone }}
</p>
<p style="margin: 0px; padding: 0px; font-size: 14px;">{{ $transfer->income_transaction->account->bank_address }}</p>
</td>
</tr>
</tbody>
</table>
<table>
<tr>
<td style="padding-bottom: 0; padding-top: 32px;">
<h2 class="text-center text-uppercase" style="font-size: 16px;">
TRANSFER DETAIL
</h2>
</td>
</tr>
</table>
<table>
<tr>
<td style="width: 70%; padding-top:0; padding-bottom:0;">
<table>
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
Date:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
@date($transfer->transferred_at)
</td>
</tr>
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
Payment Method:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $transfer->payment_method }}
</td>
</tr>
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
Reference:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $transfer->reference }}
</td>
</tr>
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
Description:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $transfer->description }}
</td>
</tr>
</table>
</td>
<td style="width:30%; padding-top:32px; padding-left: 25px;" valign="top">
<table>
<tr>
<td style="background-color: #6da252; -webkit-print-color-adjust: exact; font-weight:bold !important; display:block;">
<h5 class="text-muted mb-0 text-white" style="font-size: 20px; color:#ffffff; text-align:center; margin-top: 16px;">
Amount
</h5>
<p class="font-weight-bold mb-0 text-white" style="font-size: 26px; color:#ffffff; text-align:center;">
@money($transfer->amount, $transfer->from_currency_code, true)
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
<div class="card show-card col-md-6" style="padding: 0px 15px; border-radius: 0px; box-shadow: rgba(0, 0, 0, 0.2) 0px 4px 16px;">
<div class="card-body show-card-body">
<div class="form-group">
{!! Form::label('invoice_template', trans_choice('general.templates', 1), ['class' => 'form-control-label']) !!}
<div class="input-group">
<button type="button" class="btn btn-block btn-outline-primary" @click="onTemplate">
{{ trans('settings.invoice.choose_template') }}
</button>
</div>
</div>
</div>
</div>
<x-transfers.show.content :transfer="$transfer" />
@endsection
@push('scripts_start')
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
@endpush
<link rel="stylesheet" href="{{ asset('public/css/print.css?v=' . version('short')) }}" type="text/css">
<x-transfers.script />
@endpush

View File

@ -0,0 +1 @@
<script src="{{ asset( $scriptFile . '?v=' . $version) }}"></script>

View File

@ -0,0 +1,9 @@
@if ($attachment)
<div class="row align-items-center">
@foreach ($attachment as $file)
<div class="col-xs-12 col-sm-4 mb-4">
@include('partials.media.file')
</div>
@endforeach
</div>
@endif

View File

@ -0,0 +1,86 @@
@stack('content_header_start')
@if (!$hideHeader)
<x-transfers.show.header
:transfer="$transfer"
hide-header-from-account="{{ $hideHeaderFromAccount }}"
text-header-from-account="{{ $textHeaderFromAccount }}"
class-header-from-account="{{ $classHeaderFromAccount }}"
hide-header-to-account="{{ $hideHeaderToAccount }}"
text-header-to-account="{{ $textHeaderToAccount }}"
class-header-to-account="{{ $classHeaderToAccount }}"
hide-header-amount="{{ $hideHeaderAmount }}"
text-header-amount="{{ $textHeaderAmount }}"
class-header-amount="{{ $classHeaderAmount }}"
hide-header-paid-at="{{ $hideHeaderPaidAt }}"
text-header-paid-at="{{ $textHeaderPaidAt }}"
class-header-paid-at="{{ $classHeaderPaidAt }}"
/>
@endif
@stack('content_header_end')
@stack('transfer_start')
<x-transfers.show.transfer
:transfer="$transfer"
transfer-template="{{ $transferTemplate }}"
hide-from-account="{{ $hideFromAccount }}"
hide-from-account-title="{{ $hideFromAccountTitle }}"
hide-from-account-name="{{ $hideFromAccountName }}"
hide-from-account-number="{{ $hideFromAccountNumber }}"
hide-from-account-bank-name="{{ $hideFromAccountBankName }}"
hide-from-account-bank-phone="{{ $hideFromAccountBankPhone }}"
hide-from-account-bank-address="{{ $hideFromAccountBankAddress }}"
text-from-account-title="{{ $textFromAccountTitle }}"
text-from-account-number="{{ $textFromAccountNumber }}"
hide-to-account="{{ $hideToAccount }}"
hide-to-account-title="{{ $hideToAccountTitle }}"
hide-to-account-name="{{ $hideToAccountName }}"
hide-to-account-number="{{ $hideToAccountNumber }}"
hide-to-account-bank-name="{{ $hideToAccountBankName }}"
hide-to-account-bank-phone="{{ $hideToAccountBankPhone }}"
hide-to-account-bank-address="{{ $hideToAccountBankAddress }}"
text-to-account-title="{{ $textToAccountTitle }}"
text-to-account-number="{{ $textToAccountNumber }}"
hide-details="{{ $hideDetails }}"
hide-detail-title="{{ $hideDetailTitle }}"
hide-detail-date="{{ $hideDetailDate }}"
hide-detail-payment-method="{{ $hideDetailPaymentMethod }}"
hide-detail-reference="{{ $hideDetailReference }}"
hide-detail-description="{{ $hideDetailDescription }}"
hide-detail-amount="{{ $hideDetailAmount }}"
text-detail-title="{{ $textDetailTitle }}"
text-detail-date="{{ $textDetailDate }}"
text-detail-payment-method="{{ $textDetailPaymentMethod }}"
text-detail-reference="{{ $textDetailReference }}"
text-detail-description="{{ $textDetailDescription }}"
text-detail-amount="{{ $textDetailAmount }}"
/>
@stack('transfer_end')
@stack('attachment_start')
@if (!$hideAttachment)
<x-transfers.show.attachment
:transfer="$transfer"
:attachment="$attachment"
/>
@endif
@stack('attachment_end')
@stack('row_footer_start')
@if (!$hideFooter)
<x-transfers.show.footer
:transfer="$transfer"
:histories="$histories"
class-footer-histories="{{ $classFooterHistories }}"
hide-footer-histories="{{ $hideFooterHistories }}"
text-histories="{{ $textHistories }}"
/>
@endif
@stack('row_footer_end')
{{ Form::hidden('transfer_id', $transfer->id, ['id' => 'transfer_id']) }}

View File

@ -0,0 +1,13 @@
<div class="row">
@stack('row_footer_histories_start')
@if (!$hideFooterHistories)
<div class="{{ $classFooterHistories }}">
<x-transfers.show.histories
:transfer="$transfer"
:histories="$histories"
text-histories="{{ $textHistories }}"
/>
</div>
@endif
@stack('row_footer_histories_end')
</div>

View File

@ -0,0 +1,69 @@
<div class="row" style="font-size: inherit !important">
@stack('header_account_start')
@if (!$hideHeaderFromAccount)
<div class="{{ $classHeaderFromAccount }}">
{{ trans_choice($textHeaderFromAccount, 1) }}
<br>
<strong>
<span class="float-left long-texts mwpx-200 transaction-head-text">
{{ $transfer->expense_transaction->account->name }}
</span>
</strong>
<br><br>
</div>
@endif
@stack('header_account_end')
@stack('header_category_start')
@if (!$hideHeaderToAccount)
<div class="{{ $classHeaderToAccount }}">
{{ trans_choice($textHeaderToAccount, 1) }}
<br>
<strong>
<span class="float-left long-texts mwpx-300 transaction-head-text">
{{ $transfer->income_transaction->account->name }}
</span>
</strong>
<br><br>
</div>
@endif
@stack('header_category_end')
@stack('header_amount_start')
@if (!$hideHeaderAmount)
<div class="{{ $classHeaderAmount }}">
<span class="float-right">
{{ trans($textHeaderAmount) }}
</span>
<br>
<strong>
<span class="float-right long-texts mwpx-100 transaction-head-text">
@money($transfer->expense_transaction->amount, $transfer->from_currency_code, true)
</span>
</strong>
<br><br>
</div>
@endif
@stack('header_amount_end')
@stack('header_paid_at_start')
@if (!$hideHeaderPaidAt)
<div class="{{ $classHeaderPaidAt }}">
<span class="float-right">
{{ trans($textHeaderPaidAt) }}
</span>
<br>
<strong>
<span class="float-right long-texts mwpx-100 transaction-head-text">
@date($transfer->transferred_at)
</span>
</strong>
<br><br>
</div>
@endif
@stack('header_paid_at_end')
</div>

View File

@ -0,0 +1,47 @@
<div class="accordion">
<div class="card">
<div class="card-header" id="accordion-histories-header" data-toggle="collapse" data-target="#accordion-histories-body" aria-expanded="false" aria-controls="accordion-histories-body">
<h4 class="mb-0">{{ trans($textHistories) }}</h4>
</div>
<div id="accordion-histories-body" class="collapse hide" aria-labelledby="accordion-histories-header">
<div class="table-responsive">
<table class="table table-flush table-hover">
<thead class="thead-light">
@stack('row_footer_histories_head_tr_start')
<tr class="row table-head-line">
@stack('row_footer_histories_head_start')
<th class="col-xs-4 col-sm-3">
{{ trans('general.date') }}
</th>
<th class="col-xs-8 col-sm-9 text-left long-texts">
{{ trans('general.created') }}
</th>
@stack('row_footer_histories_head_end')
</tr>
@stack('row_footer_histories_head_tr_end')
</thead>
<tbody>
@stack('row_footer_histories_body_tr_start')
@foreach($histories as $history)
<tr class="row align-items-center border-top-1 tr-py">
@stack('row_footer_histories_body_td_start')
<td class="col-xs-4 col-sm-3">
@date($history->created_at)
</td>
<td class="col-xs-4 col-sm-6 text-left long-texts">
{{ $history->owner->name }}
</td>
@stack('row_footer_histories_body_td_end')
</tr>
@endforeach
@stack('row_footer_histories_body_tr_end')
</tbody>
</table>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,93 @@
@stack('button_group_start')
@if (!$hideButtonMoreActions)
<div class="dropup header-drop-top">
<button type="button" class="btn btn-white btn-sm" data-toggle="dropdown" aria-expanded="false">
<i class="fa fa-chevron-down"></i>&nbsp; {{ trans('general.more_actions') }}
</button>
<div class="dropdown-menu" role="menu">
@stack('button_dropdown_start')
@stack('edit_button_start')
@if (!$hideButtonEdit)
@can($permissionUpdate)
<a class="dropdown-item" href="{{ route($routeButtonEdit, $transfer->id) }}">
{{ trans('general.edit') }}
</a>
@endcan
@endif
@stack('edit_button_end')
@stack('duplicate_button_start')
@if (!$hideButtonDuplicate)
@can($permissionCreate)
<a class="dropdown-item" href="{{ route($routeButtonDuplicate, $transfer->id) }}">
{{ trans('general.duplicate') }}
</a>
@endcan
@endif
@stack('duplicate_button_end')
@stack('button_dropdown_divider_1_start')
@if (!$hideButtonGroupDivider1)
<div class="dropdown-divider"></div>
@endif
@stack('button_dropdown_divider_1_end')
@if (!$hideButtonPrint)
@stack('button_print_start')
<a class="dropdown-item" href="{{ route($routeButtonPrint, $transfer->id) }}" target="_blank">
{{ trans('general.print') }}
</a>
@stack('button_print_end')
@endif
@stack('button_pdf_start')
@if (!$hideButtonPdf)
<a class="dropdown-item" href="{{ route($routeButtonPdf, $transfer->id) }}">
{{ trans('general.download_pdf') }}
</a>
@endif
@stack('button_pdf_end')
@stack('button_dropdown_divider_2_start')
@if (!$hideButtonGroupDivider2)
<div class="dropdown-divider"></div>
@endif
@stack('button_dropdown_divider_2_end')
@if (!$hideButtonTemplate)
@stack('button_template_start')
<a class="dropdown-item" href="javascipt::void();">
{{ trans('general.form.choose', ['field' => trans_choice('general.templates', 1)]) }}
</a>
@stack('button_template_end')
@endif
@stack('button_dropdown_divider_3_start')
@if (!$hideButtonGroupDivider3)
<div class="dropdown-divider"></div>
@endif
@stack('button_dropdown_divider_3_end')
@stack('delete_button_start')
@if (!$hideButtonDelete)
@can($permissionDelete)
{!! Form::deleteLink($transfer, $routeButtonDelete, $textDeleteModal, 'transfer_number') !!}
@endcan
@endif
@stack('delete_button_end')
@stack('button_dropdown_end')
</div>
</div>
@endif
@stack('button_group_end')
@stack('add_new_button_start')
@if (!$hideButtonAddNew)
@can($permissionCreate)
<a href="{{ route($routeButtonAddNew) }}" class="btn btn-white btn-sm">
{{ trans('general.add_new') }}
</a>
@endcan
@endif
@stack('add_new_button_end')

View File

@ -0,0 +1,137 @@
<div class="card" style="padding: 0; padding-left: 15px; padding-right: 15px; border-radius: 0; box-shadow: 0 4px 16px rgba(0,0,0,.2);">
<div class="card-body show-card-body">
@if ($transferTemplate)
@switch($transferTemplate)
@case('second')
<x-transfers.template.second
:transfer="$transfer"
hide-from-account="{{ $hideFromAccount }}"
hide-from-account-title="{{ $hideFromAccountTitle }}"
hide-from-account-name="{{ $hideFromAccountName }}"
hide-from-account-number="{{ $hideFromAccountNumber }}"
hide-from-account-bank-name="{{ $hideFromAccountBankName }}"
hide-from-account-bank-phone="{{ $hideFromAccountBankPhone }}"
hide-from-account-bank-address="{{ $hideFromAccountBankAddress }}"
text-from-account-title="{{ $textFromAccountTitle }}"
text-from-account-number="{{ $textFromAccountNumber }}"
hide-to-account="{{ $hideToAccount }}"
hide-to-account-title="{{ $hideToAccountTitle }}"
hide-to-account-name="{{ $hideToAccountName }}"
hide-to-account-number="{{ $hideToAccountNumber }}"
hide-to-account-bank-name="{{ $hideToAccountBankName }}"
hide-to-account-bank-phone="{{ $hideToAccountBankPhone }}"
hide-to-account-bank-address="{{ $hideToAccountBankAddress }}"
text-to-account-title="{{ $textToAccountTitle }}"
text-to-account-number="{{ $textToAccountNumber }}"
hide-details="{{ $hideDetails }}"
hide-detail-title="{{ $hideDetailTitle }}"
hide-detail-date="{{ $hideDetailDate }}"
hide-detail-payment-method="{{ $hideDetailPaymentMethod }}"
hide-detail-reference="{{ $hideDetailReference }}"
hide-detail-description="{{ $hideDetailDescription }}"
hide-detail-amount="{{ $hideDetailAmount }}"
text-detail-title="{{ $textDetailTitle }}"
text-detail-date="{{ $textDetailDate }}"
text-detail-payment-method="{{ $textDetailPaymentMethod }}"
text-detail-reference="{{ $textDetailReference }}"
text-detail-description="{{ $textDetailDescription }}"
text-detail-amount="{{ $textDetailAmount }}"
/>
@break
@case('third')
<x-transfers.template.third
:transfer="$transfer"
hide-from-account="{{ $hideFromAccount }}"
hide-from-account-title="{{ $hideFromAccountTitle }}"
hide-from-account-name="{{ $hideFromAccountName }}"
hide-from-account-number="{{ $hideFromAccountNumber }}"
hide-from-account-bank-name="{{ $hideFromAccountBankName }}"
hide-from-account-bank-phone="{{ $hideFromAccountBankPhone }}"
hide-from-account-bank-address="{{ $hideFromAccountBankAddress }}"
text-from-account-title="{{ $textFromAccountTitle }}"
text-from-account-number="{{ $textFromAccountNumber }}"
hide-to-account="{{ $hideToAccount }}"
hide-to-account-title="{{ $hideToAccountTitle }}"
hide-to-account-name="{{ $hideToAccountName }}"
hide-to-account-number="{{ $hideToAccountNumber }}"
hide-to-account-bank-name="{{ $hideToAccountBankName }}"
hide-to-account-bank-phone="{{ $hideToAccountBankPhone }}"
hide-to-account-bank-address="{{ $hideToAccountBankAddress }}"
text-to-account-title="{{ $textToAccountTitle }}"
text-to-account-number="{{ $textToAccountNumber }}"
hide-details="{{ $hideDetails }}"
hide-detail-title="{{ $hideDetailTitle }}"
hide-detail-date="{{ $hideDetailDate }}"
hide-detail-payment-method="{{ $hideDetailPaymentMethod }}"
hide-detail-reference="{{ $hideDetailReference }}"
hide-detail-description="{{ $hideDetailDescription }}"
hide-detail-amount="{{ $hideDetailAmount }}"
text-detail-title="{{ $textDetailTitle }}"
text-detail-date="{{ $textDetailDate }}"
text-detail-payment-method="{{ $textDetailPaymentMethod }}"
text-detail-reference="{{ $textDetailReference }}"
text-detail-description="{{ $textDetailDescription }}"
text-detail-amount="{{ $textDetailAmount }}"
/>
@break
@default
<x-transfers.template.ddefault
:transfer="$transfer"
hide-from-account="{{ $hideFromAccount }}"
hide-from-account-title="{{ $hideFromAccountTitle }}"
hide-from-account-name="{{ $hideFromAccountName }}"
hide-from-account-number="{{ $hideFromAccountNumber }}"
hide-from-account-bank-name="{{ $hideFromAccountBankName }}"
hide-from-account-bank-phone="{{ $hideFromAccountBankPhone }}"
hide-from-account-bank-address="{{ $hideFromAccountBankAddress }}"
text-from-account-title="{{ $textFromAccountTitle }}"
text-from-account-number="{{ $textFromAccountNumber }}"
hide-to-account="{{ $hideToAccount }}"
hide-to-account-title="{{ $hideToAccountTitle }}"
hide-to-account-name="{{ $hideToAccountName }}"
hide-to-account-number="{{ $hideToAccountNumber }}"
hide-to-account-bank-name="{{ $hideToAccountBankName }}"
hide-to-account-bank-phone="{{ $hideToAccountBankPhone }}"
hide-to-account-bank-address="{{ $hideToAccountBankAddress }}"
text-to-account-title="{{ $textToAccountTitle }}"
text-to-account-number="{{ $textToAccountNumber }}"
hide-details="{{ $hideDetails }}"
hide-detail-title="{{ $hideDetailTitle }}"
hide-detail-date="{{ $hideDetailDate }}"
hide-detail-payment-method="{{ $hideDetailPaymentMethod }}"
hide-detail-reference="{{ $hideDetailReference }}"
hide-detail-description="{{ $hideDetailDescription }}"
hide-detail-amount="{{ $hideDetailAmount }}"
text-detail-title="{{ $textDetailTitle }}"
text-detail-date="{{ $textDetailDate }}"
text-detail-payment-method="{{ $textDetailPaymentMethod }}"
text-detail-reference="{{ $textDetailReference }}"
text-detail-description="{{ $textDetailDescription }}"
text-detail-amount="{{ $textDetailAmount }}"
/>
@endswitch
@else
@include($transferTemplate)
@endif
</div>
</div>

View File

@ -0,0 +1,179 @@
@if (!$hideFromAccount)
<table class="border-bottom-1" style="width: 100%;">
<tbody>
<tr>
<td style="width: 60%; padding-bottom: 15px;">
@if (!$hideFromAccountTitle)
<h2 class="mb-1" style="font-size: 16px;">
{{ trans($textFromAccountTitle) }}
</h2>
@endif
@if (!$hideFromAccountName)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->expense_transaction->account->name }}
</p>
@endif
@if (!$hideFromAccountNumber)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ trans($textFromAccountNumber) }}: {{ $transfer->expense_transaction->account->number }}
</p>
@endif
@if (!$hideFromAccountBankName)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->expense_transaction->account->bank_name }}
</p>
@endif
@if (!$hideFromAccountBankPhone)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->expense_transaction->account->bank_phone }}
</p>
@endif
@if (!$hideFromAccountBankAddress)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->expense_transaction->account->bank_address }}
</p>
@endif
</td>
</tr>
</tbody>
</table>
@endif
@if (!$hideToAccount)
<table class="border-bottom-1" style="width: 100%; margin-top:15px;">
<tbody>
<tr>
<td style="width: 60%; padding-bottom: 15px;">
@if (!$hideToAccountTitle)
<h2 class="mb-1" style="font-size: 16px;">
{{ trans($textToAccountTitle) }}
</h2>
@endif
@if (!$hideToAccountName)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->income_transaction->account->name }}
</p>
@endif
@if (!$hideToAccountNumber)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ trans($textToAccountNumber) }}: {{ $transfer->income_transaction->account->number }}
</p>
@endif
@if (!$hideToAccountBankName)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->income_transaction->account->bank_name }}
</p>
@endif
@if (!$hideToAccountBankPhone)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->income_transaction->account->bank_phone }}
</p>
@endif
@if (!$hideToAccountBankAddress)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->income_transaction->account->bank_address }}
</p>
@endif
</td>
</tr>
</tbody>
</table>
@endif
@if (!$hideDetails)
@if (!$hideDetailTitle)
<table>
<tr>
<td style="padding-bottom: 0; padding-top: 32px;">
<h2 class="text-center text-uppercase" style="font-size: 16px;">
{{ trans_choice($textDetailTitle, 2) }}
</h2>
</td>
</tr>
</table>
@endif
<table>
<tr>
<td style="width: 70%; padding-top:0; padding-bottom:0;">
<table>
@if (!$hideDetailDate)
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
{{ trans($textDetailDate) }}:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
@date($transfer->expense_transaction->paid_at)
</td>
</tr>
@endif
@if (!$hideDetailPaymentMethod)
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
{{ trans_choice($textDetailPaymentMethod, 1) }}:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $payment_methods[$transfer->expense_transaction->payment_method] }}
</td>
</tr>
@endif
@if (!$hideDetailReference)
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
{{ trans($textDetailReference) }}:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $transfer->expense_transaction->reference }}
</td>
</tr>
@endif
@if (!$hideDetailDescription)
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
{{ trans($textDetailDescription) }}
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $transfer->expense_transaction->description }}
</td>
</tr>
@endif
</table>
</td>
@if (!$hideDetailAmount)
<td style="width:30%; padding-top:32px; padding-left: 25px;" valign="top">
<table>
<tr>
<td style="background-color: #6da252; -webkit-print-color-adjust: exact; font-weight:bold !important; display:block;">
<h5 class="text-muted mb-0 text-white" style="font-size: 20px; color:#ffffff; text-align:center; margin-top: 16px;">
{{ trans($textDetailAmount) }}:
</h5>
<p class="font-weight-bold mb-0 text-white" style="font-size: 26px; color:#ffffff; text-align:center;">
@money($transfer->expense_transaction->amount, $transfer->from_currency_code, true)
</p>
</td>
</tr>
</table>
</td>
@endif
</tr>
</table>
@endif

View File

@ -0,0 +1,179 @@
@if (!$hideDetails)
@if (!$hideDetailTitle)
<table>
<tr>
<td style="padding-bottom: 0; padding-top: 32px;">
<h2 class="text-center text-uppercase" style="font-size: 16px;">
{{ trans_choice($textDetailTitle, 2) }}
</h2>
</td>
</tr>
</table>
@endif
<table class="border-bottom-1">
<tr>
<td style="width: 70%; padding-top:0; padding-bottom:45px;">
<table>
@if (!$hideDetailDate)
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
{{ trans($textDetailDate) }}:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
@date($transfer->transferred_at)
</td>
</tr>
@endif
@if (!$hideDetailPaymentMethod)
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
{{ trans_choice($textDetailPaymentMethod, 1) }}:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $payment_methods[$transfer->payment_method] }}
</td>
</tr>
@endif
@if (!$hideDetailReference)
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
{{ trans($textDetailReference) }}:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $transfer->reference }}
</td>
</tr>
@endif
@if (!$hideDetailDescription)
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
{{ trans($textDetailDescription) }}
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $transfer->description }}
</td>
</tr>
@endif
</table>
</td>
@if (!$hideDetailAmount)
<td style="width:30%; padding-top:32px; padding-left: 25px;" valign="top">
<table>
<tr>
<td style="background-color: #6da252; -webkit-print-color-adjust: exact; font-weight:bold !important; display:block;">
<h5 class="text-muted mb-0 text-white" style="font-size: 20px; color:#ffffff; text-align:center; margin-top: 16px;">
{{ trans($textDetailAmount) }}:
</h5>
<p class="font-weight-bold mb-0 text-white" style="font-size: 26px; color:#ffffff; text-align:center;">
@money($transfer->amount, $transfer->from_currency_code, true)
</p>
</td>
</tr>
</table>
</td>
@endif
</tr>
</table>
@endif
@if (!$hideFromAccount)
<table class="border-bottom-1" style="width: 100%;">
<tbody>
<tr>
<td style="width: 60%; padding-bottom: 15px;">
@if (!$hideFromAccountTitle)
<h2 class="mb-1" style="font-size: 16px;">
{{ trans($textFromAccountTitle) }}
</h2>
@endif
@if (!$hideFromAccountName)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->expense_transaction->account->name }}
</p>
@endif
@if (!$hideFromAccountNumber)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ trans($textFromAccountNumber) }}: {{ $transfer->expense_transaction->account->number}}
</p>
@endif
@if (!$hideFromAccountBankName)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->expense_transaction->account->bank_name }}
</p>
@endif
@if (!$hideFromAccountBankPhone)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->expense_transaction->account->bank_phone }}
</p>
@endif
@if (!$hideFromAccountBankAddress)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->expense_transaction->account->bank_address }}
</p>
@endif
</td>
</tr>
</tbody>
</table>
@endif
@if (!$hideToAccount)
<table class="border-bottom-1" style="width: 100%; margin-top:15px;">
<tbody>
<tr>
<td style="width: 60%; padding-bottom: 15px;">
@if (!$hideToAccountTitle)
<h2 class="mb-1" style="font-size: 16px;">
{{ trans($textToAccountTitle) }}
</h2>
@endif
@if (!$hideToAccountName)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->income_transaction->account->name }}
</p>
@endif
@if (!$hideToAccountNumber)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ trans($textToAccountNumber) }}: {{ $transfer->income_transaction->account->number }}
</p>
@endif
@if (!$hideToAccountBankName)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->income_transaction->account->bank_name }}
</p>
@endif
@if (!$hideToAccountBankPhone)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->income_transaction->account->bank_phone }}
</p>
@endif
@if (!$hideToAccountBankAddress)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->income_transaction->account->bank_address }}
</p>
@endif
</td>
</tr>
</tbody>
</table>
@endif

View File

@ -0,0 +1,191 @@
@if (!$hideFromAccount && !$hideToAccount)
<table class="border-bottom-1" style="width: 100%;">
<tbody>
<tr>
@if (!$hideFromAccount)
<td style="width: 50%; padding-bottom: 15px;" valign="top">
<table>
<tbody>
<tr>
<td>
@if (!$hideFromAccountTitle)
<h2 class="mb-1" style="font-size: 16px;">
{{ trans($textFromAccountTitle) }}
</h2>
@endif
@if (!$hideFromAccountName)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->expense_transaction->account->name }}
</p>
@endif
@if (!$hideFromAccountNumber)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ trans($textFromAccountNumber) }}: {{ $transfer->expense_transaction->account->number}}
</p>
@endif
@if (!$hideFromAccountBankName)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->expense_transaction->account->bank_name }}
</p>
@endif
@if (!$hideFromAccountBankPhone)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->expense_transaction->account->bank_phone }}
</p>
@endif
@if (!$hideFromAccountBankAddress)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->expense_transaction->account->bank_address }}
</p>
@endif
</td>
</tr>
</tbody>
</table>
</td>
@endif
@if (!$hideToAccount)
<td style="width: 50%; padding-bottom: 15px;" valign="top">
<table>
<tbody>
<tr>
<td style="text-align: right;">
@if (!$hideToAccountTitle)
<h2 class="mb-1" style="font-size: 16px;">
{{ trans($textToAccountTitle) }}
</h2>
@endif
@if (!$hideToAccountName)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->income_transaction->account->name }}
</p>
@endif
@if (!$hideToAccountNumber)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ trans($textToAccountNumber) }}: {{ $transfer->income_transaction->account->number }}
</p>
@endif
@if (!$hideToAccountBankName)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->income_transaction->account->bank_name }}
</p>
@endif
@if (!$hideToAccountBankPhone)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->income_transaction->account->bank_phone }}
</p>
@endif
@if (!$hideToAccountBankAddress)
<p style="margin: 0px; padding: 0px; font-size: 14px;">
{{ $transfer->income_transaction->account->bank_address }}
</p>
@endif
</td>
</tr>
</tbody>
</table>
</td>
@endif
</tr>
</tbody>
</table>
@endif
@if (!$hideDetails)
@if (!$hideDetailTitle)
<table>
<tr>
<td style="padding-bottom: 0; padding-top: 32px;">
<h2 class="text-center text-uppercase" style="font-size: 16px;">
{{ trans_choice($textDetailTitle, 2) }}
</h2>
</td>
</tr>
</table>
@endif
<table>
<tr>
<td style="width: 70%; padding-top:0; padding-bottom:0;">
<table>
@if (!$hideDetailDate)
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
{{ trans($textDetailDate) }}:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
@date($transfer->transferred_at)
</td>
</tr>
@endif
@if (!$hideDetailPaymentMethod)
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
{{ trans_choice($textDetailPaymentMethod, 1) }}:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $payment_methods[$transfer->payment_method] }}
</td>
</tr>
@endif
@if (!$hideDetailReference)
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
{{ trans($textDetailReference) }}:
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $transfer->reference }}
</td>
</tr>
@endif
@if (!$hideDetailDescription)
<tr>
<td style="width: 20%; padding-bottom:3px; font-size:14px; font-weight: bold;">
{{ trans($textDetailDescription) }}
</td>
<td class="border-bottom-1" style="width:80%; padding-bottom:3px; font-size:14px;">
{{ $transfer->description }}
</td>
</tr>
@endif
</table>
</td>
@if (!$hideDetailAmount)
<td style="width:30%; padding-top:32px; padding-left: 25px;" valign="top">
<table>
<tr>
<td style="background-color: #6da252; -webkit-print-color-adjust: exact; font-weight:bold !important; display:block;">
<h5 class="text-muted mb-0 text-white" style="font-size: 20px; color:#ffffff; text-align:center; margin-top: 16px;">
{{ trans($textDetailAmount) }}:
</h5>
<p class="font-weight-bold mb-0 text-white" style="font-size: 26px; color:#ffffff; text-align:center;">
@money($transfer->amount, $transfer->from_currency_code, true)
</p>
</td>
</tr>
</table>
</td>
@endif
</tr>
</table>
@endif