mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 12:11:08 -04:00
Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7bba576dca | |||
| 05454af593 | |||
| 74fe481ed5 | |||
| 1cd654b0cc | |||
| f4a4c05b61 | |||
| 24637bff4a | |||
| 887ad9a73d | |||
| 339099bd34 | |||
| 9b9761aa5a | |||
| 00c917853c | |||
| 122c4f478f | |||
| edc0e115e4 | |||
| b388e7a237 | |||
| 6e3ed9b4f6 | |||
| 338dbb26a1 | |||
| f10e5e9d11 | |||
| 3a046b638c | |||
| 36242c516a | |||
| c8843eb544 | |||
| 37f2b6dfc7 | |||
| c90c14312a | |||
| b5b861bb36 | |||
| ab041743a2 | |||
| 9bcec9bd75 |
@ -24,6 +24,7 @@ class EstimateItem extends Model
|
||||
'price' => 'integer',
|
||||
'total' => 'integer',
|
||||
'discount' => 'float',
|
||||
'quantity' => 'float',
|
||||
'discount_val' => 'integer',
|
||||
'tax' => 'integer'
|
||||
];
|
||||
|
||||
@ -33,10 +33,14 @@ class EnvironmentController extends Controller
|
||||
*/
|
||||
public function saveDatabaseEnvironment(DatabaseEnvironmentRequest $request)
|
||||
{
|
||||
Artisan::call('config:clear');
|
||||
Artisan::call('cache:clear');
|
||||
|
||||
$results = $this->EnvironmentManager->saveDatabaseVariables($request);
|
||||
|
||||
if(array_key_exists("success", $results)) {
|
||||
Artisan::call('config:clear');
|
||||
Artisan::call('cache:clear');
|
||||
Artisan::call('storage:link');
|
||||
Artisan::call('key:generate --force');
|
||||
Artisan::call('migrate --seed --force');
|
||||
|
||||
@ -82,7 +82,7 @@ class Invoice extends Model
|
||||
// So the substr returns this 000001
|
||||
|
||||
// Add the string in front and higher up the number.
|
||||
// the %05d part makes sure that there are always 6 numbers in the string.
|
||||
// the %06d part makes sure that there are always 6 numbers in the string.
|
||||
// so it adds the missing zero's when needed.
|
||||
|
||||
return sprintf('%06d', intval($number) + 1);
|
||||
|
||||
@ -30,6 +30,7 @@ class InvoiceItem extends Model
|
||||
'price' => 'integer',
|
||||
'total' => 'integer',
|
||||
'discount' => 'float',
|
||||
'quantity' => 'float',
|
||||
'discount_val' => 'integer',
|
||||
'tax' => 'integer'
|
||||
];
|
||||
|
||||
@ -15,7 +15,7 @@ class Listener
|
||||
protected function isListenerFired($event)
|
||||
{
|
||||
// Do not apply to the same or newer versions
|
||||
if (version_compare(static::VERSION, $event->old, '<')) {
|
||||
if (version_compare(static::VERSION, $event->old, '<=')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
87
app/Listeners/Updates/v2/Version201.php
Normal file
87
app/Listeners/Updates/v2/Version201.php
Normal file
@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
namespace Crater\Listeners\Updates\v2;
|
||||
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Crater\Events\UpdateFinished;
|
||||
use Crater\Listeners\Updates\Listener;
|
||||
use Crater\Setting;
|
||||
|
||||
class Version201 extends Listener
|
||||
{
|
||||
const VERSION = '2.0.1';
|
||||
|
||||
/**
|
||||
* Create the event listener.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param object $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(UpdateFinished $event)
|
||||
{
|
||||
if ($this->isListenerFired($event)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove the language files
|
||||
$this->removeLanguageFiles();
|
||||
|
||||
// Change estimate & invoice migrations
|
||||
$this->changeMigrations();
|
||||
|
||||
// Update Crater app version
|
||||
Setting::setSetting('version', static::VERSION);
|
||||
}
|
||||
|
||||
private function removeLanguageFiles() {
|
||||
$en = resource_path('assets/js/plugins/en.js');
|
||||
$es = resource_path('assets/js/plugins/es.js');
|
||||
$fr = resource_path('assets/js/plugins/fr.js');
|
||||
|
||||
if(file_exists($en)) {
|
||||
unlink($en);
|
||||
}
|
||||
|
||||
if(file_exists($es)) {
|
||||
unlink($es);
|
||||
}
|
||||
|
||||
if(file_exists($fr)) {
|
||||
unlink($fr);
|
||||
}
|
||||
}
|
||||
|
||||
private function changeMigrations()
|
||||
{
|
||||
\Schema::table('invoices', function (Blueprint $table) {
|
||||
$table->decimal('discount', 15, 2)->nullable()->change();
|
||||
});
|
||||
|
||||
\Schema::table('estimates', function (Blueprint $table) {
|
||||
$table->decimal('discount', 15, 2)->nullable()->change();
|
||||
});
|
||||
|
||||
\Schema::table('invoice_items', function (Blueprint $table) {
|
||||
$table->decimal('quantity', 15, 2)->change();
|
||||
$table->decimal('discount', 15, 2)->nullable()->change();
|
||||
});
|
||||
|
||||
\Schema::table('estimate_items', function (Blueprint $table) {
|
||||
$table->decimal('quantity', 15, 2)->change();
|
||||
$table->decimal('discount', 15, 2)->nullable()->change();
|
||||
$table->unsignedBigInteger('discount_val')->nullable()->change();
|
||||
});
|
||||
}
|
||||
}
|
||||
40
app/Listeners/Updates/v2/Version202.php
Normal file
40
app/Listeners/Updates/v2/Version202.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Crater\Listeners\Updates\v2;
|
||||
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Crater\Events\UpdateFinished;
|
||||
use Crater\Listeners\Updates\Listener;
|
||||
use Crater\Setting;
|
||||
|
||||
class Version202 extends Listener
|
||||
{
|
||||
const VERSION = '2.0.2';
|
||||
|
||||
/**
|
||||
* Create the event listener.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the event.
|
||||
*
|
||||
* @param object $event
|
||||
* @return void
|
||||
*/
|
||||
public function handle(UpdateFinished $event)
|
||||
{
|
||||
if ($this->isListenerFired($event)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Update Crater app version
|
||||
Setting::setSetting('version', static::VERSION);
|
||||
}
|
||||
}
|
||||
@ -7,6 +7,8 @@ use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
|
||||
use Crater\Events\UpdateFinished;
|
||||
use Crater\Listeners\Updates\v1\Version110;
|
||||
use Crater\Listeners\Updates\v2\Version200;
|
||||
use Crater\Listeners\Updates\v2\Version201;
|
||||
use Crater\Listeners\Updates\v2\Version202;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider
|
||||
{
|
||||
@ -19,6 +21,8 @@ class EventServiceProvider extends ServiceProvider
|
||||
UpdateFinished::class=> [
|
||||
Version110::class,
|
||||
Version200::class,
|
||||
Version201::class,
|
||||
Version202::class,
|
||||
],
|
||||
Registered::class => [
|
||||
SendEmailVerificationNotification::class,
|
||||
|
||||
@ -48,17 +48,21 @@ class EnvironmentManager
|
||||
'DB_USERNAME='.$request->database_username."\n".
|
||||
'DB_PASSWORD='.$request->database_password."\n\n";
|
||||
|
||||
if (! $this->checkDatabaseConnection($request)) {
|
||||
try {
|
||||
|
||||
$this->checkDatabaseConnection($request);
|
||||
|
||||
return [
|
||||
'error' => 'connection_failed'
|
||||
];
|
||||
} else {
|
||||
if(\Schema::hasTable('users') ) {
|
||||
return [
|
||||
'error' => 'database_should_be_empty'
|
||||
];
|
||||
}
|
||||
|
||||
} catch (Exception $e) {
|
||||
|
||||
return [
|
||||
'error' => $e->getMessage()
|
||||
];
|
||||
}
|
||||
|
||||
try {
|
||||
@ -118,8 +122,6 @@ class EnvironmentManager
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} catch (Exception $e) {
|
||||
return [
|
||||
'error' => 'mail_variables_save_error'
|
||||
@ -316,12 +318,6 @@ class EnvironmentManager
|
||||
],
|
||||
]);
|
||||
|
||||
try {
|
||||
DB::connection()->getPdo();
|
||||
|
||||
return true;
|
||||
} catch (Exception $e) {
|
||||
return false;
|
||||
}
|
||||
return DB::connection()->getPdo();
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,6 +9,6 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'version' => '2.0.0',
|
||||
'version' => '2.0.2',
|
||||
|
||||
];
|
||||
|
||||
@ -25,7 +25,7 @@ class CreateInvoicesTable extends Migration
|
||||
$table->string('discount_per_item');
|
||||
$table->text('notes')->nullable();
|
||||
$table->string('discount_type')->nullable();
|
||||
$table->unsignedBigInteger('discount')->nullable();
|
||||
$table->decimal('discount', 15, 2)->nullable();
|
||||
$table->unsignedBigInteger('discount_val')->nullable();
|
||||
$table->unsignedBigInteger('sub_total');
|
||||
$table->unsignedBigInteger('total');
|
||||
|
||||
@ -18,10 +18,10 @@ class CreateInvoiceItemsTable extends Migration
|
||||
$table->string('name');
|
||||
$table->string('description')->nullable();
|
||||
$table->string('discount_type');
|
||||
$table->unsignedBigInteger('quantity');
|
||||
$table->unsignedBigInteger('price');
|
||||
$table->decimal('quantity', 15, 2);
|
||||
$table->decimal('discount', 15, 2)->nullable();
|
||||
$table->unsignedBigInteger('discount_val');
|
||||
$table->unsignedBigInteger('discount');
|
||||
$table->unsignedBigInteger('tax');
|
||||
$table->unsignedBigInteger('total');
|
||||
$table->integer('invoice_id')->unsigned();
|
||||
|
||||
@ -23,8 +23,8 @@ class CreateEstimatesTable extends Migration
|
||||
$table->string('tax_per_item');
|
||||
$table->string('discount_per_item');
|
||||
$table->string('notes')->nullable();
|
||||
$table->decimal('discount', 15, 2)->nullable();
|
||||
$table->string('discount_type')->nullable();
|
||||
$table->unsignedBigInteger('discount')->nullable();
|
||||
$table->unsignedBigInteger('discount_val')->nullable();
|
||||
$table->unsignedBigInteger('sub_total');
|
||||
$table->unsignedBigInteger('total');
|
||||
|
||||
@ -18,9 +18,9 @@ class CreateEstimateItemsTable extends Migration
|
||||
$table->string('name');
|
||||
$table->string('description')->nullable();
|
||||
$table->string('discount_type');
|
||||
$table->unsignedBigInteger('quantity');
|
||||
$table->unsignedBigInteger('discount');
|
||||
$table->unsignedBigInteger('discount_val');
|
||||
$table->decimal('quantity', 15, 2);
|
||||
$table->decimal('discount', 15, 2)->nullable();
|
||||
$table->unsignedBigInteger('discount_val')->nullable();
|
||||
$table->unsignedBigInteger('price');
|
||||
$table->unsignedBigInteger('tax');
|
||||
$table->unsignedBigInteger('total');
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
{
|
||||
"/assets/js/app.js": "/assets/js/app.js?id=b43f30be09501b5efa70",
|
||||
"/assets/js/app.js": "/assets/js/app.js?id=36ab3529ebffd4f0624b",
|
||||
"/assets/css/crater.css": "/assets/css/crater.css?id=108e3a8d009e7d38018c"
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
{{ selectedCustomer.billing_address.address_street_2 }}
|
||||
</label>
|
||||
<label v-if="selectedCustomer.billing_address.city && selectedCustomer.billing_address.state">
|
||||
{{ selectedCustomer.billing_address.city.name }}, {{ selectedCustomer.billing_address.state.name }} {{ selectedCustomer.billing_address.zip }}
|
||||
{{ selectedCustomer.billing_address.city }}, {{ selectedCustomer.billing_address.state }} {{ selectedCustomer.billing_address.zip }}
|
||||
</label>
|
||||
<label v-if="selectedCustomer.billing_address.country">
|
||||
{{ selectedCustomer.billing_address.country.name }}
|
||||
@ -71,7 +71,7 @@
|
||||
{{ selectedCustomer.shipping_address.address_street_2 }}
|
||||
</label>
|
||||
<label v-if="selectedCustomer.shipping_address.city && selectedCustomer.shipping_address">
|
||||
{{ selectedCustomer.shipping_address.city.name }}, {{ selectedCustomer.shipping_address.state.name }} {{ selectedCustomer.shipping_address.zip }}
|
||||
{{ selectedCustomer.shipping_address.city }}, {{ selectedCustomer.shipping_address.state }} {{ selectedCustomer.shipping_address.zip }}
|
||||
</label>
|
||||
<label v-if="selectedCustomer.shipping_address.country" class="country">
|
||||
{{ selectedCustomer.shipping_address.country.name }}
|
||||
|
||||
@ -151,6 +151,7 @@ export default {
|
||||
id: null,
|
||||
count: null,
|
||||
estimates: [],
|
||||
estimate: null,
|
||||
currency: null,
|
||||
searchData: {
|
||||
orderBy: null,
|
||||
@ -165,10 +166,6 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
estimate () {
|
||||
return this.$store.getters['estimate/getEstimate'](this.$route.params.id)
|
||||
},
|
||||
|
||||
getOrderBy () {
|
||||
if (this.searchData.orderBy === 'asc' || this.searchData.orderBy == null) {
|
||||
return true
|
||||
@ -180,8 +177,14 @@ export default {
|
||||
return `/estimates/pdf/${this.estimate.unique_hash}`
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route (to, from) {
|
||||
this.loadEstimate()
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.loadEstimates()
|
||||
this.loadEstimate()
|
||||
this.onSearched = _.debounce(this.onSearched, 500)
|
||||
},
|
||||
methods: {
|
||||
@ -192,7 +195,8 @@ export default {
|
||||
'markAsSent',
|
||||
'sendEmail',
|
||||
'deleteEstimate',
|
||||
'selectEstimate'
|
||||
'selectEstimate',
|
||||
'fetchViewEstimate'
|
||||
]),
|
||||
async loadEstimates () {
|
||||
let response = await this.fetchEstimates()
|
||||
@ -200,6 +204,13 @@ export default {
|
||||
this.estimates = response.data.estimates.data
|
||||
}
|
||||
},
|
||||
async loadEstimate () {
|
||||
let response = await this.fetchViewEstimate(this.$route.params.id)
|
||||
|
||||
if (response.data) {
|
||||
this.estimate = response.data.estimate
|
||||
}
|
||||
},
|
||||
async onSearched () {
|
||||
let data = ''
|
||||
if (this.searchData.searchText !== '' && this.searchData.searchText !== null && this.searchData.searchText !== undefined) {
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
{{ selectedCustomer.billing_address.address_street_2 }}
|
||||
</label>
|
||||
<label v-if="selectedCustomer.billing_address.city && selectedCustomer.billing_address.state">
|
||||
{{ selectedCustomer.billing_address.city.name }}, {{ selectedCustomer.billing_address.state.name }} {{ selectedCustomer.billing_address.zip }}
|
||||
{{ selectedCustomer.billing_address.city }}, {{ selectedCustomer.billing_address.state }} {{ selectedCustomer.billing_address.zip }}
|
||||
</label>
|
||||
<label v-if="selectedCustomer.billing_address.country">
|
||||
{{ selectedCustomer.billing_address.country.name }}
|
||||
@ -69,7 +69,7 @@
|
||||
{{ selectedCustomer.shipping_address.address_street_2 }}
|
||||
</label>
|
||||
<label v-if="selectedCustomer.shipping_address.city && selectedCustomer.shipping_address">
|
||||
{{ selectedCustomer.shipping_address.city.name }}, {{ selectedCustomer.shipping_address.state.name }} {{ selectedCustomer.shipping_address.zip }}
|
||||
{{ selectedCustomer.shipping_address.city }}, {{ selectedCustomer.shipping_address.state }} {{ selectedCustomer.shipping_address.zip }}
|
||||
</label>
|
||||
<label v-if="selectedCustomer.shipping_address.country" class="country">
|
||||
{{ selectedCustomer.shipping_address.country.name }}
|
||||
|
||||
@ -154,6 +154,7 @@ export default {
|
||||
id: null,
|
||||
count: null,
|
||||
invoices: [],
|
||||
invoice: null,
|
||||
currency: null,
|
||||
searchData: {
|
||||
orderBy: null,
|
||||
@ -167,9 +168,7 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
invoice () {
|
||||
return this.$store.getters['invoice/getInvoice'](this.$route.params.id)
|
||||
},
|
||||
|
||||
getOrderBy () {
|
||||
if (this.searchData.orderBy === 'asc' || this.searchData.orderBy == null) {
|
||||
return true
|
||||
@ -180,8 +179,14 @@ export default {
|
||||
return `/invoices/pdf/${this.invoice.unique_hash}`
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route (to, from) {
|
||||
this.loadInvoice()
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.loadInvoices()
|
||||
this.loadInvoice()
|
||||
this.onSearch = _.debounce(this.onSearch, 500)
|
||||
},
|
||||
methods: {
|
||||
@ -192,7 +197,8 @@ export default {
|
||||
'markAsSent',
|
||||
'sendEmail',
|
||||
'deleteInvoice',
|
||||
'selectInvoice'
|
||||
'selectInvoice',
|
||||
'fetchViewInvoice'
|
||||
]),
|
||||
async loadInvoices () {
|
||||
let response = await this.fetchInvoices()
|
||||
@ -200,6 +206,13 @@ export default {
|
||||
this.invoices = response.data.invoices.data
|
||||
}
|
||||
},
|
||||
async loadInvoice () {
|
||||
let response = await this.fetchViewInvoice(this.$route.params.id)
|
||||
|
||||
if (response.data) {
|
||||
this.invoice = response.data.invoice
|
||||
}
|
||||
},
|
||||
async onSearch () {
|
||||
let data = ''
|
||||
if (this.searchData.searchText !== '' && this.searchData.searchText !== null && this.searchData.searchText !== undefined) {
|
||||
@ -286,7 +299,7 @@ export default {
|
||||
let request = await this.deleteInvoice(this.id)
|
||||
if (request.data.success) {
|
||||
window.toastr['success'](this.$tc('invoices.deleted_message', 1))
|
||||
this.$router.push('/admin/invoices/')
|
||||
this.$router.push('/admin/invoices')
|
||||
} else if (request.data.error) {
|
||||
window.toastr['error'](request.data.message)
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ export default {
|
||||
setTimeout(() => {
|
||||
location.reload()
|
||||
}, 2000)
|
||||
}, 5000)
|
||||
}, 1000)
|
||||
} else {
|
||||
console.log(res.data)
|
||||
window.toastr['error'](res.data.error)
|
||||
|
||||
@ -206,10 +206,10 @@ export default {
|
||||
} else {
|
||||
window.toastr['error'](this.$t('wizard.errors.' + response.data.error))
|
||||
}
|
||||
this.loading = false
|
||||
} catch (e) {
|
||||
console.log(e.response)
|
||||
window.toastr['error'](e.response.data.message)
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -410,7 +410,7 @@
|
||||
<div class="bill-address-container">
|
||||
@include('app.pdf.estimate.partials.billing-address')
|
||||
</div>
|
||||
@if($estimate->user->billingaddress->name || $estimate->user->billingaddress->address_street_1 || $estimate->user->billingaddress->address_street_2 || $estimate->user->billingaddress->country || $estimate->user->billingaddress->state || $estimate->user->billingaddress->city || $estimate->user->billingaddress->zip || $estimate->user->billingaddress->phone)
|
||||
@if($estimate->user->billingaddress && ($estimate->user->billingaddress->name || $estimate->user->billingaddress->address_street_1 || $estimate->user->billingaddress->address_street_2 || $estimate->user->billingaddress->country || $estimate->user->billingaddress->state || $estimate->user->billingaddress->city || $estimate->user->billingaddress->zip || $estimate->user->billingaddress->phone))
|
||||
<div class="ship-address-container">
|
||||
@else
|
||||
<div class="ship-address-container " style="float:left;padding-left:0px;">
|
||||
|
||||
@ -421,7 +421,7 @@
|
||||
<div class="ship-address-container">
|
||||
@include('app.pdf.estimate.partials.shipping-address')
|
||||
</div>
|
||||
@if($estimate->user->shippingaddress->name || $estimate->user->shippingaddress->address_street_1 || $estimate->user->shippingaddress->address_street_2 || $estimate->user->shippingaddress->country || $estimate->user->shippingaddress->state || $estimate->user->shippingaddress->city || $estimate->user->shippingaddress->zip || $estimate->user->phone)
|
||||
@if($estimate->user->shippingaddress && ($estimate->user->shippingaddress->name || $estimate->user->shippingaddress->address_street_1 || $estimate->user->shippingaddress->address_street_2 || $estimate->user->shippingaddress->country || $estimate->user->shippingaddress->state || $estimate->user->shippingaddress->city || $estimate->user->shippingaddress->zip || $estimate->user->phone))
|
||||
<div class="bill-address-container">
|
||||
@else
|
||||
<div class="bill-address-container" style="float:right;padding-right:0px;">
|
||||
|
||||
@ -426,7 +426,7 @@
|
||||
<div style="float:left;">
|
||||
@include('app.pdf.estimate.partials.billing-address')
|
||||
</div>
|
||||
@if($estimate->user->billingaddress->name || $estimate->user->billingaddress->address_street_1 || $estimate->user->billingaddress->address_street_2 || $estimate->user->billingaddress->country || $estimate->user->billingaddress->state || $estimate->user->billingaddress->city || $estimate->user->billingaddress->zip || $estimate->user->billingaddress->phone)
|
||||
@if($estimate->user->billingaddress && ($estimate->user->billingaddress->name || $estimate->user->billingaddress->address_street_1 || $estimate->user->billingaddress->address_street_2 || $estimate->user->billingaddress->country || $estimate->user->billingaddress->state || $estimate->user->billingaddress->city || $estimate->user->billingaddress->zip || $estimate->user->billingaddress->phone))
|
||||
<div style="float:right;">
|
||||
@else
|
||||
<div style="float:left;">
|
||||
|
||||
@ -16,12 +16,12 @@
|
||||
{{$estimate->user->billingaddress->address_street_2}}<br>
|
||||
@endif
|
||||
|
||||
@if($estimate->user->billingaddress->city && $estimate->user->billingaddress->city->name)
|
||||
{{$estimate->user->billingaddress->city->name}},
|
||||
@if($estimate->user->billingaddress->city && $estimate->user->billingaddress->city)
|
||||
{{$estimate->user->billingaddress->city}},
|
||||
@endif
|
||||
|
||||
@if($estimate->user->billingaddress->state && $estimate->user->billingaddress->state->name)
|
||||
{{$estimate->user->billingaddress->state->name}}.
|
||||
@if($estimate->user->billingaddress->state && $estimate->user->billingaddress->state)
|
||||
{{$estimate->user->billingaddress->state}}.
|
||||
@endif
|
||||
|
||||
@if($estimate->user->billingaddress->zip)
|
||||
|
||||
@ -12,10 +12,10 @@
|
||||
{{$company_address->addresses[0]['address_street_2']}} <br>
|
||||
@endif
|
||||
@if($company_address->addresses[0]['city'])
|
||||
{{$company_address->addresses[0]['city']->name}}
|
||||
{{$company_address->addresses[0]['city']}}
|
||||
@endif
|
||||
@if($company_address->addresses[0]['state'])
|
||||
{{$company_address->addresses[0]['state']->name}}
|
||||
{{$company_address->addresses[0]['state']}}
|
||||
@endif
|
||||
@if($company_address->addresses[0]['zip'])
|
||||
{{$company_address->addresses[0]['zip']}} <br>
|
||||
|
||||
@ -16,12 +16,12 @@
|
||||
{{$estimate->user->shippingaddress->address_street_2}}<br>
|
||||
@endif
|
||||
|
||||
@if($estimate->user->shippingaddress->city && $estimate->user->shippingaddress->city->name)
|
||||
{{$estimate->user->shippingaddress->city->name}},
|
||||
@if($estimate->user->shippingaddress->city && $estimate->user->shippingaddress->city)
|
||||
{{$estimate->user->shippingaddress->city}},
|
||||
@endif
|
||||
|
||||
@if($estimate->user->shippingaddress->state && $estimate->user->shippingaddress->state->name)
|
||||
{{$estimate->user->shippingaddress->state->name}}.
|
||||
@if($estimate->user->shippingaddress->state && $estimate->user->shippingaddress->state)
|
||||
{{$estimate->user->shippingaddress->state}}.
|
||||
@endif
|
||||
|
||||
@if($estimate->user->shippingaddress->zip)
|
||||
|
||||
@ -14,11 +14,11 @@
|
||||
@if($invoice->user->billingaddress->address_street_2)
|
||||
{{$invoice->user->billingaddress->address_street_2}}<br>
|
||||
@endif
|
||||
@if($invoice->user->billingaddress->city && $invoice->user->billingaddress->city->name)
|
||||
{{$invoice->user->billingaddress->city->name}},
|
||||
@if($invoice->user->billingaddress->city && $invoice->user->billingaddress->city)
|
||||
{{$invoice->user->billingaddress->city}},
|
||||
@endif
|
||||
@if($invoice->user->billingaddress->state && $invoice->user->billingaddress->state->name)
|
||||
{{$invoice->user->billingaddress->state->name}}.
|
||||
@if($invoice->user->billingaddress->state && $invoice->user->billingaddress->state)
|
||||
{{$invoice->user->billingaddress->state}}.
|
||||
@endif
|
||||
@if($invoice->user->billingaddress->zip)
|
||||
{{$invoice->user->billingaddress->zip}}<br>
|
||||
|
||||
@ -12,10 +12,10 @@
|
||||
{{$company_address->addresses[0]['address_street_2']}} <br>
|
||||
@endif
|
||||
@if($company_address->addresses[0]['city'])
|
||||
{{$company_address->addresses[0]['city']->name}}
|
||||
{{$company_address->addresses[0]['city']}}
|
||||
@endif
|
||||
@if($company_address->addresses[0]['state'])
|
||||
{{$company_address->addresses[0]['state']->name}}
|
||||
{{$company_address->addresses[0]['state']}}
|
||||
@endif
|
||||
@if($company_address->addresses[0]['zip'])
|
||||
{{$company_address->addresses[0]['zip']}} <br>
|
||||
|
||||
@ -16,12 +16,12 @@
|
||||
{{$invoice->user->shippingaddress->address_street_2}}<br>
|
||||
@endif
|
||||
|
||||
@if($invoice->user->shippingaddress->city && $invoice->user->shippingaddress->city->name)
|
||||
{{$invoice->user->shippingaddress->city->name}},
|
||||
@if($invoice->user->shippingaddress->city && $invoice->user->shippingaddress->city)
|
||||
{{$invoice->user->shippingaddress->city}},
|
||||
@endif
|
||||
|
||||
@if($invoice->user->shippingaddress->state && $invoice->user->shippingaddress->state->name)
|
||||
{{$invoice->user->shippingaddress->state->name}}.
|
||||
@if($invoice->user->shippingaddress->state && $invoice->user->shippingaddress->state)
|
||||
{{$invoice->user->shippingaddress->state}}.
|
||||
@endif
|
||||
|
||||
@if($invoice->user->shippingaddress->zip)
|
||||
|
||||
Reference in New Issue
Block a user