installed plugin Easy Digital Downloads version 3.1.0.3

This commit is contained in:
2022-11-27 15:03:07 +00:00
committed by Gitium
parent 555673545b
commit c5dce2cec6
1200 changed files with 238970 additions and 0 deletions

View File

@ -0,0 +1,34 @@
/* global Backbone */
/**
* Model a tax rate.
*/
const TaxRate = Backbone.Model.extend( {
defaults: {
id: '',
country: '',
region: '',
global: true,
amount: 0,
status: 'active',
unsaved: false,
selected: false,
},
/**
* Format a rate amount (adds a %)
*
* @todo This should support dynamic decimal types.
*/
formattedAmount: function() {
let amount = 0;
if ( this.get( 'amount' ) ) {
amount = parseFloat( this.get( 'amount' ) ).toFixed( 2 );
}
return `${ amount }%`;
},
} );
export default TaxRate;