2015-03-06 23:33:54 +00:00
|
|
|
<vn>
|
|
|
|
<vn-group>
|
2015-07-23 15:58:48 +00:00
|
|
|
<vn-param id="realm" on-changed="onTypeChange">
|
2015-07-28 19:14:26 +00:00
|
|
|
<vn-hash-param key="realm"/>
|
2015-07-23 15:58:48 +00:00
|
|
|
</vn-param>
|
2015-03-27 19:10:49 +00:00
|
|
|
<vn-param id="type" on-changed="onTypeChange">
|
2015-07-28 19:14:26 +00:00
|
|
|
<vn-hash-param key="type"/>
|
2015-03-06 23:33:54 +00:00
|
|
|
</vn-param>
|
|
|
|
<vn-param id="search"/>
|
|
|
|
<sql-filter type="AND" id="filter">
|
|
|
|
<sql-filter-item type="EQUAL" id="sql-type">
|
|
|
|
<sql-field name="tipo_id"/>
|
|
|
|
<sql-value param="type"/>
|
|
|
|
</sql-filter-item>
|
|
|
|
<sql-filter-item type="LIKE">
|
|
|
|
<sql-field name="Article"/>
|
|
|
|
<sql-search-tags param="search"/>
|
|
|
|
</sql-filter-item>
|
|
|
|
</sql-filter>
|
2015-07-30 17:31:09 +00:00
|
|
|
<db-query id="basket-lines">
|
|
|
|
SELECT item_id, warehouse_id, SUM(amount) amount
|
|
|
|
FROM basket_item
|
|
|
|
GROUP BY warehouse_id
|
|
|
|
</db-query>
|
2015-09-28 14:46:03 +00:00
|
|
|
<db-model result-index="2" id="items-model">
|
2015-08-27 14:04:34 +00:00
|
|
|
CREATE TEMPORARY TABLE tmp.bionic_calc
|
|
|
|
(INDEX (item_id))
|
|
|
|
ENGINE=MEMORY
|
|
|
|
SELECT Id_Article item_id FROM vn2008.Articles
|
2015-08-27 16:47:22 +00:00
|
|
|
WHERE #filter;
|
2015-08-27 14:04:34 +00:00
|
|
|
CALL bionic_calc ();
|
2015-09-28 15:19:15 +00:00
|
|
|
SELECT a.Id_Article item_id, t.available, t.price, p.producer,
|
2015-07-07 15:27:47 +00:00
|
|
|
a.Foto, a.Article, a.Categoria, a.Medida, a.Tallos, a.Color, o.Abreviatura
|
2015-08-27 14:04:34 +00:00
|
|
|
FROM tmp.bionic_item t
|
2015-07-21 14:16:07 +00:00
|
|
|
JOIN vn2008.Articles a ON a.Id_Article = t.item_id
|
2015-09-28 12:21:14 +00:00
|
|
|
LEFT JOIN vn2008.Articles_producer p ON p.Id_Article = a.Id_Article
|
2015-07-21 14:16:07 +00:00
|
|
|
LEFT JOIN vn2008.Origen o ON a.id_origen = o.id
|
2015-08-25 09:16:13 +00:00
|
|
|
WHERE t.available > 0
|
2015-08-27 16:47:22 +00:00
|
|
|
ORDER BY a.Article, a.Medida
|
|
|
|
LIMIT 400;
|
2015-03-09 08:36:54 +00:00
|
|
|
<sql-batch property="batch" id="batch">
|
2015-08-27 14:04:34 +00:00
|
|
|
<item name="filter" object="filter"/>
|
2015-07-07 15:27:47 +00:00
|
|
|
</sql-batch>
|
|
|
|
</db-model>
|
2015-07-21 14:16:07 +00:00
|
|
|
<db-model id="item-lots" result-index="1" on-status-changed-after="onStatusChange">
|
2015-08-25 09:16:13 +00:00
|
|
|
CALL bionic_from_item (#item);
|
2015-10-14 15:02:06 +00:00
|
|
|
SELECT p.warehouse_id, p.grouping, p.price, p.rate, l.available
|
2015-08-27 14:04:34 +00:00
|
|
|
FROM tmp.bionic_lot l
|
|
|
|
JOIN tmp.bionic_price p
|
2015-08-25 09:16:13 +00:00
|
|
|
ON p.warehouse_id = l.warehouse_id
|
2015-07-21 14:16:07 +00:00
|
|
|
ORDER BY warehouse_id, grouping;
|
2015-08-25 09:16:13 +00:00
|
|
|
<sql-batch property="batch" id="lots-batch"/>
|
2015-03-09 08:36:54 +00:00
|
|
|
</db-model>
|
2015-10-08 08:15:14 +00:00
|
|
|
<db-form id="basket" on-ready="onBasketReady">
|
|
|
|
<db-model>
|
|
|
|
SELECT o.id, o.date_send, ag.description agency, v.code method
|
|
|
|
FROM basket o
|
|
|
|
JOIN vn2008.Agencias ag ON ag.Id_Agencia = o.agency_id
|
|
|
|
JOIN vn2008.Vistas v ON v.vista_id = o.delivery_method_id
|
|
|
|
</db-model>
|
|
|
|
</db-form>
|
2015-03-06 23:33:54 +00:00
|
|
|
</vn-group>
|
|
|
|
<div id="form" class="catalog">
|
|
|
|
<div class="center">
|
|
|
|
<div class="main">
|
|
|
|
<div class="box">
|
|
|
|
<div id="header" class="header">
|
2015-03-27 19:10:49 +00:00
|
|
|
<button class="menu" on-click="onShowMenuClick">
|
2015-03-06 23:33:54 +00:00
|
|
|
<img src="image/dark/menu.svg" alt="_Menu"/>
|
|
|
|
</button>
|
|
|
|
<h1 id="title"><t>Catalog</t></h1>
|
2015-03-27 19:10:49 +00:00
|
|
|
<div class="action-bar">
|
2015-03-06 23:33:54 +00:00
|
|
|
<div class="search">
|
|
|
|
<img src="image/search.svg" alt="_Search" class="icon"/>
|
2015-03-27 19:10:49 +00:00
|
|
|
<input type="text" id="search-entry" on-change="onSearch"/>
|
2015-03-06 23:33:54 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-07-07 15:27:47 +00:00
|
|
|
<div class="clear"/>
|
2015-03-06 23:33:54 +00:00
|
|
|
</div>
|
2015-03-27 19:10:49 +00:00
|
|
|
<htk-grid empty-message="_SelectSubtype" id="items-grid" class="items" model="items-model">
|
2015-07-07 15:27:47 +00:00
|
|
|
<htk-column-image
|
|
|
|
title="*"
|
2015-08-27 14:04:34 +00:00
|
|
|
class="icon"
|
2015-07-07 15:27:47 +00:00
|
|
|
column="Foto"
|
|
|
|
directory="catalog"
|
|
|
|
subdir="200x200"
|
|
|
|
show-full="true"
|
2015-08-21 14:13:21 +00:00
|
|
|
full-dir="900x900"
|
2015-07-07 15:27:47 +00:00
|
|
|
editable="true"/>
|
2015-09-22 07:25:50 +00:00
|
|
|
<vn-column-item title="_Name" column="Article" renderer="nameRenderer"/>
|
2015-07-07 15:27:47 +00:00
|
|
|
<htk-column-text title="_Cat" renderer="featuresRender"/>
|
|
|
|
<htk-column-spin title="_Aval" column="available"/>
|
|
|
|
<htk-column-text
|
|
|
|
title="_Price"
|
|
|
|
column="price"
|
2015-08-17 18:02:14 +00:00
|
|
|
format="_from %.2d€"
|
|
|
|
class="price"/>
|
2015-07-07 15:27:47 +00:00
|
|
|
<htk-column-button
|
|
|
|
column="id"
|
|
|
|
image="image/add.svg"
|
|
|
|
tip="_AddToBasket"
|
|
|
|
on-clicked="onAddItemClick"/>
|
2015-03-06 23:33:54 +00:00
|
|
|
</htk-grid>
|
|
|
|
<p class="footer-message">
|
|
|
|
<t>IndicativePhotos</t>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-10-08 08:15:14 +00:00
|
|
|
<div id="menu" class="right-panel" on-click="onMenuClick">
|
|
|
|
<button class="basket" on-click="onBasketClick" title="Shopping basket">
|
2015-09-30 06:45:42 +00:00
|
|
|
<t>Basket</t>
|
2015-10-08 08:15:14 +00:00
|
|
|
</button><button class="configure" on-click="onConfigClick" title="_Configure shopping basket">
|
|
|
|
<t>Configure</t>
|
2015-03-06 23:33:54 +00:00
|
|
|
</button>
|
2015-10-08 08:15:14 +00:00
|
|
|
<div class="basket-info">
|
|
|
|
<p>
|
|
|
|
<htk-text form="basket" column="date_send" format="_%A, %e of %B"/>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<span id="method"/>
|
|
|
|
<htk-text form="basket" column="agency"/>
|
|
|
|
</p>
|
|
|
|
</div>
|
2015-07-23 15:58:48 +00:00
|
|
|
<htk-repeater
|
|
|
|
model="realms-model"
|
|
|
|
form-id="realm-form"
|
|
|
|
renderer="realmRenderer"
|
|
|
|
class="realms-box">
|
|
|
|
<db-model id="realms-model" on-status-changed="onTypeChange">
|
|
|
|
SELECT id, reino, color FROM vn2008.reinos
|
|
|
|
WHERE display != FALSE ORDER BY reino
|
|
|
|
</db-model>
|
|
|
|
<template>
|
|
|
|
<a id="link">
|
|
|
|
<img id="image"/>
|
|
|
|
</a>
|
|
|
|
</template>
|
|
|
|
</htk-repeater>
|
|
|
|
<htk-repeater
|
|
|
|
model="types-model"
|
|
|
|
form-id="type-form"
|
|
|
|
renderer="typeRenderer"
|
|
|
|
empty-message="_SelectFamily"
|
|
|
|
class="types-box">
|
|
|
|
<db-model id="types-model" on-status-changed="refreshTitle">
|
|
|
|
CALL type_list (#realm)
|
|
|
|
<sql-batch property="batch">
|
|
|
|
<item name="realm" param="realm"/>
|
|
|
|
</sql-batch>
|
|
|
|
</db-model>
|
|
|
|
<template>
|
|
|
|
<a id="link">
|
|
|
|
<htk-text form="type-form" column="Tipo"/>
|
|
|
|
</a>
|
|
|
|
</template>
|
|
|
|
</htk-repeater>
|
2015-03-06 23:33:54 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-07-10 12:30:08 +00:00
|
|
|
<div id="lots-popup" class="lots-popup">
|
|
|
|
<htk-grid class="lots-grid" model="item-lots" show-header="false">
|
|
|
|
<htk-column-spin title="_Price" column="price" unit="€" digits="2"/>
|
|
|
|
<htk-column-text title="_Pack" column="grouping" format="x%.0d"/>
|
|
|
|
<htk-column-button
|
|
|
|
column="id"
|
|
|
|
image="image/add.svg"
|
|
|
|
tip="_Add"
|
|
|
|
on-clicked="onAddLotClick"/>
|
|
|
|
</htk-grid>
|
|
|
|
<div class="amount">
|
|
|
|
<button on-click="onEraseClick" title="_Erase" class="erase">
|
|
|
|
<img
|
|
|
|
src="image/dark/delete.svg"
|
|
|
|
alt="_Erase"/>
|
|
|
|
</button>
|
|
|
|
<htk-text id="amount"/>
|
|
|
|
<button on-click="onConfirmClick" title="_Confirm" class="confirm">
|
|
|
|
<img
|
|
|
|
src="image/dark/ok.svg"
|
|
|
|
alt="_Confirm"/>
|
|
|
|
</button>
|
2015-08-25 09:16:13 +00:00
|
|
|
<div class="clear"/>
|
2015-07-10 12:30:08 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-06-30 12:06:19 +00:00
|
|
|
<!--
|
2015-03-27 19:10:49 +00:00
|
|
|
<htk-repeater id="grid-view" form-id="item">
|
2015-07-23 15:58:48 +00:00
|
|
|
<template>
|
2015-03-27 19:10:49 +00:00
|
|
|
<div class="item-box">
|
|
|
|
<div class="image">
|
|
|
|
<div>
|
2015-06-30 12:06:19 +00:00
|
|
|
<htk-image form="item" column="Foto" directory="catalog/200x200"/>
|
2015-03-27 19:10:49 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<h2>
|
|
|
|
<htk-text form="item" column="Article"/>
|
|
|
|
</h2>
|
|
|
|
<p>
|
|
|
|
<htk-text form="item" column="Medida"/> /
|
|
|
|
<htk-text form="item" column="Categoria"/> /
|
|
|
|
<htk-text form="item" column="Color"/> /
|
|
|
|
<htk-text form="item" column="Tallos"/> /
|
|
|
|
<htk-text form="item" column="Abreviatura"/>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<t>Available:</t>
|
|
|
|
<htk-text form="item" column="available"/>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<t>Price:</t>
|
|
|
|
<htk-text form="item" column="price" format="%.2d€"/>
|
|
|
|
</p>
|
|
|
|
<p class="amount-p">
|
|
|
|
<htk-entry id="stems" class="amount"/>
|
|
|
|
<htk-text form="item" column="grouping" format="x%.0d"/>
|
|
|
|
<htk-entry form="item" column="amount" class="amount"/>
|
|
|
|
</p>
|
|
|
|
<div class="clear"/>
|
|
|
|
</div>
|
2015-07-23 15:58:48 +00:00
|
|
|
</template>
|
2015-03-27 19:10:49 +00:00
|
|
|
</htk-repeater>
|
2015-06-30 12:06:19 +00:00
|
|
|
-->
|
2015-03-06 23:33:54 +00:00
|
|
|
</vn>
|