Browse Source

Correct behavior when using items on date of purchase

Neal Wilson 11 years ago
parent
commit
93b4008499
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      config/Reports/dailyproductiondetail.xml

+ 3
- 3
config/Reports/dailyproductiondetail.xml View File

319
 				{
319
 				{
320
 					output.writeStartElement("tr");
320
 					output.writeStartElement("tr");
321
 					output.writeTextElement("td", query.value(1));
321
 					output.writeTextElement("td", query.value(1));
322
-					qq = "SELECT balance FROM item_history(" + query.value(0) + ") WHERE time = (SELECT max(time) FROM all_transactions WHERE time < '" + dateString + "' AND item = " + query.value(0) + ") OR time = (SELECT max(time) FROM all_transactions WHERE time < '" + dateString + "'::date + integer '1' AND item = " + query.value(0) + ") ORDER BY time ASC";
322
+					qq = "SELECT balance FROM item_history(" + query.value(0) + ") WHERE time = (SELECT max(time) FROM all_transactions WHERE time <= '" + dateString + "' AND item = " + query.value(0) + ") OR time = (SELECT max(time) FROM all_transactions WHERE time < '" + dateString + "'::date + integer '1' AND item = " + query.value(0) + ") ORDER BY time ASC";
323
 					subQuery.exec(qq);
323
 					subQuery.exec(qq);
324
-					var startValue = 0;
325
-					var endValue = 0;
324
+					var startValue = "0.0";
325
+					var endValue = "0.0";
326
 					if(subQuery.next())
326
 					if(subQuery.next())
327
 					{
327
 					{
328
 						switch(unitBox.currentIndex)
328
 						switch(unitBox.currentIndex)

Loading…
Cancel
Save