details:   https://code.openbravo.com/erp/devel/pi/rev/0428e715da1a
changeset: 21395:0428e715da1a
user:      Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> 
openbravo.com>
date:      Tue Oct 29 16:17:47 2013 +0530
summary:   Related to issue 24937: Amounts shown in incorrect columns in Add 
Payment

diffstat:

 
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html
 |  25 +++++++--
 1 files changed, 19 insertions(+), 6 deletions(-)

diffs (59 lines):

diff -r 1ead78d87f15 -r 0428e715da1a 
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html
--- 
a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html
      Mon Oct 28 18:23:15 2013 +0100
+++ 
b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html
      Tue Oct 29 16:17:47 2013 +0530
@@ -336,12 +336,25 @@
         cellGLItemDim.className = 'DataGrid_Body_Cell';
         cellCount++;
       }
-      if(cellCount < 4 && acctDim === (glAcctDimsDesc.length-1)) {
-          var newElements = glAcctDimsDescnext.slice(0, 
(glAcctDimsDesc.length)-(cellCount-1));
-          for(var addElement = 0; addElement < newElements.length; 
addElement++) {
+      if(cellCount <= 4 && acctDim === (glAcctDimsDesc.length-1)) {
+        var newElements;
+        if (glAcctDimsDesc.length > 4) {
+          newElements = glAcctDimsDescnext.slice(0, 1);
+          if(newElements.length > 0) {
+            glAcctDimsDesc.push(newElements[0]);
+            if((glAcctDimsDescnext.length)-1 === 0) {
+                glAcctDimsDescnext = [];
+            } else {
+              glAcctDimsDescnext = 
glAcctDimsDescnext.slice((glAcctDimsDescnext.length)-1);
+            }
+          }
+        } else {
+          newElements = glAcctDimsDescnext.slice(0, 
(glAcctDimsDesc.length)-(cellCount-1));
+          for(addElement = 0; addElement < newElements.length; addElement++) {
               glAcctDimsDesc.push(newElements[addElement]);
           }
           glAcctDimsDescnext = 
glAcctDimsDescnext.slice(((glAcctDimsDescnext.length)-(cellCount-1)));
+        }
       }
     }
     
@@ -761,7 +774,7 @@
   }
   if(cellCount > 4) {
       rowCount++;
-      cellCount = 1;
+      cellCount = 0;
   }
 
   if(lastCell < 0) {
@@ -781,7 +794,7 @@
   }
   if(cellCount > 4) {
       rowCount++;
-      cellCount = 1;
+      cellCount = 0;
   }
 
   if(lastCell < 0) {
@@ -801,7 +814,7 @@
   }
   if(cellCount > 4) {
       rowCount++;
-      cellCount = 1;
+      cellCount = 0;
   }
 
   if(lastCell < 0) {

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to