-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop'
- Loading branch information
Showing
171 changed files
with
21,413 additions
and
17,465 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* Invoice Ninja (https://invoiceninja.com). | ||
* | ||
* @link https://github.com/invoiceninja/invoiceninja source repository | ||
* | ||
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com) | ||
* | ||
* @license https://www.elastic.co/licensing/elastic-license | ||
*/ | ||
|
||
import { store } from '$app/common/stores/store'; | ||
|
||
export function whiteLabelPlan() { | ||
return Boolean( | ||
store.getState().companyUsers.api?.[ | ||
store.getState().companyUsers.currentIndex | ||
]?.account.plan === 'white_label' | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Invoice Ninja (https://invoiceninja.com). | ||
* | ||
* @link https://github.com/invoiceninja/invoiceninja source repository | ||
* | ||
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com) | ||
* | ||
* @license https://www.elastic.co/licensing/elastic-license | ||
*/ | ||
|
||
export const PEPPOL_COUNTRIES = [ | ||
'40', | ||
'56', | ||
'208', | ||
'276', | ||
'352', | ||
'372', | ||
'442', | ||
'528', | ||
'578', | ||
'752', | ||
'826', | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/** | ||
* Invoice Ninja (https://invoiceninja.com). | ||
* | ||
* @link https://github.com/invoiceninja/invoiceninja source repository | ||
* | ||
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com) | ||
* | ||
* @license https://www.elastic.co/licensing/elastic-license | ||
*/ | ||
|
||
import { FeesAndLimitsEntry } from '$app/common/interfaces/company-gateway'; | ||
import { Expense } from '$app/common/interfaces/expense'; | ||
import { InvoiceItem } from '$app/common/interfaces/invoice-item'; | ||
import { Product } from '$app/common/interfaces/product'; | ||
import { RecurringExpense } from '$app/common/interfaces/recurring-expense'; | ||
import { ProductTableResource } from '$app/pages/invoices/common/components/ProductsTable'; | ||
|
||
type Resource = | ||
| Expense | ||
| ProductTableResource | ||
| InvoiceItem | ||
| Product | ||
| RecurringExpense | ||
| FeesAndLimitsEntry; | ||
|
||
export type TaxNamePropertyType = | ||
| ( | ||
| 'tax_name1' | ||
| 'tax_name2' | ||
| 'tax_name3' | ||
| 'fee_tax_name1' | ||
| 'fee_tax_name2' | ||
| 'fee_tax_name3' | ||
) | ||
| undefined; | ||
|
||
export function getTaxRateComboValue( | ||
resource: Resource | undefined, | ||
nameProperty: TaxNamePropertyType | ||
): string { | ||
if (!nameProperty) return ''; | ||
|
||
const taxRateProp = nameProperty.replace('name', 'rate') as keyof Resource; | ||
|
||
if (resource && resource[taxRateProp]) { | ||
return `${resource[nameProperty as keyof Resource]}||${ | ||
resource[taxRateProp] | ||
}`; | ||
} | ||
|
||
return ''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.