mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
improved VAT history + updated changelog + added instruction on watermark localisation
This commit is contained in:
parent
af9ab6d5b5
commit
be6b82fda1
@ -1,6 +1,12 @@
|
||||
# Changelog Fab Manager
|
||||
|
||||
- (France) Compliance with Article 88 of Law No. 2015-1785 and BOI-TVA-DECLA-30-10-30-20160803 : Certification of cash systems
|
||||
- Ability for an admin to view and close accounting periods
|
||||
- Secured archives for close accounting periods
|
||||
- Securely chained invoices records with visual control of data integrity
|
||||
- Notify an user if the available disk space reaches a configured threshold
|
||||
- Invoices generated outside of production environment will be watermarked
|
||||
- Keep track of currently logged user on each generated invoice
|
||||
- Fix a security issue: updated to devise 4.6.0 to fix [CVE-2019-5421](https://github.com/plataformatec/devise/issues/4981)
|
||||
- Fix a security issue: updated Rails to 4.2.11.1 to fix [CVE-2019-5418](https://groups.google.com/forum/#!topic/rubyonrails-security/pFRKI96Sm8Q) and [CVE-2019-5419](https://groups.google.com/forum/#!topic/rubyonrails-security/GN7w9fFAQeI)
|
||||
- Removed deprecated Capistrano deployment system
|
||||
@ -8,7 +14,7 @@
|
||||
- Refactored some pieces of Ruby code, according to style guide
|
||||
- Added asterisks on required fields in sign-up form
|
||||
- [TODO DEPLOY] (dev) if applicable, you must first downgrade bundler to v1 `gem uninstall bundler --version=2.0.1 && gem install bundler --version=1.7.3 && bundle install`
|
||||
- [TODO DEPLOY] if applicable, add VAT history into database `rake fablab:setup:add_vat_rate[20,2017-01-01]`
|
||||
- [TODO DEPLOY] if you have changed your VAT rate in the past, add its history into database. You can use a rate of "0" to disable VAT. Eg. `rake fablab:setup:add_vat_rate[20,2017-01-01]`
|
||||
- [TODO DEPLOY] `rake fablab:setup:set_environment_to_invoices`
|
||||
- [TODO DEPLOY] `rake fablab:setup:chain_invoices_items_records`
|
||||
- [TODO DEPLOY] `rake fablab:setup:chain_invoices_records`
|
||||
|
@ -445,6 +445,10 @@ In each cases, some inline comments are included in the localisation files.
|
||||
They can be recognized as they start with the sharp character (#).
|
||||
These comments are not required to be translated, they are intended to help the translator to have some context information about the sentence to translate.
|
||||
|
||||
You will also need to translate the invoice watermark, located in `app/pdfs/data/`.
|
||||
You'll find there the [GIMP source of the image](app/pdfs/data/watermark.xcf), which is using [Rubik Mono One](https://fonts.google.com/specimen/Rubik+Mono+One) as font.
|
||||
Use it to generate a similar localised PNG image which keep the default image size, as PDF are not responsive.
|
||||
|
||||
|
||||
<a name="i18n-configuration"></a>
|
||||
### Configuration
|
||||
|
@ -303,17 +303,34 @@ Application.Controllers.controller('InvoicesController', ['$scope', '$state', 'I
|
||||
active () {
|
||||
return $scope.invoice.VAT.active;
|
||||
},
|
||||
history () {
|
||||
rateHistory () {
|
||||
return Setting.get({ name: 'invoice_VAT-rate', history: true }).$promise;
|
||||
},
|
||||
activeHistory () {
|
||||
return Setting.get({ name: 'invoice_VAT-active', history: true }).$promise;
|
||||
}
|
||||
},
|
||||
controller: ['$scope', '$uibModalInstance', 'rate', 'active', 'history', function ($scope, $uibModalInstance, rate, active, history) {
|
||||
controller: ['$scope', '$uibModalInstance', 'rate', 'active', 'rateHistory', 'activeHistory', function ($scope, $uibModalInstance, rate, active, rateHistory, activeHistory) {
|
||||
$scope.rate = rate;
|
||||
$scope.isSelected = active;
|
||||
$scope.history = history.setting.history;
|
||||
$scope.history = [];
|
||||
|
||||
$scope.ok = function () { $uibModalInstance.close({ rate: $scope.rate, active: $scope.isSelected }); };
|
||||
return $scope.cancel = function () { $uibModalInstance.dismiss('cancel'); };
|
||||
$scope.cancel = function () { $uibModalInstance.dismiss('cancel'); };
|
||||
|
||||
|
||||
const initialize = function() {
|
||||
rateHistory.setting.history.forEach(function (rate) {
|
||||
$scope.history.push({ date: rate.created_at, rate: rate.value, user: rate.user })
|
||||
});
|
||||
activeHistory.setting.history.forEach(function (v) {
|
||||
if (v.value === 'false') {
|
||||
$scope.history.push({ date: v.created_at, rate: 0, user: v.user })
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
initialize();
|
||||
}]
|
||||
});
|
||||
|
||||
|
@ -195,6 +195,38 @@
|
||||
|
||||
|
||||
table.closings-table {
|
||||
@extend table.scrollable-3-cols;
|
||||
|
||||
tbody .actions {
|
||||
padding-left: 2em;
|
||||
|
||||
& > span {
|
||||
margin-left: 2em;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
tbody .show-more {
|
||||
color: #00b3ee;
|
||||
}
|
||||
|
||||
tbody .download-archive {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
tbody .download-archive:hover {
|
||||
i {
|
||||
display: none;
|
||||
}
|
||||
&:after {
|
||||
content: '\f019';
|
||||
font-family: 'fontawesome';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
table.scrollable-3-cols {
|
||||
width: 100%;
|
||||
border-spacing: 0;
|
||||
|
||||
@ -230,34 +262,6 @@ table.closings-table {
|
||||
width: 32%; /* 32% is less than (100% / 3 cols) = 33.33% */
|
||||
float: left;
|
||||
}
|
||||
|
||||
tbody .actions {
|
||||
padding-left: 2em;
|
||||
|
||||
& > span {
|
||||
margin-left: 2em;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
tbody .show-more {
|
||||
color: #00b3ee;
|
||||
}
|
||||
|
||||
tbody .download-archive {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
tbody .download-archive:hover {
|
||||
i {
|
||||
display: none;
|
||||
}
|
||||
&:after {
|
||||
content: '\f019';
|
||||
font-family: 'fontawesome';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -396,18 +396,21 @@
|
||||
|
||||
<div class="m-t-lg">
|
||||
<h4 translate>{{ 'invoices.VAT_history' }}</h4>
|
||||
<table class="table">
|
||||
<head>
|
||||
<table class="table scrollable-3-cols">
|
||||
<thead>
|
||||
<tr>
|
||||
<th translate>{{ 'invoices.VAT_rate' }}</th>
|
||||
<th translate>{{ 'invoices.changed_at' }}</th>
|
||||
<th translate>{{ 'invoices.changed_by' }}</th>
|
||||
</tr>
|
||||
</head>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="value in history">
|
||||
<td>{{value.value}} %</td>
|
||||
<td>{{value.created_at | amDateFormat:'L LT'}}</td>
|
||||
<tr ng-repeat="value in history | orderBy:'-date'">
|
||||
<td>
|
||||
<span class="no-user-label" ng-show="value.rate === 0" translate>{{'invoices.VAT_disabled'}}</span>
|
||||
<span ng-hide="value.rate === 0">{{value.rate}}</span>
|
||||
</td>
|
||||
<td>{{value.date | amDateFormat:'L LT'}}</td>
|
||||
<td>{{value.user.name}}<span class="no-user-label" ng-hide="value.user" translate>{{ 'invoices.deleted_user' }}</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
Loading…
x
Reference in New Issue
Block a user