mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Minor fixes
This commit is contained in:
parent
824787b2f2
commit
57866333a8
@ -229,10 +229,6 @@ class InvoiceItemExport extends BaseExport
|
|||||||
// $entity['currency'] = $invoice->client->currency() ? $invoice->client->currency()->code : $invoice->company->currency()->code;
|
// $entity['currency'] = $invoice->client->currency() ? $invoice->client->currency()->code : $invoice->company->currency()->code;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// if(array_key_exists('type', $entity)) {
|
|
||||||
// $entity['type'] = $invoice->typeIdString($entity['type']);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if(array_key_exists('tax_category', $entity)) {
|
// if(array_key_exists('tax_category', $entity)) {
|
||||||
// $entity['tax_category'] = $invoice->taxTypeString($entity['tax_category']);
|
// $entity['tax_category'] = $invoice->taxTypeString($entity['tax_category']);
|
||||||
// }
|
// }
|
||||||
|
@ -213,10 +213,6 @@ class PurchaseOrderItemExport extends BaseExport
|
|||||||
// $entity['currency'] = $purchase_order->vendor->currency() ? $purchase_order->vendor->currency()->code : $purchase_order->company->currency()->code;
|
// $entity['currency'] = $purchase_order->vendor->currency() ? $purchase_order->vendor->currency()->code : $purchase_order->company->currency()->code;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// if(array_key_exists('type', $entity)) {
|
|
||||||
// $entity['type'] = $purchase_order->typeIdString($entity['type']);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if(array_key_exists('tax_category', $entity)) {
|
// if(array_key_exists('tax_category', $entity)) {
|
||||||
// $entity['tax_category'] = $purchase_order->taxTypeString($entity['tax_category']);
|
// $entity['tax_category'] = $purchase_order->taxTypeString($entity['tax_category']);
|
||||||
// }
|
// }
|
||||||
|
@ -714,22 +714,22 @@ class Invoice extends BaseModel
|
|||||||
return $tax_type;
|
return $tax_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function typeIdString($id)
|
// public function typeIdString($id)
|
||||||
{
|
// {
|
||||||
$type = '';
|
// $type = '';
|
||||||
match($id) {
|
// match($id) {
|
||||||
'1' => $type = ctrans('texts.product'),
|
// '1' => $type = ctrans('texts.product'),
|
||||||
'2' => $type = ctrans('texts.service'),
|
// '2' => $type = ctrans('texts.service'),
|
||||||
'3' => $type = ctrans('texts.gateway_fees'),
|
// '3' => $type = ctrans('texts.gateway_fees'),
|
||||||
'4' => $type = ctrans('texts.gateway_fees'),
|
// '4' => $type = ctrans('texts.gateway_fees'),
|
||||||
'5' => $type = ctrans('texts.late_fees'),
|
// '5' => $type = ctrans('texts.late_fees'),
|
||||||
'6' => $type = ctrans('texts.expense'),
|
// '6' => $type = ctrans('texts.expense'),
|
||||||
default => $type = ctrans('texts.product'),
|
// default => $type = ctrans('texts.product'),
|
||||||
};
|
// };
|
||||||
|
|
||||||
return $type;
|
// return $type;
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
public function reminderSchedule(): string
|
public function reminderSchedule(): string
|
||||||
{
|
{
|
||||||
|
@ -353,22 +353,22 @@ class PurchaseOrder extends BaseModel
|
|||||||
return ctrans('texts.purchase_order');
|
return ctrans('texts.purchase_order');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function typeIdString($id): string
|
// public function typeIdString($id): string
|
||||||
{
|
// {
|
||||||
$type = '';
|
// $type = '';
|
||||||
match($id) {
|
// match($id) {
|
||||||
'1' => $type = ctrans('texts.product'),
|
// '1' => $type = ctrans('texts.product'),
|
||||||
'2' => $type = ctrans('texts.service'),
|
// '2' => $type = ctrans('texts.service'),
|
||||||
'3' => $type = ctrans('texts.gateway_fees'),
|
// '3' => $type = ctrans('texts.gateway_fees'),
|
||||||
'4' => $type = ctrans('texts.gateway_fees'),
|
// '4' => $type = ctrans('texts.gateway_fees'),
|
||||||
'5' => $type = ctrans('texts.late_fees'),
|
// '5' => $type = ctrans('texts.late_fees'),
|
||||||
'6' => $type = ctrans('texts.expense'),
|
// '6' => $type = ctrans('texts.expense'),
|
||||||
default => $type = ctrans('texts.product'),
|
// default => $type = ctrans('texts.product'),
|
||||||
};
|
// };
|
||||||
|
|
||||||
return $type;
|
// return $type;
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
public function taxTypeString($id): string
|
public function taxTypeString($id): string
|
||||||
{
|
{
|
||||||
|
@ -65,7 +65,7 @@ class RouteServiceProvider extends ServiceProvider
|
|||||||
if (Ninja::isSelfHost()) {
|
if (Ninja::isSelfHost()) {
|
||||||
return Limit::none();
|
return Limit::none();
|
||||||
} else {
|
} else {
|
||||||
return Limit::perMinute(500)->by($request->ip());
|
return Limit::perMinute(800)->by($request->ip());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -31,9 +31,16 @@ class Merge extends AbstractService
|
|||||||
|
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
|
nlog("merging {$this->mergable_client->id} into {$this->client->id}");
|
||||||
|
nlog("balance pre {$this->client->balance}");
|
||||||
|
nlog("paid_to_date pre {$this->client->paid_to_date}");
|
||||||
|
|
||||||
$this->client->balance += $this->mergable_client->balance;
|
$this->client->balance += $this->mergable_client->balance;
|
||||||
$this->client->paid_to_date += $this->mergable_client->paid_to_date;
|
$this->client->paid_to_date += $this->mergable_client->paid_to_date;
|
||||||
$this->client->save();
|
$this->client->save();
|
||||||
|
|
||||||
|
nlog("balance post {$this->client->balance}");
|
||||||
|
nlog("paid_to_date post {$this->client->paid_to_date}");
|
||||||
|
|
||||||
$this->updateLedger($this->mergable_client->balance);
|
$this->updateLedger($this->mergable_client->balance);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user