Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 5297-newWorker_iban_not_required

This commit is contained in:
Carlos Satorres 2023-05-24 08:09:44 +02:00
commit bb39724718
3 changed files with 8 additions and 3 deletions

View File

@ -16,7 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- (Trabajadores -> Nuevo trabajador) Los clientes se crean sin 'TR' pero se añade tipo de negocio 'Trabajador'
### Fixed
-
- (Tickets -> Líneas) Se permite hacer split de líneas al mismo ticket

View File

@ -78,7 +78,7 @@ module.exports = Self => {
const saleIds = sales.map(sale => sale.id);
const hasClaimedSales = await models.ClaimBeginning.findOne({where: {saleFk: {inq: saleIds}}});
if (hasClaimedSales)
if (ticketId != id && hasClaimedSales)
throw new UserError(`Can't transfer claimed sales`);
for (const sale of sales) {

View File

@ -244,7 +244,12 @@ class Controller extends Section {
const query = `tickets/${this.ticket.id}/transferSales`;
this.$http.post(query, params)
.then(res => this.$state.go('ticket.card.sale', {id: res.data.id}));
.then(res => {
if (res.data && res.data.id === this.ticket.id) {
this.$.transfer.hide();
this.$.model.refresh();
} else this.$state.go('ticket.card.sale', {id: res.data.id});
});
}
showEditPricePopover(event, sale) {