Add accounting number format style (#974)

This commit is contained in:
Harry Gulliford 2019-05-30 17:18:03 +10:00 committed by Mark Baker
parent cce6e5976f
commit 0b3deeaac5
3 changed files with 13 additions and 0 deletions

View File

@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org).
- Added support for inline styles in Html reader (borders, alignment, width, height) - Added support for inline styles in Html reader (borders, alignment, width, height)
- QuotedText cells no longer treated as formulae if the content begins with a `=` - QuotedText cells no longer treated as formulae if the content begins with a `=`
- Clean handling for DDE in formulae - Clean handling for DDE in formulae
- Add accounting number format style
### Fixed ### Fixed

View File

@ -49,6 +49,8 @@ class NumberFormat extends Supervisor
const FORMAT_CURRENCY_USD = '$#,##0_-'; const FORMAT_CURRENCY_USD = '$#,##0_-';
const FORMAT_CURRENCY_EUR_SIMPLE = '#,##0.00_-"€"'; const FORMAT_CURRENCY_EUR_SIMPLE = '#,##0.00_-"€"';
const FORMAT_CURRENCY_EUR = '#,##0_-"€"'; const FORMAT_CURRENCY_EUR = '#,##0_-"€"';
const FORMAT_ACCOUNTING_USD = '_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)';
const FORMAT_ACCOUNTING_EUR = '_("€"* #,##0.00_);_("€"* \(#,##0.00\);_("€"* "-"??_);_(@_)';
/** /**
* Excel built-in number formats. * Excel built-in number formats.

View File

@ -206,4 +206,14 @@ return [
9.98, 9.98,
'[$-1010409]#,##0.00;-#,##0.00', '[$-1010409]#,##0.00;-#,##0.00',
], ],
[
' $ 23.06 ',
23.0597,
'_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)',
],
[
' € 13.03 ',
13.0316,
'_("€"* #,##0.00_);_("€"* \(#,##0.00\);_("€"* "-"??_);_(@_)',
],
]; ];