open delivery notes on ticket index

This commit is contained in:
Carlos Jimenez Ruiz 2020-06-16 12:36:34 +02:00
parent ecf1a1159c
commit b44942c7d7
3 changed files with 26 additions and 0 deletions

View File

@ -120,6 +120,13 @@
</vn-data-viewer>
<div fixed-bottom-right>
<vn-vertical style="align-items: center;">
<vn-button class="round sm vn-mb-sm"
icon="print"
ng-show="$ctrl.totalChecked > 0"
ng-click="$ctrl.openDeliveryNotes()"
vn-tooltip="Open delivery note(s)"
tooltip-position="left">
</vn-button>
<vn-button class="round sm vn-mb-sm"
icon="icon-recovery"
ng-show="$ctrl.totalChecked > 0"

View File

@ -4,6 +4,24 @@ import UserError from 'core/lib/user-error';
import './style.scss';
export default class Controller extends Section {
openDeliveryNotes() {
const checkedTickets = this.checked;
let ids = [];
for (let ticket of checkedTickets)
ids.push(ticket.id);
for (let id of ids) {
const params = {
authorization: this.vnToken.token,
ticketId: id
};
const serializedParams = this.$httpParamSerializer(params);
window.open(`api/report/delivery-note?${serializedParams}`); ``;
}
}
openBalanceDialog() {
const checkedTickets = this.checked;
const description = [];

View File

@ -2,6 +2,7 @@ Weekly tickets: Tickets programados
Go to lines: Ir a lineas
Not available: No disponible
Payment on account...: Pago a cuenta...
Open delivery note(s): Abrir albarán/es
Closure: Cierre
You cannot make a payment on account from multiple clients: No puedes realizar un pago a cuenta de clientes diferentes
Filter by selection: Filtro por selección