#4226-remove-density #1066
|
@ -391,7 +391,7 @@ export default {
|
||||||
intrastadCheckbox: '.vn-popover.shown vn-horizontal:nth-child(3) > vn-check[label="Intrastat"]',
|
intrastadCheckbox: '.vn-popover.shown vn-horizontal:nth-child(3) > vn-check[label="Intrastat"]',
|
||||||
originCheckbox: '.vn-popover.shown vn-horizontal:nth-child(3) > vn-check[label="Origin"]',
|
originCheckbox: '.vn-popover.shown vn-horizontal:nth-child(3) > vn-check[label="Origin"]',
|
||||||
buyerCheckbox: '.vn-popover.shown vn-horizontal:nth-child(3) > vn-check[label="Buyer"]',
|
buyerCheckbox: '.vn-popover.shown vn-horizontal:nth-child(3) > vn-check[label="Buyer"]',
|
||||||
densityCheckbox: '.vn-popover.shown vn-horizontal:nth-child(3) > vn-check[label="Density"]',
|
weightByPieceCheckbox: '.vn-popover.shown vn-horizontal:nth-child(3) > vn-check[label="Weight/Piece"]',
|
||||||
saveFieldsButton: '.vn-popover.shown vn-button[label="Save"] > button'
|
saveFieldsButton: '.vn-popover.shown vn-button[label="Save"] > button'
|
||||||
},
|
},
|
||||||
itemFixedPrice: {
|
itemFixedPrice: {
|
||||||
|
|
|
@ -31,7 +31,7 @@ describe('Item index path', () => {
|
||||||
await page.waitToClick(selectors.itemsIndex.intrastadCheckbox);
|
await page.waitToClick(selectors.itemsIndex.intrastadCheckbox);
|
||||||
await page.waitToClick(selectors.itemsIndex.originCheckbox);
|
await page.waitToClick(selectors.itemsIndex.originCheckbox);
|
||||||
await page.waitToClick(selectors.itemsIndex.buyerCheckbox);
|
await page.waitToClick(selectors.itemsIndex.buyerCheckbox);
|
||||||
await page.waitToClick(selectors.itemsIndex.densityCheckbox);
|
await page.waitToClick(selectors.itemsIndex.weightByPieceCheckbox);
|
||||||
await page.waitToClick(selectors.itemsIndex.saveFieldsButton);
|
await page.waitToClick(selectors.itemsIndex.saveFieldsButton);
|
||||||
const message = await page.waitForSnackbar();
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ describe('Item index path', () => {
|
||||||
await page.waitToClick(selectors.itemsIndex.intrastadCheckbox);
|
await page.waitToClick(selectors.itemsIndex.intrastadCheckbox);
|
||||||
await page.waitToClick(selectors.itemsIndex.originCheckbox);
|
await page.waitToClick(selectors.itemsIndex.originCheckbox);
|
||||||
await page.waitToClick(selectors.itemsIndex.buyerCheckbox);
|
await page.waitToClick(selectors.itemsIndex.buyerCheckbox);
|
||||||
await page.waitToClick(selectors.itemsIndex.densityCheckbox);
|
await page.waitToClick(selectors.itemsIndex.weightByPieceCheckbox);
|
||||||
await page.waitToClick(selectors.itemsIndex.saveFieldsButton);
|
await page.waitToClick(selectors.itemsIndex.saveFieldsButton);
|
||||||
const message = await page.waitForSnackbar();
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ module.exports = Self => {
|
||||||
|
|
||||||
switch (field) {
|
switch (field) {
|
||||||
case 'size':
|
case 'size':
|
||||||
case 'density':
|
case 'weightByPiece':
|
||||||
case 'description':
|
case 'description':
|
||||||
case 'packingOut':
|
case 'packingOut':
|
||||||
modelName = 'Item';
|
modelName = 'Item';
|
||||||
|
|
|
@ -157,7 +157,7 @@ module.exports = Self => {
|
||||||
i.image,
|
i.image,
|
||||||
i.id AS itemFk,
|
i.id AS itemFk,
|
||||||
i.size,
|
i.size,
|
||||||
i.density,
|
i.weightByPiece,
|
||||||
it.code,
|
it.code,
|
||||||
i.typeFk,
|
i.typeFk,
|
||||||
i.family,
|
i.family,
|
||||||
|
|
|
@ -68,8 +68,8 @@
|
||||||
<th field="origin">
|
<th field="origin">
|
||||||
<span translate>Origin</span>
|
<span translate>Origin</span>
|
||||||
</th>
|
</th>
|
||||||
<th field="density">
|
<th field="weightByPiece">
|
||||||
<span translate>Density</span>
|
<span translate>Weight/Piece</span>
|
||||||
</th>
|
</th>
|
||||||
<th field="isActive">
|
<th field="isActive">
|
||||||
<span translate>Active</span>
|
<span translate>Active</span>
|
||||||
|
@ -183,7 +183,7 @@
|
||||||
{{::buy.intrastat}}
|
{{::buy.intrastat}}
|
||||||
</td>
|
</td>
|
||||||
<td>{{::buy.origin}}</td>
|
<td>{{::buy.origin}}</td>
|
||||||
<td>{{::buy.density}}</td>
|
<td>{{::buy.weightByPiece}}</td>
|
||||||
<td>
|
<td>
|
||||||
<vn-check
|
<vn-check
|
||||||
disabled="true"
|
disabled="true"
|
||||||
|
|
|
@ -80,7 +80,7 @@ export default class Controller extends Section {
|
||||||
{field: 'weight', displayName: this.$t('Weight')},
|
{field: 'weight', displayName: this.$t('Weight')},
|
||||||
{field: 'description', displayName: this.$t('Description')},
|
{field: 'description', displayName: this.$t('Description')},
|
||||||
{field: 'size', displayName: this.$t('Size')},
|
{field: 'size', displayName: this.$t('Size')},
|
||||||
{field: 'density', displayName: this.$t('Density')},
|
{field: 'weightByPiece', displayName: this.$t('weight/Piece')},
|
||||||
{field: 'packingOut', displayName: this.$t('PackingOut')},
|
{field: 'packingOut', displayName: this.$t('PackingOut')},
|
||||||
{field: 'landing', displayName: this.$t('Landing')}
|
{field: 'landing', displayName: this.$t('Landing')}
|
||||||
];
|
];
|
||||||
|
@ -103,7 +103,7 @@ export default class Controller extends Section {
|
||||||
switch (param) {
|
switch (param) {
|
||||||
case 'id':
|
case 'id':
|
||||||
case 'size':
|
case 'size':
|
||||||
case 'density':
|
case 'weightByPiece':
|
||||||
case 'isActive':
|
case 'isActive':
|
||||||
case 'family':
|
case 'family':
|
||||||
case 'minPrice':
|
case 'minPrice':
|
||||||
|
|
|
@ -160,7 +160,7 @@ module.exports = Self => {
|
||||||
i.subName,
|
i.subName,
|
||||||
i.isActive,
|
i.isActive,
|
||||||
i.stems,
|
i.stems,
|
||||||
i.density,
|
i.weightByPiece,
|
||||||
i.stemMultiplier,
|
i.stemMultiplier,
|
||||||
i.typeFk,
|
i.typeFk,
|
||||||
i.isFloramondo,
|
i.isFloramondo,
|
||||||
|
|
|
@ -53,9 +53,9 @@
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"description": "Relevancy"
|
"description": "Relevancy"
|
||||||
},
|
},
|
||||||
"density": {
|
"weightByPiece": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"description": "Density"
|
"description": "WeightByPiece"
|
||||||
},
|
},
|
||||||
"stemMultiplier": {
|
"stemMultiplier": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
|
|
|
@ -124,9 +124,8 @@
|
||||||
<vn-input-number
|
<vn-input-number
|
||||||
vn-one
|
vn-one
|
||||||
min="0"
|
min="0"
|
||||||
step="0.01"
|
label="Weight/Piece"
|
||||||
label="Density"
|
ng-model="$ctrl.item.weightByPiece"
|
||||||
ng-model="$ctrl.item.density"
|
|
||||||
rule>
|
rule>
|
||||||
</vn-input-number>
|
</vn-input-number>
|
||||||
<vn-autocomplete
|
<vn-autocomplete
|
||||||
|
|
|
@ -45,8 +45,8 @@
|
||||||
<th field="buyerFk">
|
<th field="buyerFk">
|
||||||
<span translate>Buyer</span>
|
<span translate>Buyer</span>
|
||||||
</th>
|
</th>
|
||||||
<th field="density">
|
<th field="weightByPiece">
|
||||||
<span translate>Density</span>
|
<span translate>Weight/Piece</span>
|
||||||
</th>
|
</th>
|
||||||
<th field="stemMultiplier">
|
<th field="stemMultiplier">
|
||||||
<span translate>Multiplier</span>
|
<span translate>Multiplier</span>
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
{{::item.userName}}
|
{{::item.userName}}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>{{::item.density}}</td>
|
<td>{{::item.weightByPiece}}</td>
|
||||||
<td>{{::item.stemMultiplier}}</td>
|
<td>{{::item.stemMultiplier}}</td>
|
||||||
<td>
|
<td>
|
||||||
<vn-check
|
<vn-check
|
||||||
|
|
|
@ -87,7 +87,7 @@ class Controller extends Section {
|
||||||
case 'size':
|
case 'size':
|
||||||
case 'subname':
|
case 'subname':
|
||||||
case 'isActive':
|
case 'isActive':
|
||||||
case 'density':
|
case 'weightByPiece':
|
||||||
case 'stemMultiplier':
|
case 'stemMultiplier':
|
||||||
case 'stems':
|
case 'stems':
|
||||||
return {[`i.${param}`]: value};
|
return {[`i.${param}`]: value};
|
||||||
|
|
|
@ -40,7 +40,7 @@ Create: Crear
|
||||||
Client card: Ficha del cliente
|
Client card: Ficha del cliente
|
||||||
Shipped: F. envío
|
Shipped: F. envío
|
||||||
stems: Tallos
|
stems: Tallos
|
||||||
Density: Densidad
|
Weight/Piece: Peso/tallo
|
||||||
Search items by id, name or barcode: Buscar articulos por identificador, nombre o codigo de barras
|
Search items by id, name or barcode: Buscar articulos por identificador, nombre o codigo de barras
|
||||||
SalesPerson: Comercial
|
SalesPerson: Comercial
|
||||||
Concept: Concepto
|
Concept: Concepto
|
||||||
|
|
|
@ -91,8 +91,8 @@
|
||||||
<vn-label-value label="Relevancy"
|
<vn-label-value label="Relevancy"
|
||||||
value="{{$ctrl.summary.item.relevancy}}">
|
value="{{$ctrl.summary.item.relevancy}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value label="Density"
|
<vn-label-value label="Weight/Piece"
|
||||||
value="{{$ctrl.summary.item.density}}">
|
value="{{$ctrl.summary.item.weightByPiece}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value label="Expense"
|
<vn-label-value label="Expense"
|
||||||
value="{{$ctrl.summary.item.expense.name}}">
|
value="{{$ctrl.summary.item.expense.name}}">
|
||||||
|
|
|
@ -130,8 +130,8 @@ module.exports = Self => {
|
||||||
SUM(b.stickers) AS stickers,
|
SUM(b.stickers) AS stickers,
|
||||||
s.id AS cargoSupplierFk,
|
s.id AS cargoSupplierFk,
|
||||||
s.nickname AS cargoSupplierNickname,
|
s.nickname AS cargoSupplierNickname,
|
||||||
CAST(SUM(i.density * b.stickers * IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000 ) as DECIMAL(10,0)) as loadedKg,
|
CAST(SUM(b.weight * b.stickers) as DECIMAL(10,0)) as loadedKg,
|
||||||
CAST(SUM(167.5 * b.stickers * IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000 ) as DECIMAL(10,0)) as volumeKg
|
CAST(SUM(vc.aerealVolumetricDensity * b.stickers * IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000) as DECIMAL(10,0)) as volumeKg
|
||||||
FROM travel t
|
FROM travel t
|
||||||
LEFT JOIN supplier s ON s.id = t.cargoSupplierFk
|
LEFT JOIN supplier s ON s.id = t.cargoSupplierFk
|
||||||
LEFT JOIN entry e ON e.travelFk = t.id
|
LEFT JOIN entry e ON e.travelFk = t.id
|
||||||
|
@ -143,7 +143,8 @@ module.exports = Self => {
|
||||||
JOIN warehouse wo ON wo.id = t.warehouseOutFk
|
JOIN warehouse wo ON wo.id = t.warehouseOutFk
|
||||||
JOIN country c ON c.id = wo.countryFk
|
JOIN country c ON c.id = wo.countryFk
|
||||||
LEFT JOIN continent cnt ON cnt.id = c.continentFk
|
LEFT JOIN continent cnt ON cnt.id = c.continentFk
|
||||||
JOIN agencyMode am ON am.id = t.agencyModeFk`
|
JOIN agencyMode am ON am.id = t.agencyModeFk
|
||||||
|
JOIN vn.volumeConfig vc`
|
||||||
);
|
);
|
||||||
|
|
||||||
stmt.merge(conn.makeWhere(filter.where));
|
stmt.merge(conn.makeWhere(filter.where));
|
||||||
|
@ -165,15 +166,16 @@ module.exports = Self => {
|
||||||
SUM(b.stickers) AS stickers,
|
SUM(b.stickers) AS stickers,
|
||||||
e.evaNotes,
|
e.evaNotes,
|
||||||
e.notes,
|
e.notes,
|
||||||
CAST(SUM(i.density * b.stickers * IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000 ) as DECIMAL(10,0)) as loadedkg,
|
CAST(SUM(b.weight * b.stickers) AS DECIMAL(10,0)) as loadedkg,
|
||||||
CAST(SUM(167.5 * b.stickers * IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000 ) as DECIMAL(10,0)) as volumeKg
|
CAST(SUM(vc.aerealVolumetricDensity * b.stickers * IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000) AS DECIMAL(10,0)) as volumeKg
|
||||||
FROM tmp.travel tr
|
FROM tmp.travel tr
|
||||||
JOIN entry e ON e.travelFk = tr.id
|
JOIN entry e ON e.travelFk = tr.id
|
||||||
JOIN buy b ON b.entryFk = e.id
|
JOIN buy b ON b.entryFk = e.id
|
||||||
JOIN packaging pkg ON pkg.id = b.packageFk
|
JOIN packaging pkg ON pkg.id = b.packageFk
|
||||||
JOIN item i ON i.id = b.itemFk
|
JOIN item i ON i.id = b.itemFk
|
||||||
JOIN itemType it ON it.id = i.typeFk
|
JOIN itemType it ON it.id = i.typeFk
|
||||||
JOIN supplier s ON s.id = e.supplierFk`
|
JOIN supplier s ON s.id = e.supplierFk
|
||||||
|
JOIN vn.volumeConfig vc`
|
||||||
);
|
);
|
||||||
|
|
||||||
stmt.merge(conn.makeGroupBy('e.id'));
|
stmt.merge(conn.makeGroupBy('e.id'));
|
||||||
|
|
|
@ -4,14 +4,15 @@ SELECT
|
||||||
e.ref,
|
e.ref,
|
||||||
s.name AS supplierName,
|
s.name AS supplierName,
|
||||||
SUM(b.stickers) AS stickers,
|
SUM(b.stickers) AS stickers,
|
||||||
CAST(SUM(i.density * b.stickers * IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000 ) as DECIMAL(10,0)) as loadedKg,
|
CAST(SUM(b.weight * b.stickers) as DECIMAL(10,0)) as loadedKg,
|
||||||
CAST(SUM(167.5 * b.stickers * IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000 ) as DECIMAL(10,0)) as volumeKg
|
CAST(SUM(vc.aerealVolumetricDensity * b.stickers * IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000) as DECIMAL(10,0)) as volumeKg
|
||||||
FROM travel t
|
FROM travel t
|
||||||
JOIN entry e ON e.travelFk = t.id
|
JOIN entry e ON e.travelFk = t.id
|
||||||
JOIN buy b ON b.entryFk = e.id
|
JOIN buy b ON b.entryFk = e.id
|
||||||
JOIN packaging pkg ON pkg.id = b.packageFk
|
JOIN packaging pkg ON pkg.id = b.packageFk
|
||||||
JOIN item i ON i.id = b.itemFk
|
JOIN item i ON i.id = b.itemFk
|
||||||
JOIN itemType it ON it.id = i.typeFk
|
JOIN itemType it ON it.id = i.typeFk
|
||||||
JOIN supplier s ON s.id = e.supplierFk
|
JOIN supplier s ON s.id = e.supplierFk
|
||||||
|
JOIN vn.volumeConfig vc
|
||||||
WHERE t.id IN(?)
|
WHERE t.id IN(?)
|
||||||
GROUP BY e.id
|
GROUP BY e.id
|
|
@ -6,9 +6,10 @@ SELECT
|
||||||
t.kg,
|
t.kg,
|
||||||
am.id AS agencyModeFk,
|
am.id AS agencyModeFk,
|
||||||
SUM(b.stickers) AS stickers,
|
SUM(b.stickers) AS stickers,
|
||||||
CAST(SUM(i.density * b.stickers * IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000 ) as DECIMAL(10,0)) as loadedKg,
|
CAST(SUM(b.weight * b.stickers) as DECIMAL(10,0)) as loadedKg,
|
||||||
CAST(SUM(167.5 * b.stickers * IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000 ) as DECIMAL(10,0)) as volumeKg
|
CAST(SUM(vc.aerealVolumetricDensity * b.stickers * IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000) as DECIMAL(10,0)) as volumeKg
|
||||||
FROM travel t
|
FROM travel t
|
||||||
|
JOIN volumeConfig vc
|
||||||
LEFT JOIN supplier s ON s.id = t.cargoSupplierFk
|
LEFT JOIN supplier s ON s.id = t.cargoSupplierFk
|
||||||
LEFT JOIN entry e ON e.travelFk = t.id
|
LEFT JOIN entry e ON e.travelFk = t.id
|
||||||
LEFT JOIN buy b ON b.entryFk = e.id
|
LEFT JOIN buy b ON b.entryFk = e.id
|
||||||
|
|
Loading…
Reference in New Issue