Merge branch '2402-entry_create' of https://gitea.verdnatura.es/verdnatura/salix into 2402-entry_create

This commit is contained in:
Carlos Jimenez Ruiz 2020-09-03 16:59:41 +02:00
commit 0116adeddb
3 changed files with 10 additions and 9 deletions

View File

@ -33,8 +33,8 @@
ng-model="$ctrl.entry.travelFk"
url="Travels/filter"
search-function="$ctrl.searchFunction($search)"
value-field="t.id"
order="t.id"
value-field="id"
order="id"
label="Travel"
required="true">
<tpl-item>

View File

@ -26,11 +26,11 @@ export default class Controller extends Section {
searchFunction($search) {
return {or: [
{'am.name': {like: `%${$search}%`}},
{'win.name': {like: `%${$search}%`}},
{'wout.name': {like: `%${$search}%`}},
{'t.shipped': new Date($search)},
{'t.landed': new Date($search)}
{'agencyModeName': {like: `%${$search}%`}},
{'warehouseInName': {like: `%${$search}%`}},
{'warehouseOutName': {like: `%${$search}%`}},
{'shipped': new Date($search)},
{'landed': new Date($search)}
]};
}
}

View File

@ -112,7 +112,8 @@ module.exports = Self => {
let stmts = [];
let stmt;
stmt = new ParameterizedSQL(
`SELECT
`SELECT * FROM
(SELECT
t.id,
t.shipped,
t.landed,
@ -132,7 +133,7 @@ module.exports = Self => {
FROM vn.travel t
JOIN vn.agencyMode am ON am.id = t.agencyFk
JOIN vn.warehouse win ON win.id = t.warehouseInFk
JOIN vn.warehouse wout ON wout.id = t.warehouseOutFk`
JOIN vn.warehouse wout ON wout.id = t.warehouseOutFk) AS t`
);
stmt.merge(conn.makeSuffix(filter));