diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eee6165df82b..462119a834ab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,7 +48,7 @@ jobs: npm run build cp -r dist/react/* ../public/react mkdir -p public/tinymce_6.4.2/tinymce/js/ - cp -r node_modules/tinymce ../public/tinymce_6.4.2/tinymce/js/ + cp -r node_modules/tinymce public/tinymce_6.4.2/tinymce/js/ cd .. rm -rf ui php artisan ninja:react diff --git a/app/Export/CSV/InvoiceItemExport.php b/app/Export/CSV/InvoiceItemExport.php index 420bd023e42d..83181268c152 100644 --- a/app/Export/CSV/InvoiceItemExport.php +++ b/app/Export/CSV/InvoiceItemExport.php @@ -69,9 +69,9 @@ class InvoiceItemExport extends BaseExport 'total_taxes' => 'total_taxes', 'currency' => 'currency_id', 'quantity' => 'item.quantity', - 'unit_cost' => 'item.cost', + 'cost' => 'item.cost', 'product_key' => 'item.product_key', - 'cost' => 'item.product_cost', + 'buy_price' => 'item.product_cost', 'notes' => 'item.notes', 'discount' => 'item.discount', 'is_amount_discount' => 'item.is_amount_discount', @@ -87,6 +87,8 @@ class InvoiceItemExport extends BaseExport 'invoice2' => 'item.custom_value2', 'invoice3' => 'item.custom_value3', 'invoice4' => 'item.custom_value4', + 'tax_category' => 'item.tax_id', + 'type' => 'item.type_id', ]; private array $decorate_keys = [ @@ -149,14 +151,18 @@ class InvoiceItemExport extends BaseExport if (str_contains($key, "item.")) { $key = str_replace("item.", "", $key); + $keyval = str_replace("custom_value", "invoice", $key); + if (property_exists($item, $key)) { - $item_array[$key] = $item->{$key}; + $item_array[$keyval] = $item->{$key}; } else { - $item_array[$key] = ''; + $item_array[$keyval] = ''; } } } - + nlog("item array"); + nlog($item_array); + $entity = []; foreach (array_values($this->input['report_keys']) as $key) { //create an array of report keys only @@ -168,6 +174,8 @@ class InvoiceItemExport extends BaseExport $entity[$keyval] = ""; } } + nlog("entity"); + nlog($entity); $transformed_items = array_merge($transformed_invoice, $item_array); $entity = $this->decorateAdvancedFields($invoice, $transformed_items); diff --git a/lang/en/texts.php b/lang/en/texts.php index 98e650a94ef5..d447137b99c9 100644 --- a/lang/en/texts.php +++ b/lang/en/texts.php @@ -5113,7 +5113,7 @@ $LANG = array( 'item_tax_rate1' => 'Item Tax Rate 1', 'item_tax_rate2' => 'Item Tax Rate 2', 'item_tax_rate3' => 'Item Tax Rate 3', - + 'buy_price' => 'Buy Price', ); diff --git a/phpstan.neon b/phpstan.neon index 859693d32cae..b3411ce79b40 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -4,9 +4,9 @@ includes: parameters: treatPhpDocTypesAsCertain: false parallel: - jobSize: 20 - maximumNumberOfProcesses: 2 - processTimeout: 300.0 + jobSize: 5 + maximumNumberOfProcesses: 8 + processTimeout: 600.0 ignoreErrors: - '#Call to an undefined method .*badMethod\(\)#' - '#Call to an undefined method Illuminate\Database\Eloquent\Builder::exclude#'