diff --git a/client/client/src/billing-data/billing-data.html b/client/client/src/billing-data/billing-data.html
index a001ba49e0..74180d36e9 100644
--- a/client/client/src/billing-data/billing-data.html
+++ b/client/client/src/billing-data/billing-data.html
@@ -5,7 +5,7 @@
form="form"
save="put">
-
\ No newline at end of file
+
+
+
+
+ Changed terms
+ Notify customer?
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/client/client/src/billing-data/billing-data.js b/client/client/src/billing-data/billing-data.js
index 7c70b46afd..c5b99cf092 100644
--- a/client/client/src/billing-data/billing-data.js
+++ b/client/client/src/billing-data/billing-data.js
@@ -1,8 +1,56 @@
import {module} from '../module';
export const NAME = 'vnClientBillingData';
+
+class billingData {
+ constructor($scope, $http, $timeout) {
+ this.$ = $scope;
+ this.http = $http;
+ this.timeout = $timeout;
+ this.payId = null;
+ this.dueDay = null;
+ this.copyData();
+ }
+
+ $onChanges(changes) {
+ this.copyData();
+ }
+
+ copyData() {
+ if (this.client) {
+ this.payId = this.client.payMethod ? this.client.payMethod.id : null;
+ this.dueDay = this.client.dueDay ? this.client.dueDay : null;
+ }
+ }
+
+ checkChanges() {
+ let payId = this.client.payMethodFk || null;
+ let dueDay = this.client.dueDay || null;
+ let dialog = this.$.sendMail;
+
+ if (dialog && (this.payId !== payId || this.dueDay !== dueDay)) {
+ dialog.show();
+ return false;
+ }
+
+ return true;
+ }
+ returnDialog(response) {
+ if (response === 'ACCEPT') {
+ this.sendMail();
+ }
+ this.timeout(() => this.$.watcher.submit());
+ }
+
+ sendMail() {
+ this.http.post(`/mailer/manuscript/paymentUpdate`, {user: this.client.id});
+ }
+}
+billingData.$inject = ['$scope', '$http', '$timeout'];
+
export const COMPONENT = {
template: require('./billing-data.html'),
+ controller: billingData,
controllerAs: 'bill',
bindings: {
client: '<'
diff --git a/client/client/src/billing-data/locale/es.json b/client/client/src/billing-data/locale/es.json
new file mode 100644
index 0000000000..5c4e720d71
--- /dev/null
+++ b/client/client/src/billing-data/locale/es.json
@@ -0,0 +1,6 @@
+{
+ "Changed terms": "Has modificado las condiciones de pago",
+ "Notify customer?" : "¿Deseas notificar al cliente con dichos cambios?",
+ "No": "No",
+ "Yes, notify": "Sí, notificar"
+}
\ No newline at end of file
diff --git a/client/salix/src/styles/misc.scss b/client/salix/src/styles/misc.scss
index 6b8523aab5..1146d9c0fd 100644
--- a/client/salix/src/styles/misc.scss
+++ b/client/salix/src/styles/misc.scss
@@ -26,4 +26,7 @@ html [fixed-bottom-right] {
vn-button-bar {
display: block;
margin-top: $margin-small;
+}
+html [text-center], .text-center {
+ text-align: center;
}
\ No newline at end of file
diff --git a/services/mailer/Application/router.js b/services/mailer/Application/router.js
index 6bc5e60bfa..c18f908a98 100644
--- a/services/mailer/Application/router.js
+++ b/services/mailer/Application/router.js
@@ -4,7 +4,7 @@ var settings = require('./settings.js');
// Página por defecto
router.get('/', function(request, response) {
- response.send(Settings.name + ' v' + settings.version);
+ response.send(settings.name + ' v' + settings.version);
});
// Rutas de los escritos.