-
+
diff --git a/resources/views/modals/transactions/email.blade.php b/resources/views/modals/transactions/email.blade.php
index bfdfc50f6..533062a87 100644
--- a/resources/views/modals/transactions/email.blade.php
+++ b/resources/views/modals/transactions/email.blade.php
@@ -1,15 +1,128 @@
-
-
-
+
+
+
+ {{ trans('general.general') }}
+
-
-
-
-
-
-
-
+
+ {{ trans_choice('general.attachments', 2) }}
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ trans('general.name') }}
+
+
+
+ {{ trans('general.size') }}
+
+
+
+
+
+
+
+ form.attachments[e.target.name] = e.target.checked | 0">
+
+
+
+ description
+
+
+
+
+ {{ trans('general.pdf_file', ['type' => trans_choice('general.transactions', 1)]) }}
+
+
+
+ {{ trans('general.na') }}
+
+
+ @if ($transaction->attachment)
+ @foreach($transaction->attachment as $attachment)
+
+
+ form.attachments[e.target.name] = e.target.checked | 0">
+
+
+ @if ($attachment->aggregate_type == 'image')
+
+
 }})
+
+ @else
+
+ attach_file
+
+ @endif
+
+
+
+ {{ $attachment->basename }}
+
+
+
+ {{ $attachment->readableSize() }}
+
+
+ @endforeach
+ @endif
+
+
+
+
+
diff --git a/resources/views/purchases/bills/index.blade.php b/resources/views/purchases/bills/index.blade.php
index a88641ecd..aecfb716c 100644
--- a/resources/views/purchases/bills/index.blade.php
+++ b/resources/views/purchases/bills/index.blade.php
@@ -18,7 +18,7 @@
-
+
diff --git a/resources/views/purchases/vendors/edit.blade.php b/resources/views/purchases/vendors/edit.blade.php
index fa33d20fc..c78b82684 100644
--- a/resources/views/purchases/vendors/edit.blade.php
+++ b/resources/views/purchases/vendors/edit.blade.php
@@ -7,5 +7,5 @@
-
+
diff --git a/resources/views/sales/customers/edit.blade.php b/resources/views/sales/customers/edit.blade.php
index 94aed59f9..1b9771848 100644
--- a/resources/views/sales/customers/edit.blade.php
+++ b/resources/views/sales/customers/edit.blade.php
@@ -7,5 +7,5 @@
-
+
diff --git a/resources/views/sales/invoices/index.blade.php b/resources/views/sales/invoices/index.blade.php
index 08f654a0d..031b795b3 100644
--- a/resources/views/sales/invoices/index.blade.php
+++ b/resources/views/sales/invoices/index.blade.php
@@ -18,7 +18,7 @@
-
+
diff --git a/routes/admin.php b/routes/admin.php
index ffa504952..f21a52488 100644
--- a/routes/admin.php
+++ b/routes/admin.php
@@ -42,6 +42,7 @@ Route::group(['prefix' => 'common'], function () {
Route::post('bulk-actions/{group}/{type}', 'Common\BulkActions@action')->name('bulk-actions.action');
Route::get('reports/{report}/print', 'Common\Reports@print')->name('reports.print');
+ Route::get('reports/{report}/pdf', 'Common\Reports@pdf')->name('reports.pdf');
Route::get('reports/{report}/export', 'Common\Reports@export')->name('reports.export');
Route::get('reports/{report}/duplicate', 'Common\Reports@duplicate')->name('reports.duplicate');
Route::get('reports/{report}/clear', 'Common\Reports@clear')->name('reports.clear');
@@ -49,6 +50,8 @@ Route::group(['prefix' => 'common'], function () {
Route::resource('reports', 'Common\Reports');
Route::get('contacts/index', 'Common\Contacts@index')->name('contacts.index');
+
+ Route::get('plans/check', 'Common\Plans@check')->name('plans.check');
});
Route::group(['prefix' => 'auth'], function () {
@@ -70,6 +73,7 @@ Route::group(['prefix' => 'auth'], function () {
Route::group(['prefix' => 'sales'], function () {
Route::get('invoices/{invoice}/sent', 'Sales\Invoices@markSent')->name('invoices.sent');
Route::get('invoices/{invoice}/cancelled', 'Sales\Invoices@markCancelled')->name('invoices.cancelled');
+ Route::get('invoices/{invoice}/restore', 'Sales\Invoices@restoreInvoice')->name('invoices.restore');
Route::get('invoices/{invoice}/email', 'Sales\Invoices@emailInvoice')->name('invoices.email');
Route::get('invoices/{invoice}/print', 'Sales\Invoices@printInvoice')->name('invoices.print');
Route::get('invoices/{invoice}/pdf', 'Sales\Invoices@pdfInvoice')->name('invoices.pdf');
@@ -97,6 +101,7 @@ Route::group(['prefix' => 'sales'], function () {
Route::group(['prefix' => 'purchases'], function () {
Route::get('bills/{bill}/received', 'Purchases\Bills@markReceived')->name('bills.received');
Route::get('bills/{bill}/cancelled', 'Purchases\Bills@markCancelled')->name('bills.cancelled');
+ Route::get('bills/{bill}/restore', 'Purchases\Bills@restoreBill')->name('bills.restore');
Route::get('bills/{bill}/print', 'Purchases\Bills@printBill')->name('bills.print');
Route::get('bills/{bill}/pdf', 'Purchases\Bills@pdfBill')->name('bills.pdf');
Route::get('bills/{bill}/duplicate', 'Purchases\Bills@duplicate')->name('bills.duplicate');
diff --git a/safelist.txt b/safelist.txt
index 835003870..a32f6f4d4 100644
--- a/safelist.txt
+++ b/safelist.txt
@@ -99,4 +99,5 @@ ltr:float-right
ltr:float-left
rtl:float-right
rtl:float-left
-rtl:rotate-180
\ No newline at end of file
+rtl:rotate-180
+hover:bg-purple-200
\ No newline at end of file
diff --git a/tests/Feature/Auth/UsersTest.php b/tests/Feature/Auth/UsersTest.php
index abb9f5b73..8dec1a830 100644
--- a/tests/Feature/Auth/UsersTest.php
+++ b/tests/Feature/Auth/UsersTest.php
@@ -3,7 +3,6 @@
namespace Tests\Feature\Auth;
use App\Jobs\Auth\CreateUser;
-use App\Models\Auth\User;
use App\Notifications\Auth\Invitation;
use Illuminate\Support\Facades\Notification;
use Tests\Feature\FeatureTestCase;
@@ -55,11 +54,11 @@ class UsersTest extends FeatureTestCase
'success' => true,
'error' => false,
'message' => '',
- 'redirect' => route('users.show', User::max('id')),
+ 'redirect' => route('users.show', user_model_class()::max('id')),
])
->json();
- $user = User::findOrFail($response['data']['id']);
+ $user = user_model_class()::findOrFail($response['data']['id']);
$this->assertFlashLevel('success');
@@ -229,7 +228,7 @@ class UsersTest extends FeatureTestCase
public function getRequest()
{
- return User::factory()->enabled()->raw();
+ return user_model_class()::factory()->enabled()->raw();
}
public function getAssertRequest($request)
diff --git a/tests/Feature/FeatureTestCase.php b/tests/Feature/FeatureTestCase.php
index 273199273..329d3164a 100644
--- a/tests/Feature/FeatureTestCase.php
+++ b/tests/Feature/FeatureTestCase.php
@@ -2,7 +2,6 @@
namespace Tests\Feature;
-use App\Models\Auth\User;
use App\Models\Common\Company;
use Faker\Factory as Faker;
use Tests\TestCase;
@@ -22,7 +21,7 @@ abstract class FeatureTestCase extends TestCase
$this->withoutExceptionHandling();
$this->faker = Faker::create();
- $this->user = User::first();
+ $this->user = user_model_class()::first();
$this->company = $this->user->companies()->first();
// Disable debugbar
@@ -36,7 +35,7 @@ abstract class FeatureTestCase extends TestCase
* @param Company|null $company
* @return FeatureTestCase
*/
- public function loginAs(User $user = null, Company $company = null)
+ public function loginAs($user = null, Company $company = null)
{
if (!$user) {
$user = $this->user;
diff --git a/tests/Feature/PaymentTestCase.php b/tests/Feature/PaymentTestCase.php
index d3cffd18c..449102dcf 100644
--- a/tests/Feature/PaymentTestCase.php
+++ b/tests/Feature/PaymentTestCase.php
@@ -75,13 +75,13 @@ class PaymentTestCase extends FeatureTestCase
} elseif ($this->invoice_currency != null) {
$this->dispatch(new CreateCurrency([
'company_id' => company_id(),
- 'name' => config('money.currencies.' . $this->invoice_currency . '.name'),
+ 'name' => currency($this->invoice_currency)->getName(),
'code' => $this->invoice_currency,
'rate' => config(['money.' . $this->invoice_currency . '.rate' => 1]),
'enabled' => 1,
- 'symbol_first' => config('money.currencies.' . $this->invoice_currency . '.symbol_first'),
- 'decimal_mark' => config('money.currencies.' . $this->invoice_currency . '.decimal_mark'),
- 'thousands_separator' => config('money.currencies.' . $this->invoice_currency . '.thousands_separator'),
+ 'symbol_first' => currency($this->invoice_currency)->isSymbolFirst(),
+ 'decimal_mark' => currency($this->invoice_currency)->getDecimalMark(),
+ 'thousands_separator' => currency($this->invoice_currency)->getThousandsSeparator(),
'default_currency' => true,
]));
}
diff --git a/tests/Feature/Sales/CustomersTest.php b/tests/Feature/Sales/CustomersTest.php
index 5864dc60d..c1cf56dff 100644
--- a/tests/Feature/Sales/CustomersTest.php
+++ b/tests/Feature/Sales/CustomersTest.php
@@ -4,7 +4,6 @@ namespace Tests\Feature\Sales;
use App\Exports\Sales\Customers as Export;
use App\Jobs\Common\CreateContact;
-use App\Models\Auth\User;
use App\Models\Common\Contact;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Facades\File;
@@ -64,7 +63,7 @@ class CustomersTest extends FeatureTestCase
$this->assertFlashLevel('success');
- $user = User::where('email', $request['email'])->first();
+ $user = user_model_class()::where('email', $request['email'])->first();
$this->assertNotNull($user);
$this->assertEquals($request['email'], $user->email);