Merge pull request '#6697 - removeClaimQuantity' (!2363) from 6697-removeClaimQuantity into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #2363 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
89ffdbfdf7
|
@ -0,0 +1,2 @@
|
||||||
|
-- Place your SQL code here
|
||||||
|
ALTER TABLE vn.claimBeginning MODIFY COLUMN quantity double DEFAULT 0 NULL;
|
|
@ -83,7 +83,6 @@ module.exports = Self => {
|
||||||
const newClaimBeginning = models.ClaimBeginning.create({
|
const newClaimBeginning = models.ClaimBeginning.create({
|
||||||
saleFk: sale.id,
|
saleFk: sale.id,
|
||||||
claimFk: newClaim.id,
|
claimFk: newClaim.id,
|
||||||
quantity: sale.quantity
|
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
|
|
||||||
promises.push(newClaimBeginning);
|
promises.push(newClaimBeginning);
|
||||||
|
|
|
@ -37,7 +37,7 @@ describe('Claim createFromSales()', () => {
|
||||||
let claimBeginning = await models.ClaimBeginning.findOne({where: {claimFk: claim.id}}, options);
|
let claimBeginning = await models.ClaimBeginning.findOne({where: {claimFk: claim.id}}, options);
|
||||||
|
|
||||||
expect(claimBeginning.saleFk).toEqual(newSale[0].id);
|
expect(claimBeginning.saleFk).toEqual(newSale[0].id);
|
||||||
expect(claimBeginning.quantity).toEqual(newSale[0].quantity);
|
expect(claimBeginning.quantity).toEqual(0);
|
||||||
|
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -67,7 +67,7 @@ describe('Claim createFromSales()', () => {
|
||||||
const claimBeginning = await models.ClaimBeginning.findOne({where: {claimFk: claim.id}}, options);
|
const claimBeginning = await models.ClaimBeginning.findOne({where: {claimFk: claim.id}}, options);
|
||||||
|
|
||||||
expect(claimBeginning.saleFk).toEqual(newSale[0].id);
|
expect(claimBeginning.saleFk).toEqual(newSale[0].id);
|
||||||
expect(claimBeginning.quantity).toEqual(newSale[0].quantity);
|
expect(claimBeginning.quantity).toEqual(0);
|
||||||
|
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
"description": "Identifier"
|
"description": "Identifier"
|
||||||
},
|
},
|
||||||
"quantity": {
|
"quantity": {
|
||||||
"type": "number",
|
"type": "number"
|
||||||
"required": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"relations": {
|
"relations": {
|
||||||
|
|
Loading…
Reference in New Issue