crater-invoice / crater

Open Source Invoicing Solution for Individuals & Businesses
https://craterapp.com
GNU Affero General Public License v3.0
7.83k stars 1.56k forks source link

Tax type percentages should support more than two decimal places #157

Open gbro115 opened 4 years ago

gbro115 commented 4 years ago

Is your feature request related to a problem? Please describe. Crater presently supports custom tax types with two decimal place precision.

In Québec, we have a provincial tax rate of 9.975%, which cannot be entered in the GUI, nor stored in the DB.

Describe the solution you'd like 1) Modification to the taxes table's percent field to allow for 3 decimal place precision $table->decimal('percent', 5, 3);

2) Modification to TaxTypeModal.vue to allow for 3 decimal place precision:

      defaultInput: {
        decimal: '.',
        thousands: ',',
        prefix: '% ',
        precision: 3,
        masked: false
      }

Describe alternatives you've considered I've created a fork at https://github.com/gbro115/crater, however it would be great to have this in the original repo.

mohitpanjwani commented 4 years ago

Good point. but have you tested the implementation?

If it works, can you create a PR for the same?

Thanks

wanycn commented 1 year ago

I below half of the N.Am. tax rate are in 3 decimal. I just login to mysql and change percent to (5,3) and change the value to 8.875 for NY and 6.625 for NJ. Then it looks like working. But the rate showing different in different places. in Estamate, in edit and pdf is correct, But in Invoice, it show 2 dicemal and calculated total looks as 3 decimal results. Maybe it is quick fix but need fix bug for display.