diff --git a/app/Models/Activity.php b/app/Models/Activity.php index 772c234e695a..e8b1a7f05d2b 100644 --- a/app/Models/Activity.php +++ b/app/Models/Activity.php @@ -451,8 +451,8 @@ class Activity extends StaticModel ':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_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' => '']], - ':adjustment' => $translation = [substr($variable, 1) =>[ 'label' => Number::formatMoney($this?->payment?->refunded, $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 ?? $this->company) ?? '', 'hashed_id' => '']], ':ip' => $translation = [ 'ip' => $this->ip ?? ''], ':contact' => $translation = $this->resolveContact(), default => $translation = [], diff --git a/app/Services/Payment/RefundPayment.php b/app/Services/Payment/RefundPayment.php index b06833eeff0d..82e2781e40a6 100644 --- a/app/Services/Payment/RefundPayment.php +++ b/app/Services/Payment/RefundPayment.php @@ -149,7 +149,8 @@ class RefundPayment $fields->user_id = $this->payment->user_id; $fields->company_id = $this->payment->company_id; $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; if (isset($this->refund_data['invoices'])) { diff --git a/app/Services/Pdf/PdfBuilder.php b/app/Services/Pdf/PdfBuilder.php index 9b19192e1bcf..ef2328955d56 100644 --- a/app/Services/Pdf/PdfBuilder.php +++ b/app/Services/Pdf/PdfBuilder.php @@ -843,8 +843,9 @@ class PdfBuilder */ public function processTaxColumns(string $type): void { + $column_type = 'product'; + if ($type == 'product') { - $column_type = 'product'; $type_id = 1; } diff --git a/app/Utils/Traits/Payment/Refundable.php b/app/Utils/Traits/Payment/Refundable.php index 442c1dfdad8f..7a7098bb0684 100644 --- a/app/Utils/Traits/Payment/Refundable.php +++ b/app/Utils/Traits/Payment/Refundable.php @@ -208,6 +208,7 @@ trait Refundable $fields->company_id = $this->company_id; $fields->activity_type_id = Activity::REFUNDED_PAYMENT; $fields->credit_id = $credit_id; + $fields->client_id = $this->client_id; if (isset($data['invoices'])) { foreach ($data['invoices'] as $invoice) {