mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #8828 from turbo124/v5-develop
updates for searching report previews
This commit is contained in:
commit
778b68864b
@ -185,7 +185,7 @@ class ClientExport extends BaseExport
|
|||||||
$clean_row[$key]['id'] = $report_keys[1] ?? $report_keys[0];
|
$clean_row[$key]['id'] = $report_keys[1] ?? $report_keys[0];
|
||||||
$clean_row[$key]['hashed_id'] = $report_keys[0] == 'client' ? null : $resource->{$report_keys[0]}->hashed_id ?? null;
|
$clean_row[$key]['hashed_id'] = $report_keys[0] == 'client' ? null : $resource->{$report_keys[0]}->hashed_id ?? null;
|
||||||
$clean_row[$key]['value'] = $row[$column_key];
|
$clean_row[$key]['value'] = $row[$column_key];
|
||||||
$clean_row[$key]['identifier'] = $value;
|
$clean_row[$key]['identifier'] = $key;
|
||||||
|
|
||||||
if(in_array($clean_row[$key]['id'], ['paid_to_date', 'balance', 'credit_balance','payment_balance']))
|
if(in_array($clean_row[$key]['id'], ['paid_to_date', 'balance', 'credit_balance','payment_balance']))
|
||||||
$clean_row[$key]['display_value'] = Number::formatMoney($row[$column_key], $resource);
|
$clean_row[$key]['display_value'] = Number::formatMoney($row[$column_key], $resource);
|
||||||
|
@ -94,6 +94,7 @@ class InvoiceController extends Controller
|
|||||||
'quote' => $invitation = QuoteInvitation::withTrashed()->find($data['invitation_id']),
|
'quote' => $invitation = QuoteInvitation::withTrashed()->find($data['invitation_id']),
|
||||||
'credit' => $invitation = CreditInvitation::withTrashed()->find($data['invitation_id']),
|
'credit' => $invitation = CreditInvitation::withTrashed()->find($data['invitation_id']),
|
||||||
'recurring_invoice' => $invitation = RecurringInvoiceInvitation::withTrashed()->find($data['invitation_id']),
|
'recurring_invoice' => $invitation = RecurringInvoiceInvitation::withTrashed()->find($data['invitation_id']),
|
||||||
|
false => $invitation = false,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (! $invitation) {
|
if (! $invitation) {
|
||||||
|
@ -74,7 +74,7 @@ class OneTimeTokenController extends BaseController
|
|||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'company_key'=> $user->company()->company_key,
|
'company_key'=> $user->company()->company_key,
|
||||||
'context' => $request->input('context'),
|
'context' => $request->input('context'),
|
||||||
'is_react' => $request->request()->hasHeader('X-REACT') ? true : false,
|
'is_react' => $request->hasHeader('X-REACT') ? true : false,
|
||||||
];
|
];
|
||||||
|
|
||||||
Cache::put($hash, $data, 3600);
|
Cache::put($hash, $data, 3600);
|
||||||
|
@ -98,7 +98,7 @@ class EntitySentObject
|
|||||||
$mail_obj->markdown = 'email.admin.generic';
|
$mail_obj->markdown = 'email.admin.generic';
|
||||||
$mail_obj->tag = $this->company->company_key;
|
$mail_obj->tag = $this->company->company_key;
|
||||||
}
|
}
|
||||||
nlog($mail_obj);
|
// nlog($mail_obj);
|
||||||
return $mail_obj;
|
return $mail_obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,10 +98,7 @@ trait Utilities
|
|||||||
$error_message = $_payment['actions'][0]['response_summary'];
|
$error_message = $_payment['actions'][0]['response_summary'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($_payment['actions'][0]['response_code']) ?? false) {
|
//checkout does not return a integer status code as an alias for a http status code.
|
||||||
$error_code = $_payment['actions'][0]['response_code'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
$error_code = 400;
|
$error_code = 400;
|
||||||
|
|
||||||
$this->getParent()->sendFailureMail($error_message);
|
$this->getParent()->sendFailureMail($error_message);
|
||||||
|
@ -16,11 +16,9 @@ use App\Models\PurchaseOrder;
|
|||||||
|
|
||||||
class PurchaseOrderInventory
|
class PurchaseOrderInventory
|
||||||
{
|
{
|
||||||
private PurchaseOrder $purchase_order;
|
|
||||||
|
|
||||||
public function __construct(PurchaseOrder $purchase_order)
|
public function __construct(private PurchaseOrder $purchase_order)
|
||||||
{
|
{
|
||||||
$this->purchase_order = $purchase_order;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function run()
|
public function run()
|
||||||
@ -31,7 +29,19 @@ class PurchaseOrderInventory
|
|||||||
$p = Product::query()->where('product_key', $item->product_key)->where('company_id', $this->purchase_order->company_id)->first();
|
$p = Product::query()->where('product_key', $item->product_key)->where('company_id', $this->purchase_order->company_id)->first();
|
||||||
|
|
||||||
if (!$p) {
|
if (!$p) {
|
||||||
continue;
|
$p = new Product();
|
||||||
|
$p->user_id = $this->purchase_order->user_id;
|
||||||
|
$p->company_id = $this->purchase_order->company_id;
|
||||||
|
$p->project_id = $this->purchase_order->project_id;
|
||||||
|
$p->vendor_id = $this->purchase_order->vendor_id;
|
||||||
|
$p->product_key = $item->product_key;
|
||||||
|
$p->notes = $item->notes ?? '';
|
||||||
|
$p->price = $item->cost ?? 0;
|
||||||
|
$p->quantity = $item->quantity ?? 0;
|
||||||
|
$p->custom_value1 = $item->custom_value1 ?? '';
|
||||||
|
$p->custom_value2 = $item->custom_value2 ?? '';
|
||||||
|
$p->custom_value3 = $item->custom_value3 ?? '';
|
||||||
|
$p->custom_value4 = $item->custom_value4 ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$p->in_stock_quantity += $item->quantity;
|
$p->in_stock_quantity += $item->quantity;
|
||||||
|
@ -22,6 +22,7 @@ parameters:
|
|||||||
- App\DataMapper\Tax\RuleInterface
|
- App\DataMapper\Tax\RuleInterface
|
||||||
- App\DataMapper\FeesAndLimits
|
- App\DataMapper\FeesAndLimits
|
||||||
- \Postmark\Models\DynamicResponseModel
|
- \Postmark\Models\DynamicResponseModel
|
||||||
|
- \Stripe\Collection
|
||||||
reportUnmatchedIgnoredErrors: false
|
reportUnmatchedIgnoredErrors: false
|
||||||
ignoreErrors:
|
ignoreErrors:
|
||||||
- '#Array has 2 duplicate keys with value#'
|
- '#Array has 2 duplicate keys with value#'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user