Ammends
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
94b668c01e
commit
1b9ca13391
|
@ -1,14 +1,14 @@
|
|||
create table `vn`.`buyImportReference`
|
||||
create table `vn`.`itemMatchProperties`
|
||||
(
|
||||
itemFk int not null,
|
||||
name varchar(80) not null,
|
||||
company varchar(80) not null,
|
||||
producer varchar(80) not null,
|
||||
size int not null,
|
||||
constraint buyImportReference_pk
|
||||
primary key (itemFk, name, company, size),
|
||||
constraint itemMatchProperties_pk
|
||||
primary key (itemFk, name, producer, size),
|
||||
constraint itemFk___fk
|
||||
foreign key (itemFk) references item (id)
|
||||
on update cascade on delete cascade
|
||||
)
|
||||
comment 'Referencias de compras importadas';
|
||||
comment 'Propiedades para encontrar articulos equivalentes en verdnatura';
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ module.exports = Self => {
|
|||
packageFk: buy.packageFk
|
||||
});
|
||||
|
||||
await models.BuyImportReference.upsert({
|
||||
await models.ItemMatchProperties.upsert({
|
||||
itemFk: buy.itemFk,
|
||||
name: buy.description,
|
||||
company: buy.companyName,
|
||||
|
|
|
@ -41,7 +41,7 @@ module.exports = Self => {
|
|||
if (packaging)
|
||||
buy.packageFk = packaging.id;
|
||||
|
||||
const reference = await models.BuyImportReference.findOne({
|
||||
const reference = await models.ItemMatchProperties.findOne({
|
||||
fields: ['itemFk'],
|
||||
where: {
|
||||
name: buy.description,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"Buy": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"BuyImportReference": {
|
||||
"ItemMatchProperties": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"EntryLog": {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"name": "BuyImportReference",
|
||||
"name": "ItemMatchProperties",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "buyImportReference"
|
||||
"table": "itemMatchProperties"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
|
|
Loading…
Reference in New Issue