Informe estanterias modificado

This commit is contained in:
Juan Ferrer Toribio 2015-10-22 17:51:35 +02:00
parent d4c21e866c
commit 6886f436a9
3 changed files with 22 additions and 19 deletions

2
debian/changelog vendored
View File

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

View File

@ -17,15 +17,18 @@ Vn.Shelves = new Class
,onPreviewClick: function ()
{
var batch = new Sql.Batch ();
batch.addParam ('shelf', this.$('shelf'));
batch.addParam ('wh', this.$('warehouse'));
batch.addParam ('date', this.$('date'));
batch.addParam ('family', this.$('family'));
batch.addValue ('filter', this.$('filter').value);
var report = new Vn.ShelvesReport ({conn: this.conn});
report.setParams (
this.$('report-title').value,
this.$('warehouse').value,
this.$('date').value,
this.$('family').value,
this.$('filter').value,
this.$('max-amount').value,
this.$('shelf').value
batch
);
report.open ();
}
@ -38,17 +41,10 @@ Vn.ShelvesReport = new Class
,nItem: -1
,nColors: 4
,setParams: function (title, warehouse, date, type, filter, maxAmount, shelf)
,setParams: function (title, maxAmount, batch)
{
this.title = title;
this.maxAmount = maxAmount;
var batch = new Sql.Batch ();
batch.addValue ('shelf', shelf);
batch.addValue ('wh', warehouse);
batch.addValue ('date', date);
batch.addValue ('type', type);
batch.addValue ('filter', filter);
this.batch = batch;
}
@ -58,7 +54,7 @@ Vn.ShelvesReport = new Class
'SELECT id, name, width, height, max_height, tray_height, '+
'first_tray_elevation, tray_density, vspacing, hspacing '+
'FROM vn2008.shelf WHERE id = #shelf; '+
'CALL item_organizer (#wh, #date, #type, #filter)';
'CALL item_organizer (#wh, #date, #family, #filter)';
this.conn.execQuery (query, this.onQueryExec.bind (this), this.batch);
}
@ -146,12 +142,13 @@ Vn.ShelvesReport = new Class
ul.appendChild (li);
var span = this.doc.createElement ('span');
span.className = 'amount';
span.appendChild (this.doc.createTextNode (remainings[i].amount));
span.className = 'item';
span.appendChild (this.doc.createTextNode (remainings[i].name));
li.appendChild (span);
var span = this.doc.createElement ('span');
span.appendChild (this.doc.createTextNode (' '+ remainings[i].name));
span.className = 'amount';
span.appendChild (this.doc.createTextNode (remainings[i].amount));
li.appendChild (span);
}
}

View File

@ -70,12 +70,18 @@ ul
li *
{
font-size: 6mm;
line-height: 12mm;
}
.item
{
display: inline-block;
width: 100mm;
}
.amount
{
color: #666;
width: 10mm;
text-align: right;
display: inline-block;
padding-right: 1mm;
}