Merge branch 'build-version300' into 'master'

Build version300

See merge request mohit.panjvani/crater-web!162
This commit is contained in:
Mohit Panjwani
2020-01-27 09:26:58 +00:00
35 changed files with 121 additions and 124 deletions

View File

@@ -9,7 +9,7 @@ DB_HOST=db
DB_PORT=3306
DB_DATABASE=crater
DB_USERNAME=crater
DB_PASSWORD=crater
DB_PASSWORD="crater"
BROADCAST_DRIVER=log
CACHE_DRIVER=file

View File

@@ -36,7 +36,8 @@ class DashboardController extends Controller
$start = Carbon::now();
$end = Carbon::now();
$terms = explode('-', $fiscalYear);
if ($terms[0] < $start->month) {
if ($terms[0] <= $start->month) {
$startDate->month($terms[0])->startOfMonth();
$start->month($terms[0])->startOfMonth();
$end->month($terms[0])->endOfMonth();
@@ -93,6 +94,7 @@ class DashboardController extends Controller
}
$start->subMonth()->endOfMonth();
$salesTotal = Invoice::whereCompany($request->header('company'))
->whereBetween(
'invoice_date',

View File

@@ -168,10 +168,6 @@ class EstimatesController extends Controller
$data['user'] = User::find($userId)->toArray();
$data['company'] = Company::find($estimate->company_id);
$email = $data['user']['email'];
$notificationEmail = CompanySetting::getSetting(
'notification_email',
$request->header('company')
);
if (!$email) {
return response()->json([
@@ -179,13 +175,13 @@ class EstimatesController extends Controller
]);
}
if (!$notificationEmail) {
if (!config('mail.from.name')) {
return response()->json([
'error' => 'notification_email_does_not_exist'
'error' => 'from_email_does_not_exist'
]);
}
\Mail::to($email)->send(new EstimatePdf($data, $notificationEmail));
\Mail::to($email)->send(new EstimatePdf($data));
}
$estimate = Estimate::with([
@@ -340,10 +336,6 @@ class EstimatesController extends Controller
$data['company'] = Company::find($estimate->company_id);
$email = $data['user']['email'];
$notificationEmail = CompanySetting::getSetting(
'notification_email',
$request->header('company')
);
if (!$email) {
return response()->json([
@@ -351,13 +343,13 @@ class EstimatesController extends Controller
]);
}
if (!$notificationEmail) {
if (!config('mail.from.name')) {
return response()->json([
'error' => 'notification_email_does_not_exist'
'error' => 'from_email_does_not_exist'
]);
}
\Mail::to($email)->send(new EstimatePdf($data, $notificationEmail));
\Mail::to($email)->send(new EstimatePdf($data));
if ($estimate->status == Estimate::STATUS_DRAFT) {
$estimate->status = Estimate::STATUS_SENT;

View File

@@ -167,11 +167,6 @@ class InvoicesController extends Controller
$data['user'] = User::find($request->user_id)->toArray();
$data['company'] = Company::find($invoice->company_id);
$notificationEmail = CompanySetting::getSetting(
'notification_email',
$request->header('company')
);
$email = $data['user']['email'];
if (!$email) {
@@ -180,13 +175,13 @@ class InvoicesController extends Controller
]);
}
if (!$notificationEmail) {
if (!config('mail.from.name')) {
return response()->json([
'error' => 'notification_email_does_not_exist'
'error' => 'from_email_does_not_exist'
]);
}
\Mail::to($email)->send(new invoicePdf($data, $notificationEmail));
\Mail::to($email)->send(new invoicePdf($data));
}
$invoice = Invoice::with(['items', 'user', 'invoiceTemplate', 'taxes'])->find($invoice->id);
@@ -408,10 +403,6 @@ class InvoicesController extends Controller
$data['user'] = User::find($userId)->toArray();
$data['company'] = Company::find($invoice->company_id);
$email = $data['user']['email'];
$notificationEmail = CompanySetting::getSetting(
'notification_email',
$request->header('company')
);
if (!$email) {
return response()->json([
@@ -419,13 +410,13 @@ class InvoicesController extends Controller
]);
}
if (!$notificationEmail) {
if (!config('mail.from.name')) {
return response()->json([
'error' => 'notification_email_does_not_exist'
'error' => 'from_email_does_not_exist'
]);
}
\Mail::to($email)->send(new invoicePdf($data, $notificationEmail));
\Mail::to($email)->send(new invoicePdf($data));
if ($invoice->status == Invoice::STATUS_DRAFT) {
$invoice->status = Invoice::STATUS_SENT;

View File

@@ -12,17 +12,14 @@ class EstimatePdf extends Mailable
public $data = [];
public $notificationEmail = '';
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($data, $notificationEmail)
public function __construct($data)
{
$this->data = $data;
$this->notificationEmail = $notificationEmail;
}
/**
@@ -32,6 +29,6 @@ class EstimatePdf extends Mailable
*/
public function build()
{
return $this->from($this->notificationEmail)->markdown('emails.send.estimate', ['data', $this->data]);
return $this->markdown('emails.send.estimate', ['data', $this->data]);
}
}

View File

@@ -12,17 +12,14 @@ class invoicePdf extends Mailable
public $data = [];
public $notificationEmail = '';
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($data, $notificationEmail)
public function __construct($data)
{
$this->data = $data;
$this->notificationEmail = $notificationEmail;
}
/**
@@ -32,6 +29,6 @@ class invoicePdf extends Mailable
*/
public function build()
{
return $this->from($this->notificationEmail)->markdown('emails.send.invoice', ['data', $this->data]);
return $this->markdown('emails.send.invoice', ['data', $this->data]);
}
}

View File

@@ -38,7 +38,7 @@ class EnvironmentManager
'DB_PORT='.config('database.connections.'.config('database.default').'.port')."\n".
'DB_DATABASE='.config('database.connections.'.config('database.default').'.database')."\n".
'DB_USERNAME='.config('database.connections.'.config('database.default').'.username')."\n".
'DB_PASSWORD='.config('database.connections.'.config('database.default').'.password')."\n\n";
'DB_PASSWORD="'.config('database.connections.'.config('database.default').'.password')."\"\n\n";
$newDatabaseData =
'DB_CONNECTION='.$request->database_connection."\n".
@@ -46,7 +46,7 @@ class EnvironmentManager
'DB_PORT='.$request->database_port."\n".
'DB_DATABASE='.$request->database_name."\n".
'DB_USERNAME='.$request->database_username."\n".
'DB_PASSWORD='.$request->database_password."\n\n";
'DB_PASSWORD="'.$request->database_password."\"\n\n";
try {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
{
"/assets/js/app.js": "/assets/js/app.js?id=173ae96baaa64386fe81",
"/assets/css/crater.css": "/assets/css/crater.css?id=52eb9b3d184487e7c842"
"/assets/js/app.js": "/assets/js/app.js?id=397e57d36ef22a2e14fc",
"/assets/css/crater.css": "/assets/css/crater.css?id=616996a79c1df69d18de"
}

View File

@@ -398,6 +398,7 @@
"update_payment": "تحديث الدفعة",
"payment": "دفعة | مدفوعات",
"no_payments": "لا يوجد مدفوعات حتى الآن!",
"no_matching_payments": "لا توجد مدفوعات مطابقة!",
"list_of_payments": "سوف تحتوي هذه القائمة على مدفوعات الفواتير.",
"select_payment_mode": "اختر طريقة الدفع",

View File

@@ -452,6 +452,7 @@
"list_of_payments": "Dieser Abschnitt enthält die Liste der Zahlungen.",
"new_payment": "Neue Zahlung",
"no_payments": "Keine Zahlungen vorhanden!",
"no_matching_payments": "Es gibt keine passenden Zahlungen!",
"note": "Hinweis",
"payment": "Zahlung | Zahlungen",
"payment_mode": "Zahlungsart",

View File

@@ -409,6 +409,7 @@
"update_payment": "Update Payment",
"payment": "Payment | Payments",
"no_payments": "No payments yet!",
"no_matching_payments": "There are no matching payments!",
"list_of_payments": "This section will contain the list of payments.",
"select_payment_mode": "Select payment mode",
"confirm_send_payment": "This payment will be sent via email to the customer",

View File

@@ -397,6 +397,7 @@
"update_payment": "Actualizar pago",
"payment": "Pago | Pagos",
"no_payments": "¡Aún no hay pagos!",
"no_matching_payments": "¡No hay pagos equivalentes!",
"list_of_payments": "Esta sección contendrá la lista de pagos.",
"select_payment_mode": "Seleccionar modo de pago",

View File

@@ -395,6 +395,7 @@
"update_payment": "Mettre à jour le paiement",
"payment": "Paiement | Paiements",
"no_payments": "Aucun paiement pour le moment!",
"no_matching_payments": "Il n'y a aucun paiement correspondant!",
"list_of_payments": "Cette section contiendra la liste des paiements",
"select_payment_mode": "Sélectionnez le mode de paiement",

View File

@@ -398,6 +398,7 @@
"update_payment": "Atualizar Pagamento",
"payment": "Pagamento | Pagamentos",
"no_payments": "Ainda sem pagamentos!",
"no_matching_payments": "Não há pagamentos correspondentes!",
"list_of_payments": "Esta seção conterá a lista de pagamentos.",
"select_payment_mode": "Selecione a forma de pagamento",

View File

@@ -13,13 +13,13 @@ export const loadData = ({ commit, dispatch, state }, params) => {
})
}
export const getChart = ({ commit, dispatch, state }) => {
return new Promise((resolve, reject) => {
window.axios.get(`/api/dashboard/expense/chart`).then((response) => {
commit(types.SET_INITIAL_DATA, response.data)
resolve(response)
}).catch((err) => {
reject(err)
})
})
}
// export const getChart = ({ commit, dispatch, state }) => {
// return new Promise((resolve, reject) => {
// window.axios.get(`/api/dashboard/expense/chart`).then((response) => {
// commit(types.SET_INITIAL_DATA, response.data)
// resolve(response)
// }).catch((err) => {
// reject(err)
// })
// })
// }

View File

@@ -136,7 +136,9 @@ export const fatchItemUnit = ({ commit, dispatch, state }, id) => {
export const deleteItemUnit = ({ commit, dispatch, state }, id) => {
return new Promise((resolve, reject) => {
window.axios.delete(`/api/units/${id}`).then((response) => {
commit(types.DELETE_ITEM_UNIT, id)
if (!response.data.error) {
commit(types.DELETE_ITEM_UNIT, id)
}
resolve(response)
}).catch((err) => {
reject(err)

View File

@@ -154,7 +154,9 @@ export const fetchPaymentMode = ({ commit, dispatch, state }, data) => {
export const deletePaymentMode = ({ commit, dispatch, state }, id) => {
return new Promise((resolve, reject) => {
window.axios.delete(`/api/payment-methods/${id}`).then((response) => {
commit(types.DELETE_PAYMENT_MODE, id)
if (!response.data.error) {
commit(types.DELETE_PAYMENT_MODE, id)
}
resolve(response)
}).catch((err) => {
reject(err)

View File

@@ -4,9 +4,15 @@
<div class="page-header">
<h3 class="page-title">{{ isEdit ? $t('customers.edit_customer') : $t('customers.new_customer') }}</h3>
<ol class="breadcrumb">
<li class="breadcrumb-item"><router-link slot="item-title" to="/admin/dashboard">{{ $t('general.home') }}</router-link></li>
<li class="breadcrumb-item"><router-link slot="item-title" to="/admin/customers">{{ $tc('customers.customer', 2) }}</router-link></li>
<li class="breadcrumb-item">{{ isEdit ? $t('customers.edit_customer') : $t('customers.new_customer') }}</li>
<li class="breadcrumb-item">
<router-link slot="item-title" to="/admin/dashboard">{{ $t('general.home') }}</router-link>
</li>
<li class="breadcrumb-item">
<router-link slot="item-title" to="/admin/customers">{{ $tc('customers.customer', 2) }}</router-link>
</li>
<li class="breadcrumb-item">
{{ isEdit ? $t('customers.edit_customer') : $t('customers.new_customer') }}
</li>
</ol>
<div class="page-actions header-button-container">
<base-button
@@ -38,8 +44,12 @@
@input="$v.formData.name.$touch()"
/>
<div v-if="$v.formData.name.$error">
<span v-if="!$v.formData.name.required" class="text-danger">{{ $tc('validation.required') }}</span>
<span v-if="!$v.formData.name.minLength" class="text-danger"> {{ $tc('validation.name_min_length', $v.formData.name.$params.minLength.min, { count: $v.formData.name.$params.minLength.min }) }} </span>
<span v-if="!$v.formData.name.required" class="text-danger">
{{ $tc('validation.required') }}
</span>
<span v-if="!$v.formData.name.minLength" class="text-danger">
{{ $tc('validation.name_min_length', $v.formData.name.$params.minLength.min, { count: $v.formData.name.$params.minLength.min }) }}
</span>
</div>
</div>
<div class="form-group">
@@ -53,7 +63,9 @@
@input="$v.formData.email.$touch()"
/>
<div v-if="$v.formData.email.$error">
<span v-if="!$v.formData.email.email" class="text-danger"> {{ $tc('validation.email_incorrect') }} </span>
<span v-if="!$v.formData.email.email" class="text-danger">
{{ $tc('validation.email_incorrect') }}
</span>
</div>
</div>
<div class="form-group">
@@ -97,10 +109,13 @@
v-model="formData.website"
:invalid="$v.formData.website.$error"
type="url"
tab-index="6"
@input="$v.formData.website.$touch()"
/>
<div v-if="$v.formData.website.$error">
<span v-if="!$v.formData.website.url" class="text-danger">{{ $tc('validation.invalid_url') }}</span>
<span v-if="!$v.formData.website.url" class="text-danger">
{{ $tc('validation.invalid_url') }}
</span>
</div>
</div>
</div>
@@ -124,6 +139,7 @@
v-model="billing.state"
name="billing.state"
type="text"
tab-index="9"
/>
</div>
<div class="form-group">
@@ -138,7 +154,9 @@
@input="$v.billing.address_street_1.$touch()"
/>
<div v-if="$v.billing.address_street_1.$error">
<span v-if="!$v.billing.address_street_1.maxLength" class="text-danger">{{ $t('validation.address_maxlength') }}</span>
<span v-if="!$v.billing.address_street_1.maxLength" class="text-danger">
{{ $t('validation.address_maxlength') }}
</span>
</div>
<base-text-area
:tabindex="12"
@@ -150,7 +168,9 @@
@input="$v.billing.address_street_2.$touch()"
/>
<div v-if="$v.billing.address_street_2.$error">
<span v-if="!$v.billing.address_street_2.maxLength" class="text-danger">{{ $t('validation.address_maxlength') }}</span>
<span v-if="!$v.billing.address_street_2.maxLength" class="text-danger">
{{ $t('validation.address_maxlength') }}
</span>
</div>
</div>
</div>
@@ -175,6 +195,7 @@
v-model="billing.city"
name="billing.city"
type="text"
tab-index="10"
/>
</div>
<div class="form-group">
@@ -226,6 +247,7 @@
v-model="shipping.state"
name="shipping.state"
type="text"
tab-index="17"
/>
</div>
<div class="form-group">
@@ -277,6 +299,7 @@
v-model="shipping.city"
name="shipping.city"
type="text"
tab-index="18"
/>
</div>
<div class="form-group">

View File

@@ -398,7 +398,6 @@ export default {
}
},
created () {
this.loadChart()
this.loadData()
},
methods: {
@@ -422,11 +421,6 @@ export default {
'markEstimateAsSent': 'markAsSent'
}),
async loadChart () {
await this.$store.dispatch('dashboard/getChart')
this.isLoaded = true
},
async loadData (params) {
await this.$store.dispatch('dashboard/loadData', params)
this.isLoaded = true
@@ -434,7 +428,7 @@ export default {
async removeEstimate (id) {
this.id = id
swal({
window.swal({
title: this.$t('general.are_you_sure'),
text: this.$tc('estimates.confirm_delete', 1),
icon: '/assets/icon/trash-solid.svg',
@@ -462,7 +456,7 @@ export default {
},
async convertInToinvoice (id) {
swal({
window.swal({
title: this.$t('general.are_you_sure'),
text: this.$t('estimates.confirm_conversion'),
icon: '/assets/icon/file-alt-solid.svg',
@@ -483,7 +477,7 @@ export default {
},
async onMarkAsSent (id) {
swal({
window.swal({
title: this.$t('general.are_you_sure'),
text: this.$t('estimates.confirm_mark_as_sent'),
icon: '/assets/icon/check-circle-solid.svg',
@@ -505,7 +499,7 @@ export default {
async removeInvoice (id) {
this.id = id
swal({
window.swal({
title: this.$t('general.are_you_sure'),
text: this.$tc('invoices.confirm_delete'),
icon: '/assets/icon/trash-solid.svg',
@@ -525,7 +519,7 @@ export default {
},
async sendInvoice (id) {
swal({
window.swal({
title: this.$t('general.are_you_sure'),
text: this.$t('invoices.confirm_send'),
icon: '/assets/icon/paper-plane-solid.svg',
@@ -552,7 +546,7 @@ export default {
},
async sentInvoice (id) {
swal({
window.swal({
title: this.$t('general.are_you_sure'),
text: this.$t('invoices.invoice_mark_as_sent'),
icon: '/assets/icon/check-circle-solid.svg',
@@ -573,7 +567,7 @@ export default {
},
async onMarkAsAccepted (id) {
swal({
window.swal({
title: this.$t('general.are_you_sure'),
text: this.$t('estimates.confirm_mark_as_accepted'),
icon: '/assets/icon/check-circle-solid.svg',
@@ -595,7 +589,7 @@ export default {
},
async onMarkAsRejected (id) {
swal({
window.swal({
title: this.$t('general.are_you_sure'),
text: this.$t('estimates.confirm_mark_as_rejected'),
icon: '/assets/icon/times-circle-solid.svg',
@@ -617,7 +611,7 @@ export default {
},
async sendEstimate (id) {
swal({
window.swal({
title: this.$t('general.are_you_sure'),
text: this.$t('estimates.confirm_send_estimate'),
icon: '/assets/icon/paper-plane-solid.svg',

View File

@@ -118,7 +118,7 @@
</div>
</router-link>
<p v-if="!payments.length" class="no-result">
{{ $t('payments.no_matching_invoices') }}
{{ $t('payments.no_matching_payments') }}
</p>
</div>
</div>

View File

@@ -199,11 +199,9 @@ export default {
if (!this.getReports()) {
return false
}
if (navigator.appVersion.indexOf('Mac') !== -1) {
this.url += '&download=true'
} else {
window.open(this.getReportUrl + '&download=true')
}
window.open(this.getReportUrl + '&download=true')
setTimeout(() => {
this.url = `${this.siteURL}?from_date=${moment(this.formData.from_date).format('DD/MM/YYYY')}&to_date=${moment(this.formData.to_date).format('DD/MM/YYYY')}`
}, 200)

View File

@@ -121,7 +121,7 @@ export default {
this.loadProfitLossLink(this.url + '&download=true')
},
methods: {
...mapActions('profitLossReport',[
...mapActions('profitLossReport', [
'loadProfitLossLink'
]),
getThisDate (type, time) {
@@ -203,11 +203,8 @@ export default {
if (!this.getReports()) {
return false
}
if (navigator.appVersion.indexOf('Mac') !== -1) {
this.url += '&download=true'
} else {
window.open(this.getReportUrl + '&download=true')
}
window.open(this.getReportUrl + '&download=true')
setTimeout(() => {
this.url = `${this.siteURL}?from_date=${moment(this.formData.from_date).format('DD/MM/YYYY')}&to_date=${moment(this.formData.to_date).format('DD/MM/YYYY')}`
}, 200)

View File

@@ -234,11 +234,8 @@ export default {
if (!this.getReports()) {
return false
}
if (navigator.appVersion.indexOf('Mac') !== -1) {
this.url += '&download=true'
} else {
window.open(this.getReportUrl + '&download=true')
}
window.open(this.getReportUrl + '&download=true')
setTimeout(() => {
if (this.selectedType === 'By Customer') {
this.url = `${this.customerSiteURL}?from_date=${moment(this.formData.from_date).format('DD/MM/YYYY')}&to_date=${moment(this.formData.to_date).format('DD/MM/YYYY')}`

View File

@@ -49,7 +49,8 @@
<div class="col-sm-8 reports-tab-container">
<iframe :src="getReportUrl" class="reports-frame-style"/>
<a class="base-button btn btn-primary btn-lg report-view-button" @click="viewReportsPDF">
<font-awesome-icon icon="file-pdf" class="vue-icon icon-left svg-inline--fa fa-download fa-w-16 mr-2" /> <span>{{ $t('reports.view_pdf') }}</span>
<font-awesome-icon icon="file-pdf" class="vue-icon icon-left svg-inline--fa fa-download fa-w-16 mr-2" />
<span>{{ $t('reports.view_pdf') }}</span>
</a>
</div>
</div>
@@ -199,11 +200,9 @@ export default {
if (!this.getReports()) {
return false
}
if (navigator.appVersion.indexOf('Mac') !== -1) {
this.url += '&download=true'
} else {
window.open(this.url + '&download=true')
}
window.open(this.url + '&download=true')
setTimeout(() => {
this.url = `${this.siteURL}?from_date=${moment(this.formData.from_date).format('DD/MM/YYYY')}&to_date=${moment(this.formData.to_date).format('DD/MM/YYYY')}`
}, 200)

View File

@@ -7,11 +7,11 @@
@endif
<p class="bill-user-address">
@if($estimate->user->billingaddress->address_street_1)
{{$estimate->user->billingaddress->address_street_1}}<br>
{!! nl2br(htmlspecialchars($estimate->user->billingaddress->address_street_1)) !!}<br>
@endif
@if($estimate->user->billingaddress->address_street_2)
{{$estimate->user->billingaddress->address_street_2}}<br>
{!! nl2br(htmlspecialchars($estimate->user->billingaddress->address_street_2)) !!}<br>
@endif
@if($estimate->user->billingaddress->city)

View File

@@ -5,11 +5,11 @@
@if($company_address)
<p class="company-add">
@if($company_address->addresses[0]['address_street_1'])
{{$company_address->addresses[0]['address_street_1']}} <br>
{!! nl2br(htmlspecialchars($company_address->addresses[0]['address_street_1'])) !!} <br>
@endif
@if($company_address->addresses[0]['address_street_2'])
{{$company_address->addresses[0]['address_street_2']}} <br>
{!! nl2br(htmlspecialchars($company_address->addresses[0]['address_street_2'])) !!} <br>
@endif
@if($company_address->addresses[0]['city'])
{{$company_address->addresses[0]['city']}}

View File

@@ -7,11 +7,11 @@
@endif
<p class="ship-user-address">
@if($estimate->user->shippingaddress->address_street_1)
{{$estimate->user->shippingaddress->address_street_1}}<br>
{!! nl2br(htmlspecialchars($estimate->user->shippingaddress->address_street_1)) !!}<br>
@endif
@if($estimate->user->shippingaddress->address_street_2)
{{$estimate->user->shippingaddress->address_street_2}}<br>
{!! nl2br(htmlspecialchars($estimate->user->shippingaddress->address_street_2)) !!}<br>
@endif
@if($estimate->user->shippingaddress->city && $estimate->user->shippingaddress->city)

View File

@@ -7,10 +7,10 @@
@endif
<p class="bill-user-address">
@if($invoice->user->billingaddress->address_street_1)
{{$invoice->user->billingaddress->address_street_1}}<br>
{!! nl2br(htmlspecialchars($invoice->user->billingaddress->address_street_1)) !!}<br>
@endif
@if($invoice->user->billingaddress->address_street_2)
{{$invoice->user->billingaddress->address_street_2}}<br>
{!! nl2br(htmlspecialchars($invoice->user->billingaddress->address_street_2)) !!}<br>
@endif
@if($invoice->user->billingaddress->city && $invoice->user->billingaddress->city)
{{$invoice->user->billingaddress->city}},

View File

@@ -5,11 +5,11 @@
@if($company_address)
<p class="company-add">
@if($company_address->addresses[0]['address_street_1'])
{{$company_address->addresses[0]['address_street_1']}} <br>
{!! nl2br(htmlspecialchars($company_address->addresses[0]['address_street_1'])) !!} <br>
@endif
@if($company_address->addresses[0]['address_street_2'])
{{$company_address->addresses[0]['address_street_2']}} <br>
{!! nl2br(htmlspecialchars($company_address->addresses[0]['address_street_2'])) !!} <br>
@endif
@if($company_address->addresses[0]['city'])
{{$company_address->addresses[0]['city']}}

View File

@@ -7,11 +7,11 @@
@endif
<p class="ship-user-address">
@if($invoice->user->shippingaddress->address_street_1)
{{$invoice->user->shippingaddress->address_street_1}}<br>
{!! nl2br(htmlspecialchars($invoice->user->shippingaddress->address_street_1)) !!}<br>
@endif
@if($invoice->user->shippingaddress->address_street_2)
{{$invoice->user->shippingaddress->address_street_2}}<br>
{!! nl2br(htmlspecialchars($invoice->user->shippingaddress->address_street_2)) !!}<br>
@endif
@if($invoice->user->shippingaddress->city && $invoice->user->shippingaddress->city)

View File

@@ -7,10 +7,10 @@
@endif
<p class="bill-user-address">
@if($payment->user->billingaddress->address_street_1)
{{$payment->user->billingaddress->address_street_1}}<br>
{!! nl2br(htmlspecialchars($payment->user->billingaddress->address_street_1)) !!}<br>
@endif
@if($payment->user->billingaddress->address_street_2)
{{$payment->user->billingaddress->address_street_2}}<br>
{!! nl2br(htmlspecialchars($payment->user->billingaddress->address_street_2)) !!}<br>
@endif
@if($payment->user->billingaddress->city && $payment->user->billingaddress->city)
{{$payment->user->billingaddress->city}},

View File

@@ -5,11 +5,11 @@
@if($company_address)
<p class="company-add">
@if($company_address->addresses[0]['address_street_1'])
{{$company_address->addresses[0]['address_street_1']}} <br>
{!! nl2br(htmlspecialchars($company_address->addresses[0]['address_street_1'])) !!} <br>
@endif
@if($company_address->addresses[0]['address_street_2'])
{{$company_address->addresses[0]['address_street_2']}} <br>
{!! nl2br(htmlspecialchars($company_address->addresses[0]['address_street_2'])) !!} <br>
@endif
@if($company_address->addresses[0]['city'])
{{$company_address->addresses[0]['city']}}

View File

@@ -7,11 +7,11 @@
@endif
<p class="ship-user-address">
@if($payment->user->shippingaddress->address_street_1)
{{$payment->user->shippingaddress->address_street_1}}<br>
{!! nl2br(htmlspecialchars($payment->user->shippingaddress->address_street_1)) !!}<br>
@endif
@if($payment->user->shippingaddress->address_street_2)
{{$payment->user->shippingaddress->address_street_2}}<br>
{!! nl2br(htmlspecialchars($payment->user->shippingaddress->address_street_2)) !!}<br>
@endif
@if($payment->user->shippingaddress->city && $payment->user->shippingaddress->city)