Merge pull request '2952-ticket.sale-tracking_part2' (!1310) from 2952-ticket.sale-tracking_part2 into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #1310 Reviewed-by: Joan Sanchez <joan@verdnatura.es>
This commit is contained in:
commit
c2735e54a0
|
@ -29,5 +29,12 @@
|
|||
"pickingOrder": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"saleGroup": {
|
||||
"type": "hasMany",
|
||||
"model": "saleGroup",
|
||||
"foreignKey": "parkingFk"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,6 +41,12 @@
|
|||
"SaleComponent": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"SaleGroup": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"SaleGroupDetail": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"SaleTracking": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
|
|
|
@ -75,6 +75,11 @@
|
|||
"type": "hasOne",
|
||||
"model": "ItemShelvingSale",
|
||||
"foreignKey": "saleFk"
|
||||
},
|
||||
"saleGroupDetail": {
|
||||
"type": "hasOne",
|
||||
"model": "SaleGroupDetail",
|
||||
"foreignKey": "saleFk"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"name": "SaleGroup",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "saleGroup"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"id": true,
|
||||
"type": "number",
|
||||
"description": "Identifier"
|
||||
},
|
||||
"parkingFk": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"saleGroupDetail": {
|
||||
"type": "hasMany",
|
||||
"model": "SaleGroupDetail",
|
||||
"foreignKey": "saleGroupFk"
|
||||
},
|
||||
"parking": {
|
||||
"type": "belongsTo",
|
||||
"model": "Parking",
|
||||
"foreignKey": "parkingFk"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"name": "SaleGroupDetail",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "saleGroupDetail"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"id": true,
|
||||
"type": "number",
|
||||
"description": "Identifier"
|
||||
},
|
||||
"saleFk": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"sale": {
|
||||
"type": "belongsTo",
|
||||
"model": "Sale",
|
||||
"foreignKey": "saleFk"
|
||||
},
|
||||
"saleGroup": {
|
||||
"type": "belongsTo",
|
||||
"model": "SaleGroup",
|
||||
"foreignKey": "saleGroupFk"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -17,6 +17,7 @@
|
|||
<vn-th field="itemFk" number>Item</vn-th>
|
||||
<vn-th field="concept">Description</vn-th>
|
||||
<vn-th field="quantity" number>Quantity</vn-th>
|
||||
<vn-th field="parking" center>Parking</vn-th>
|
||||
<vn-th></vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
|
@ -50,6 +51,7 @@
|
|||
</vn-fetched-tags>
|
||||
</vn-td>
|
||||
<vn-td number>{{::sale.quantity}}</vn-td>
|
||||
<vn-td center>{{::sale.saleGroupDetail.saleGroup.parking.code | dashIfEmpty}}</vn-td>
|
||||
<vn-td actions>
|
||||
<vn-icon-button
|
||||
vn-click-stop="$ctrl.showSaleTracking(sale)"
|
||||
|
|
|
@ -9,11 +9,30 @@ class Controller extends Section {
|
|||
include: [
|
||||
{
|
||||
relation: 'item'
|
||||
}, {
|
||||
},
|
||||
{
|
||||
relation: 'saleTracking',
|
||||
scope: {
|
||||
fields: ['isChecked']
|
||||
}
|
||||
},
|
||||
{
|
||||
relation: 'saleGroupDetail',
|
||||
scope: {
|
||||
fields: ['saleGroupFk'],
|
||||
include: {
|
||||
relation: 'saleGroup',
|
||||
scope: {
|
||||
fields: ['parkingFk'],
|
||||
include: {
|
||||
relation: 'parking',
|
||||
scope: {
|
||||
fields: ['code']
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue