mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Minor fixes for page number vertical height
This commit is contained in:
parent
3bc24a8bd7
commit
064b9c4e67
@ -167,7 +167,7 @@ class CreditService
|
||||
}
|
||||
|
||||
public function adjustBalance($adjustment)
|
||||
{
|
||||
{nlog("adjusting by {$adjustment}");
|
||||
$this->credit->balance += $adjustment;
|
||||
|
||||
return $this;
|
||||
|
@ -69,16 +69,6 @@ class RefundPayment
|
||||
EmailRefundPayment::dispatch($this->payment, $this->payment->company, $contact);
|
||||
}
|
||||
|
||||
$transaction = [
|
||||
'invoice' => [],
|
||||
'payment' => $this->payment->transaction_event(),
|
||||
'client' => $this->payment->client->transaction_event(),
|
||||
'credit' => [],
|
||||
'metadata' => [],
|
||||
];
|
||||
|
||||
// TransactionLog::dispatch(TransactionEvent::PAYMENT_REFUND, $transaction, $this->payment->company->db);
|
||||
|
||||
$notes = ctrans('texts.refunded') . " : {$this->total_refund} - " . ctrans('texts.gateway_refund') . " : ";
|
||||
$notes .= $this->refund_data['gateway_refund'] !== false ? ctrans('texts.yes') : ctrans('texts.no');
|
||||
|
||||
@ -210,6 +200,7 @@ class RefundPayment
|
||||
if ($this->payment->credits()->exists()) {
|
||||
//Adjust credits first!!!
|
||||
foreach ($this->payment->credits as $paymentable_credit) {
|
||||
|
||||
$available_credit = $paymentable_credit->pivot->amount - $paymentable_credit->pivot->refunded;
|
||||
|
||||
if ($available_credit > $this->total_refund) {
|
||||
@ -222,17 +213,17 @@ class RefundPayment
|
||||
->updatePaidToDate($this->total_refund * -1)
|
||||
->save();
|
||||
|
||||
|
||||
$this->total_refund = 0;
|
||||
} else {
|
||||
$paymentable_credit->pivot->refunded += $available_credit;
|
||||
$paymentable_credit->pivot->save();
|
||||
|
||||
$paymentable_credit->balance += $available_credit;
|
||||
$paymentable_credit->service()
|
||||
->setStatus(Credit::STATUS_SENT)
|
||||
->setStatus(Credit::STATUS_SENT)
|
||||
->adjustBalance($available_credit)
|
||||
->updatePaidToDate($available_credit * -1)
|
||||
->save();
|
||||
->save();
|
||||
|
||||
$this->total_refund -= $available_credit;
|
||||
}
|
||||
@ -288,16 +279,6 @@ class RefundPayment
|
||||
->updateBalance($refunded_invoice['amount'])
|
||||
->save();
|
||||
|
||||
$transaction = [
|
||||
'invoice' => $invoice->transaction_event(),
|
||||
'payment' => [],
|
||||
'client' => $client->transaction_event(),
|
||||
'credit' => [],
|
||||
'metadata' => [],
|
||||
];
|
||||
|
||||
// TransactionLog::dispatch(TransactionEvent::PAYMENT_REFUND, $transaction, $invoice->company->db);
|
||||
|
||||
if ($invoice->is_deleted) {
|
||||
$invoice->delete();
|
||||
}
|
||||
@ -311,15 +292,6 @@ class RefundPayment
|
||||
|
||||
$client->service()->updatePaidToDate(-1 * $refunded_invoice['amount'])->save();
|
||||
|
||||
$transaction = [
|
||||
'invoice' => [],
|
||||
'payment' => [],
|
||||
'client' => $client->transaction_event(),
|
||||
'credit' => [],
|
||||
'metadata' => [],
|
||||
];
|
||||
|
||||
// TransactionLog::dispatch(TransactionEvent::PAYMENT_REFUND, $transaction, $client->company->db);
|
||||
} else {
|
||||
//if we are refunding and no payments have been tagged, then we need to decrement the client->paid_to_date by the total refund amount.
|
||||
|
||||
@ -331,15 +303,6 @@ class RefundPayment
|
||||
|
||||
$client->service()->updatePaidToDate(-1 * $this->total_refund)->save();
|
||||
|
||||
$transaction = [
|
||||
'invoice' => [],
|
||||
'payment' => [],
|
||||
'client' => $client->transaction_event(),
|
||||
'credit' => [],
|
||||
'metadata' => [],
|
||||
];
|
||||
|
||||
// TransactionLog::dispatch(TransactionEvent::PAYMENT_REFUND, $transaction, $client->company->db);
|
||||
}
|
||||
|
||||
return $this;
|
||||
|
@ -19,7 +19,7 @@ class PDF extends FPDI
|
||||
|
||||
public function Footer()
|
||||
{
|
||||
$this->SetXY(0, -5);
|
||||
$this->SetXY(0, -6);
|
||||
$this->SetFont('Arial', 'I', 9);
|
||||
|
||||
$this->SetTextColor(135, 135, 135);
|
||||
|
Loading…
x
Reference in New Issue
Block a user