diff --git a/app/City.php b/app/City.php
index 8d47508c..d3c44d5c 100644
--- a/app/City.php
+++ b/app/City.php
@@ -3,7 +3,6 @@ namespace Crater;
use Illuminate\Database\Eloquent\Model;
use Crater\State;
-use Crater\Country;
class City extends Model
{
diff --git a/app/CompanySetting.php b/app/CompanySetting.php
index ed38efda..dd927397 100644
--- a/app/CompanySetting.php
+++ b/app/CompanySetting.php
@@ -2,7 +2,6 @@
namespace Crater;
use Illuminate\Database\Eloquent\Model;
-use Crater\User;
class CompanySetting extends Model
{
diff --git a/app/Country.php b/app/Country.php
index 8405d266..8a7b9acb 100644
--- a/app/Country.php
+++ b/app/Country.php
@@ -3,7 +3,6 @@ namespace Crater;
use Illuminate\Database\Eloquent\Model;
use Crater\State;
-use Crater\Country;
class Country extends Model
{
diff --git a/app/Estimate.php b/app/Estimate.php
index a71e6a13..08fd7aaf 100644
--- a/app/Estimate.php
+++ b/app/Estimate.php
@@ -218,6 +218,7 @@ class Estimate extends Model
if ($estimate->taxes()->exists()) {
$estimate->taxes()->delete();
}
+
$estimate->delete();
return true;
diff --git a/app/Http/Controllers/EstimatesController.php b/app/Http/Controllers/EstimatesController.php
index 790502d1..706a50a1 100644
--- a/app/Http/Controllers/EstimatesController.php
+++ b/app/Http/Controllers/EstimatesController.php
@@ -328,13 +328,13 @@ class EstimatesController extends Controller
]);
}
+ \Mail::to($email)->send(new EstimatePdf($data, $notificationEmail));
+
if ($estimate->status == Estimate::STATUS_DRAFT) {
$estimate->status = Estimate::STATUS_SENT;
$estimate->save();
}
- \Mail::to($email)->send(new EstimatePdf($data, $notificationEmail));
-
return response()->json([
'success' => true
]);
diff --git a/app/Http/Controllers/FrontendController.php b/app/Http/Controllers/FrontendController.php
index 6d250ad2..66c6b33b 100644
--- a/app/Http/Controllers/FrontendController.php
+++ b/app/Http/Controllers/FrontendController.php
@@ -2,21 +2,14 @@
namespace Crater\Http\Controllers;
use Illuminate\Http\Request;
-use Crater\Expense;
-use Crater\Http\Requests;
use Crater\Invoice;
-use Crater\Payment;
-use Crater\PdfSetting;
use PDF;
-use Crater\Currency;
use Crater\CompanySetting;
use Crater\Estimate;
-use Crater\Item;
use Crater\User;
use Crater\Company;
use Crater\InvoiceTemplate;
use Crater\EstimateTemplate;
-use Auth;
use Crater\Mail\EstimateViewed;
use Crater\Mail\InvoiceViewed;
diff --git a/app/Http/Controllers/InvoicesController.php b/app/Http/Controllers/InvoicesController.php
index 54a8d764..13415b36 100644
--- a/app/Http/Controllers/InvoicesController.php
+++ b/app/Http/Controllers/InvoicesController.php
@@ -392,13 +392,14 @@ class InvoicesController extends Controller
]);
}
+ \Mail::to($email)->send(new invoicePdf($data, $notificationEmail));
+
if ($invoice->status == Invoice::STATUS_DRAFT) {
$invoice->status = Invoice::STATUS_SENT;
$invoice->sent = true;
$invoice->save();
}
- \Mail::to($email)->send(new invoicePdf($data, $notificationEmail));
return response()->json([
'success' => true
diff --git a/app/Item.php b/app/Item.php
index 2f574dd9..d3b72443 100644
--- a/app/Item.php
+++ b/app/Item.php
@@ -108,6 +108,7 @@ class Item extends Model
if ($item->estimateItems()->exists() && $item->estimateItems()->count() > 0) {
return false;
}
+
$item->delete();
return true;
diff --git a/app/Space/Updater.php b/app/Space/Updater.php
index 093282ed..83f8add3 100644
--- a/app/Space/Updater.php
+++ b/app/Space/Updater.php
@@ -18,7 +18,7 @@ class Updater
$data = null;
$path = null;
- $url = '/downloads/file/'.$version.'?type=update';
+ $url = 'https://craterapp.com/downloads/file/'.$version.'?type=update';
$response = static::getRemote($url, ['timeout' => 100, 'track_redirects' => true]);
@@ -99,7 +99,7 @@ class Updater
public static function checkForUpdate()
{
$data = null;
- $url = '/downloads/check/latest/'.Setting::getSetting('version');
+ $url = 'https://craterapp.com/downloads/check/latest/'. Setting::getSetting('version');
$response = static::getRemote($url, ['timeout' => 100, 'track_redirects' => true]);
diff --git a/app/User.php b/app/User.php
index b0865794..9c43d0f6 100644
--- a/app/User.php
+++ b/app/User.php
@@ -239,6 +239,7 @@ class User extends Authenticatable implements HasMedia
if ($customer->addresses()->exists()) {
$customer->addresses()->delete();
}
+
$customer->delete();
return true;
diff --git a/resources/assets/js/plugins/en.js b/resources/assets/js/plugins/en.js
index bdd290af..e11a29bc 100644
--- a/resources/assets/js/plugins/en.js
+++ b/resources/assets/js/plugins/en.js
@@ -182,7 +182,7 @@ export default {
list_of_items: 'This section will contain the list of items.',
select_a_unit: 'select unit',
- item_attached_message: 'Cannot delete an item already in use',
+ item_attached_message: 'Cannot delete an item which is already in use',
confirm_delete: 'You will not be able to recover this Item | You will not be able to recover these Items',
created_message: 'Item created successfully',
updated_message: 'Item updated successfully',
@@ -227,7 +227,7 @@ export default {
add_estimate: 'Add Estimate',
save_estimate: 'Save Estimate',
confirm_conversion: 'You want to convert this Estimate into Invoice?',
- conversion_message: 'Conversion successful',
+ conversion_message: 'Invoice created successful',
confirm_send_estimate: 'This estimate will be sent via email to the customer',
confirm_mark_as_sent: 'This estimate will be marked as sent',
confirm_mark_as_accepted: 'This estimate will be marked as Accepted',
diff --git a/resources/assets/js/views/categories/Create.vue b/resources/assets/js/views/categories/Create.vue
deleted file mode 100644
index 5ec50a03..00000000
--- a/resources/assets/js/views/categories/Create.vue
+++ /dev/null
@@ -1,96 +0,0 @@
-
- {{ $t('categories.new_category') }}
-
- {{ $t('categories.add_category') }}
- {{ $t('navigation.edit') }} {{ $tc('navigation.category',1) }}
-
-