mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-06 19:44:35 -04:00
Merge pull request #8126 from turbo124/v5-develop
Add issue templates back into the repo
This commit is contained in:
commit
442c21287b
41
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
41
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: triage
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**What version of Invoice Ninja are you running? ie v4.5.25 / v5.0.30**
|
||||
|
||||
**What environment are you running?**
|
||||
Docker
|
||||
Shared Hosting
|
||||
ZIP
|
||||
Other
|
||||
|
||||
**Have you checked log files (storage/logs/) Please provide redacted output**
|
||||
|
||||
**Have you searched existing issues?**
|
||||
|
||||
**Have you reported this to Slack/forum before posting?**
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**Steps To Reproduce**
|
||||
Please list the steps to reproduce the issue
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
|
||||
<!-- Note: Before posting don't forget to check our "Troubleshooting" category in the [docs](https://invoiceninja.github.io/docs/self-host-troubleshooting/) (https://invoiceninja.github.io/docs/self-host-troubleshooting/) -->
|
||||
|
||||
**(v5) Can you replicate the issue on our demo site? https://demo.invoiceninja.com**
|
24
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
24
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: feature request
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**What version of Invoice Ninja are you running? ie v4.5 / v5**
|
||||
|
||||
**What environment are you running?**
|
||||
Docker
|
||||
Shared Hosting
|
||||
ZIP
|
||||
Other
|
||||
|
||||
**Have you searched existing issues/requests?**
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your request/question.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the request/question here.
|
@ -95,7 +95,6 @@ class ClientService
|
||||
{
|
||||
$credits = Credit::withTrashed()->where('client_id', $this->client->id)
|
||||
->where('is_deleted', false)
|
||||
->where('balance', '>', 0)
|
||||
->where(function ($query) {
|
||||
$query->whereDate('due_date', '<=', now()->format('Y-m-d'))
|
||||
->orWhereNull('due_date');
|
||||
|
@ -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,12 +213,12 @@ 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)
|
||||
->adjustBalance($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;
|
||||
|
@ -239,6 +239,11 @@ class SubscriptionService
|
||||
->where('status_id', Invoice::STATUS_PAID)
|
||||
->first();
|
||||
|
||||
if($last_invoice)
|
||||
nlog($last_invoice->toArray());
|
||||
else
|
||||
nlog("no invoice found");
|
||||
|
||||
$refund = $this->calculateProRataRefundForSubscription($last_invoice);
|
||||
|
||||
if($use_credit_setting != 'off')
|
||||
@ -709,6 +714,12 @@ class SubscriptionService
|
||||
|
||||
$recurring_invoice = $this->createNewRecurringInvoice($old_recurring_invoice);
|
||||
|
||||
//update the invoice and attach to the recurring invoice!!!!!
|
||||
$invoice = Invoice::find($payment_hash->fee_invoice_id);
|
||||
$invoice->recurring_id = $recurring_invoice->id;
|
||||
$invoice->is_proforma = false;
|
||||
$invoice->save();
|
||||
|
||||
$context = [
|
||||
'context' => 'change_plan',
|
||||
'recurring_invoice' => $recurring_invoice->hashed_id,
|
||||
@ -910,7 +921,7 @@ class SubscriptionService
|
||||
$invoice = InvoiceFactory::create($this->subscription->company_id, $this->subscription->user_id);
|
||||
$invoice->line_items = $subscription_repo->generateLineItems($this->subscription);
|
||||
$invoice->subscription_id = $this->subscription->id;
|
||||
$invoice->is_proforman = true;
|
||||
$invoice->is_proforma = true;
|
||||
|
||||
if(strlen($data['coupon']) >=1 && ($data['coupon'] == $this->subscription->promo_code) && $this->subscription->promo_discount > 0)
|
||||
{
|
||||
|
@ -66,6 +66,9 @@ class ZeroCostProduct extends AbstractService
|
||||
->start()
|
||||
->save();
|
||||
|
||||
$invoice->recurring_id = $recurring_invoice->id;
|
||||
$invoice->save();
|
||||
|
||||
$context = [
|
||||
'context' => 'recurring_purchase',
|
||||
'recurring_invoice' => $recurring_invoice->hashed_id,
|
||||
|
@ -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