mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Updates for releases
This commit is contained in:
parent
7526f347a9
commit
fe4e372034
@ -1 +1 @@
|
|||||||
5.6.9
|
5.6.10
|
@ -146,12 +146,17 @@ class InvoiceItemExport extends BaseExport
|
|||||||
|
|
||||||
foreach ($invoice->line_items as $item) {
|
foreach ($invoice->line_items as $item) {
|
||||||
$item_array = [];
|
$item_array = [];
|
||||||
|
|
||||||
foreach (array_values($this->input['report_keys']) as $key) { //items iterator produces item array
|
foreach (array_values($this->input['report_keys']) as $key) { //items iterator produces item array
|
||||||
|
|
||||||
if (str_contains($key, "item.")) {
|
if (str_contains($key, "item.")) {
|
||||||
|
|
||||||
$key = str_replace("item.", "", $key);
|
$key = str_replace("item.", "", $key);
|
||||||
|
|
||||||
$keyval = str_replace("custom_value", "invoice", $key);
|
if($key == 'type_id')
|
||||||
|
$keyval = 'type';
|
||||||
|
|
||||||
|
if($key == 'tax_id')
|
||||||
|
$keyval = 'tax_category';
|
||||||
|
|
||||||
if (property_exists($item, $key)) {
|
if (property_exists($item, $key)) {
|
||||||
$item_array[$keyval] = $item->{$key};
|
$item_array[$keyval] = $item->{$key};
|
||||||
@ -160,8 +165,6 @@ class InvoiceItemExport extends BaseExport
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nlog("item array");
|
|
||||||
nlog($item_array);
|
|
||||||
|
|
||||||
$entity = [];
|
$entity = [];
|
||||||
|
|
||||||
@ -174,8 +177,8 @@ class InvoiceItemExport extends BaseExport
|
|||||||
$entity[$keyval] = "";
|
$entity[$keyval] = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nlog("entity");
|
// nlog("entity");
|
||||||
nlog($entity);
|
// nlog($entity);
|
||||||
|
|
||||||
$transformed_items = array_merge($transformed_invoice, $item_array);
|
$transformed_items = array_merge($transformed_invoice, $item_array);
|
||||||
$entity = $this->decorateAdvancedFields($invoice, $transformed_items);
|
$entity = $this->decorateAdvancedFields($invoice, $transformed_items);
|
||||||
@ -220,6 +223,14 @@ class InvoiceItemExport extends BaseExport
|
|||||||
$entity['currency'] = $invoice->client->currency() ? $invoice->client->currency()->code : $invoice->company->currency()->code;
|
$entity['currency'] = $invoice->client->currency() ? $invoice->client->currency()->code : $invoice->company->currency()->code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(array_key_exists('type', $entity)) {
|
||||||
|
$entity['type'] = $invoice->typeIdString($entity['type']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(array_key_exists('tax_category', $entity)) {
|
||||||
|
$entity['tax_category'] = $invoice->taxTypeString($entity['tax_category']);
|
||||||
|
}
|
||||||
|
|
||||||
if($this->force_keys) {
|
if($this->force_keys) {
|
||||||
$entity['client'] = $invoice->client->present()->name();
|
$entity['client'] = $invoice->client->present()->name();
|
||||||
$entity['client_id_number'] = $invoice->client->id_number;
|
$entity['client_id_number'] = $invoice->client->id_number;
|
||||||
|
@ -889,4 +889,38 @@ class Invoice extends BaseModel
|
|||||||
{
|
{
|
||||||
return ctrans('texts.invoice');
|
return ctrans('texts.invoice');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function taxTypeString($id)
|
||||||
|
{
|
||||||
|
match(intval($id)){
|
||||||
|
Product::PRODUCT_TYPE_PHYSICAL => $tax_type = ctrans('texts.physical_goods'),
|
||||||
|
Product::PRODUCT_TYPE_SERVICE => $tax_type = ctrans('texts.services'),
|
||||||
|
Product::PRODUCT_TYPE_DIGITAL => $tax_type = ctrans('texts.digital_products'),
|
||||||
|
Product::PRODUCT_TYPE_SHIPPING => $tax_type = ctrans('texts.shipping'),
|
||||||
|
Product::PRODUCT_TYPE_EXEMPT => $tax_type = ctrans('texts.tax_exempt'),
|
||||||
|
Product::PRODUCT_TYPE_REDUCED_TAX => $tax_type = ctrans('texts.reduced_tax'),
|
||||||
|
Product::PRODUCT_TYPE_OVERRIDE_TAX => $tax_type = ctrans('texts.override_tax'),
|
||||||
|
Product::PRODUCT_TYPE_ZERO_RATED => $tax_type = ctrans('texts.zero_rated'),
|
||||||
|
Product::PRODUCT_TYPE_REVERSE_TAX => $tax_type = ctrans('texts.reverse_tax'),
|
||||||
|
default => $tax_type = ctrans('texts.physical_goods'),
|
||||||
|
};
|
||||||
|
|
||||||
|
return $tax_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function typeIdString($id)
|
||||||
|
{
|
||||||
|
match($id) {
|
||||||
|
'1' => $type = ctrans('texts.product'),
|
||||||
|
'2' => $type = ctrans('texts.service'),
|
||||||
|
'3' => $type = ctrans('texts.gateway_fees'),
|
||||||
|
'4' => $type = ctrans('texts.gateway_fees'),
|
||||||
|
'5' => $type = ctrans('texts.late_fees'),
|
||||||
|
'6' => $type = ctrans('texts.expense'),
|
||||||
|
default => $type = ctrans('texts.product'),
|
||||||
|
};
|
||||||
|
|
||||||
|
return $type;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,8 @@ return [
|
|||||||
'require_https' => env('REQUIRE_HTTPS', true),
|
'require_https' => env('REQUIRE_HTTPS', true),
|
||||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||||
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
||||||
'app_version' => '5.6.9',
|
'app_version' => '5.6.10',
|
||||||
'app_tag' => '5.6.9',
|
'app_tag' => '5.6.10',
|
||||||
'minimum_client_version' => '5.0.16',
|
'minimum_client_version' => '5.0.16',
|
||||||
'terms_version' => '1.0.1',
|
'terms_version' => '1.0.1',
|
||||||
'api_secret' => env('API_SECRET', ''),
|
'api_secret' => env('API_SECRET', ''),
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
includes:
|
includes:
|
||||||
- ./vendor/nunomaduro/larastan/extension.neon
|
- ./vendor/nunomaduro/larastan/extension.neon
|
||||||
|
- phpstan-baseline.neon
|
||||||
parameters:
|
parameters:
|
||||||
treatPhpDocTypesAsCertain: false
|
treatPhpDocTypesAsCertain: false
|
||||||
parallel:
|
parallel:
|
||||||
jobSize: 5
|
jobSize: 5
|
||||||
maximumNumberOfProcesses: 8
|
maximumNumberOfProcesses: 16
|
||||||
processTimeout: 600.0
|
processTimeout: 600.0
|
||||||
ignoreErrors:
|
ignoreErrors:
|
||||||
- '#Call to an undefined method .*badMethod\(\)#'
|
- '#Call to an undefined method .*badMethod\(\)#'
|
||||||
|
Loading…
Reference in New Issue
Block a user