0
1
Fork 0

Estanterias ahora muestra fin e inicio en cada hoja, y la etiqueta de las cajas mas grande

This commit is contained in:
Juan Ferrer Toribio 2015-10-29 12:30:03 +01:00
parent 5181d78b18
commit 7390f21a92
4 changed files with 44 additions and 51 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.241-deb8) stable; urgency=low hedera-web (1.243-deb8) stable; urgency=low
* Initial Release. * Initial Release.

View File

@ -48,7 +48,7 @@ Vn.ShelvesReport = new Class
Extends: Vn.Report Extends: Vn.Report
,nItem: -1 ,nItem: -1
,nColors: 6 ,nColors: 5
,setParams: function (title, maxAmount, showPacking, stack, batch) ,setParams: function (title, maxAmount, showPacking, stack, batch)
{ {
@ -108,6 +108,8 @@ Vn.ShelvesReport = new Class
return; return;
} }
var boxScale = scale * 10;
while (res.next ()) while (res.next ())
if (!this.maxAmount || res.get ('etiquetas') <= this.maxAmount) if (!this.maxAmount || res.get ('etiquetas') <= this.maxAmount)
{ {
@ -115,10 +117,10 @@ Vn.ShelvesReport = new Class
id: res.get ('Id_Article') id: res.get ('Id_Article')
,name: res.get ('Article') ,name: res.get ('Article')
,packing: res.get ('packing') ,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') ,amount: res.get ('etiquetas')
,boxHeight: res.get ('z') * boxScale
,boxWidth: res.get ('x') * boxScale
,boxDepth: res.get ('y') * boxScale
}); });
} }
else else
@ -202,6 +204,7 @@ Vn.ShelvesReport = new Class
// Draws the shelves // Draws the shelves
alloc.run (); alloc.run ();
this.drawShelfEnding ();
} }
,drawShelf: function (allocator, item) ,drawShelf: function (allocator, item)
@ -228,18 +231,18 @@ Vn.ShelvesReport = new Class
subtitle.className = 'subtitle'; subtitle.className = 'subtitle';
subtitle.appendChild (this.doc.createTextNode (item.id.toLocaleString ())); subtitle.appendChild (this.doc.createTextNode (item.id.toLocaleString ()));
sheet.appendChild (subtitle); sheet.appendChild (subtitle);
this.drawShelfEnding ();
this.lastSubtitle = subtitle;
// Draws the shelf // Draws the shelf
var shelfDiv = this.shelfDiv = this.doc.createElement ('div'); var shelfDiv = this.shelfDiv = this.doc.createElement ('div');
shelfDiv.className = 'shelf'; shelfDiv.className = 'shelf';
shelfDiv.style.width = shelf.width +'mm'; shelfDiv.style.width = this.mm (shelf.width);
shelfDiv.style.height = shelf.maxHeight +'mm'; shelfDiv.style.height = this.mm (shelf.maxHeight);
sheet.appendChild (shelfDiv); sheet.appendChild (shelfDiv);
// this.drawEdge ().style.left = 0;
// this.drawEdge ().style.right = 0;
// Draws trays // Draws trays
var lastTrayY = shelf.firstTrayElevation; var lastTrayY = shelf.firstTrayElevation;
@ -249,25 +252,27 @@ Vn.ShelvesReport = new Class
{ {
var tray = this.doc.createElement ('div'); var tray = this.doc.createElement ('div');
tray.className = 'tray'; tray.className = 'tray';
tray.style.width = shelf.width +'mm'; tray.style.width = this.mm (shelf.width);
tray.style.height = shelf.trayDensity +'mm'; tray.style.height = this.mm (shelf.trayDensity);
tray.style.bottom = lastTrayY +'mm'; tray.style.bottom = this.mm (lastTrayY);
shelfDiv.appendChild (tray); shelfDiv.appendChild (tray);
lastTrayY += shelf.trayHeight + shelf.trayDensity; lastTrayY += shelf.trayHeight + shelf.trayDensity;
} }
} }
/*
,drawEdge: function (shelfDiv) ,drawShelfEnding: function ()
{ {
var edge = this.doc.createElement ('div'); if (this.lastSubtitle)
edge.className = 'edge'; this.lastSubtitle.appendChild (
edge.style.height = this.shelf.height +'mm'; this.doc.createTextNode (' - '+ this.lastItem.id.toLocaleString ()));
edge.style.bottom = 0;
this.shelfDiv.appendChild (edge);
return edge;
} }
*/
,mm: function (size)
{
return size.toFixed (2) +'mm';
}
,drawBox: function (allocator, item, amount) ,drawBox: function (allocator, item, amount)
{ {
if (item.boxWidth == 0 || item.boxHeight == 0) if (item.boxWidth == 0 || item.boxHeight == 0)
@ -284,10 +289,10 @@ Vn.ShelvesReport = new Class
box.className = 'box'; box.className = 'box';
this.shelfDiv.appendChild (box); this.shelfDiv.appendChild (box);
box.style.left = x +'mm'; box.style.left = this.mm (x);
box.style.bottom = y +'mm'; box.style.bottom = this.mm (y);
box.style.width = item.boxWidth +'mm'; box.style.width = this.mm (item.boxWidth);
box.style.height = item.boxHeight +'mm'; box.style.height = this.mm (item.boxHeight);
if (amount == 0) if (amount == 0)
this.nItem++; this.nItem++;
@ -297,20 +302,19 @@ Vn.ShelvesReport = new Class
if (amount == 0 || allocator.firstShelfBox) 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'); var boxLabel = this.doc.createElement ('div');
boxLabel.className = 'box-label'; boxLabel.className = 'box-label';
boxLabel.style.fontSize = this.mm (fontSize);
/* if (this.showPacking) boxLabel.appendChild (this.doc.createTextNode (item.id.toLocaleString ()));
{
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 */));
box.appendChild (boxLabel); box.appendChild (boxLabel);
} }
this.lastItem = item;
} }
}); });

View File

@ -59,7 +59,7 @@ Vn.Locale.add
,"Print": "Imprimir" ,"Print": "Imprimir"
,"Please unlock popups and try again": ,"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ú" ,"Menu": "Menú"

View File

@ -4,7 +4,7 @@
h1 h1
{ {
font-weight: normal; font-weight: normal;
font-size: 600%; font-size: 500%;
margin: 0; margin: 0;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
@ -13,7 +13,7 @@ h1
h2.subtitle h2.subtitle
{ {
margin: 0; margin: 0;
font-size: 500%; font-size: 400%;
font-weight: normal; font-weight: normal;
color: #333; color: #333;
} }
@ -53,15 +53,8 @@ h1.page-number
font-size: 55%; font-size: 55%;
word-wrap: break-word; word-wrap: break-word;
box-sizing: border-box; box-sizing: border-box;
padding: 3%; padding: 0 4%;
} }
/*.box .packing
{
margin-left: 3%;
display: block;
float: right;
font-size: 140%;
}*/
.color0 .color0
{ {
background-color: #FDD !important; background-color: #FDD !important;
@ -79,10 +72,6 @@ h1.page-number
background-color: #DFF !important; background-color: #DFF !important;
} }
.color4 .color4
{
background-color: #FDF !important;
}
.color5
{ {
background-color: #FFD !important; background-color: #FFD !important;
} }