Taxes, tips and bugfixes #10

Merged
pitmutt merged 24 commits from dev into master 2023-10-28 12:07:37 +00:00
3 changed files with 427 additions and 522 deletions
Showing only changes of commit 98edbe2d45 - Show all commits

919
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -55,32 +55,32 @@
<tr>
<td>
<mat-slide-toggle formControlName="useTips" class="settings-toggle" (change)="onChangeTips($event)">
Use Tips?
{{ vE.settingsUseTips }}
</mat-slide-toggle>
</td>
<td align="center">
<mat-slide-toggle formControlName="useTax" class="settings-toggle" (change)="onChangeTax($event)">
Use Sales Tax?
{{ vE.settingsUseTax }}
</mat-slide-toggle>
<br>
<mat-form-field *ngIf="useTax" class="settings-field" [style.width.%]="100">
<mat-label>Sales Tax Rate (%)</mat-label>
<mat-label> {{ vE.settingsSalesTaxRateLbl }}</mat-label>
<input matInput
type="number"
placeholder="Sales Tax Rate (%)"
placeholder="{{ vE.settingsSalesTaxRateTxt }}"
formControlName="taxRate">
</mat-form-field>
</td>
<td align="center">
<mat-slide-toggle formControlName="useVat" class="settings-toggle" (change)="onChangeVat($event)">
Use VAT?
{{ vE.settingsUseVAT }}
</mat-slide-toggle>
<br>
<mat-form-field *ngIf="useVat" class="settings-field" [style.width.%]="100">
<mat-label>Value-Added Tax Rate (%)</mat-label>
<mat-label>{{ vE.settingsSalesVATRateLbl }} </mat-label>
<input matInput
type="number"
placeholder="Value-Added Tax Rate (%)"
placeholder="{{ vE.settingsSalesVATRateTxt }}"
formControlName="vatRate">
</mat-form-field>
</td>

View file

@ -115,7 +115,14 @@ export class SettingsComponent implements OnInit {
settingsXeroClosebtn : '',
settingsXeroLbl : '',
settingsXeropmtConfirmdis : '',
settingsXeroSavebtn : ''
settingsXeroSavebtn : '',
settingsUseTips : '',
settingsUseTax : '',
settingsUseVAT : '',
settingsSalesTaxRateLbl : '',
settingsSalesTaxRateTxt : '',
settingsSalesVATRateLbl : '',
settingsSalesVATRateTxt : ''
};
//
languageRdy = new Subject<boolean>();
@ -456,6 +463,13 @@ export class SettingsComponent implements OnInit {
this.vE.settingsAcodeSaved = response.data.settings_acode_saved;
this.vE.settingsAcodeNotsaved = response.data.settings_acode_notsaved;
this.vE.settingsAcodeInvalid = response.data.settings_acode_invalid;
this.vE.settingsUseTips = response.data.settings_use_tips;
this.vE.settingsUseTax = response.data.settings_use_tax;
this.vE.settingsUseVAT = response.data.settings_use_vat;
this.vE.settingsSalesTaxRateLbl = response.data.settings_sales_tax_rate_lbl;
this.vE.settingsSalesTaxRateTxt = response.data.settings_sales_tax_rate_txt;
this.vE.settingsSalesVATRateLbl = response.data.settings_sales_vat_rate_lbl;
this.vE.settingsSalesVATRateTxt = response.data.settings_sales_vat_rate_txt;
//
this.languageRdy.next(true);
},