Merge branch 'master' of github.com:mervekaraman/akaunting
This commit is contained in:
commit
df95c10fcb
@ -15,9 +15,10 @@ use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
|||||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||||
use Maatwebsite\Excel\Concerns\WithMapping;
|
use Maatwebsite\Excel\Concerns\WithMapping;
|
||||||
use Maatwebsite\Excel\Concerns\WithTitle;
|
use Maatwebsite\Excel\Concerns\WithTitle;
|
||||||
|
use Maatwebsite\Excel\Concerns\WithStrictNullComparison;
|
||||||
use PhpOffice\PhpSpreadsheet\Shared\Date as ExcelDate;
|
use PhpOffice\PhpSpreadsheet\Shared\Date as ExcelDate;
|
||||||
|
|
||||||
abstract class Export implements FromCollection, HasLocalePreference, ShouldAutoSize, ShouldQueue, WithHeadings, WithMapping, WithTitle
|
abstract class Export implements FromCollection, HasLocalePreference, ShouldAutoSize, ShouldQueue, WithHeadings, WithMapping, WithTitle, WithStrictNullComparison
|
||||||
{
|
{
|
||||||
use Exportable;
|
use Exportable;
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ abstract class Import implements HasLocalePreference, ShouldQueue, SkipsEmptyRow
|
|||||||
$row['reconciled'] = (int) $row['reconciled'];
|
$row['reconciled'] = (int) $row['reconciled'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$date_fields = ['paid_at', 'invoiced_at', 'billed_at', 'due_at', 'issued_at', 'created_at', 'transferred_at'];
|
$date_fields = ['paid_at', 'invoiced_at', 'billed_at', 'due_at', 'issued_at', 'transferred_at'];
|
||||||
foreach ($date_fields as $date_field) {
|
foreach ($date_fields as $date_field) {
|
||||||
if (!isset($row[$date_field])) {
|
if (!isset($row[$date_field])) {
|
||||||
continue;
|
continue;
|
||||||
|
23
app/Events/Common/DatesFormating.php
Normal file
23
app/Events/Common/DatesFormating.php
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Events\Common;
|
||||||
|
|
||||||
|
use App\Abstracts\Event;
|
||||||
|
|
||||||
|
class DatesFormating extends Event
|
||||||
|
{
|
||||||
|
public $columns;
|
||||||
|
|
||||||
|
public $request;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new event instance.
|
||||||
|
*
|
||||||
|
* @param $request
|
||||||
|
*/
|
||||||
|
public function __construct($columns, $request)
|
||||||
|
{
|
||||||
|
$this->columns = $columns;
|
||||||
|
$this->request = $request;
|
||||||
|
}
|
||||||
|
}
|
@ -194,20 +194,19 @@ class Tiles extends Controller
|
|||||||
case 'paid':
|
case 'paid':
|
||||||
$response = $this->getPaidModules($data);
|
$response = $this->getPaidModules($data);
|
||||||
|
|
||||||
$last_page = $response->last_page;
|
$last_page = ! empty($response) ? $response->last_page : 1;
|
||||||
$modules = $this->prepareModules($response);
|
$modules = $this->prepareModules($response);
|
||||||
break;
|
break;
|
||||||
case 'new':
|
case 'new':
|
||||||
$response = $this->getNewModules($data);
|
$response = $this->getNewModules($data);
|
||||||
|
|
||||||
$last_page = $response->last_page;
|
$last_page = ! empty($response) ? $response->last_page : 1;
|
||||||
$modules = $this->prepareModules($response);
|
$modules = $this->prepareModules($response);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'free':
|
case 'free':
|
||||||
$response = $this->getFreeModules($data);
|
$response = $this->getFreeModules($data);
|
||||||
|
|
||||||
$last_page = $response->last_page;
|
$last_page = ! empty($response) ? $response->last_page : 1;
|
||||||
$modules = $this->prepareModules($response);
|
$modules = $this->prepareModules($response);
|
||||||
break;
|
break;
|
||||||
case 'search':
|
case 'search':
|
||||||
@ -215,7 +214,7 @@ class Tiles extends Controller
|
|||||||
|
|
||||||
$response = $this->getSearchModules($data);
|
$response = $this->getSearchModules($data);
|
||||||
|
|
||||||
$last_page = $response->last_page;
|
$last_page = ! empty($response) ? $response->last_page : 1;
|
||||||
$modules = $this->prepareModules($response);
|
$modules = $this->prepareModules($response);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Http\Middleware;
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use App\Events\Common\DatesFormating;
|
||||||
use Closure;
|
use Closure;
|
||||||
use Date;
|
use Date;
|
||||||
|
|
||||||
@ -12,13 +13,27 @@ class DateFormat
|
|||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
* @param \Closure $next
|
* @param \Closure $next
|
||||||
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next)
|
||||||
{
|
{
|
||||||
if (($request->method() == 'POST') || ($request->method() == 'PATCH')) {
|
if (($request->method() == 'POST') || ($request->method() == 'PATCH')) {
|
||||||
// todo fire event
|
$columns = new \stdClass();
|
||||||
$fields = ['paid_at', 'due_at', 'issued_at', 'started_at', 'ended_at', 'expire_at', 'recurring_started_at', 'recurring_limit_date'];
|
$columns->fields = [
|
||||||
|
'paid_at',
|
||||||
|
'due_at',
|
||||||
|
'issued_at',
|
||||||
|
'started_at',
|
||||||
|
'ended_at',
|
||||||
|
'expire_at',
|
||||||
|
'recurring_started_at',
|
||||||
|
'recurring_limit_date',
|
||||||
|
];
|
||||||
|
|
||||||
|
event(new DatesFormating($columns, $request));
|
||||||
|
|
||||||
|
$fields = $columns->fields;
|
||||||
|
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
$date = $request->get($field);
|
$date = $request->get($field);
|
||||||
|
52
database/migrations/2023_06_22_000000_core_v3016.php
Normal file
52
database/migrations/2023_06_22_000000_core_v3016.php
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
// Settings
|
||||||
|
Schema::table('settings', function (Blueprint $table) {
|
||||||
|
$connection = Schema::getConnection();
|
||||||
|
$d_table = $connection->getDoctrineSchemaManager()->listTableDetails($connection->getTablePrefix() . 'settings');
|
||||||
|
|
||||||
|
if ($d_table->hasIndex('settings_company_id_key_unique')) {
|
||||||
|
$table->dropUnique('settings_company_id_key_unique');
|
||||||
|
} else {
|
||||||
|
$table->dropUnique(['company_id', 'key']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$table->unique(['company_id', 'key', 'deleted_at']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
// Settings
|
||||||
|
Schema::table('settings', function (Blueprint $table) {
|
||||||
|
$connection = Schema::getConnection();
|
||||||
|
$d_table = $connection->getDoctrineSchemaManager()->listTableDetails($connection->getTablePrefix() . 'settings');
|
||||||
|
|
||||||
|
if ($d_table->hasIndex('settings_company_id_key_deleted_at_unique')) {
|
||||||
|
$table->dropUnique('settings_company_id_key_deleted_at_unique');
|
||||||
|
} else {
|
||||||
|
$table->dropUnique(['company_id', 'key', 'deleted_at']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$table->unique(['company_id', 'key']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
BIN
public/img/wizard-rocket.gif
Normal file
BIN
public/img/wizard-rocket.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 MiB |
@ -220,6 +220,8 @@
|
|||||||
|
|
||||||
let styles = {};
|
let styles = {};
|
||||||
|
|
||||||
|
styles.zIndex = 100;
|
||||||
|
|
||||||
if (this.verticalAlign === 'top') {
|
if (this.verticalAlign === 'top') {
|
||||||
styles.top = `${pixels}px`;
|
styles.top = `${pixels}px`;
|
||||||
} else {
|
} else {
|
||||||
|
@ -231,6 +231,7 @@ return [
|
|||||||
'validation_error' => 'Validation error',
|
'validation_error' => 'Validation error',
|
||||||
'dismiss' => 'Dismiss',
|
'dismiss' => 'Dismiss',
|
||||||
'size' => 'Size',
|
'size' => 'Size',
|
||||||
|
'media' => 'Media',
|
||||||
|
|
||||||
'card' => [
|
'card' => [
|
||||||
'cards' => 'Card|Cards',
|
'cards' => 'Card|Cards',
|
||||||
|
@ -231,7 +231,7 @@
|
|||||||
:class="[{'btn-outline-primary' : row.discount_type !== 'fixed'}, {'bg-white rounded-lg' : row.discount_type === 'fixed'}]"
|
:class="[{'btn-outline-primary' : row.discount_type !== 'fixed'}, {'bg-white rounded-lg' : row.discount_type === 'fixed'}]"
|
||||||
@click="onChangeLineDiscountType(index, 'fixed')"
|
@click="onChangeLineDiscountType(index, 'fixed')"
|
||||||
>
|
>
|
||||||
<span class="text-base">{{ $currency->symbol }}</span>
|
<span class="text-base">{{ ($currency) ? $currency->symbol : '$' }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user