mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-05 03:34:36 -04:00
Fixes for activity insertions
This commit is contained in:
parent
fec38eac8a
commit
1bff207e6c
@ -451,8 +451,8 @@ class Activity extends StaticModel
|
|||||||
':subscription' => $translation = [substr($variable, 1) => [ 'label' => $this?->subscription?->number ?? '', 'hashed_id' => $this->subscription->hashed_id ?? '' ]],
|
':subscription' => $translation = [substr($variable, 1) => [ 'label' => $this?->subscription?->number ?? '', 'hashed_id' => $this->subscription->hashed_id ?? '' ]],
|
||||||
':recurring_invoice' => $translation = [substr($variable, 1) =>[ 'label' => $this?->recurring_invoice?->number ??'', 'hashed_id' => $this->recurring_invoice->hashed_id ?? '']],
|
':recurring_invoice' => $translation = [substr($variable, 1) =>[ 'label' => $this?->recurring_invoice?->number ??'', 'hashed_id' => $this->recurring_invoice->hashed_id ?? '']],
|
||||||
':recurring_expense' => $translation = [substr($variable, 1) => [ 'label' => $this?->recurring_expense?->number ??'', 'hashed_id' => $this->recurring_expense->hashed_id ?? '']],
|
':recurring_expense' => $translation = [substr($variable, 1) => [ 'label' => $this?->recurring_expense?->number ??'', 'hashed_id' => $this->recurring_expense->hashed_id ?? '']],
|
||||||
':payment_amount' => $translation = [substr($variable, 1) =>[ 'label' => Number::formatMoney($this?->payment?->amount, $this?->payment?->client) ?? '', 'hashed_id' => '']],
|
':payment_amount' => $translation = [substr($variable, 1) =>[ 'label' => Number::formatMoney($this?->payment?->amount, $this?->payment?->client ?? $this->company) ?? '', 'hashed_id' => '']],
|
||||||
':adjustment' => $translation = [substr($variable, 1) =>[ 'label' => Number::formatMoney($this?->payment?->refunded, $this?->payment?->client) ?? '', 'hashed_id' => '']],
|
':adjustment' => $translation = [substr($variable, 1) =>[ 'label' => Number::formatMoney($this?->payment?->refunded, $this?->payment?->client ?? $this->company) ?? '', 'hashed_id' => '']],
|
||||||
':ip' => $translation = [ 'ip' => $this->ip ?? ''],
|
':ip' => $translation = [ 'ip' => $this->ip ?? ''],
|
||||||
':contact' => $translation = $this->resolveContact(),
|
':contact' => $translation = $this->resolveContact(),
|
||||||
default => $translation = [],
|
default => $translation = [],
|
||||||
|
@ -149,7 +149,8 @@ class RefundPayment
|
|||||||
$fields->user_id = $this->payment->user_id;
|
$fields->user_id = $this->payment->user_id;
|
||||||
$fields->company_id = $this->payment->company_id;
|
$fields->company_id = $this->payment->company_id;
|
||||||
$fields->activity_type_id = Activity::REFUNDED_PAYMENT;
|
$fields->activity_type_id = Activity::REFUNDED_PAYMENT;
|
||||||
// $fields->credit_id = $this->credit_note->id; // TODO
|
$fields->client_id = $this->payment->client_id;
|
||||||
|
// $fields->credit_id // TODO
|
||||||
$fields->notes = $notes;
|
$fields->notes = $notes;
|
||||||
|
|
||||||
if (isset($this->refund_data['invoices'])) {
|
if (isset($this->refund_data['invoices'])) {
|
||||||
|
@ -843,8 +843,9 @@ class PdfBuilder
|
|||||||
*/
|
*/
|
||||||
public function processTaxColumns(string $type): void
|
public function processTaxColumns(string $type): void
|
||||||
{
|
{
|
||||||
if ($type == 'product') {
|
|
||||||
$column_type = 'product';
|
$column_type = 'product';
|
||||||
|
|
||||||
|
if ($type == 'product') {
|
||||||
$type_id = 1;
|
$type_id = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,6 +208,7 @@ trait Refundable
|
|||||||
$fields->company_id = $this->company_id;
|
$fields->company_id = $this->company_id;
|
||||||
$fields->activity_type_id = Activity::REFUNDED_PAYMENT;
|
$fields->activity_type_id = Activity::REFUNDED_PAYMENT;
|
||||||
$fields->credit_id = $credit_id;
|
$fields->credit_id = $credit_id;
|
||||||
|
$fields->client_id = $this->client_id;
|
||||||
|
|
||||||
if (isset($data['invoices'])) {
|
if (isset($data['invoices'])) {
|
||||||
foreach ($data['invoices'] as $invoice) {
|
foreach ($data['invoices'] as $invoice) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user