refs #4614 fear(ticket): add 'set weight' funcionality #1487
|
@ -1,7 +1,7 @@
|
||||||
UPDATE vn.ticket t
|
UPDATE `vn`.`ticket` t
|
||||||
JOIN vn.ticketObservation o ON o.ticketFk = t.id
|
JOIN `vn`.`ticketObservation` o ON o.ticketFk = t.id
|
||||||
SET t.weight = cast(REPLACE(o.description, ',', '.') as decimal(10,2))
|
SET t.weight = cast(REPLACE(o.description, ',', '.') as decimal(10,2))
|
||||||
WHERE o.observationTypeFk = 6;
|
WHERE o.observationTypeFk = 6;
|
||||||
|
|
||||||
DELETE FROM vn.ticketObservation WHERE observationTypeFk = 6;
|
DELETE FROM `vn`.`ticketObservation` WHERE observationTypeFk = 6;
|
||||||
DELETE FROM vn.observationType WHERE id = 6;
|
DELETE FROM `vn`.`observationType` WHERE id = 6;
|
||||||
|
|
|
@ -101,23 +101,32 @@
|
||||||
translate>
|
translate>
|
||||||
Change shipped hour
|
Change shipped hour
|
||||||
</vn-item>
|
</vn-item>
|
||||||
<vn-item
|
<vn-item class="dropdown"
|
||||||
ng-click="$ctrl.sendPaymentSms()"
|
vn-click-stop="sendDeliveryNoteMenu.show($event, 'left');"
|
||||||
name="sendPaymentSms"
|
|
||||||
translate>
|
translate>
|
||||||
SMS Pending payment
|
Send SMS...
|
||||||
</vn-item>
|
<vn-menu vn-id="sendDeliveryNoteMenu">
|
||||||
<vn-item
|
<vn-list>
|
||||||
ng-click="$ctrl.sendImportSms()"
|
<vn-item
|
||||||
name="sendImportSms"
|
ng-click="$ctrl.sendPaymentSms()"
|
||||||
translate>
|
name="sendPaymentSms"
|
||||||
SMS Minimum import
|
translate>
|
||||||
</vn-item>
|
Pending payment
|
||||||
<vn-item
|
</vn-item>
|
||||||
ng-click="$ctrl.sendChangesSms()"
|
<vn-item
|
||||||
name="sendChangesSms"
|
ng-click="$ctrl.sendImportSms()"
|
||||||
translate>
|
name="sendImportSms"
|
||||||
SMS Notify changes
|
translate>
|
||||||
|
Minimum import
|
||||||
|
</vn-item>
|
||||||
|
<vn-item
|
||||||
|
ng-click="$ctrl.sendChangesSms()"
|
||||||
|
name="sendChangesSms"
|
||||||
|
translate>
|
||||||
|
Notify changes
|
||||||
|
</vn-item>
|
||||||
|
</vn-list>
|
||||||
|
</vn-menu>
|
||||||
</vn-item>
|
</vn-item>
|
||||||
<vn-item
|
<vn-item
|
||||||
ng-click="makeInvoiceConfirmation.show()"
|
ng-click="makeInvoiceConfirmation.show()"
|
||||||
|
@ -165,7 +174,7 @@
|
||||||
</vn-item>
|
</vn-item>
|
||||||
<vn-item
|
<vn-item
|
||||||
ng-click="setTicketWeight.show()"
|
ng-click="setTicketWeight.show()"
|
||||||
vn-acl="employee"
|
vn-acl="deliveryBoss"
|
||||||
translate>
|
translate>
|
||||||
Set ticket weight
|
Set ticket weight
|
||||||
</vn-item>
|
</vn-item>
|
||||||
|
@ -371,3 +380,11 @@
|
||||||
<button response="accept" translate>Accept</button>
|
<button response="accept" translate>Accept</button>
|
||||||
</tpl-buttons>
|
</tpl-buttons>
|
||||||
</vn-dialog>
|
</vn-dialog>
|
||||||
|
|
||||||
|
<!-- Without weight confirmation dialog -->
|
||||||
|
<vn-confirm
|
||||||
|
vn-id="withoutWeightConfirmation"
|
||||||
|
on-accept="$ctrl.makeInvoice(true)"
|
||||||
|
question="This address has incoterms, you should set the weight before invoice it"
|
||||||
|
message="Are you sure you want to invoice this ticket?">
|
||||||
|
</vn-confirm>
|
||||||
|
|
|
@ -249,16 +249,11 @@ class Controller extends Section {
|
||||||
this.$.sms.open();
|
this.$.sms.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
makeInvoice() {
|
makeInvoice(force) {
|
||||||
const params = {ticketsIds: [this.id]};
|
if (this.ticket.address.incotermsFk && !this.ticket.weight && !force)
|
||||||
/*
|
return this.$.withoutWeightConfirmation.show();
|
||||||
This should call the notification sistem to insert a new notification
|
|
||||||
in te queue, yet to check how to handle user permissions,
|
|
||||||
as of 08-11-2022 every employee can insert a new notification in the queue
|
|
||||||
|
|
||||||
*/
|
|
||||||
const client = this.ticket.client;
|
const client = this.ticket.client;
|
||||||
|
|
||||||
if (client.hasElectronicInvoice) {
|
if (client.hasElectronicInvoice) {
|
||||||
this.$http.post(`NotificationQueues`, {
|
this.$http.post(`NotificationQueues`, {
|
||||||
notificationFk: 'invoice-electronic',
|
notificationFk: 'invoice-electronic',
|
||||||
|
@ -275,7 +270,8 @@ class Controller extends Section {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.$http.post(`Tickets/makeInvoice`, params)
|
return this.$http.post(`Tickets/makeInvoice`, {ticketsIds: [this.id]})
|
||||||
|
.then(() => this.reload())
|
||||||
.then(() => this.reload())
|
.then(() => this.reload())
|
||||||
.then(() => this.vnApp.showSuccess(this.$t('Ticket invoiced')));
|
.then(() => this.vnApp.showSuccess(this.$t('Ticket invoiced')));
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,14 @@ without warehouse: sin almacén
|
||||||
Invoice sent: Factura enviada
|
Invoice sent: Factura enviada
|
||||||
The following refund ticket have been created: "Se ha creado siguiente ticket de abono: {{ticketId}}"
|
The following refund ticket have been created: "Se ha creado siguiente ticket de abono: {{ticketId}}"
|
||||||
Transfer client: Transferir cliente
|
Transfer client: Transferir cliente
|
||||||
SMS Notify changes: SMS Notificar cambios
|
Send SMS...: Enviar SMS...
|
||||||
|
Notify changes: Notificar cambios
|
||||||
|
Minimum import: Importe mínimo
|
||||||
|
Pending payment: Pago pendiente
|
||||||
PDF sent!: ¡PDF enviado!
|
PDF sent!: ¡PDF enviado!
|
||||||
Already exist signed delivery note: Ya existe albarán de entrega firmado
|
Already exist signed delivery note: Ya existe albarán de entrega firmado
|
||||||
Are you sure you want to replace this delivery note?: ¿Seguro que quieres reemplazar este albarán de entrega?
|
Are you sure you want to replace this delivery note?: ¿Seguro que quieres reemplazar este albarán de entrega?
|
||||||
Create a single ticket with all the content of the current ticket: Crea un ticket único con todo el contenido del ticket actual
|
Create a single ticket with all the content of the current ticket: Crea un ticket único con todo el contenido del ticket actual
|
||||||
|
Set ticket weight: Establecer peso al ticket
|
||||||
|
Ticket weight: Peso del ticket
|
||||||
|
This address has incoterms, you should set the weight before invoice it: Este consigatario tiene incoterms, deberías establecer el peso antes de facturar
|
||||||
|
|
|
@ -17,8 +17,6 @@ Shipped hour updated: Hora de envio modificada
|
||||||
Deleted ticket: Ticket eliminado
|
Deleted ticket: Ticket eliminado
|
||||||
Recalculate components: Recalcular componentes
|
Recalculate components: Recalcular componentes
|
||||||
Are you sure you want to recalculate the components?: ¿Seguro que quieres recalcular los componentes?
|
Are you sure you want to recalculate the components?: ¿Seguro que quieres recalcular los componentes?
|
||||||
SMS Minimum import: 'SMS Importe minimo'
|
|
||||||
SMS Pending payment: 'SMS Pago pendiente'
|
|
||||||
Restore ticket: Restaurar ticket
|
Restore ticket: Restaurar ticket
|
||||||
You are going to restore this ticket: Vas a restaurar este ticket
|
You are going to restore this ticket: Vas a restaurar este ticket
|
||||||
Are you sure you want to restore this ticket?: ¿Seguro que quieres restaurar el ticket?
|
Are you sure you want to restore this ticket?: ¿Seguro que quieres restaurar el ticket?
|
||||||
|
|
Loading…
Reference in New Issue