Added options to invoiceOut
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
1ec20e250c
commit
82a14088d0
|
@ -26,7 +26,7 @@ class Email {
|
|||
* @param {Object} params The email parameters
|
||||
* @return {Promise} Promise resolved when it's sent
|
||||
*/
|
||||
sendCSV(template, params) {
|
||||
sendCsv(template, params) {
|
||||
return this.$http.get(`csv/${template}/send`, {params})
|
||||
.then(() => this.vnApp.showMessage(this.$t('Notification sent!')));
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ class Report {
|
|||
* @param {String} report The report name
|
||||
* @param {Object} params The report parameters
|
||||
*/
|
||||
showCSV(report, params) {
|
||||
showCsv(report, params) {
|
||||
params = Object.assign({
|
||||
authorization: this.vnToken.token
|
||||
}, params);
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
Show as PDF
|
||||
</a>
|
||||
<vn-item
|
||||
ng-click="$ctrl.showInvoiceCSV()"
|
||||
ng-click="$ctrl.showCsvInvoice()"
|
||||
translate>
|
||||
Show as CSV
|
||||
</vn-item>
|
||||
|
@ -34,12 +34,12 @@
|
|||
<vn-menu vn-id="sendInvoiceMenu">
|
||||
<vn-list>
|
||||
<vn-item
|
||||
ng-click="invoiceConfirmation.show({email: $ctrl.invoiceOut.client.email})"
|
||||
ng-click="sendPdfConfirmation.show({email: $ctrl.invoiceOut.client.email})"
|
||||
translate>
|
||||
Send PDF
|
||||
</vn-item>
|
||||
<vn-item
|
||||
ng-click="confirmDeliveryNoteCSV.show({email: $ctrl.ticket.client.email})"
|
||||
ng-click="sendCsvConfirmation.show({email: $ctrl.invoiceOut.client.email})"
|
||||
translate>
|
||||
Send CSV
|
||||
</vn-item>
|
||||
|
@ -136,15 +136,32 @@
|
|||
message="You are going to regenerate the invoice PDF document">
|
||||
</vn-confirm>
|
||||
|
||||
<!-- Send invoice confirmation popup -->
|
||||
<vn-dialog class="edit"
|
||||
vn-id="invoiceConfirmation"
|
||||
on-accept="$ctrl.sendInvoice($data)"
|
||||
message="Send invoice PDF">
|
||||
<!-- Send PDF invoice confirmation popup -->
|
||||
<vn-dialog
|
||||
vn-id="sendPdfConfirmation"
|
||||
on-accept="$ctrl.sendPdfInvoice($data)"
|
||||
message="Send PDF invoice">
|
||||
<tpl-body>
|
||||
<span translate>Are you sure you want to send it?</span>
|
||||
<vn-textfield vn-one
|
||||
ng-model="invoiceConfirmation.data.email">
|
||||
ng-model="sendPdfConfirmation.data.email">
|
||||
</vn-textfield>
|
||||
</tpl-body>
|
||||
<tpl-buttons>
|
||||
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
||||
<button response="accept" translate>Confirm</button>
|
||||
</tpl-buttons>
|
||||
</vn-dialog>
|
||||
|
||||
<!-- Send CSV invoice confirmation popup -->
|
||||
<vn-dialog
|
||||
vn-id="sendCsvConfirmation"
|
||||
on-accept="$ctrl.sendCsvInvoice($data)"
|
||||
message="Send CSV invoice">
|
||||
<tpl-body>
|
||||
<span translate>Are you sure you want to send it?</span>
|
||||
<vn-textfield vn-one
|
||||
ng-model="sendCsvConfirmation.data.email">
|
||||
</vn-textfield>
|
||||
</tpl-body>
|
||||
<tpl-buttons>
|
||||
|
|
|
@ -22,7 +22,7 @@ class Controller extends Descriptor {
|
|||
.then(() => this.vnApp.showSuccess(this.$t('InvoiceOut booked')));
|
||||
}
|
||||
|
||||
createInvoicePdf() {
|
||||
createPdfInvoice() {
|
||||
const invoiceId = this.invoiceOut.id;
|
||||
return this.$http.post(`InvoiceOuts/${invoiceId}/createPdf`)
|
||||
.then(() => {
|
||||
|
@ -60,14 +60,14 @@ class Controller extends Descriptor {
|
|||
.then(res => this.entity = res.data);
|
||||
}
|
||||
|
||||
showInvoiceCSV() {
|
||||
this.vnReport.showCSV('invoice', {
|
||||
showCsvInvoice() {
|
||||
this.vnReport.showCsv('invoice', {
|
||||
recipientId: this.invoiceOut.client.id,
|
||||
invoiceId: this.id,
|
||||
});
|
||||
}
|
||||
|
||||
sendInvoice($data) {
|
||||
sendPdfInvoice($data) {
|
||||
return this.vnEmail.send('invoice', {
|
||||
recipientId: this.invoiceOut.client.id,
|
||||
recipient: $data.email,
|
||||
|
@ -75,11 +75,11 @@ class Controller extends Descriptor {
|
|||
});
|
||||
}
|
||||
|
||||
sendDeliveryNoteCSV($data) {
|
||||
return this.vnEmail.sendCSV('delivery-note', {
|
||||
recipientId: this.ticket.client.id,
|
||||
sendCsvInvoice($data) {
|
||||
return this.vnEmail.sendCsv('invoice', {
|
||||
recipientId: this.invoiceOut.client.id,
|
||||
recipient: $data.email,
|
||||
ticketId: this.id
|
||||
invoiceId: this.id
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@ Client card: Ficha del cliente
|
|||
Invoice ticket list: Listado de tickets de la factura
|
||||
Show invoice...: Ver factura...
|
||||
Send invoice...: Enviar factura...
|
||||
Send invoice PDF: Enviar factura en PDF
|
||||
Send invoice CSV: Enviar factura en CSV
|
||||
Send PDF invoice: Enviar factura en PDF
|
||||
Send CSV invoice: Enviar factura en CSV
|
||||
Delete Invoice: Eliminar factura
|
||||
Clone Invoice: Clonar factura
|
||||
InvoiceOut deleted: Factura eliminada
|
||||
|
|
|
@ -16,16 +16,16 @@
|
|||
<vn-item class="dropdown"
|
||||
vn-click-stop="showDeliveryNoteMenu.show($event, 'left')"
|
||||
translate>
|
||||
Show Delivery Note
|
||||
Show Delivery Note...
|
||||
<vn-menu vn-id="showDeliveryNoteMenu">
|
||||
<vn-list>
|
||||
<vn-item
|
||||
ng-click="$ctrl.showDeliveryNote()"
|
||||
ng-click="$ctrl.showPdfDeliveryNote()"
|
||||
translate>
|
||||
Show as PDF
|
||||
</vn-item>
|
||||
<vn-item
|
||||
ng-click="$ctrl.showDeliveryNoteCSV()"
|
||||
ng-click="$ctrl.showCsvDeliveryNote()"
|
||||
translate>
|
||||
Show as CSV
|
||||
</vn-item>
|
||||
|
@ -35,17 +35,17 @@
|
|||
<vn-item class="dropdown"
|
||||
vn-click-stop="sendDeliveryNoteMenu.show($event, 'left')"
|
||||
translate>
|
||||
Send Delivery Note
|
||||
Send Delivery Note...
|
||||
|
||||
<vn-menu vn-id="sendDeliveryNoteMenu">
|
||||
<vn-list>
|
||||
<vn-item
|
||||
ng-click="confirmDeliveryNote.show({email: $ctrl.ticket.client.email})"
|
||||
ng-click="sendPdfConfirmation.show({email: $ctrl.ticket.client.email})"
|
||||
translate>
|
||||
Send PDF
|
||||
</vn-item>
|
||||
<vn-item
|
||||
ng-click="confirmDeliveryNoteCSV.show({email: $ctrl.ticket.client.email})"
|
||||
ng-click="sendCsvConfirmation.show({email: $ctrl.ticket.client.email})"
|
||||
translate>
|
||||
Send CSV
|
||||
</vn-item>
|
||||
|
@ -109,7 +109,7 @@
|
|||
Make invoice
|
||||
</vn-item>
|
||||
<vn-item
|
||||
ng-click="createInvoicePdfConfirmation.show()"
|
||||
ng-click="createPdfConfirmation.show()"
|
||||
ng-show="$ctrl.isInvoiced"
|
||||
vn-acl="invoicing"
|
||||
vn-acl-action="remove"
|
||||
|
@ -165,22 +165,15 @@
|
|||
</div>
|
||||
</vn-popup>
|
||||
|
||||
<!-- Send delivery note confirmation popup -->
|
||||
<!-- <vn-confirm
|
||||
vn-id="confirmDeliveryNote"
|
||||
on-accept="$ctrl.sendDeliveryNote()"
|
||||
question="Are you sure you want to send it?"
|
||||
message="Send Delivery Note">
|
||||
</vn-confirm> -->
|
||||
|
||||
<!-- Send PDF delivery note confirmation popup -->
|
||||
<vn-dialog
|
||||
vn-id="confirmDeliveryNote"
|
||||
on-accept="$ctrl.sendDeliveryNote($data)"
|
||||
message="Send Delivery Note PDF">
|
||||
vn-id="sendPdfConfirmation"
|
||||
on-accept="$ctrl.sendPdfDeliveryNote($data)"
|
||||
message="Send PDF Delivery Note">
|
||||
<tpl-body>
|
||||
<span translate>Are you sure you want to send it?</span>
|
||||
<vn-textfield vn-one
|
||||
ng-model="confirmDeliveryNote.data.email">
|
||||
ng-model="sendPdfConfirmation.data.email">
|
||||
</vn-textfield>
|
||||
</tpl-body>
|
||||
<tpl-buttons>
|
||||
|
@ -189,15 +182,15 @@
|
|||
</tpl-buttons>
|
||||
</vn-dialog>
|
||||
|
||||
<!-- Send delivery note CSV confirmation popup -->
|
||||
<!-- Send CSV delivery note confirmation popup -->
|
||||
<vn-dialog
|
||||
vn-id="confirmDeliveryNoteCSV"
|
||||
on-accept="$ctrl.sendDeliveryNoteCSV($data)"
|
||||
message="Send Delivery Note CSV">
|
||||
vn-id="sendCsvConfirmation"
|
||||
on-accept="$ctrl.sendCsvDeliveryNote($data)"
|
||||
message="Send CSV Delivery Note">
|
||||
<tpl-body>
|
||||
<span translate>Are you sure you want to send it?</span>
|
||||
<vn-textfield vn-one
|
||||
ng-model="confirmDeliveryNoteCSV.data.email">
|
||||
ng-model="sendCsvConfirmation.data.email">
|
||||
</vn-textfield>
|
||||
</tpl-body>
|
||||
<tpl-buttons>
|
||||
|
@ -271,8 +264,8 @@
|
|||
|
||||
<!-- Create invoice PDF confirmation dialog -->
|
||||
<vn-confirm
|
||||
vn-id="createInvoicePdfConfirmation"
|
||||
on-accept="$ctrl.createInvoicePdf()"
|
||||
vn-id="createPdfConfirmation"
|
||||
on-accept="$ctrl.createPdfInvoice()"
|
||||
question="Are you sure you want to regenerate the invoice PDF document?"
|
||||
message="You are going to regenerate the invoice PDF document">
|
||||
</vn-confirm>
|
||||
|
|
|
@ -111,21 +111,21 @@ class Controller extends Section {
|
|||
});
|
||||
}
|
||||
|
||||
showDeliveryNote() {
|
||||
showPdfDeliveryNote() {
|
||||
this.vnReport.show('delivery-note', {
|
||||
recipientId: this.ticket.client.id,
|
||||
ticketId: this.id,
|
||||
});
|
||||
}
|
||||
|
||||
showDeliveryNoteCSV() {
|
||||
this.vnReport.showCSV('delivery-note', {
|
||||
showCsvDeliveryNote() {
|
||||
this.vnReport.showCsv('delivery-note', {
|
||||
recipientId: this.ticket.client.id,
|
||||
ticketId: this.id,
|
||||
});
|
||||
}
|
||||
|
||||
sendDeliveryNote($data) {
|
||||
sendPdfDeliveryNote($data) {
|
||||
return this.vnEmail.send('delivery-note', {
|
||||
recipientId: this.ticket.client.id,
|
||||
recipient: $data.email,
|
||||
|
@ -133,8 +133,8 @@ class Controller extends Section {
|
|||
});
|
||||
}
|
||||
|
||||
sendDeliveryNoteCSV($data) {
|
||||
return this.vnEmail.sendCSV('delivery-note', {
|
||||
sendCsvDeliveryNote($data) {
|
||||
return this.vnEmail.sendCsv('delivery-note', {
|
||||
recipientId: this.ticket.client.id,
|
||||
recipient: $data.email,
|
||||
ticketId: this.id
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
Show Delivery Note: Ver albarán
|
||||
Send Delivery Note: Enviar albarán
|
||||
Show Delivery Note...: Ver albarán...
|
||||
Send Delivery Note...: Enviar albarán...
|
||||
Show as PDF: Ver como PDF
|
||||
Show as CSV: Ver como CSV
|
||||
Send PDF: Enviar PDF
|
||||
Send CSV: Enviar CSV
|
||||
Send Delivery Note CSV: Enviar albarán en CSV
|
||||
Send Delivery Note PDF: Enviar albarán en PDF
|
||||
Send CSV Delivery Note: Enviar albarán en CSV
|
||||
Send PDF Delivery Note: Enviar albarán en PDF
|
Loading…
Reference in New Issue