Merge branch 'master' into 7801-franceGoLabel
gitea/salix/pipeline/pr-master This commit looks good
Details
gitea/salix/pipeline/pr-master This commit looks good
Details
This commit is contained in:
commit
90f7cc0583
|
@ -10,15 +10,10 @@ BEGIN
|
|||
* @param vSaleGroupFk id de la preparación previa
|
||||
* @param vParkingFk id del parking
|
||||
*/
|
||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||
BEGIN
|
||||
RESIGNAL;
|
||||
END;
|
||||
|
||||
UPDATE saleGroup sg
|
||||
SET sg.parkingFk = vParkingFk
|
||||
WHERE sg.id = vSaleGroupFk
|
||||
AND sg.created >= util.VN_CURDATE() - INTERVAL 1 WEEK;
|
||||
WHERE sg.id = vSaleGroupFk
|
||||
AND sg.created >= util.VN_CURDATE() - INTERVAL 1 WEEK;
|
||||
|
||||
CALL ticket_setNextState(ticket_get(vSaleGroupFk));
|
||||
END$$
|
||||
|
|
|
@ -13,12 +13,6 @@ BEGIN
|
|||
DECLARE vParkingFk INT;
|
||||
DECLARE vLastWeek DATE;
|
||||
|
||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||
BEGIN
|
||||
ROLLBACK;
|
||||
RESIGNAL;
|
||||
END;
|
||||
|
||||
SET vParkingCode = REPLACE(vParkingCode, ' ', '');
|
||||
|
||||
SELECT id INTO vParkingFk
|
||||
|
@ -29,8 +23,6 @@ BEGIN
|
|||
CALL util.throw('parkingNotExist');
|
||||
END IF;
|
||||
|
||||
START TRANSACTION;
|
||||
|
||||
SET vLastWeek = util.VN_CURDATE() - INTERVAL 1 WEEK;
|
||||
|
||||
-- Comprobamos si es una prep. previa, ticket, colección o shelving
|
||||
|
@ -45,7 +37,5 @@ BEGIN
|
|||
ELSE
|
||||
CALL util.throw('paramNotExist');
|
||||
END IF;
|
||||
|
||||
COMMIT;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`shelving_setParking`(IN `vShelvingCode` VARCHAR(8), IN `vParkingFk` INT)
|
||||
proc: BEGIN
|
||||
BEGIN
|
||||
/**
|
||||
* Aparca una matrícula en un parking
|
||||
*
|
||||
* @param vShelvingCode code de la matrícula
|
||||
* @param vParkingFk id del parking
|
||||
*/
|
||||
INSERT INTO vn.shelvingLog (originFk, userFk, action , description,changedModel,changedModelId)
|
||||
INSERT INTO shelvingLog (originFk, userFk, action , description,changedModel,changedModelId)
|
||||
SELECT s.id, account.myUser_getId(), 'update', CONCAT("Cambio parking ",vShelvingCode," de ", p.code," a ", pNew.code),'Shelving',s.id
|
||||
FROM parking p
|
||||
JOIN shelving s ON s.parkingFk = p.id
|
||||
JOIN parking pNew ON pNew.id = vParkingFk
|
||||
WHERE s.code = vShelvingCode COLLATE utf8_unicode_ci;
|
||||
|
||||
UPDATE vn.shelving
|
||||
UPDATE shelving
|
||||
SET parkingFk = vParkingFk,
|
||||
parked = util.VN_NOW(),
|
||||
isPrinted = TRUE
|
||||
|
|
|
@ -21,11 +21,6 @@ BEGIN
|
|||
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
|
||||
|
||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||
BEGIN
|
||||
RESIGNAL;
|
||||
END;
|
||||
|
||||
INSERT INTO vn.ticketParking(ticketFk, parkingFk)
|
||||
SELECT IFNULL(tc2.ticketFk, t.id), vParkingFk
|
||||
FROM ticket t
|
||||
|
|
|
@ -367,5 +367,6 @@
|
|||
"It has been invoiced but the PDF of refund not be generated": "Se ha facturado pero no se ha podido generar el PDF del abono",
|
||||
"Payment method is required": "El método de pago es obligatorio",
|
||||
"Cannot send mail": "Não é possível enviar o email",
|
||||
"CONSTRAINT `supplierAccountTooShort` failed for `vn`.`supplier`": "La cuenta debe tener exactamente 10 dígitos"
|
||||
}
|
||||
"CONSTRAINT `supplierAccountTooShort` failed for `vn`.`supplier`": "La cuenta debe tener exactamente 10 dígitos",
|
||||
"The sale not exists in the item shelving": "La venta no existe en la estantería del artículo"
|
||||
}
|
|
@ -29,7 +29,7 @@ module.exports = Self => {
|
|||
SELECT COUNT(*) > 0 isCustomer
|
||||
FROM salix.Account A
|
||||
JOIN salix.Role r ON r.id = A.roleFK
|
||||
WHERE r.name = 'customer'
|
||||
WHERE r.name IN ('customer', 'supplier')
|
||||
AND A.id IN (?)`;
|
||||
const [result] = await Self.rawSql(query, [id], myOptions);
|
||||
const {isCustomer} = result;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
const UserError = require('vn-loopback/util/user-error');
|
||||
module.exports = Self => {
|
||||
Self.remoteMethod('updateFromSale', {
|
||||
description: 'Update the visible items',
|
||||
|
@ -32,6 +33,9 @@ module.exports = Self => {
|
|||
include: {relation: 'itemShelving'}
|
||||
}, myOptions);
|
||||
|
||||
if (!itemShelvingSale?.itemShelving())
|
||||
throw new UserError('The sale not exists in the item shelving');
|
||||
|
||||
const itemShelving = itemShelvingSale.itemShelving();
|
||||
const quantity = itemShelving.visible + itemShelvingSale.quantity;
|
||||
|
||||
|
|
|
@ -62,8 +62,11 @@ export default class Controller extends Section {
|
|||
|
||||
setDefaultFilter() {
|
||||
let today = Date.vnNew();
|
||||
today.setHours(0, 0, 0, 0);
|
||||
const tomorrow = new Date(today);
|
||||
tomorrow.setDate(tomorrow.getDate() + 1);
|
||||
tomorrow.setHours(23, 59, 59, 999);
|
||||
|
||||
this.$http.get(`UserConfigs/getUserConfig`)
|
||||
.then(res => {
|
||||
this.filterParams = {
|
||||
|
@ -86,15 +89,6 @@ export default class Controller extends Section {
|
|||
return checkedLines;
|
||||
}
|
||||
|
||||
dateRange(value) {
|
||||
const minHour = new Date(value);
|
||||
minHour.setHours(0, 0, 0, 0);
|
||||
const maxHour = new Date(value);
|
||||
maxHour.setHours(23, 59, 59, 59);
|
||||
|
||||
return [minHour, maxHour];
|
||||
}
|
||||
|
||||
totalPriceColor(totalWithVat) {
|
||||
return this.isLessThan50(totalWithVat) ? 'warning' : '';
|
||||
}
|
||||
|
|
|
@ -36,24 +36,6 @@ describe('Component vnTicketAdvance', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('dateRange()', () => {
|
||||
it('should return two dates with the hours at the start and end of the given date', () => {
|
||||
const now = Date.vnNew();
|
||||
|
||||
const today = now.getDate();
|
||||
|
||||
const dateRange = controller.dateRange(now);
|
||||
const start = dateRange[0].toString();
|
||||
const end = dateRange[1].toString();
|
||||
|
||||
expect(start).toContain(today);
|
||||
expect(start).toContain('00:00:00');
|
||||
|
||||
expect(end).toContain(today);
|
||||
expect(end).toContain('23:59:59');
|
||||
});
|
||||
});
|
||||
|
||||
describe('moveTicketsAdvance()', () => {
|
||||
it('should make an HTTP Post query', () => {
|
||||
jest.spyOn(controller.$.model, 'refresh');
|
||||
|
|
|
@ -33,9 +33,6 @@ span {
|
|||
.barcode {
|
||||
text-align: center;
|
||||
}
|
||||
#variant {
|
||||
.one-third {
|
||||
width: 314px;
|
||||
}
|
||||
#producer {
|
||||
width: 471px;
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div id="variant" class="cell">
|
||||
<div class="cell one-third">
|
||||
<span class="lbl">{{$t('variety')}}</span>
|
||||
{{buy.name}}
|
||||
</div>
|
||||
|
@ -63,18 +63,24 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div id="producer" class="cell">
|
||||
<td colspan="2">
|
||||
<div class="cell one-third">
|
||||
<span class="lbl">{{$t('producer')}}</span>
|
||||
{{buy.producer}}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="cell">
|
||||
<span class="lbl">{{$t('control')}}</span>
|
||||
{{`${weekNum} / ${dayNum}`}}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="cell">
|
||||
<span class="lbl">{{$t('control')}}</span>
|
||||
{{`${weekNum} / ${dayNum}`}}
|
||||
<div class="cell one-third">
|
||||
<span class="lbl">{{$t('reference')}}</span>
|
||||
{{buy.comment}}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
@ -9,4 +9,5 @@ grouping: Grouping
|
|||
unitSale: Un. sale
|
||||
producer: Producer
|
||||
control: Control
|
||||
boxNum: Box no.
|
||||
boxNum: Box no.
|
||||
reference: Reference
|
|
@ -9,4 +9,5 @@ grouping: Grouping
|
|||
saleUnit: Sale un.
|
||||
producer: Productor
|
||||
control: Control
|
||||
boxNum: Caja nº
|
||||
boxNum: Caja nº
|
||||
reference: Referencia
|
|
@ -20,7 +20,8 @@ SELECT ROW_NUMBER() OVER(ORDER BY b.id, num.n) labelNum,
|
|||
i.stems,
|
||||
b.id,
|
||||
b.itemFk,
|
||||
p.name producer
|
||||
p.name producer,
|
||||
i.comment
|
||||
FROM buy b
|
||||
JOIN item i ON i.id = b.itemFk
|
||||
LEFT JOIN producer p ON p.id = i.producerFk
|
||||
|
|
Loading…
Reference in New Issue