forked from verdnatura/hedera-web
Estanterias ahora muestra fin e inicio en cada hoja, y la etiqueta de las cajas mas grande
This commit is contained in:
parent
5181d78b18
commit
7390f21a92
|
@ -1,4 +1,4 @@
|
|||
hedera-web (1.241-deb8) stable; urgency=low
|
||||
hedera-web (1.243-deb8) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ Vn.ShelvesReport = new Class
|
|||
Extends: Vn.Report
|
||||
|
||||
,nItem: -1
|
||||
,nColors: 6
|
||||
,nColors: 5
|
||||
|
||||
,setParams: function (title, maxAmount, showPacking, stack, batch)
|
||||
{
|
||||
|
@ -108,6 +108,8 @@ Vn.ShelvesReport = new Class
|
|||
return;
|
||||
}
|
||||
|
||||
var boxScale = scale * 10;
|
||||
|
||||
while (res.next ())
|
||||
if (!this.maxAmount || res.get ('etiquetas') <= this.maxAmount)
|
||||
{
|
||||
|
@ -115,10 +117,10 @@ Vn.ShelvesReport = new Class
|
|||
id: res.get ('Id_Article')
|
||||
,name: res.get ('Article')
|
||||
,packing: res.get ('packing')
|
||||
,boxHeight: res.get ('z') * 10 * scale
|
||||
,boxWidth: res.get ('x') * 10 * scale
|
||||
,boxDepth: res.get ('y') * 10 * scale
|
||||
,amount: res.get ('etiquetas')
|
||||
,boxHeight: res.get ('z') * boxScale
|
||||
,boxWidth: res.get ('x') * boxScale
|
||||
,boxDepth: res.get ('y') * boxScale
|
||||
});
|
||||
}
|
||||
else
|
||||
|
@ -202,6 +204,7 @@ Vn.ShelvesReport = new Class
|
|||
// Draws the shelves
|
||||
|
||||
alloc.run ();
|
||||
this.drawShelfEnding ();
|
||||
}
|
||||
|
||||
,drawShelf: function (allocator, item)
|
||||
|
@ -228,18 +231,18 @@ Vn.ShelvesReport = new Class
|
|||
subtitle.className = 'subtitle';
|
||||
subtitle.appendChild (this.doc.createTextNode (item.id.toLocaleString ()));
|
||||
sheet.appendChild (subtitle);
|
||||
|
||||
this.drawShelfEnding ();
|
||||
this.lastSubtitle = subtitle;
|
||||
|
||||
// Draws the shelf
|
||||
|
||||
var shelfDiv = this.shelfDiv = this.doc.createElement ('div');
|
||||
shelfDiv.className = 'shelf';
|
||||
shelfDiv.style.width = shelf.width +'mm';
|
||||
shelfDiv.style.height = shelf.maxHeight +'mm';
|
||||
shelfDiv.style.width = this.mm (shelf.width);
|
||||
shelfDiv.style.height = this.mm (shelf.maxHeight);
|
||||
sheet.appendChild (shelfDiv);
|
||||
|
||||
// this.drawEdge ().style.left = 0;
|
||||
// this.drawEdge ().style.right = 0;
|
||||
|
||||
// Draws trays
|
||||
|
||||
var lastTrayY = shelf.firstTrayElevation;
|
||||
|
@ -249,25 +252,27 @@ Vn.ShelvesReport = new Class
|
|||
{
|
||||
var tray = this.doc.createElement ('div');
|
||||
tray.className = 'tray';
|
||||
tray.style.width = shelf.width +'mm';
|
||||
tray.style.height = shelf.trayDensity +'mm';
|
||||
tray.style.bottom = lastTrayY +'mm';
|
||||
tray.style.width = this.mm (shelf.width);
|
||||
tray.style.height = this.mm (shelf.trayDensity);
|
||||
tray.style.bottom = this.mm (lastTrayY);
|
||||
shelfDiv.appendChild (tray);
|
||||
|
||||
lastTrayY += shelf.trayHeight + shelf.trayDensity;
|
||||
}
|
||||
}
|
||||
/*
|
||||
,drawEdge: function (shelfDiv)
|
||||
|
||||
,drawShelfEnding: function ()
|
||||
{
|
||||
var edge = this.doc.createElement ('div');
|
||||
edge.className = 'edge';
|
||||
edge.style.height = this.shelf.height +'mm';
|
||||
edge.style.bottom = 0;
|
||||
this.shelfDiv.appendChild (edge);
|
||||
return edge;
|
||||
if (this.lastSubtitle)
|
||||
this.lastSubtitle.appendChild (
|
||||
this.doc.createTextNode (' - '+ this.lastItem.id.toLocaleString ()));
|
||||
}
|
||||
*/
|
||||
|
||||
,mm: function (size)
|
||||
{
|
||||
return size.toFixed (2) +'mm';
|
||||
}
|
||||
|
||||
,drawBox: function (allocator, item, amount)
|
||||
{
|
||||
if (item.boxWidth == 0 || item.boxHeight == 0)
|
||||
|
@ -284,10 +289,10 @@ Vn.ShelvesReport = new Class
|
|||
box.className = 'box';
|
||||
this.shelfDiv.appendChild (box);
|
||||
|
||||
box.style.left = x +'mm';
|
||||
box.style.bottom = y +'mm';
|
||||
box.style.width = item.boxWidth +'mm';
|
||||
box.style.height = item.boxHeight +'mm';
|
||||
box.style.left = this.mm (x);
|
||||
box.style.bottom = this.mm (y);
|
||||
box.style.width = this.mm (item.boxWidth);
|
||||
box.style.height = this.mm (item.boxHeight);
|
||||
|
||||
if (amount == 0)
|
||||
this.nItem++;
|
||||
|
@ -297,20 +302,19 @@ Vn.ShelvesReport = new Class
|
|||
|
||||
if (amount == 0 || allocator.firstShelfBox)
|
||||
{
|
||||
var fontSize = item.boxWidth / 5.2;
|
||||
|
||||
if (fontSize > item.boxHeight - 1)
|
||||
fontSize = item.boxHeight - 1;
|
||||
|
||||
var boxLabel = this.doc.createElement ('div');
|
||||
boxLabel.className = 'box-label';
|
||||
|
||||
/* if (this.showPacking)
|
||||
{
|
||||
var packing = this.doc.createElement ('span');
|
||||
packing.className = 'packing';
|
||||
packing.appendChild (this.doc.createTextNode (item.packing));
|
||||
boxLabel.appendChild (packing);
|
||||
}
|
||||
*/
|
||||
boxLabel.appendChild (this.doc.createTextNode (item.id.toLocaleString () /* item.name */));
|
||||
boxLabel.style.fontSize = this.mm (fontSize);
|
||||
boxLabel.appendChild (this.doc.createTextNode (item.id.toLocaleString ()));
|
||||
box.appendChild (boxLabel);
|
||||
}
|
||||
|
||||
this.lastItem = item;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ Vn.Locale.add
|
|||
|
||||
,"Print": "Imprimir"
|
||||
,"Please unlock popups and try again":
|
||||
"Por favor, desploquea los popups y vuelvelo a intentar"
|
||||
"Por favor, desploquea los popups y vuélvelo a intentar"
|
||||
|
||||
,"Menu": "Menú"
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
h1
|
||||
{
|
||||
font-weight: normal;
|
||||
font-size: 600%;
|
||||
font-size: 500%;
|
||||
margin: 0;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
|
@ -13,7 +13,7 @@ h1
|
|||
h2.subtitle
|
||||
{
|
||||
margin: 0;
|
||||
font-size: 500%;
|
||||
font-size: 400%;
|
||||
font-weight: normal;
|
||||
color: #333;
|
||||
}
|
||||
|
@ -53,15 +53,8 @@ h1.page-number
|
|||
font-size: 55%;
|
||||
word-wrap: break-word;
|
||||
box-sizing: border-box;
|
||||
padding: 3%;
|
||||
padding: 0 4%;
|
||||
}
|
||||
/*.box .packing
|
||||
{
|
||||
margin-left: 3%;
|
||||
display: block;
|
||||
float: right;
|
||||
font-size: 140%;
|
||||
}*/
|
||||
.color0
|
||||
{
|
||||
background-color: #FDD !important;
|
||||
|
@ -79,10 +72,6 @@ h1.page-number
|
|||
background-color: #DFF !important;
|
||||
}
|
||||
.color4
|
||||
{
|
||||
background-color: #FDF !important;
|
||||
}
|
||||
.color5
|
||||
{
|
||||
background-color: #FFD !important;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue