mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-29 18:52:22 +01:00
(bug) the switch to enable/disable the VAT does not reflect the current state of the VAT
This commit is contained in:
parent
9f7c77144a
commit
cb6a3a00b6
@ -17,6 +17,7 @@
|
||||
- Fix a bug: exports to Excel are corrupted (#49)
|
||||
- Fix a bug: if a specialized VAT rate was defined when the VAT was disabled, the resulting VAT rate is wrong
|
||||
- Fix a bug: unable to rebuild the PDF for invoices without subscriptions
|
||||
- Fix a bug: the switch to enable/disable the VAT does not reflect the current state of the VAT
|
||||
- [TODO DEPLOY] `rails db:seed`
|
||||
|
||||
# v5.3.0 2021 December 29
|
||||
|
@ -478,6 +478,13 @@ Application.Controllers.controller('InvoicesController', ['$scope', '$state', 'I
|
||||
$scope.isSelected = active;
|
||||
$scope.history = [];
|
||||
|
||||
// callback on "enable VAT" switch toggle
|
||||
$scope.enableVATChanged = function (checked) {
|
||||
setTimeout(() => {
|
||||
$scope.isSelected = checked;
|
||||
$scope.$apply();
|
||||
}, 1);
|
||||
};
|
||||
$scope.ok = function () { $uibModalInstance.close({ rate: $scope.rate, active: $scope.isSelected }); };
|
||||
$scope.cancel = function () { $uibModalInstance.dismiss('cancel'); };
|
||||
$scope.editMultiVAT = function () {
|
||||
|
@ -5,14 +5,11 @@
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="enableVAT" class="control-label" translate>{{ 'app.admin.invoices.enable_VAT' }}</label>
|
||||
<input bs-switch
|
||||
ng-model="isSelected"
|
||||
id="enableVAT"
|
||||
type="checkbox"
|
||||
class="form-control m-l-sm"
|
||||
switch-on-text="{{ 'app.admin.invoices.enabled' | translate }}"
|
||||
switch-off-text="{{ 'app.admin.invoices.disabled' | translate }}"
|
||||
switch-animate="true"/>
|
||||
<switch id="enableVAT"
|
||||
checked="isSelected"
|
||||
on-change="enableVATChanged"
|
||||
classname="form-control m-l-sm">
|
||||
</switch>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-show="isSelected">
|
||||
|
Loading…
x
Reference in New Issue
Block a user