#7108 - exchange-rate #2295
Labels
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#2295
Loading…
Reference in New Issue
No description provided.
Delete Branch "7108-exchange-rate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
7108-exchange-rateto #7108 - exchange-rate@ -0,0 +11,4 @@
path: '/exchangeRateUpdate',
verb: 'post'
},
returns: {
Si no retorna res, no cal ficar return (no estic segur)
@ -0,0 +29,4 @@
const maxDateRecord = await models.ReferenceRate.findOne({order: 'dated DESC'});
const maxDate = maxDateRecord && maxDateRecord.dated ? new Date(maxDateRecord.dated) : null;
Se pot simplificar en
const maxDate = maxDateRecord?.dated ? new Date(maxDateRecord.dated) : null;
const maxDate = maxDateRecord?.dated ? new Date(maxDateRecord.dated) : null;
Unhandled error for request POST /api/Collections/exchangeRateUpdate?access_token=YQ8SPYxYrHrY4veSEyY5q9YJD3AtcjEqcGXxyA5rweDZO92PLp0FB2WhBxlbTvUO: TypeError: Cannot read properties of null (reading 'dated')
Ahir em va fallar..ací t'he posat la conversa amb chatGpt...ara sí va..ho canvie de nou
@ -0,0 +31,4 @@
const maxDate = maxDateRecord && maxDateRecord.dated ? new Date(maxDateRecord.dated) : null;
for (let i = 0; i < cubes.length; i++) {
Si no cal la "i" i la "j", vec mes legible fer:
i lo mateix en el altre for
no era iterable li he posat Array.from(
@ -0,0 +1,37 @@
{
"name": "ReferenceRate",
"base": "PersistedModel",
"idInjection": false,
esta propietat no la havia vist mai
@ -356,0 +360,4 @@
"ValidationError: The `ReferenceRate` instance is not valid. Details: `currencyFk` can't be blank (value: NaN).": "ValidationError: The `ReferenceRate` instance is not valid. Details: `currencyFk` can't be blank (value: NaN).",
"ReferenceError: Currency is not defined": "ReferenceError: Currency is not defined",
"UserError: Currency not found for code: CNY": "UserError: Currency not found for code: CNY",
"Error: ER_DUP_ENTRY: Duplicate entry '2-2024-04-03' for key 'PRIMARY'": "Error: ER_DUP_ENTRY: Duplicate entry '2-2024-04-03' for key 'PRIMARY'",
Hi han q se han colat, al fer proves
#7108 - exchange-rateto WIP: #7108 - exchange-rateWIP: #7108 - exchange-rateto #7108 - exchange-rate@ -0,0 +1,2 @@
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`)
VALUES ('invoiceIn', 'exchangeRateUpdate', '*', 'ALLOW', 'ROLE', 'employee');
'invoiceIn' deuria ser en PascalCase ns si aixina fallaria.