mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
commit
6e2fefcba4
@ -1 +1 @@
|
|||||||
5.8.31
|
5.8.32
|
@ -57,7 +57,11 @@ class DocumentFilters extends QueryFilters
|
|||||||
\App\Models\Credit::class,
|
\App\Models\Credit::class,
|
||||||
\App\Models\Expense::class,
|
\App\Models\Expense::class,
|
||||||
\App\Models\Payment::class,
|
\App\Models\Payment::class,
|
||||||
\App\Models\Task::class], function ($q2) use ($client_id) {
|
\App\Models\Task::class,
|
||||||
|
\App\Models\RecurringExpense::class,
|
||||||
|
\App\Models\RecurringInvoice::class,
|
||||||
|
\App\Models\Project::class,
|
||||||
|
], function ($q2) use ($client_id) {
|
||||||
$q2->where('client_id', $this->decodePrimaryKey($client_id));
|
$q2->where('client_id', $this->decodePrimaryKey($client_id));
|
||||||
})->orWhereHasMorph('documentable', [\App\Models\Client::class], function ($q3) use ($client_id) {
|
})->orWhereHasMorph('documentable', [\App\Models\Client::class], function ($q3) use ($client_id) {
|
||||||
$q3->where('id', $this->decodePrimaryKey($client_id));
|
$q3->where('id', $this->decodePrimaryKey($client_id));
|
||||||
|
@ -122,7 +122,7 @@ class InvoiceSum
|
|||||||
|
|
||||||
private function calculateInvoiceTaxes(): self
|
private function calculateInvoiceTaxes(): self
|
||||||
{
|
{
|
||||||
if (is_string($this->invoice->tax_name1) && strlen($this->invoice->tax_name1) > 2) {
|
if (is_string($this->invoice->tax_name1) && strlen($this->invoice->tax_name1) >= 2) {
|
||||||
$tax = $this->taxer($this->total, $this->invoice->tax_rate1);
|
$tax = $this->taxer($this->total, $this->invoice->tax_rate1);
|
||||||
$tax += $this->getSurchargeTaxTotalForKey($this->invoice->tax_name1, $this->invoice->tax_rate1);
|
$tax += $this->getSurchargeTaxTotalForKey($this->invoice->tax_name1, $this->invoice->tax_rate1);
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ class InvoiceSum
|
|||||||
$this->total_tax_map[] = ['name' => $this->invoice->tax_name1.' '.floatval($this->invoice->tax_rate1).'%', 'total' => $tax];
|
$this->total_tax_map[] = ['name' => $this->invoice->tax_name1.' '.floatval($this->invoice->tax_rate1).'%', 'total' => $tax];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_string($this->invoice->tax_name2) && strlen($this->invoice->tax_name2) > 2) {
|
if (is_string($this->invoice->tax_name2) && strlen($this->invoice->tax_name2) >= 2) {
|
||||||
$tax = $this->taxer($this->total, $this->invoice->tax_rate2);
|
$tax = $this->taxer($this->total, $this->invoice->tax_rate2);
|
||||||
$tax += $this->getSurchargeTaxTotalForKey($this->invoice->tax_name2, $this->invoice->tax_rate2);
|
$tax += $this->getSurchargeTaxTotalForKey($this->invoice->tax_name2, $this->invoice->tax_rate2);
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ class InvoiceSum
|
|||||||
$this->total_tax_map[] = ['name' => $this->invoice->tax_name2.' '.floatval($this->invoice->tax_rate2).'%', 'total' => $tax];
|
$this->total_tax_map[] = ['name' => $this->invoice->tax_name2.' '.floatval($this->invoice->tax_rate2).'%', 'total' => $tax];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_string($this->invoice->tax_name3) && strlen($this->invoice->tax_name3) > 2) {
|
if (is_string($this->invoice->tax_name3) && strlen($this->invoice->tax_name3) >= 2) {
|
||||||
$tax = $this->taxer($this->total, $this->invoice->tax_rate3);
|
$tax = $this->taxer($this->total, $this->invoice->tax_rate3);
|
||||||
$tax += $this->getSurchargeTaxTotalForKey($this->invoice->tax_name3, $this->invoice->tax_rate3);
|
$tax += $this->getSurchargeTaxTotalForKey($this->invoice->tax_name3, $this->invoice->tax_rate3);
|
||||||
|
|
||||||
|
@ -49,6 +49,9 @@ use App\Http\Requests\Client\ClientDocumentsRequest;
|
|||||||
use App\Http\Requests\Client\ReactivateClientEmailRequest;
|
use App\Http\Requests\Client\ReactivateClientEmailRequest;
|
||||||
use App\Models\Expense;
|
use App\Models\Expense;
|
||||||
use App\Models\Payment;
|
use App\Models\Payment;
|
||||||
|
use App\Models\Project;
|
||||||
|
use App\Models\RecurringExpense;
|
||||||
|
use App\Models\RecurringInvoice;
|
||||||
use App\Models\Task;
|
use App\Models\Task;
|
||||||
use App\Transformers\DocumentTransformer;
|
use App\Transformers\DocumentTransformer;
|
||||||
|
|
||||||
@ -421,7 +424,7 @@ class ClientController extends BaseController
|
|||||||
|
|
||||||
$documents = Document::query()
|
$documents = Document::query()
|
||||||
->company()
|
->company()
|
||||||
->whereHasMorph('documentable', [Invoice::class, Quote::class, Credit::class, Expense::class, Payment::class, Task::class], function ($query) use ($client) {
|
->whereHasMorph('documentable', [Invoice::class, Quote::class, Credit::class, Expense::class, Payment::class, Task::class, RecurringInvoice::class, RecurringExpense::class, Project::class], function ($query) use ($client) {
|
||||||
$query->where('client_id', $client->id);
|
$query->where('client_id', $client->id);
|
||||||
})
|
})
|
||||||
->orWhereHasMorph('documentable', [Client::class], function ($query) use ($client) {
|
->orWhereHasMorph('documentable', [Client::class], function ($query) use ($client) {
|
||||||
|
@ -214,15 +214,17 @@ class Document extends BaseModel
|
|||||||
$link = '';
|
$link = '';
|
||||||
|
|
||||||
match($this->documentable_type) {
|
match($this->documentable_type) {
|
||||||
'App\Models\Vendor' => $link = "vendors/{$entity_id}",
|
'App\Models\Vendor' => $link = "/vendors/{$entity_id}",
|
||||||
'App\Models\Project' => $link = "projects/{$entity_id}",
|
'App\Models\Project' => $link = "/projects/{$entity_id}",
|
||||||
'invoices' => $link = "invoices/{$entity_id}/edit",
|
'invoices' => $link = "/invoices/{$entity_id}/edit",
|
||||||
'App\Models\Quote' => $link = "quotes/{$entity_id}/edit",
|
'App\Models\Quote' => $link = "/quotes/{$entity_id}/edit",
|
||||||
'App\Models\Credit' => $link = "credits/{$entity_id}/edit",
|
'App\Models\Credit' => $link = "/credits/{$entity_id}/edit",
|
||||||
'App\Models\Expense' => $link = "expenses/{$entity_id}/edit",
|
'App\Models\Expense' => $link = "/expenses/{$entity_id}/edit",
|
||||||
'App\Models\Payment' => $link = "payments/{$entity_id}/edit",
|
'App\Models\Payment' => $link = "/payments/{$entity_id}/edit",
|
||||||
'App\Models\Task' => $link = "tasks/{$entity_id}/edit",
|
'App\Models\Task' => $link = "/tasks/{$entity_id}/edit",
|
||||||
'App\Models\Client' => $link = "clients/{$entity_id}",
|
'App\Models\Client' => $link = "/clients/{$entity_id}",
|
||||||
|
'App\Models\RecurringExpense' => $link = "/recurring_expenses/{$entity_id}/edit",
|
||||||
|
'App\Models\RecurringInvoice' => $link = "/recurring_invoices/{$entity_id}/edit",
|
||||||
default => $link = '',
|
default => $link = '',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@ return [
|
|||||||
'require_https' => env('REQUIRE_HTTPS', true),
|
'require_https' => env('REQUIRE_HTTPS', true),
|
||||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||||
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
|
||||||
'app_version' => env('APP_VERSION', '5.8.31'),
|
'app_version' => env('APP_VERSION', '5.8.32'),
|
||||||
'app_tag' => env('APP_TAG', '5.8.31'),
|
'app_tag' => env('APP_TAG', '5.8.32'),
|
||||||
'minimum_client_version' => '5.0.16',
|
'minimum_client_version' => '5.0.16',
|
||||||
'terms_version' => '1.0.1',
|
'terms_version' => '1.0.1',
|
||||||
'api_secret' => env('API_SECRET', false),
|
'api_secret' => env('API_SECRET', false),
|
||||||
|
@ -5241,6 +5241,7 @@ $lang = array(
|
|||||||
'test_email_sent' => 'Successfully sent email',
|
'test_email_sent' => 'Successfully sent email',
|
||||||
'gateway_type' => 'Gateway Type',
|
'gateway_type' => 'Gateway Type',
|
||||||
'save_template_body' => 'Would you like to save this import mapping as a template for future use?',
|
'save_template_body' => 'Would you like to save this import mapping as a template for future use?',
|
||||||
|
'save_as_template' => 'Save Template Mapping'
|
||||||
);
|
);
|
||||||
|
|
||||||
return $lang;
|
return $lang;
|
||||||
|
@ -5234,6 +5234,10 @@ Lorsque les montant apparaîtront sur votre relevé, veuillez revenir sur cette
|
|||||||
'user_sales' => 'Ventes de l\'utilisateur',
|
'user_sales' => 'Ventes de l\'utilisateur',
|
||||||
'iframe_url' => 'URL de l\'iFrame',
|
'iframe_url' => 'URL de l\'iFrame',
|
||||||
'user_unsubscribed' => 'Utilisateur désabonné des courriels :link',
|
'user_unsubscribed' => 'Utilisateur désabonné des courriels :link',
|
||||||
|
'use_available_payments' => 'Utilisez les paiements disponibles',
|
||||||
|
'test_email_sent' => 'Le courriel a été envoyé',
|
||||||
|
'gateway_type' => 'Type de passerelle',
|
||||||
|
'save_template_body' => 'Souhaitez-vous enregistrer cette correspondance d\'importation en tant que modèle pour une utilisation future ?',
|
||||||
);
|
);
|
||||||
|
|
||||||
return $lang;
|
return $lang;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user