Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 4159-tableQ_filter
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
commit
e276b1f266
|
@ -392,12 +392,13 @@ export default {
|
|||
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"]',
|
||||
densityCheckbox: '.vn-popover.shown vn-horizontal:nth-child(3) > vn-check[label="Density"]',
|
||||
saveFieldsButton: '.vn-popover.shown vn-button[label="Save"] > button',
|
||||
openAdvancedSearchButton: 'vn-searchbar .append vn-icon[icon="arrow_drop_down"]',
|
||||
advancedSearchItemType: 'vn-item-search-panel vn-autocomplete[ng-model="filter.typeFk"]',
|
||||
advancedSearchButton: 'vn-item-search-panel button[type=submit]',
|
||||
advancedSmartTableButton: 'vn-item-index vn-button[icon="search"]',
|
||||
advancedSmartTableGrouping: 'vn-item-index vn-textfield[name=grouping]',
|
||||
weightByPieceCheckbox: '.vn-popover.shown vn-horizontal:nth-child(3) > vn-check[label="Weight/Piece"]',
|
||||
saveFieldsButton: '.vn-popover.shown vn-button[label="Save"] > button'
|
||||
},
|
||||
itemFixedPrice: {
|
||||
add: 'vn-fixed-price vn-icon-button[icon="add_circle"]',
|
||||
|
|
|
@ -31,7 +31,7 @@ describe('Item index path', () => {
|
|||
await page.waitToClick(selectors.itemsIndex.intrastadCheckbox);
|
||||
await page.waitToClick(selectors.itemsIndex.originCheckbox);
|
||||
await page.waitToClick(selectors.itemsIndex.buyerCheckbox);
|
||||
await page.waitToClick(selectors.itemsIndex.densityCheckbox);
|
||||
await page.waitToClick(selectors.itemsIndex.weightByPieceCheckbox);
|
||||
await page.waitToClick(selectors.itemsIndex.saveFieldsButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
|
@ -64,7 +64,7 @@ describe('Item index path', () => {
|
|||
await page.waitToClick(selectors.itemsIndex.intrastadCheckbox);
|
||||
await page.waitToClick(selectors.itemsIndex.originCheckbox);
|
||||
await page.waitToClick(selectors.itemsIndex.buyerCheckbox);
|
||||
await page.waitToClick(selectors.itemsIndex.densityCheckbox);
|
||||
await page.waitToClick(selectors.itemsIndex.weightByPieceCheckbox);
|
||||
await page.waitToClick(selectors.itemsIndex.saveFieldsButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ module.exports = Self => {
|
|||
|
||||
switch (field) {
|
||||
case 'size':
|
||||
case 'density':
|
||||
case 'weightByPiece':
|
||||
case 'description':
|
||||
case 'packingOut':
|
||||
modelName = 'Item';
|
||||
|
|
|
@ -157,7 +157,7 @@ module.exports = Self => {
|
|||
i.image,
|
||||
i.id AS itemFk,
|
||||
i.size,
|
||||
i.density,
|
||||
i.weightByPiece,
|
||||
it.code,
|
||||
i.typeFk,
|
||||
i.family,
|
||||
|
|
|
@ -68,8 +68,8 @@
|
|||
<th field="origin">
|
||||
<span translate>Origin</span>
|
||||
</th>
|
||||
<th field="density">
|
||||
<span translate>Density</span>
|
||||
<th field="weightByPiece">
|
||||
<span translate>Weight/Piece</span>
|
||||
</th>
|
||||
<th field="isActive">
|
||||
<span translate>Active</span>
|
||||
|
@ -183,7 +183,7 @@
|
|||
{{::buy.intrastat}}
|
||||
</td>
|
||||
<td>{{::buy.origin}}</td>
|
||||
<td>{{::buy.density}}</td>
|
||||
<td>{{::buy.weightByPiece}}</td>
|
||||
<td>
|
||||
<vn-check
|
||||
disabled="true"
|
||||
|
|
|
@ -80,7 +80,7 @@ export default class Controller extends Section {
|
|||
{field: 'weight', displayName: this.$t('Weight')},
|
||||
{field: 'description', displayName: this.$t('Description')},
|
||||
{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: 'landing', displayName: this.$t('Landing')}
|
||||
];
|
||||
|
@ -103,7 +103,7 @@ export default class Controller extends Section {
|
|||
switch (param) {
|
||||
case 'id':
|
||||
case 'size':
|
||||
case 'density':
|
||||
case 'weightByPiece':
|
||||
case 'isActive':
|
||||
case 'family':
|
||||
case 'minPrice':
|
||||
|
|
|
@ -160,7 +160,7 @@ module.exports = Self => {
|
|||
i.subName,
|
||||
i.isActive,
|
||||
i.stems,
|
||||
i.density,
|
||||
i.weightByPiece,
|
||||
i.stemMultiplier,
|
||||
i.typeFk,
|
||||
i.isFloramondo,
|
||||
|
|
|
@ -53,9 +53,9 @@
|
|||
"type": "number",
|
||||
"description": "Relevancy"
|
||||
},
|
||||
"density": {
|
||||
"weightByPiece": {
|
||||
"type": "number",
|
||||
"description": "Density"
|
||||
"description": "WeightByPiece"
|
||||
},
|
||||
"stemMultiplier": {
|
||||
"type": "number",
|
||||
|
|
|
@ -124,9 +124,8 @@
|
|||
<vn-input-number
|
||||
vn-one
|
||||
min="0"
|
||||
step="0.01"
|
||||
label="Density"
|
||||
ng-model="$ctrl.item.density"
|
||||
label="Weight/Piece"
|
||||
ng-model="$ctrl.item.weightByPiece"
|
||||
rule>
|
||||
</vn-input-number>
|
||||
<vn-autocomplete
|
||||
|
|
|
@ -45,8 +45,8 @@
|
|||
<th field="buyerFk">
|
||||
<span translate>Buyer</span>
|
||||
</th>
|
||||
<th field="density">
|
||||
<span translate>Density</span>
|
||||
<th field="weightByPiece">
|
||||
<span translate>Weight/Piece</span>
|
||||
</th>
|
||||
<th field="stemMultiplier">
|
||||
<span translate>Multiplier</span>
|
||||
|
@ -117,7 +117,7 @@
|
|||
{{::item.userName}}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{::item.density}}</td>
|
||||
<td>{{::item.weightByPiece}}</td>
|
||||
<td>{{::item.stemMultiplier}}</td>
|
||||
<td>
|
||||
<vn-check
|
||||
|
|
|
@ -87,7 +87,7 @@ class Controller extends Section {
|
|||
case 'size':
|
||||
case 'subname':
|
||||
case 'isActive':
|
||||
case 'density':
|
||||
case 'weightByPiece':
|
||||
case 'stemMultiplier':
|
||||
case 'stems':
|
||||
return {[`i.${param}`]: value};
|
||||
|
|
|
@ -40,7 +40,7 @@ Create: Crear
|
|||
Client card: Ficha del cliente
|
||||
Shipped: F. envío
|
||||
stems: Tallos
|
||||
Density: Densidad
|
||||
Weight/Piece: Peso/tallo
|
||||
Search items by id, name or barcode: Buscar articulos por identificador, nombre o codigo de barras
|
||||
SalesPerson: Comercial
|
||||
Concept: Concepto
|
||||
|
|
|
@ -91,8 +91,8 @@
|
|||
<vn-label-value label="Relevancy"
|
||||
value="{{$ctrl.summary.item.relevancy}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Density"
|
||||
value="{{$ctrl.summary.item.density}}">
|
||||
<vn-label-value label="Weight/Piece"
|
||||
value="{{$ctrl.summary.item.weightByPiece}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Expense"
|
||||
value="{{$ctrl.summary.item.expense.name}}">
|
||||
|
|
|
@ -210,6 +210,9 @@
|
|||
</slot-table>
|
||||
</smart-table>
|
||||
</vn-card>
|
||||
<vn-ticket-descriptor-popover
|
||||
vn-id="ticketDescriptor">
|
||||
</vn-ticket-descriptor-popover>
|
||||
<vn-worker-descriptor-popover
|
||||
vn-id="workerDescriptor">
|
||||
</vn-worker-descriptor-popover>
|
||||
|
|
|
@ -130,8 +130,8 @@ module.exports = Self => {
|
|||
SUM(b.stickers) AS stickers,
|
||||
s.id AS cargoSupplierFk,
|
||||
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(167.5 * b.stickers * IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000 ) as DECIMAL(10,0)) as volumeKg
|
||||
CAST(SUM(b.weight * b.stickers) as DECIMAL(10,0)) as loadedKg,
|
||||
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
|
||||
LEFT JOIN supplier s ON s.id = t.cargoSupplierFk
|
||||
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 country c ON c.id = wo.countryFk
|
||||
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));
|
||||
|
@ -165,15 +166,16 @@ module.exports = Self => {
|
|||
SUM(b.stickers) AS stickers,
|
||||
e.evaNotes,
|
||||
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(167.5 * b.stickers * IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000 ) as DECIMAL(10,0)) as volumeKg
|
||||
CAST(SUM(b.weight * b.stickers) AS DECIMAL(10,0)) as loadedkg,
|
||||
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
|
||||
JOIN entry e ON e.travelFk = tr.id
|
||||
JOIN buy b ON b.entryFk = e.id
|
||||
JOIN packaging pkg ON pkg.id = b.packageFk
|
||||
JOIN item i ON i.id = b.itemFk
|
||||
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'));
|
||||
|
|
|
@ -29,7 +29,7 @@ module.exports = {
|
|||
for (let attachment of options.attachments) {
|
||||
const fileName = attachment.filename;
|
||||
const filePath = attachment.path;
|
||||
if (fileName.includes('.png')) return;
|
||||
if (fileName.includes('.png')) continue;
|
||||
|
||||
if (fileName || filePath)
|
||||
attachments.push(filePath ? filePath : fileName);
|
||||
|
|
|
@ -11,15 +11,17 @@ module.exports = async function(request, response, next) {
|
|||
if (reqArgs.to) toDate = reqArgs.to;
|
||||
|
||||
const todayMinDate = new Date();
|
||||
minDate.setHours(0, 0, 0, 0);
|
||||
todayMinDate.setHours(0, 0, 0, 0);
|
||||
|
||||
const todayMaxDate = new Date();
|
||||
maxDate.setHours(23, 59, 59, 59);
|
||||
todayMinDate.setHours(23, 59, 59, 59);
|
||||
|
||||
// Prevent closure for current day
|
||||
if (toDate >= todayMinDate && toDate <= todayMaxDate)
|
||||
throw new Error('You cannot close tickets for today');
|
||||
|
||||
console.log(`Making closure up to ${toDate}...`);
|
||||
|
||||
const tickets = await db.rawSql(`
|
||||
SELECT
|
||||
t.id,
|
||||
|
|
|
@ -7,11 +7,13 @@ const storage = require('vn-print/core/storage');
|
|||
|
||||
module.exports = {
|
||||
async start(tickets, reqArgs) {
|
||||
console.log(tickets);
|
||||
if (tickets.length == 0) return;
|
||||
|
||||
const failedtickets = [];
|
||||
for (const ticket of tickets) {
|
||||
try {
|
||||
console.log(`Closing ticket id ${ticket.id}...`);
|
||||
await db.rawSql(`CALL vn.ticket_closeByTicket(?)`, [ticket.id]);
|
||||
|
||||
const invoiceOut = await db.findOne(`
|
||||
|
|
|
@ -4,14 +4,15 @@ SELECT
|
|||
e.ref,
|
||||
s.name AS supplierName,
|
||||
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(167.5 * b.stickers * IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000 ) as DECIMAL(10,0)) as volumeKg
|
||||
FROM travel t
|
||||
CAST(SUM(b.weight * b.stickers) as DECIMAL(10,0)) as loadedKg,
|
||||
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
|
||||
JOIN entry e ON e.travelFk = t.id
|
||||
JOIN buy b ON b.entryFk = e.id
|
||||
JOIN packaging pkg ON pkg.id = b.packageFk
|
||||
JOIN item i ON i.id = b.itemFk
|
||||
JOIN itemType it ON it.id = i.typeFk
|
||||
JOIN supplier s ON s.id = e.supplierFk
|
||||
JOIN vn.volumeConfig vc
|
||||
WHERE t.id IN(?)
|
||||
GROUP BY e.id
|
||||
GROUP BY e.id
|
|
@ -6,9 +6,10 @@ SELECT
|
|||
t.kg,
|
||||
am.id AS agencyModeFk,
|
||||
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(167.5 * b.stickers * IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000 ) as DECIMAL(10,0)) as volumeKg
|
||||
CAST(SUM(b.weight * b.stickers) as DECIMAL(10,0)) as loadedKg,
|
||||
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
|
||||
JOIN volumeConfig vc
|
||||
LEFT JOIN supplier s ON s.id = t.cargoSupplierFk
|
||||
LEFT JOIN entry e ON e.travelFk = t.id
|
||||
LEFT JOIN buy b ON b.entryFk = e.id
|
||||
|
|
Loading…
Reference in New Issue