modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html
author Harpreet Singh <harpreet@openbravo.com>
Fri, 10 Dec 2010 19:47:45 +0100
changeset 9076 c4f1a5c7d7c2
child 10028 96d3e090f851
permissions -rw-r--r--
Added 3.0 modules to modules dir and changed the VERSION number
harpreet@9076
     1
<?xml version="1.0" encoding="UTF-8" ?>
harpreet@9076
     2
<!--
harpreet@9076
     3
 *************************************************************************
harpreet@9076
     4
 * The contents of this file are subject to the Openbravo  Public  License
harpreet@9076
     5
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
harpreet@9076
     6
 * Version 1.1  with a permitted attribution clause; you may not  use this
harpreet@9076
     7
 * file except in compliance with the License. You  may  obtain  a copy of
harpreet@9076
     8
 * the License at http://www.openbravo.com/legal/license.html
harpreet@9076
     9
 * Software distributed under the License  is  distributed  on  an "AS IS"
harpreet@9076
    10
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
harpreet@9076
    11
 * License for the specific  language  governing  rights  and  limitations
harpreet@9076
    12
 * under the License.
harpreet@9076
    13
 * The Original Code is Openbravo ERP.
harpreet@9076
    14
 * The Initial Developer of the Original Code is Openbravo SLU
harpreet@9076
    15
 * All portions are Copyright (C) 2010 Openbravo SLU
harpreet@9076
    16
 * All Rights Reserved.
harpreet@9076
    17
 * Contributor(s):  ______________________________________.
harpreet@9076
    18
 *************************************************************************
harpreet@9076
    19
-->
harpreet@9076
    20
<html>
harpreet@9076
    21
<head>
harpreet@9076
    22
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
harpreet@9076
    23
<title>Add Payment</title>
harpreet@9076
    24
<link rel="shortcut icon" href="../../../../../web/images/favicon.ico" type="image/x-icon" />
harpreet@9076
    25
<link rel="stylesheet" type="text/css" href="../../../../../web/skins/Default/Openbravo_ERP_250.css" id="paramCSS"></link>
harpreet@9076
    26
harpreet@9076
    27
<script language="JavaScript" type="text/javascript" id="paramDirectory">
harpreet@9076
    28
  var baseDirectory = "../../../../../web/";
harpreet@9076
    29
</script>
harpreet@9076
    30
<script language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript"></script>
harpreet@9076
    31
<script language="JavaScript" src="../utility/DynamicJS.js" type="text/javascript"></script>
harpreet@9076
    32
<script language="JavaScript" type="text/javascript" id="paramLanguage">
harpreet@9076
    33
  var defaultLang = "en_US";
harpreet@9076
    34
</script>
harpreet@9076
    35
<script language="JavaScript" src="../../../../../web/js/shortcuts.js" type="text/javascript"></script>
harpreet@9076
    36
<script language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></script>
harpreet@9076
    37
<script language="JavaScript" src="../../../../../web/js/windowKeyboard.js" type="text/javascript"></script>
harpreet@9076
    38
<script language="JavaScript" src="../../../../../web/js/searchs.js" type="text/javascript"></script>
harpreet@9076
    39
<script language="JavaScript" src="../../../../../web/js/ajax.js" type="text/javascript"></script>
harpreet@9076
    40
<script language="JavaScript" src="../../../../../web/js/default/MessageBox.js" type="text/javascript"></script>
harpreet@9076
    41
<script language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript"></script>
harpreet@9076
    42
<script language="JavaScript" src="../utility/DynamicJS.js" type="text/javascript"></script>
harpreet@9076
    43
<script language="JavaScript" src="../../../../../web/org.openbravo.userinterface.selector/js/classic-skin-variable.js" type="text/javascript"></script>
harpreet@9076
    44
<script language="JavaScript" src="../../../../../web/../org.openbravo.client.kernel/OBCLKER_Kernel/StaticResources" type="text/javascript"></script>
harpreet@9076
    45
<script language="JavaScript" src="../../../../../web/js/calculator.js" type="text/javascript"></script>
harpreet@9076
    46
<script language="JavaScript" src="../../../../../web/js/jscalendar/calendar.js" type="text/javascript"></script>
harpreet@9076
    47
<script language="JavaScript" src="../../../../../web/js/jscalendar/lang/calendar-es.js" type="text/javascript" id="fieldCalendar"></script>
harpreet@9076
    48
<script language="JavaScript" src="../../../../../web/js/default/DateTextBox.js" type="text/javascript"></script>
harpreet@9076
    49
<script language="JavaScript" src="../../../../../web/js/dojoConfig.js" type="text/javascript"></script>
harpreet@9076
    50
<script language="JavaScript" src="../../../../../web/js/dojo/dojo.js" type="text/javascript"></script>
harpreet@9076
    51
<script language="JavaScript" src="../../../../../web/org.openbravo.advpaymentmngt/FIN_Utilities.js" type="text/javascript"></script>
harpreet@9076
    52
<script type="text/javascript">
harpreet@9076
    53
  window.onunload = reloadOpener; // reloads opener on closing
harpreet@9076
    54
</script>
harpreet@9076
    55
harpreet@9076
    56
<script language="JavaScript" type="text/javascript">
harpreet@9076
    57
function validate(action) {
harpreet@9076
    58
  var frm = document.frmMain;
harpreet@9076
    59
  if (action=='openprocess') {
harpreet@9076
    60
    if (frm.inpActualPayment.value==null || frm.inpActualPayment.value=="") {
harpreet@9076
    61
      setWindowElementFocus(frm.inpActualPayment);
harpreet@9076
    62
      showJSMessage(7);
harpreet@9076
    63
      return false;
harpreet@9076
    64
    } else if (isTrue('isGLItem')) {
harpreet@9076
    65
      //Do nothing on case of GL Item.
harpreet@9076
    66
    } else {
harpreet@9076
    67
      var allowCreditGeneration = true;
harpreet@9076
    68
      if (!validateSelectedPendingPayments(allowCreditGeneration)) return false;
harpreet@9076
    69
    }
harpreet@9076
    70
  }
harpreet@9076
    71
  return true;
harpreet@9076
    72
}
harpreet@9076
    73
</script>
harpreet@9076
    74
<script language="JavaScript" type="text/javascript">
harpreet@9076
    75
function closeThisPage() {
harpreet@9076
    76
  removeAllGLItem();
harpreet@9076
    77
  parent.window.close();
harpreet@9076
    78
  return true;
harpreet@9076
    79
}
harpreet@9076
    80
function submitThisPage(strCommand) {
harpreet@9076
    81
  if (validate(strCommand)) {
harpreet@9076
    82
    if (isTrue('isGLItem')) {
harpreet@9076
    83
      var temp = document.getElementById('sectionGrid');
harpreet@9076
    84
      temp.parentNode.removeChild(temp);
harpreet@9076
    85
    } else
harpreet@9076
    86
      removeAllGLItem();
harpreet@9076
    87
    submitCommandForm(strCommand, false, null, null, '_top');
harpreet@9076
    88
    return true;
harpreet@9076
    89
  }
harpreet@9076
    90
  return true;
harpreet@9076
    91
}
harpreet@9076
    92
function openProcessPayment() {
harpreet@9076
    93
  if (validate('openprocess')) {
harpreet@9076
    94
    document.getElementById('client_top_popup').style.display = 'block';
harpreet@9076
    95
    document.getElementById('client_top').style.display = 'none';
harpreet@9076
    96
    document.getElementById('client_middle').style.display = 'none';
harpreet@9076
    97
    document.getElementById('client_bottom').style.display = 'none';
harpreet@9076
    98
  }
harpreet@9076
    99
}
harpreet@9076
   100
function closeProcessPayment() {
harpreet@9076
   101
  document.getElementById('client_top_popup').style.display = 'none';
harpreet@9076
   102
  document.getElementById('client_top').style.display = 'block';
harpreet@9076
   103
  document.getElementById('client_middle').style.display = 'block';
harpreet@9076
   104
  document.getElementById('client_bottom').style.display = 'block';
harpreet@9076
   105
  setGLItemMode(isTrue('isGLItem'));
harpreet@9076
   106
}
harpreet@9076
   107
harpreet@9076
   108
function setGLItemMode(toGLItem){
harpreet@9076
   109
  if (isTrue('isReceipt')) {
harpreet@9076
   110
    if (toGLItem){
harpreet@9076
   111
      document.getElementById('paramActualPayment').className.replace(' readonly', '');
harpreet@9076
   112
      document.getElementById('paramActualPayment').readOnly = true;
harpreet@9076
   113
      var classText = document.getElementById('paramActualPayment').className;
harpreet@9076
   114
      document.getElementById('paramActualPayment').className = classText.concat(" readonly");
harpreet@9076
   115
      displayLogicElement('NoPackageslinkCalc', false);
harpreet@9076
   116
    } else {
harpreet@9076
   117
      var classTextReadOnly = document.getElementById('paramActualPayment').className.replace(' readonly', '');
harpreet@9076
   118
      document.getElementById('paramActualPayment').className = classTextReadOnly;
harpreet@9076
   119
      document.getElementById('paramActualPayment').readOnly = false;
harpreet@9076
   120
      displayLogicElement('NoPackageslinkCalc', true);
harpreet@9076
   121
    }
harpreet@9076
   122
  }
harpreet@9076
   123
harpreet@9076
   124
  displayLogicElement('glitemBlank', toGLItem);
harpreet@9076
   125
  displayLogicElement('glitemBlank', toGLItem);
harpreet@9076
   126
  displayLogicElement('glitemRow', toGLItem);
harpreet@9076
   127
  displayLogicElement('glitemAddRow', toGLItem);
harpreet@9076
   128
  displayLogicElement('DueDateFromLbl', !toGLItem);
harpreet@9076
   129
  displayLogicElement('DueDateFrom', !toGLItem);
harpreet@9076
   130
  displayLogicElement('DueDateToLbl', !toGLItem);
harpreet@9076
   131
  displayLogicElement('DueDateTo', !toGLItem);
harpreet@9076
   132
  displayLogicElement('gridPayment', !toGLItem);
harpreet@9076
   133
  displayLogicElement('gridGLItem', toGLItem);
harpreet@9076
   134
  displayLogicElement('inpAlternativeLabel', !toGLItem);
harpreet@9076
   135
  displayLogicElement('inpAlternativeChkBox', !toGLItem);
harpreet@9076
   136
harpreet@9076
   137
  resizeAreaInfo();
harpreet@9076
   138
harpreet@9076
   139
  if (toGLItem)
harpreet@9076
   140
    loadGLItemList();
harpreet@9076
   141
harpreet@9076
   142
  return true;
harpreet@9076
   143
}
harpreet@9076
   144
harpreet@9076
   145
function updateData(key, mark) {
harpreet@9076
   146
  if (mark==null) mark=false;
harpreet@9076
   147
  updateReadOnly(key, mark);
harpreet@9076
   148
  var paymentAmount = document.frmMain.elements['inpPaymentAmount'+key];
harpreet@9076
   149
  if (!isTrue('isReceipt')){
harpreet@9076
   150
    if (mark && paymentAmount.value=='') {
harpreet@9076
   151
      paymentAmount.value=document.frmMain.elements['inpRecordAmt'+key].value;
harpreet@9076
   152
    }
harpreet@9076
   153
  }
harpreet@9076
   154
  updateTotal();
harpreet@9076
   155
harpreet@9076
   156
  return true;
harpreet@9076
   157
}
harpreet@9076
   158
harpreet@9076
   159
function validateDate(element){
harpreet@9076
   160
  if(isValidDate(element.value, element.getAttribute("displayformat")))
harpreet@9076
   161
    loadGridList();
harpreet@9076
   162
}
harpreet@9076
   163
harpreet@9076
   164
function paymentAmountOnChange(element){
harpreet@9076
   165
  updateTotal();
harpreet@9076
   166
  numberInputEvent('onchange', element);
harpreet@9076
   167
}
harpreet@9076
   168
harpreet@9076
   169
function documentTypeOnChange(value){
harpreet@9076
   170
  if ("G" == value){
harpreet@9076
   171
    if (!isTrue('isGLItem')) {
harpreet@9076
   172
      document.frmMain.isGLItem.value="Y";
harpreet@9076
   173
      setGLItemMode(true);
harpreet@9076
   174
      document.frmMain.inpHeaderAmount.value = document.frmMain.inpActualPayment.value;
harpreet@9076
   175
      var amount = document.frmMain.inpGLSumAmount.value;
harpreet@9076
   176
      if (document.frmMain.inpUseCredit.checked) {
harpreet@9076
   177
        amount = subtract(amount, document.frmMain.inpCredit.value);
harpreet@9076
   178
        if ( compare(amount, '<', "0") )
harpreet@9076
   179
          amount = 0;
harpreet@9076
   180
      }
harpreet@9076
   181
      document.frmMain.inpActualPayment.value = amount;
harpreet@9076
   182
    }
harpreet@9076
   183
  } else {
harpreet@9076
   184
    document.frmMain.inpActualPayment.value=document.frmMain.inpHeaderAmount.value;
harpreet@9076
   185
    document.frmMain.isFirstLoad.value = "true";
harpreet@9076
   186
    loadGridList();
harpreet@9076
   187
    if (isTrue('isGLItem')) {
harpreet@9076
   188
      document.frmMain.isGLItem.value="N";
harpreet@9076
   189
      setGLItemMode(false);
harpreet@9076
   190
      updateTotal();
harpreet@9076
   191
    }
harpreet@9076
   192
  }
harpreet@9076
   193
}
harpreet@9076
   194
harpreet@9076
   195
function useCreditOnChange(){
harpreet@9076
   196
  actualPaymentOnChange();
harpreet@9076
   197
  updateTotal();
harpreet@9076
   198
}
harpreet@9076
   199
harpreet@9076
   200
function actualPaymentOnChange(){
harpreet@9076
   201
  if (isTrue('isReceipt') && !isTrue('isGLItem')) {
harpreet@9076
   202
    var amount = document.frmMain.inpActualPayment.value;
harpreet@9076
   203
    if (document.frmMain.inpUseCredit.checked)
harpreet@9076
   204
      amount = add(amount, document.frmMain.inpCredit.value);
harpreet@9076
   205
    distributeAmount(amount);
harpreet@9076
   206
  } if (isTrue('isGLItem')) {
harpreet@9076
   207
    var amount = document.frmMain.inpGLSumAmount.value;
harpreet@9076
   208
    if (document.frmMain.inpUseCredit.checked) {
harpreet@9076
   209
      amount = subtract(amount, document.frmMain.inpCredit.value);
harpreet@9076
   210
      if ( compare(amount, '<', "0") )
harpreet@9076
   211
        amount = 0;
harpreet@9076
   212
    }
harpreet@9076
   213
    document.frmMain.inpActualPayment.value=amount;
harpreet@9076
   214
  }
harpreet@9076
   215
}
harpreet@9076
   216
</script>
harpreet@9076
   217
<script language="JavaScript" type="text/javascript">
harpreet@9076
   218
  function addGLItem() {
harpreet@9076
   219
    if (frm.inpGLItemAmount.value==null || frm.inpGLItemAmount.value=="") {
harpreet@9076
   220
      setWindowElementFocus(frm.inpGLItemAmount);
harpreet@9076
   221
      showJSMessage(7);
harpreet@9076
   222
      return false;
harpreet@9076
   223
    } else if (frm.inpcGlitemId.value==null || frm.inpcGlitemId.value=="") {
harpreet@9076
   224
      setWindowElementFocus(frm.inpcGlitemId);
harpreet@9076
   225
      showJSMessage(7);
harpreet@9076
   226
      return false;
harpreet@9076
   227
    }
harpreet@9076
   228
harpreet@9076
   229
    try {
harpreet@9076
   230
      var url = "../org.openbravo.advpaymentmngt.ad_actionbutton/AddOrderOrInvoice.html";
harpreet@9076
   231
      var paramXMLReq = null;
harpreet@9076
   232
      document.frmMain.inpGLSumAmount.value = add(document.frmMain.inpGLSumAmount.value, document.frmMain.inpGLItemAmount.value);
harpreet@9076
   233
      var amount = document.frmMain.inpGLSumAmount.value;
harpreet@9076
   234
      if (document.frmMain.inpUseCredit.checked) {
harpreet@9076
   235
        amount = subtract(amount, document.frmMain.inpCredit.value);
harpreet@9076
   236
        if ( compare(amount, '<', "0") )
harpreet@9076
   237
          amount = 0;
harpreet@9076
   238
      }
harpreet@9076
   239
      document.frmMain.inpActualPayment.value = amount;
harpreet@9076
   240
      return submitXmlHttpRequest(callBackGLItem, document.frmMain, "ADDGLITEM", url, false, null, paramXMLReq);
harpreet@9076
   241
    } catch (e) {
harpreet@9076
   242
      alert(e);
harpreet@9076
   243
    }
harpreet@9076
   244
  }
harpreet@9076
   245
    function removeGLItem(key) {
harpreet@9076
   246
      try {
harpreet@9076
   247
        document.frmMain.inpDeleteGLItem.value = key;
harpreet@9076
   248
        var url = "../org.openbravo.advpaymentmngt.ad_actionbutton/AddOrderOrInvoice.html";
harpreet@9076
   249
        var paramXMLReq = null;
harpreet@9076
   250
        if ( compare(document.frmMain.inpActualPayment.value, '>', document.frmMain.elements['inpHiddenAmt'+key].value) ) 
harpreet@9076
   251
          document.frmMain.inpActualPayment.value = subtract(document.frmMain.inpActualPayment.value, document.frmMain.elements['inpHiddenAmt'+key].value);
harpreet@9076
   252
        else
harpreet@9076
   253
          document.frmMain.inpActualPayment.value = 0;
harpreet@9076
   254
        document.frmMain.inpGLSumAmount.value = subtract(document.frmMain.inpGLSumAmount.value, document.frmMain.elements['inpHiddenAmt'+key].value);
harpreet@9076
   255
        return submitXmlHttpRequest(callBackGLItem, document.frmMain, "REMOVEGLITEM", url, false, null, paramXMLReq);
harpreet@9076
   256
      } catch (e) {
harpreet@9076
   257
        alert(e);
harpreet@9076
   258
      }
harpreet@9076
   259
    }
harpreet@9076
   260
    function removeAllGLItem() {
harpreet@9076
   261
      try {
harpreet@9076
   262
        document.frmMain.inpDeleteGLItem.value = "";
harpreet@9076
   263
        var url = "../org.openbravo.advpaymentmngt.ad_actionbutton/AddOrderOrInvoice.html";
harpreet@9076
   264
        var paramXMLReq = null;
harpreet@9076
   265
        return submitXmlHttpRequest(callBackGLItem, document.frmMain, "REMOVEALLGLITEM", url, false, null, paramXMLReq);
harpreet@9076
   266
      } catch (e) {
harpreet@9076
   267
        alert(e);
harpreet@9076
   268
      }
harpreet@9076
   269
    }
harpreet@9076
   270
harpreet@9076
   271
    function callBackGLItem(paramXMLParticular, XMLHttpRequestObj) {
harpreet@9076
   272
     var strText = "";
harpreet@9076
   273
      if (getReadyStateHandler(XMLHttpRequestObj)) {
harpreet@9076
   274
        try {
harpreet@9076
   275
          if (XMLHttpRequestObj.responseText) {
harpreet@9076
   276
            strText = XMLHttpRequestObj.responseText;
harpreet@9076
   277
            if (strText != "" && strText != "\r\n")
harpreet@9076
   278
              setValues_MessageBox('messageBoxID', 'WARNING', '', strText);
harpreet@9076
   279
            else
harpreet@9076
   280
              initialize_MessageBox('messageBoxID');
harpreet@9076
   281
            loadGLItemList();
harpreet@9076
   282
          } else {
harpreet@9076
   283
            initialize_MessageBox('messageBoxID');
harpreet@9076
   284
          }
harpreet@9076
   285
        } catch (e) {
harpreet@9076
   286
        }
harpreet@9076
   287
      }
harpreet@9076
   288
      return true;
harpreet@9076
   289
    }
harpreet@9076
   290
</script>
harpreet@9076
   291
<script language="JavaScript" type="text/javascript">
harpreet@9076
   292
    function loadGLItemList() {
harpreet@9076
   293
      try {
harpreet@9076
   294
        var url = "../org.openbravo.advpaymentmngt.ad_actionbutton/AddOrderOrInvoice.html";
harpreet@9076
   295
        var paramXMLReq = null;
harpreet@9076
   296
        return submitXmlHttpRequest(callBackGLItemGrid, document.frmMain, "GLITEMGRIDLIST", url, false, null, paramXMLReq);
harpreet@9076
   297
      } catch (e) {
harpreet@9076
   298
        alert(e);
harpreet@9076
   299
      }
harpreet@9076
   300
    }
harpreet@9076
   301
harpreet@9076
   302
    function callBackGLItemGrid(paramXMLParticular, XMLHttpRequestObj) {
harpreet@9076
   303
     var strText = "";
harpreet@9076
   304
      if (getReadyStateHandler(XMLHttpRequestObj)) {
harpreet@9076
   305
        try {
harpreet@9076
   306
          if (XMLHttpRequestObj.responseText) {
harpreet@9076
   307
            strText = XMLHttpRequestObj.responseText;
harpreet@9076
   308
            var aux = strText.substring(29, strText.length-8);
harpreet@9076
   309
            var tableBody = document.getElementById('sectionGLItemGrid');
harpreet@9076
   310
            var browserName = getBrowserInfo('name');
harpreet@9076
   311
            if (browserName.toUpperCase().indexOf('INTERNET EXPLORER') != -1) {
harpreet@9076
   312
              var temp = document.createElement("span");
harpreet@9076
   313
              temp.id = 'temp';
harpreet@9076
   314
              temp.style.display = 'none';
harpreet@9076
   315
              var newRows = '<table><tbody id=\"sectionGLItemGrid\">'+ aux;
harpreet@9076
   316
              temp.innerHTML = newRows;
harpreet@9076
   317
              tableBody.parentNode.replaceChild(temp.firstChild.firstChild, tableBody);
harpreet@9076
   318
              temp.parentNode.removeChild(temp);
harpreet@9076
   319
            }
harpreet@9076
   320
            tableBody.innerHTML = aux;
harpreet@9076
   321
            
harpreet@9076
   322
            updateGLItemTotal();
harpreet@9076
   323
          } else {
harpreet@9076
   324
            document.getElementById('sectionGLItemGrid').innerHTML = '';
harpreet@9076
   325
          }
harpreet@9076
   326
        } catch (e) {
harpreet@9076
   327
        }
harpreet@9076
   328
      }
harpreet@9076
   329
      return true;
harpreet@9076
   330
    }
harpreet@9076
   331
harpreet@9076
   332
</script>
harpreet@9076
   333
<script language="JavaScript" type="text/javascript">
harpreet@9076
   334
    function loadGridList() {
harpreet@9076
   335
      try {
harpreet@9076
   336
        var url = "../org.openbravo.advpaymentmngt.ad_actionbutton/AddOrderOrInvoice.html";
harpreet@9076
   337
        var paramXMLReq = null;
harpreet@9076
   338
        return submitXmlHttpRequest(callBackGrid, document.frmMain, "GRIDLIST", url, false, null, paramXMLReq);
harpreet@9076
   339
      } catch (e) {
harpreet@9076
   340
        alert(e);
harpreet@9076
   341
      }
harpreet@9076
   342
    }
harpreet@9076
   343
harpreet@9076
   344
    function callBackGrid(paramXMLParticular, XMLHttpRequestObj) {
harpreet@9076
   345
     var strText = "";
harpreet@9076
   346
      if (getReadyStateHandler(XMLHttpRequestObj)) {
harpreet@9076
   347
        try {
harpreet@9076
   348
          if (XMLHttpRequestObj.responseText) {
harpreet@9076
   349
            strText = XMLHttpRequestObj.responseText;
harpreet@9076
   350
            var aux = strText.substring(29, strText.length-8);
harpreet@9076
   351
            var tableBody = document.getElementById('sectionGrid');
harpreet@9076
   352
            var browserName = getBrowserInfo('name');
harpreet@9076
   353
            if (browserName.toUpperCase().indexOf('INTERNET EXPLORER') != -1) {
harpreet@9076
   354
              var temp = document.createElement("span");
harpreet@9076
   355
              temp.id = 'temp';
harpreet@9076
   356
              temp.style.display = 'none';
harpreet@9076
   357
              var newRows = '<table><tbody id=\"sectionGrid\">'+ aux;
harpreet@9076
   358
              temp.innerHTML = newRows;
harpreet@9076
   359
              tableBody.parentNode.replaceChild(temp.firstChild.firstChild, tableBody);
harpreet@9076
   360
              temp.parentNode.removeChild(temp);
harpreet@9076
   361
            }
harpreet@9076
   362
            tableBody.innerHTML = aux;
harpreet@9076
   363
harpreet@9076
   364
            if (document.frmMain.isFirstLoad.value=="true"){
harpreet@9076
   365
              document.frmMain.isFirstLoad.value="false";
harpreet@9076
   366
              if (isTrue('isReceipt')) {
harpreet@9076
   367
                var amount = document.frmMain.inpActualPayment.value;
harpreet@9076
   368
                if (document.frmMain.inpUseCredit.checked)
harpreet@9076
   369
                  amount = add(amount, document.frmMain.inpCredit.value);
harpreet@9076
   370
                distributeAmount(amount);
harpreet@9076
   371
              }
harpreet@9076
   372
            }
harpreet@9076
   373
            updateAll();
harpreet@9076
   374
            updateTotal();
harpreet@9076
   375
          } else {
harpreet@9076
   376
            document.getElementById('sectionGrid').innerHTML = '';
harpreet@9076
   377
          }
harpreet@9076
   378
        } catch (e) {
harpreet@9076
   379
        }
harpreet@9076
   380
      }
harpreet@9076
   381
      return true;
harpreet@9076
   382
    }
harpreet@9076
   383
harpreet@9076
   384
</script>
harpreet@9076
   385
<script language="JavaScript" type="text/javascript">
harpreet@9076
   386
  function onLoadDo(){
harpreet@9076
   387
    this.windowTables = new Array(
harpreet@9076
   388
      new windowTableId('client_top_popup', 'buttonOK'),
harpreet@9076
   389
      new windowTableId('client_top', 'buttonProcess'),
harpreet@9076
   390
      new windowTableId('client_middle', 'buttonProcess'),
harpreet@9076
   391
      new windowTableId('client_botton', 'buttonProcess')
harpreet@9076
   392
    );
harpreet@9076
   393
harpreet@9076
   394
    setWindowTableParentElement();
harpreet@9076
   395
    enableShortcuts('popup');
harpreet@9076
   396
    setBrowserAutoComplete(false);
harpreet@9076
   397
harpreet@9076
   398
    initFIN_Utilities(document.frmMain);
harpreet@9076
   399
    try {
harpreet@9076
   400
      onloadFunctions();
harpreet@9076
   401
    } catch (e) {}
harpreet@9076
   402
    setGLItemMode(isTrue('isGLItem'));
harpreet@9076
   403
    displayLogicElement('sectionDifference', false);
harpreet@9076
   404
    displayLogicElement('sectionDifferenceBox', false);
harpreet@9076
   405
    processLabels();
harpreet@9076
   406
    displayLogicElement('paramCustBalance', isReceipt);
harpreet@9076
   407
    displayLogicElement('NoPackageslinkCalc', isTrue('isReceipt'));
harpreet@9076
   408
    displayLogicElement('paramCredit', compare(document.getElementById('paramCredit').value, '>', "0") );
harpreet@9076
   409
    displayLogicElement('lblCredit', compare(document.getElementById('paramCredit').value, '>', "0"));
harpreet@9076
   410
    displayLogicElement('paramUseCredit', compare(document.getElementById('paramCredit').value, '>', "0") && compare(document.frmMain.inpGeneratedCredit.value, '==', "0") );
harpreet@9076
   411
    displayLogicElement('lblUseCredit', compare(document.getElementById('paramCredit').value, '>', "0") && compare(document.frmMain.inpGeneratedCredit.value, '==', "0") );
harpreet@9076
   412
    if (isTrue('isReceipt')) {
harpreet@9076
   413
        setWindowElementFocus(frm.inpActualPayment);
harpreet@9076
   414
    } else {
harpreet@9076
   415
        document.getElementById('paramActualPayment').readOnly = true;
harpreet@9076
   416
        document.getElementById('paramActualPayment').className = "readonly required dojoValidateValid TextBox_btn_OneCell_width number";
harpreet@9076
   417
        setWindowElementFocus(frm.inpDocNumber);
harpreet@9076
   418
        updateTotal();
harpreet@9076
   419
    }
harpreet@9076
   420
harpreet@9076
   421
    //numberInputEvent('onchange', document.frmMain.inpGLItemAmount);
harpreet@9076
   422
    loadGridList();
harpreet@9076
   423
    resizeAreaInfo();
harpreet@9076
   424
  }
harpreet@9076
   425
harpreet@9076
   426
  function onResizeDo(){
harpreet@9076
   427
    resizeAreaInfo(true);
harpreet@9076
   428
  }
harpreet@9076
   429
</script>
harpreet@9076
   430
</head>
harpreet@9076
   431
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="onLoadDo();" onresize="onResizeDo();">
harpreet@9076
   432
<form name="frmMain" method="post" action="AddOrderOrInvoice.html">
harpreet@9076
   433
  <input type="hidden" name="Command" />
harpreet@9076
   434
  <input type="hidden" name="IsPopUpCall" value="1" />
harpreet@9076
   435
  <input type="hidden" name="inpadOrgId" value="" id="fieldOrg"/>
harpreet@9076
   436
  <input type="hidden" name="inpfinPaymentId" value="" id="fieldPayment"/>
harpreet@9076
   437
  <input type="hidden" name="inpadWindowId" value="" id="fieldWindowId"/>
harpreet@9076
   438
  <input type="hidden" name="inpTabId" value="" id="fieldTabId"/>
harpreet@9076
   439
  <input type="hidden" name="isReceipt" value="" id="fieldReceipt"/>
harpreet@9076
   440
  <input type="hidden" name="isFirstLoad" value="true"/>
harpreet@9076
   441
  <input type="hidden" name="isGLItem" value="N"/>
harpreet@9076
   442
  <input type="hidden" name="inpDeleteGLItem" value=""/>
harpreet@9076
   443
  <input type="hidden" id="paramPrecision" name="curPrecision" value="2"/>
harpreet@9076
   444
  <input type="hidden" id="paramHeaderAmount" name="inpHeaderAmount" value="0"/>
harpreet@9076
   445
  <input type="hidden" id="paramGLSumAmount" name="inpGLSumAmount" value="0"/>
harpreet@9076
   446
  <input type="hidden" id="paramGeneratedCredit" name="inpGeneratedCredit" value="0"/>
harpreet@9076
   447
  <div class="Popup_ContentPane_CircleLogo">
harpreet@9076
   448
    <div class="Popup_WindowLogo">
harpreet@9076
   449
      <img class="Popup_WindowLogo_Icon Popup_WindowLogo_Icon_process" src="../../../../../web/images/blank.gif" border=0/></img>
harpreet@9076
   450
    </div>
harpreet@9076
   451
  </div>
harpreet@9076
   452
  <table cellspacing="0" cellpadding="0" width="100%" id="table_header">
harpreet@9076
   453
    <tr>
harpreet@9076
   454
      <td>
harpreet@9076
   455
        <table cellspacing="0" cellpadding="0" class="Popup_ContentPane_NavBar">
harpreet@9076
   456
          <tr class="Popup_NavBar_bg"><td></td>
harpreet@9076
   457
            <td class="Popup_NavBar_separator_cell"></td>
harpreet@9076
   458
            <td class="Popup_NavBar_bg_logo_left"></td>
harpreet@9076
   459
            <td class="Popup_NavBar_bg_logo" width="1" onclick="openNewBrowser('http://www.openbravo.com', 'Openbravo');return false;"><img src="../../../../../web/images/blank.gif" alt="Openbravo" title="Openbravo" border="0" id="openbravoLogo" class="Popup_NavBar_logo" /></td>
harpreet@9076
   460
            <td class="Popup_NavBar_bg_logo_right"></td>
harpreet@9076
   461
            <td class="Popup_NavBar_Popup_title_cell"><span>Add Payment</span></td>
harpreet@9076
   462
            <td class="Popup_NavBar_separator_cell"></td>
harpreet@9076
   463
          </tr>
harpreet@9076
   464
        </table>
harpreet@9076
   465
      </td>
harpreet@9076
   466
    </tr>
harpreet@9076
   467
harpreet@9076
   468
    <tr>
harpreet@9076
   469
      <td>
harpreet@9076
   470
        <table cellspacing="0" cellpadding="0" class="Popup_ContentPane_SeparatorBar">
harpreet@9076
   471
          <tr>
harpreet@9076
   472
            <td class="Popup_SeparatorBar_bg"></td>
harpreet@9076
   473
          </tr>
harpreet@9076
   474
        </table>
harpreet@9076
   475
      </td>
harpreet@9076
   476
    </tr>
harpreet@9076
   477
harpreet@9076
   478
  </table>
harpreet@9076
   479
  <table cellspacing="0" cellpadding="0" width="100%">
harpreet@9076
   480
    <tr>
harpreet@9076
   481
      <td>
harpreet@9076
   482
        <div class="Popup_ContentPane_Client" style="overflow: auto;" id="client_messagebox">
harpreet@9076
   483
harpreet@9076
   484
          <!-- MessageBox -->
harpreet@9076
   485
          <table cellpadding="0" cellspacing="0" id="messageBoxID" class="MessageBoxyy">
harpreet@9076
   486
            <tbody>
harpreet@9076
   487
            <tr class="MessageBox_TopMargin">
harpreet@9076
   488
              <td class="MessageBox_LeftMargin"></td>
harpreet@9076
   489
              <td></td>
harpreet@9076
   490
              <td class="MessageBox_RightMargin"></td>
harpreet@9076
   491
            </tr>
harpreet@9076
   492
            <tr>
harpreet@9076
   493
              <td class="MessageBox_LeftMargin"></td>
harpreet@9076
   494
              <td>
harpreet@9076
   495
harpreet@9076
   496
                <table cellpadding="0" cellspacing="0" class="MessageBox_Container">
harpreet@9076
   497
                  <tbody>
harpreet@9076
   498
                  <tr>
harpreet@9076
   499
                    <td class="MessageBox_LeftTrans">
harpreet@9076
   500
                      <table style="width: 100%; height: 100%" cellpadding="0" cellspacing="0">
harpreet@9076
   501
                        <tbody>
harpreet@9076
   502
                        <tr>
harpreet@9076
   503
                          <td class="MessageBox_TopLeft"></td>
harpreet@9076
   504
                        </tr>
harpreet@9076
   505
                        <tr>
harpreet@9076
   506
                          <td class="MessageBox_Left"></td>
harpreet@9076
   507
                        </tr>
harpreet@9076
   508
                        </tbody>
harpreet@9076
   509
                      </table>
harpreet@9076
   510
                    </td>
harpreet@9076
   511
                    <td class="MessageBox_bg">
harpreet@9076
   512
harpreet@9076
   513
                      <table class="MessageBox_Top">
harpreet@9076
   514
                      <tbody>
harpreet@9076
   515
                        <tr>
harpreet@9076
   516
                          <td>
harpreet@9076
   517
                            <span>
harpreet@9076
   518
                            <table cellpadding="0" cellspacing="0" class="MessageBox_Body_ContentCell">
harpreet@9076
   519
                              <tbody>
harpreet@9076
   520
                              <tr>
harpreet@9076
   521
                                <td class="MessageBox_Icon_ContentCell">
harpreet@9076
   522
                                  <div class="MessageBox_Icon"></div>
harpreet@9076
   523
                                </td>
harpreet@9076
   524
                                <td style="vertical-align: top;" id="messageBoxIDContent">
harpreet@9076
   525
                                  <span>
harpreet@9076
   526
                                    <div class="MessageBox_TextTitle" id="messageBoxIDTitle">
harpreet@9076
   527
                                      xxInfo: AccessTableWithNoView
harpreet@9076
   528
                                    </div>
harpreet@9076
   529
                                    <div class="MessageBox_TextDescription" id="messageBoxIDMessage">
harpreet@9076
   530
                                      xxThe current information is empty.
harpreet@9076
   531
                                    </div>
harpreet@9076
   532
                                    <div class="MessageBox_TextSeparator"></div>
harpreet@9076
   533
                                  </span>
harpreet@9076
   534
                                </td>
harpreet@9076
   535
                              </tr>
harpreet@9076
   536
                              </tbody>
harpreet@9076
   537
                            </table>
harpreet@9076
   538
                            </span>
harpreet@9076
   539
                          </td>
harpreet@9076
   540
                        </tr>
harpreet@9076
   541
                        </tbody>
harpreet@9076
   542
                      </table>
harpreet@9076
   543
harpreet@9076
   544
                    </td>
harpreet@9076
   545
                    <td class="MessageBox_RightTrans">
harpreet@9076
   546
                      <table style="width: 100%; height: 100%" cellpadding="0" cellspacing="0">
harpreet@9076
   547
                        <tbody>
harpreet@9076
   548
                        <tr>
harpreet@9076
   549
                          <td class="MessageBox_TopRight"></td>
harpreet@9076
   550
                        </tr>
harpreet@9076
   551
                        <tr>
harpreet@9076
   552
                          <td class="MessageBox_Right"></td>
harpreet@9076
   553
                        </tr>
harpreet@9076
   554
                        </tbody>
harpreet@9076
   555
                      </table>
harpreet@9076
   556
                    </td>
harpreet@9076
   557
                  </tr>
harpreet@9076
   558
                  <tr>
harpreet@9076
   559
                    <td rowspan="2" class="MessageBox_BottomLeft">
harpreet@9076
   560
                    </td>
harpreet@9076
   561
                    <td class="MessageBox_BottomTrans MessageBox_bg">
harpreet@9076
   562
                    </td>
harpreet@9076
   563
                    <td rowspan="2" class="MessageBox_BottomRight">
harpreet@9076
   564
                    </td>
harpreet@9076
   565
                  </tr>
harpreet@9076
   566
                  <tr>
harpreet@9076
   567
                    <td class="MessageBox_Bottom">
harpreet@9076
   568
                    </td>
harpreet@9076
   569
                  </tr>
harpreet@9076
   570
                  </tbody>
harpreet@9076
   571
                </table>
harpreet@9076
   572
harpreet@9076
   573
              </td>
harpreet@9076
   574
              <td class="MessageBox_RightMargin"></td>
harpreet@9076
   575
            </tr>
harpreet@9076
   576
            <tr class="MessageBox_BottomMargin">
harpreet@9076
   577
              <td class="MessageBox_LeftMargin"></td>
harpreet@9076
   578
              <td></td>
harpreet@9076
   579
                <td class="MessageBox_RightMargin"></td>
harpreet@9076
   580
              </tr>
harpreet@9076
   581
            </tbody>
harpreet@9076
   582
          </table>
harpreet@9076
   583
        <!-- MessageBox END -->
harpreet@9076
   584
        </div>
harpreet@9076
   585
      </td>
harpreet@9076
   586
    </tr>
harpreet@9076
   587
  </table>
harpreet@9076
   588
harpreet@9076
   589
  <table cellspacing="0" cellpadding="0" width="100%">
harpreet@9076
   590
harpreet@9076
   591
    <tr>
harpreet@9076
   592
      <td>
harpreet@9076
   593
        <!-- Hidden Process Payment Div  -->
harpreet@9076
   594
        <div class="Popup_ContentPane_Client" style="display: none;" id="client_top_popup">
harpreet@9076
   595
          <table cellspacing="0" cellpadding="0" class="Popup_ContentPane_InfoBar">
harpreet@9076
   596
           <tr>
harpreet@9076
   597
             <td class="Popup_InfoBar_Icon_cell"><img src="../web/images/blank.gif" class="Popup_InfoBar_Icon_info" border="0"></td>
harpreet@9076
   598
             <td class="Popup_InfoBar_text_table">
harpreet@9076
   599
               <table>
harpreet@9076
   600
                 <tr><td class="Popup_InfoBar_text" id="processHelp">Process Payment</td></tr>
harpreet@9076
   601
                 </table>
harpreet@9076
   602
              </td>
harpreet@9076
   603
            </tr>
harpreet@9076
   604
          </table>
harpreet@9076
   605
          <table cellspacing="0" cellpadding="0" class="Popup_Client_TableSelector">
harpreet@9076
   606
            <tr>
harpreet@9076
   607
              <td class="TableEdition_OneCell_width"></td>
harpreet@9076
   608
              <td class="TableEdition_OneCell_width"></td>
harpreet@9076
   609
              <td class="TableEdition_OneCell_width"></td>
harpreet@9076
   610
              <td class="TableEdition_OneCell_width"></td>
harpreet@9076
   611
              <td class="TableEdition_OneCell_width"></td>
harpreet@9076
   612
              <td class="TableEdition_OneCell_width"></td>
harpreet@9076
   613
            </tr>
harpreet@9076
   614
            <tr><td colspan="6" height="20"></td></tr>
harpreet@9076
   615
            <tr>
harpreet@9076
   616
              <td class="TitleCell"></td>
harpreet@9076
   617
              <td class="TitleCell" colspan="2"><span class="LabelText">Action regarding document</span></td>
harpreet@9076
   618
              <td class="Combo_ContentCell">
harpreet@9076
   619
                <select name="inpActionDocument" id="paramActionDocument" class="ComboKey Combo_TwoCells_width" required="true">
harpreet@9076
   620
                  <div id="reportActionDocument"></div>
harpreet@9076
   621
                </select>
harpreet@9076
   622
              </td>
harpreet@9076
   623
              <td class="TitleCell"></td>
harpreet@9076
   624
              <td class="TitleCell"></td>
harpreet@9076
   625
            </tr>
harpreet@9076
   626
            <tr><td colspan="6" height="20"></td></tr>
harpreet@9076
   627
            <tr>
harpreet@9076
   628
              <td></td>
harpreet@9076
   629
              <td></td>
harpreet@9076
   630
              <td class="Button_RightAlign_ContentCell">
harpreet@9076
   631
                <div>
harpreet@9076
   632
                  <button type="button"
harpreet@9076
   633
                    id="buttonOK"
harpreet@9076
   634
                    class="ButtonLink_focus"
harpreet@9076
   635
                    onclick="submitThisPage('SAVE');return false;"
harpreet@9076
   636
                    onfocus="buttonEvent('onfocus', this); window.status='OK'; return true;"
harpreet@9076
   637
                    onblur="buttonEvent('onblur', this);"
harpreet@9076
   638
                    onkeyup="buttonEvent('onkeyup', this);"
harpreet@9076
   639
                    onkeydown="buttonEvent('onkeydown', this);"
harpreet@9076
   640
                    onkeypress="buttonEvent('onkeypress', this);"
harpreet@9076
   641
                    onmouseup="buttonEvent('onmouseup', this);"
harpreet@9076
   642
                    onmousedown="buttonEvent('onmousedown', this);"
harpreet@9076
   643
                    onmouseover="buttonEvent('onmouseover', this); window.status='OK'; return true;"
harpreet@9076
   644
                    onmouseout="buttonEvent('onmouseout', this);">
harpreet@9076
   645
                    <table class="Button">
harpreet@9076
   646
                      <tr>
harpreet@9076
   647
                        <td class="Button_left"><img class="Button_Icon Button_Icon_ok" alt="OK" title="OK" src="../web/images/blank.gif" id="imgButtonOK" border="0"></td>
harpreet@9076
   648
                        <td class="Button_text Button_width" id="tdButtonOK">OK</td>
harpreet@9076
   649
                        <td class="Button_right"></td>
harpreet@9076
   650
                      </tr>
harpreet@9076
   651
                    </table>
harpreet@9076
   652
                  </button>
harpreet@9076
   653
                </div>
harpreet@9076
   654
              </td>
harpreet@9076
   655
              <td class="Button_LeftAlign_ContentCell">
harpreet@9076
   656
                <div>
harpreet@9076
   657
                  <button type="button"
harpreet@9076
   658
                    id="buttonCancel"
harpreet@9076
   659
                    class="ButtonLink"
harpreet@9076
   660
                    onclick="closeProcessPayment();return false;"
harpreet@9076
   661
                    onfocus="buttonEvent('onfocus', this); window.status='Cancel'; return true;"
harpreet@9076
   662
                    onblur="buttonEvent('onblur', this);"
harpreet@9076
   663
                    onkeyup="buttonEvent('onkeyup', this);"
harpreet@9076
   664
                    onkeydown="buttonEvent('onkeydown', this);"
harpreet@9076
   665
                    onkeypress="buttonEvent('onkeypress', this);"
harpreet@9076
   666
                    onmouseup="buttonEvent('onmouseup', this);"
harpreet@9076
   667
                    onmousedown="buttonEvent('onmousedown', this);"
harpreet@9076
   668
                    onmouseover="buttonEvent('onmouseover', this); window.status='Cancel'; return true;"
harpreet@9076
   669
                    onmouseout="buttonEvent('onmouseout', this);">
harpreet@9076
   670
                    <table class="Button">
harpreet@9076
   671
                      <tr>
harpreet@9076
   672
                        <td class="Button_left"><img class="Button_Icon Button_Icon_cancel" alt="Cancel" title="Cancel" src="../web/images/blank.gif" id="imgButtonCancel" border="0"></td>
harpreet@9076
   673
                        <td class="Button_text Button_width" id="tdButtonCancel">Cancel</td>
harpreet@9076
   674
                        <td class="Button_right"></td>
harpreet@9076
   675
                      </tr>
harpreet@9076
   676
                    </table>
harpreet@9076
   677
                  </button>
harpreet@9076
   678
                </div>
harpreet@9076
   679
              </td>
harpreet@9076
   680
              <td></td>
harpreet@9076
   681
              <td></td>
harpreet@9076
   682
            </tr>
harpreet@9076
   683
          </table>
harpreet@9076
   684
        </div>
harpreet@9076
   685
        <div class="Popup_ContentPane_Client" style="overflow: auto;" id="client_top">
harpreet@9076
   686
          <table cellspacing="0" cellpadding="0" class="Popup_Client_TableSelector">
harpreet@9076
   687
harpreet@9076
   688
            <tr>
harpreet@9076
   689
              <td class="TableEdition_OneCell_width"></td>
harpreet@9076
   690
              <td class="TableEdition_OneCell_width"></td>
harpreet@9076
   691
              <td class="TableEdition_OneCell_width"></td>
harpreet@9076
   692
              <td class="TableEdition_OneCell_width"></td>
harpreet@9076
   693
              <td class="TableEdition_OneCell_width"></td>
harpreet@9076
   694
              <td class="TableEdition_OneCell_width"></td>
harpreet@9076
   695
            </tr>
harpreet@9076
   696
harpreet@9076
   697
            <!-- Text -->
harpreet@9076
   698
            <tr>
harpreet@9076
   699
                <td colspan="6" class="LabelText" style="font-weight: bold;">
harpreet@9076
   700
                    <span name="lblR" id="lblRText">Select sales orders, invoices or GL Items that you want to match to this payment</span>
harpreet@9076
   701
                    <span name="lblP" id="lblPText">Select purchase orders, invoices or GL Items that you want to match to this payment</span>
harpreet@9076
   702
                </td>
harpreet@9076
   703
            </tr>
harpreet@9076
   704
            
harpreet@9076
   705
            <!-- Line 1 -->
harpreet@9076
   706
            <tr>
harpreet@9076
   707
              <td class="TitleCell"><span name="lblP" id="lblPPayingTo" class="LabelText">Paying To</span><span name="lblR" id="lblRReceivingFrom" class="LabelText">Receiving From</span></td>
harpreet@9076
   708
              <td class="TextBox_ContentCell" colspan="2"><input class="readonly dojoValidateValid TextBox_TwoCells_width" type="text" name="inpBusinessPartner" value="" id="paramBusinessPartner"></input>
harpreet@9076
   709
              <input type="hidden" name="inpBusinessPartnerId" value="" id="paramBusinessPartnerId"></input></td>
harpreet@9076
   710
              <td class="TitleCell"><span class="LabelText" name="lblR" id="lblRCustomerBalance">Customer Balance</span></td>
harpreet@9076
   711
              <td class="TextBox_ContentCell"><input class="readonly dojoValidateValid TextBox_OneCell_width number" type="text" name="inpCustBalance" value="" id="paramCustBalance"></input></td>
harpreet@9076
   712
            </tr>
harpreet@9076
   713
harpreet@9076
   714
            <!-- Line hidden -->
harpreet@9076
   715
            <tr style="display:none;">
harpreet@9076
   716
              <td class="TitleCell"><span class="LabelText">Expected Payment</span></td>
harpreet@9076
   717
              <td class="TextBox_ContentCell"> <input class="readonly dojoValidateValid required TextBox_OneCell_width number" type="text" id="paramExpectedPayment" name="inpExpectedPayment" value="" onchange="updateDifference();"></input>
harpreet@9076
   718
              </td>
harpreet@9076
   719
              <td class="TitleCell"></td>
harpreet@9076
   720
              <td class="TitleCell"></td>
harpreet@9076
   721
              <td class="TitleCell"></td>
harpreet@9076
   722
              <td class="TitleCell"></td>
harpreet@9076
   723
            </tr>
harpreet@9076
   724
harpreet@9076
   725
            <!-- Line 2 -->
harpreet@9076
   726
            <tr>
harpreet@9076
   727
              <td class="TitleCell"><span class="LabelText">Amount</span></td>
harpreet@9076
   728
              <td class="TextBox_btn_ContentCell">
harpreet@9076
   729
                  <table border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
harpreet@9076
   730
                    <tr>
harpreet@9076
   731
                      <td class="Textbox_ContentCell">
harpreet@9076
   732
                        <table style="border: 0px none; border-collapse: collapse;">
harpreet@9076
   733
                        <tr><td style="padding-top: 0px;">
harpreet@9076
   734
                          <input type="text" onblur="numberInputEvent('onblur', this);" onfocus="numberInputEvent('onfocus', this);" outputformat="euroEdition" onchange="actualPaymentOnChange();return true;" onpaste="changeToEditingMode('onpaste');" oncut="changeToEditingMode('oncut');" onkeypress="changeToEditingMode('onkeypress');" onkeydown="changeToEditingMode('onkeydown'); numberInputEvent('onkeydown', this, event);" onkeyup="" name="inpActualPayment" maxlength="22" value="" required="true" class="dojoValidateValid required TextBox_btn_OneCell_width number" id="paramActualPayment"/>
harpreet@9076
   735
                          </td></tr>
harpreet@9076
   736
                        </table>
harpreet@9076
   737
                        <span id="paramActualPaymentinvalidSpan" style="display: none;" class="TextBox_MsgContainer_span">
harpreet@9076
   738
                          <table class="TextBox_MsgContainer_table">
harpreet@9076
   739
                            <tbody><tr class="TextBox_MsgContainer_tr">
harpreet@9076
   740
                              <td class="TextBox_MsgContainer_td"><div class="TextBox_MsgContainer_div"></div></td><td></td>
harpreet@9076
   741
                            </tr>
harpreet@9076
   742
                            <tr>
harpreet@9076
   743
                              <td class="invalid" colspan="2"><div name="invalidText" id="paramActualPaymentinvalidSpanText" class="TextBox_MsgContainer_div2">* The value entered is not valid.</div></td>
harpreet@9076
   744
                            </tr>
harpreet@9076
   745
                          </tbody></table>
harpreet@9076
   746
                        </span>
harpreet@9076
   747
                      </td>
harpreet@9076
   748
                      <td class="FieldButton_ContentCell">
harpreet@9076
   749
                      <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Amount From'; return true;" onblur=" window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;"  onclick="calculator('frmMain.inpActualPayment', document.frmMain.inpActualPayment.value, false);return false;">
harpreet@9076
   750
                      <table class="FieldButton" onmouseout="this.className='FieldButton';window.status='';return true;" onmouseover="this.className='FieldButton_hover';window.status='';return true;" onmousedown="this.className='FieldButton_active';return true;" onmouseup="this.className='FieldButton';return true;" id="NoPackageslinkCalc">
harpreet@9076
   751
                          <tr>
harpreet@9076
   752
                            <td class="FieldButton_bg">
harpreet@9076
   753
                              <img alt="Calculator" class="FieldButton_Icon FieldButton_Icon_Calc" title="Amount" src="../../../../../web/images/blank.gif" border="0" id="buttonCalc"></img>
harpreet@9076
   754
                            </td>
harpreet@9076
   755
                          </tr>
harpreet@9076
   756
                        </table>
harpreet@9076
   757
                      </a>
harpreet@9076
   758
                      </td>
harpreet@9076
   759
                    </tr>
harpreet@9076
   760
                  </table>
harpreet@9076
   761
              </td>
harpreet@9076
   762
              <td class="TitleCell"><span class="LabelText" name="lbl" id="lblCredit">Available Credit</span></td>
harpreet@9076
   763
              <td class="TextBox_ContentCell"><input class="readonly dojoValidateValid TextBox_OneCell_width number" type="text" name="inpCredit" value="0" id="paramCredit"></input></td>
harpreet@9076
   764
              <td class="TitleCell"><span class="LabelText" name="lbl" id="lblUseCredit">Use Available Credit</span></td>
harpreet@9076
   765
              <td class="Radio_Check_ContentCell"><span class="Checkbox_container_NOT_Focused"><input type="checkbox" name="inpUseCredit" value="Y" id="paramUseCredit" onclick="useCreditOnChange();"></input></span></td>
harpreet@9076
   766
            </tr>
harpreet@9076
   767
            
harpreet@9076
   768
            <tr class="FieldGroup_BottomMargin"></tr>
harpreet@9076
   769
            
harpreet@9076
   770
            <!-- Table filters -->
harpreet@9076
   771
            <tr> 
harpreet@9076
   772
             <td class="TitleCell"><span class="LabelText">Transaction Type</span></td>
harpreet@9076
   773
             <td class="Combo_ContentCell">
harpreet@9076
   774
                <select name="inpDocumentType" class="ComboKey Combo_OneCell_width" onchange="documentTypeOnChange(this.value);">
harpreet@9076
   775
                  <option value="O">Orders</option>
harpreet@9076
   776
                  <option value="I" selected="selected">Invoices</option>
harpreet@9076
   777
                  <option value="B">Orders and Invoices</option>
harpreet@9076
   778
                  <option value="G">GL Items</option>
harpreet@9076
   779
                </select>
harpreet@9076
   780
              </td>
harpreet@9076
   781
              <td></td>
harpreet@9076
   782
              <td class="TitleCell" id="glitemBlank" colspan="4"></td>
harpreet@9076
   783
              <td class="TitleCell" id="DueDateFromLbl"><span class="LabelText">Due Date From</span></td>
harpreet@9076
   784
              <td class="TextBox_btn_ContentCell" id="DueDateFrom">
harpreet@9076
   785
                <table border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
harpreet@9076
   786
                  <tr>
harpreet@9076
   787
                    <td class="TextBox_ContentCell">
harpreet@9076
   788
                      <table style="border: 0px none; border-collapse: collapse;">
harpreet@9076
   789
                        <tr><td style="padding-top: 0px;">
harpreet@9076
   790
                          <input type="text" id="paramDueDateFrom" class="dojoValidateValid TextBox_btn_OneCell_width" value="" maxlength="10" name="inpDueDateFrom" onkeyup="autoCompleteDate(this);" onkeydown="changeToEditingMode('onkeydown');" onkeypress="changeToEditingMode('onkeypress');" oncut="changeToEditingMode('oncut');" onpaste="changeToEditingMode('onpaste');" oncontextmenu="changeToEditingMode('oncontextmenu');" onblur="expandDateYear(this.id);" onchange="validateDateTextBox(this.id); validateDate(this); return true;" displayFormat="xx" saveFormat="xx"></input>
harpreet@9076
   791
                          <!--input dojoType="openbravo:DateTextbox" lowerThan="paramDueDateTo" displayFormat="xx" saveFormat="yy"  class="TextBox_btn_OneCell_width" type="text" name="inpDueDateFrom" id="paramDueDateFrom" size="10" maxlength="10" value="" onkeyup="autoCompleteDate(this.textbox, this.displayFormat);return true;" onblur="loadGridList();return true;"></input><script>djConfig.searchIds.push("paramDueDateFrom");</script-->
harpreet@9076
   792
                        </td></tr>
harpreet@9076
   793
                      </table>
harpreet@9076
   794
                      <span id="paramDueDateFrominvalidSpan" style="display: none;" class="TextBox_MsgContainer_span">
harpreet@9076
   795
                        <table class="TextBox_MsgContainer_table">
harpreet@9076
   796
                          <tbody><tr class="TextBox_MsgContainer_tr"><td class="TextBox_MsgContainer_td"><div class="TextBox_MsgContainer_div"></div></td><td></td></tr>
harpreet@9076
   797
                          <tr><td class="invalid" colspan="2"><div name="invalidText" id="paramDueDateFrominvalidSpanText" class="TextBox_MsgContainer_div2">* The value entered is not valid.</div></td></tr>
harpreet@9076
   798
                        </tbody></table>
harpreet@9076
   799
                      </span>
harpreet@9076
   800
                    </td>
harpreet@9076
   801
                    <td class="FieldButton_ContentCell">
harpreet@9076
   802
                      <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Calendar'; return true;" onblur="window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;" onclick="showCalendar('frmMain.inpDueDateFrom', document.frmMain.inpDueDateFrom.value, false);return false;">
harpreet@9076
   803
                        <table class="FieldButton" onmouseout="this.className='FieldButton';window.status='';return true;" onmouseover="this.className='FieldButton_hover';window.status='Show calendar';return true;" onmousedown="this.className='FieldButton_active';return true;" onmouseup="this.className='FieldButton';return true;">
harpreet@9076
   804
                          <tr>
harpreet@9076
   805
                            <td class="FieldButton_bg">
harpreet@9076
   806
                              <img alt="Calendar" class="FieldButton_Icon FieldButton_Icon_Calendar" title="Calendar" src="../../../../../web/images/blank.gif" border="0"></img>
harpreet@9076
   807
                            </td>
harpreet@9076
   808
                          </tr>
harpreet@9076
   809
                        </table>
harpreet@9076
   810
                      </a>
harpreet@9076
   811
                    </td>
harpreet@9076
   812
                  </tr>
harpreet@9076
   813
                </table>
harpreet@9076
   814
              </td>
harpreet@9076
   815
             </tr>
harpreet@9076
   816
            <tr>
harpreet@9076
   817
              <td class="TitleCell" id="inpAlternativeLabel"><span class="TitleCell LabelText"><label for="paramAlternativePaymentMethod">Show payments for alternative payment methods</label></span></td>
harpreet@9076
   818
              <td class="Radio_Check_ContentCell" id="inpAlternativeChkBox">
harpreet@9076
   819
              <span class="Radio_Check_ContentCell Checkbox_container_NOT_Focused"><input type="checkbox" name="inpAlternativePaymentMethod" value="Y" id="paramAlternativePaymentMethod" onclick="loadGridList()"></input></span>
harpreet@9076
   820
             </td>
harpreet@9076
   821
             <td></td>
harpreet@9076
   822
             <td class="TitleCell" id="DueDateToLbl"><span class="LabelText">Due Date To</span></td>
harpreet@9076
   823
             <td class="TextBox_btn_ContentCell" id="DueDateTo">
harpreet@9076
   824
                <table border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
harpreet@9076
   825
                  <tr>
harpreet@9076
   826
                    <td class="TextBox_ContentCell">
harpreet@9076
   827
                      <table style="border: 0px none; border-collapse: collapse;">
harpreet@9076
   828
                        <tr><td style="padding-top: 0px;">
harpreet@9076
   829
                          <input type="text" id="paramDueDateTo" class="dojoValidateValid TextBox_btn_OneCell_width" value="" maxlength="10" name="inpDueDateTo" onkeyup="autoCompleteDate(this);" onkeydown="changeToEditingMode('onkeydown');" onkeypress="changeToEditingMode('onkeypress');" oncut="changeToEditingMode('oncut');" onpaste="changeToEditingMode('onpaste');" oncontextmenu="changeToEditingMode('oncontextmenu');" onblur="expandDateYear(this.id);" onchange="validateDateTextBox(this.id); validateDate(this);return true;" displayFormat="xx" saveFormat="xx"></input>
harpreet@9076
   830
                          <!--input dojoType="openbravo:DateTextbox" displayFormat="xx" saveFormat="yy"  class="TextBox_btn_OneCell_width" type="text" name="inpDueDateTo" id="paramDueDateTo" size="10" maxlength="10" value="" onkeyup="autoCompleteDate(this.textbox, this.displayFormat);return true;" onblur="loadGridList();return true;"></input><script>djConfig.searchIds.push("paramDueDateTo");</script-->
harpreet@9076
   831
                          </td></tr>
harpreet@9076
   832
                      </table>
harpreet@9076
   833
                      <span id="paramDueDateToinvalidSpan" style="display: none;" class="TextBox_MsgContainer_span">
harpreet@9076
   834
                        <table class="TextBox_MsgContainer_table">
harpreet@9076
   835
                          <tbody><tr class="TextBox_MsgContainer_tr"><td class="TextBox_MsgContainer_td"><div class="TextBox_MsgContainer_div"></div></td><td></td></tr>
harpreet@9076
   836
                          <tr><td class="invalid" colspan="2"><div name="invalidText" id="paramDueDateToinvalidSpanText" class="TextBox_MsgContainer_div2">* The value entered is not valid.</div></td></tr>
harpreet@9076
   837
                        </tbody></table>
harpreet@9076
   838
                      </span>
harpreet@9076
   839
                    </td>
harpreet@9076
   840
                    <td class="FieldButton_ContentCell">
harpreet@9076
   841
                      <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Calendar'; return true;" onblur="window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;" onclick="showCalendar('frmMain.inpDueDateTo', document.frmMain.inpDueDateTo.value, false);return false;">
harpreet@9076
   842
                        <table class="FieldButton" onmouseout="this.className='FieldButton';window.status='';return true;" onmouseover="this.className='FieldButton_hover';window.status='Show calendar';return true;" onmousedown="this.className='FieldButton_active';return true;" onmouseup="this.className='FieldButton';return true;">
harpreet@9076
   843
                          <tr>
harpreet@9076
   844
                            <td class="FieldButton_bg">
harpreet@9076
   845
                              <img alt="Calendar" class="FieldButton_Icon FieldButton_Icon_Calendar" title="Calendar" src="../../../../../web/images/blank.gif" border="0"></img>
harpreet@9076
   846
                            </td>
harpreet@9076
   847
                          </tr>
harpreet@9076
   848
                        </table>
harpreet@9076
   849
                      </a>
harpreet@9076
   850
                    </td>
harpreet@9076
   851
                  </tr>
harpreet@9076
   852
                </table>
harpreet@9076
   853
             </td>
harpreet@9076
   854
            </tr>
harpreet@9076
   855
            <tr id="glitemRow">
harpreet@9076
   856
              <td class="TitleCell"><span class="LabelText">GL Item</span></td>
harpreet@9076
   857
              <td class="TextBox_ContentCell" colspan="2">
harpreet@9076
   858
                <table style="border:0px;border-collapse:collapse;">
harpreet@9076
   859
                  <tr>
harpreet@9076
   860
                    <td style="padding-top: 0px;">
harpreet@9076
   861
                      <script>var sc_C_Glitem_ID = null;</script>
harpreet@9076
   862
                      <input type="hidden" name="inpcGlitemId" id="C_Glitem_ID" value="" onreset="sc_C_Glitem_ID.resetSelector();" onchange="openbravo.Utilities.updateSmartClientComponentValue(this, sc_C_Glitem_ID.selectorField);"></input>
harpreet@9076
   863
                      <script id="selectorLink" src="../org.openbravo.client.kernel/OBUISEL_Selector/9FAD469CE4414A25974CF45C0AD22D35?columnName=C_Glitem_ID&disabled=false&CssSize=TwoCells&DisplayLength=45.0&required=true"></script>
harpreet@9076
   864
                    </td>
harpreet@9076
   865
                  </tr>
harpreet@9076
   866
                </table>
harpreet@9076
   867
              </td>
harpreet@9076
   868
              <td class="TitleCell"><span name="lblR" id="lblRReceivedIn" class="LabelText">Received In</span><span name="lblP" id="lblPPaidOut" class="LabelText">Paid Out</span></td>
harpreet@9076
   869
              <td class="TextBox_btn_ContentCell">
harpreet@9076
   870
                <table border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
harpreet@9076
   871
                  <tr>
harpreet@9076
   872
                    <td class="Textbox_ContentCell">
harpreet@9076
   873
                      <table style="border: 0px none; border-collapse: collapse;">
harpreet@9076
   874
                        <tr><td style="padding-top: 0px;">
harpreet@9076
   875
                        <input type="text" id="paramGLItemAmount" class="dojoValidateValid required TextBox_btn_OneCell_width number"  value="0" maxlength="22" name="inpGLItemAmount" onblur="numberInputEvent('onblur', this);" onfocus="numberInputEvent('onfocus', this);" onchange="" oncontextmenu="changeToEditingMode('oncontextmenu');" onpaste="changeToEditingMode('onpaste');" oncut="changeToEditingMode('oncut');" onkeypress="changeToEditingMode('onkeypress');" onkeydown="changeToEditingMode('onkeydown'); numberInputEvent('onkeydown', this, event);" onkeyup="" outputformat="euroEdition"></input>
harpreet@9076
   876
                        </td></tr>
harpreet@9076
   877
                      </table>
harpreet@9076
   878
                      <span id="paramGLItemAmountinvalidSpan" style="display: none;" class="TextBox_MsgContainer_span">
harpreet@9076
   879
                        <table class="TextBox_MsgContainer_table">
harpreet@9076
   880
                          <tbody><tr class="TextBox_MsgContainer_tr">
harpreet@9076
   881
                            <td class="TextBox_MsgContainer_td"><div class="TextBox_MsgContainer_div"></div></td><td></td>
harpreet@9076
   882
                          </tr>
harpreet@9076
   883
                          <tr>
harpreet@9076
   884
                            <td class="invalid" colspan="2"><div name="invalidText" id="paramGLItemAmountinvalidSpanText" class="TextBox_MsgContainer_div2">* The value entered is not valid.</div></td>
harpreet@9076
   885
                          </tr>
harpreet@9076
   886
                        </tbody></table>
harpreet@9076
   887
                      </span>
harpreet@9076
   888
                    </td>
harpreet@9076
   889
                    <td class="FieldButton_ContentCell">
harpreet@9076
   890
                      <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Amount'; return true;" onblur=" window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;"  onclick="calculator('frmMain.inpGLItemAmount', document.frmMain.inpGLItemAmount.value, false);return false;">
harpreet@9076
   891
                        <table class="FieldButton" onmouseout="this.className='FieldButton';window.status='';return true;" onmouseover="this.className='FieldButton_hover';window.status='';return true;" onmousedown="this.className='FieldButton_active';return true;" onmouseup="this.className='FieldButton';return true;" id="NoPackageslinkCalc">
harpreet@9076
   892
                          <tr>
harpreet@9076
   893
                            <td class="FieldButton_bg">
harpreet@9076
   894
                              <img alt="Calculator" class="FieldButton_Icon FieldButton_Icon_Calc" title="Amount" src="../../../../../web/images/blank.gif" border="0" id="buttonCalc"></img>
harpreet@9076
   895
                            </td>
harpreet@9076
   896
                          </tr>
harpreet@9076
   897
                        </table>
harpreet@9076
   898
                      </a>
harpreet@9076
   899
                    </td>
harpreet@9076
   900
                  </tr>
harpreet@9076
   901
                </table>
harpreet@9076
   902
              </td>
harpreet@9076
   903
              <td class="TitleCell"></td>
harpreet@9076
   904
            </tr>
harpreet@9076
   905
            <tr id="glitemAddRow">
harpreet@9076
   906
              <td class="TitleCell"></td>
harpreet@9076
   907
              <td class="Button_RightAlign_ContentCell">
harpreet@9076
   908
                <div>
harpreet@9076
   909
                  <button type="button"
harpreet@9076
   910
                    id="buttonAddGLItem"
harpreet@9076
   911
                    class="ButtonLink_focus"
harpreet@9076
   912
                    onclick="addGLItem();return false;"
harpreet@9076
   913
                    onfocus="buttonEvent('onfocus', this); window.status='OK'; return true;"
harpreet@9076
   914
                    onblur="buttonEvent('onblur', this);"
harpreet@9076
   915
                    onkeyup="buttonEvent('onkeyup', this);"
harpreet@9076
   916
                    onkeydown="buttonEvent('onkeydown', this);"
harpreet@9076
   917
                    onkeypress="buttonEvent('onkeypress', this);"
harpreet@9076
   918
                    onmouseup="buttonEvent('onmouseup', this);"
harpreet@9076
   919
                    onmousedown="buttonEvent('onmousedown', this);"
harpreet@9076
   920
                    onmouseover="buttonEvent('onmouseover', this); window.status='OK'; return true;"
harpreet@9076
   921
                    onmouseout="buttonEvent('onmouseout', this);">
harpreet@9076
   922
                    <table class="Button">
harpreet@9076
   923
                      <tr>
harpreet@9076
   924
                        <td class="Button_left"><img class="Button_Icon Button_Icon_ok" alt="OK" title="OK" src="../web/images/blank.gif" id="imgButtonOK" border="0"></td>
harpreet@9076
   925
                        <td class="Button_text Button_width" id="tdButtonOK">Add</td>
harpreet@9076
   926
                        <td class="Button_right"></td>
harpreet@9076
   927
                      </tr>
harpreet@9076
   928
                    </table>
harpreet@9076
   929
                  </button>
harpreet@9076
   930
                </div>
harpreet@9076
   931
              </td>
harpreet@9076
   932
              <td class="TitleCell" colspan="4"></td>
harpreet@9076
   933
            </tr>
harpreet@9076
   934
            
harpreet@9076
   935
            <tr class="FieldGroup_BottomMargin"></tr>
harpreet@9076
   936
harpreet@9076
   937
          </table>
harpreet@9076
   938
        </div>
harpreet@9076
   939
      </td>
harpreet@9076
   940
    </tr>
harpreet@9076
   941
    <tr>
harpreet@9076
   942
      <td>
harpreet@9076
   943
        <div class="Popup_ContentPane_Client" style="overflow: auto;" id="client_middle">
harpreet@9076
   944
          <table height="100%" border="0" cellpadding="0" cellspacing="0" id="gridPayment">
harpreet@9076
   945
            <tr>
harpreet@9076
   946
              <td valign="top" class="Popup_Client_Selector_DataGrid_LeftMargin">
harpreet@9076
   947
                <table width="100%" border="0" cellspacing="0" cellpadding="0" id="tdleftSeparator">
harpreet@9076
   948
                  <tr><td class="Popup_Client_Selector_DataGrid_LeftMargin"></td></tr>
harpreet@9076
   949
                </table>
harpreet@9076
   950
              </td>
harpreet@9076
   951
              <td valign="top">
harpreet@9076
   952
                <div id="client2" style="overflow: auto;">
harpreet@9076
   953
                  <table cellspacing="0" cellpadding="0" width="100%" class="DataGrid_Header_Table DataGrid_Body_Table" style="table-layout: auto;">
harpreet@9076
   954
                    <thead>
harpreet@9076
   955
                      <tr class="DataGrid_Body_Row">
harpreet@9076
   956
                        <th class="DataGrid_Header_LineNoCell DataGrid_Body_Cell_CheckBox" width="25"> 
harpreet@9076
   957
                          <input type="checkbox" name="inpAllLines" onclick="markAll(document.frmMain.inpScheduledPaymentDetailId, this.checked);updateAll();return true;"/>
harpreet@9076
   958
                        </th>
harpreet@9076
   959
                        <th class="DataGrid_Header_Cell" width="120"><span name="lblP" id="lblPPON">Purchase Order No.</span><span name="lblR" id="lblRSON">Sales Order No.</span></th>
harpreet@9076
   960
                        <th class="DataGrid_Header_Cell" width="120"><span name="lblP" id="lblPPIN">Purchase Invoice No.</span><span name="lblR" id="lblRSIN">Sales Invoice No.</span></th>
harpreet@9076
   961
                        <th class="DataGrid_Header_Cell" width="100">Payment Method</th>
harpreet@9076
   962
                        <th class="DataGrid_Header_Cell" width="70">Due Date</th>
harpreet@9076
   963
                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100">Invoiced Amount</th>
harpreet@9076
   964
                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100">Expected Amount</th>
harpreet@9076
   965
                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="100">Outstanding Amount</th>
harpreet@9076
   966
                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="110">Payment</th>
harpreet@9076
   967
                      </tr>
harpreet@9076
   968
                    </thead>
harpreet@9076
   969
                    <tbody id="sectionGrid">
harpreet@9076
   970
                    </tbody>
harpreet@9076
   971
                  </table>
harpreet@9076
   972
                  <input type="hidden" id="inpTotal" value="0" outputformat="euroEdition"/>
harpreet@9076
   973
                  <input type="hidden" name="inpDifference" id="inpDifference" value="0" outputformat="euroEdition"/>
harpreet@9076
   974
                  <table cellspacing="0" cellpadding="0" width="100%" class="" style="table-layout: auto;">
harpreet@9076
   975
                    <tr class="FieldGroup_BottomMargin"></tr>
harpreet@9076
   976
                    <tr>
harpreet@9076
   977
                      <td width="715" class="LabelText" style="text-align:right">Total</td>
harpreet@9076
   978
                      <td class="LabelText number" style="padding-right:10px;font-weight: bold;"><span id="paramTotal"></span></td>
harpreet@9076
   979
                    </tr>
harpreet@9076
   980
                    <tr id="sectionDifference">
harpreet@9076
   981
                      <td class="LabelText" style="text-align:right">There is a difference of</td>
harpreet@9076
   982
                      <td class="LabelText number" style="padding-right:10px;font-weight: bold;"><span id="paramDifference"></span></td>
harpreet@9076
   983
                    </tr>
harpreet@9076
   984
                    <tr id="sectionDifferenceBox">
harpreet@9076
   985
                      <td></td>
harpreet@9076
   986
                      <td>
harpreet@9076
   987
                        <table cellspacing="0" cellpadding="0" width="100%" class="" style="border: #888888 2px solid; table-layout: auto;">
harpreet@9076
   988
                          <tr id="underpayment">
harpreet@9076
   989
                            <td class="Radio_Check_ContentCell" width="20">
harpreet@9076
   990
                              <input type="radio" name="inpDifferenceAction" value="underpayment" checked="checked"/>
harpreet@9076
   991
                            </td>
harpreet@9076
   992
                            <td><span class="LabelText">Leave this as an underpayment</span></td>
harpreet@9076
   993
                          </tr>
harpreet@9076
   994
                          <tr id="credit">
harpreet@9076
   995
                            <td class="Radio_Check_ContentCell" width="20">
harpreet@9076
   996
                              <input type="radio" name="inpDifferenceAction" value="credit"/>
harpreet@9076
   997
                            </td>
harpreet@9076
   998
                            <td><span class="LabelText">Leave the credit to be used later</span></td>
harpreet@9076
   999
                          </tr>
harpreet@9076
  1000
                          <tr id="refund">
harpreet@9076
  1001
                            <td class="Radio_Check_ContentCell" width="20">
harpreet@9076
  1002
                              <input type="radio" name="inpDifferenceAction" value="refund"/>
harpreet@9076
  1003
                            </td>
harpreet@9076
  1004
                            <td><span class="LabelText">Refund amount to customer</span></td>
harpreet@9076
  1005
                          </tr>
harpreet@9076
  1006
                          <tr id="writeoff">
harpreet@9076
  1007
                            <td class="Radio_Check_ContentCell">
harpreet@9076
  1008
                              <input type="radio" name="inpDifferenceAction" value="writeoff"/>
harpreet@9076
  1009
                            </td>
harpreet@9076
  1010
                            <td><span class="LabelText">Write off the difference</span></td>
harpreet@9076
  1011
                          </tr>
harpreet@9076
  1012
                        </table>
harpreet@9076
  1013
                      </td>
harpreet@9076
  1014
                    </tr>
harpreet@9076
  1015
                  </table>
harpreet@9076
  1016
                </div>
harpreet@9076
  1017
              </td>
harpreet@9076
  1018
              <td valign="top" class="Popup_Client_Selector_DataGrid_RightMargin">
harpreet@9076
  1019
                <table width="100%" border="0" cellspacing="0" cellpadding="0" id="tdrightSeparator">
harpreet@9076
  1020
                  <tr><td class="Popup_Client_Selector_DataGrid_RightMargin"></td></tr>
harpreet@9076
  1021
                </table>
harpreet@9076
  1022
              </td>
harpreet@9076
  1023
            </tr>
harpreet@9076
  1024
            
harpreet@9076
  1025
          </table>
harpreet@9076
  1026
          <table height="100%" border="0" cellpadding="0" cellspacing="0" id="gridGLItem">
harpreet@9076
  1027
            <tr>
harpreet@9076
  1028
              <td valign="top" class="Popup_Client_Selector_DataGrid_LeftMargin">
harpreet@9076
  1029
                <table width="100%" border="0" cellspacing="0" cellpadding="0" id="tdleftSeparator">
harpreet@9076
  1030
                  <tr><td class="Popup_Client_Selector_DataGrid_LeftMargin"></td></tr>
harpreet@9076
  1031
                </table>
harpreet@9076
  1032
              </td>
harpreet@9076
  1033
              <td valign="top">
harpreet@9076
  1034
                <div id="client2" style="overflow: auto;">
harpreet@9076
  1035
                  <table cellspacing="0" cellpadding="0" width="100%" class="DataGrid_Header_Table DataGrid_Body_Table" style="table-layout: auto;">
harpreet@9076
  1036
                    <thead>
harpreet@9076
  1037
                      <tr class="DataGrid_Body_Row">
harpreet@9076
  1038
                        <th class="DataGrid_Header_Cell" width="400">GL Item</th>
harpreet@9076
  1039
                        <th class="DataGrid_Header_Cell DataGrid_Header_Cell_Inverse" width="200"><span name="lblR" id="lblRRecIn">Received In</span><span name="lblP" id="lblPPOut">Paid Out</span></th>
harpreet@9076
  1040
                        <th class="DataGrid_Header_LineNoCell" width="20"></th>
harpreet@9076
  1041
                      </tr>
harpreet@9076
  1042
                    </thead>
harpreet@9076
  1043
                    <tbody id="sectionGLItemGrid">
harpreet@9076
  1044
                    </tbody>
harpreet@9076
  1045
                  </table>
harpreet@9076
  1046
                </div>
harpreet@9076
  1047
              </td>
harpreet@9076
  1048
              <td valign="top" class="Popup_Client_Selector_DataGrid_RightMargin">
harpreet@9076
  1049
                <table width="100%" border="0" cellspacing="0" cellpadding="0" id="tdrightSeparator">
harpreet@9076
  1050
                  <tr><td class="Popup_Client_Selector_DataGrid_RightMargin"></td></tr>
harpreet@9076
  1051
                </table>
harpreet@9076
  1052
              </td>
harpreet@9076
  1053
            </tr>
harpreet@9076
  1054
          </table>
harpreet@9076
  1055
        </div>
harpreet@9076
  1056
      </td>
harpreet@9076
  1057
    </tr>
harpreet@9076
  1058
    
harpreet@9076
  1059
    <tr>
harpreet@9076
  1060
      <td>
harpreet@9076
  1061
        <div class="Popup_ContentPane_Client" style="overflow: auto; height:50px;" id="client_bottom">
harpreet@9076
  1062
          <table cellspacing="0" cellpadding="0" class="Popup_Client_TableSelector">
harpreet@9076
  1063
harpreet@9076
  1064
            <tr>
harpreet@9076
  1065
              <td class="TableEdition_OneCell_width"></td>
harpreet@9076
  1066
              <td class="TableEdition_OneCell_width"></td>
harpreet@9076
  1067
              <td class="TableEdition_OneCell_width"></td>
harpreet@9076
  1068
              <td class="TableEdition_OneCell_width"></td>
harpreet@9076
  1069
              <td class="TableEdition_OneCell_width"></td>
harpreet@9076
  1070
              <td class="TableEdition_OneCell_width"></td>
harpreet@9076
  1071
            </tr>
harpreet@9076
  1072
            <tr>
harpreet@9076
  1073
              <td></td>
harpreet@9076
  1074
              <td></td>
harpreet@9076
  1075
              <td class="Button_RightAlign_ContentCell">
harpreet@9076
  1076
                <div>
harpreet@9076
  1077
                  <button type="button" 
harpreet@9076
  1078
                    id="buttonProcess"
harpreet@9076
  1079
                    class="ButtonLink" 
harpreet@9076
  1080
                    onclick="openProcessPayment();return false;"
harpreet@9076
  1081
                    onfocus="buttonEvent('onfocus', this); window.status='Create'; return true;"
harpreet@9076
  1082
                    onblur="buttonEvent('onblur', this);"
harpreet@9076
  1083
                    onkeyup="buttonEvent('onkeyup', this);"
harpreet@9076
  1084
                    onkeydown="buttonEvent('onkeydown', this);"
harpreet@9076
  1085
                    onkeypress="buttonEvent('onkeypress', this);"
harpreet@9076
  1086
                    onmouseup="buttonEvent('onmouseup', this);"
harpreet@9076
  1087
                    onmousedown="buttonEvent('onmousedown', this);"
harpreet@9076
  1088
                    onmouseover="buttonEvent('onmouseover', this); window.status='Create'; return true;"
harpreet@9076
  1089
                    onmouseout="buttonEvent('onmouseout', this);">
harpreet@9076
  1090
                    <table class="Button">
harpreet@9076
  1091
                      <tr>
harpreet@9076
  1092
                        <td class="Button_left"><img class="Button_Icon Button_Icon_ok" alt="Process" title="Process" src="../../../../../web/images/blank.gif" border="0" /></td>
harpreet@9076
  1093
                        <td class="Button_text Button_width">Process</td>
harpreet@9076
  1094
                        <td class="Button_right"></td>
harpreet@9076
  1095
                      </tr>
harpreet@9076
  1096
                    </table>
harpreet@9076
  1097
                  </button>
harpreet@9076
  1098
                </div>
harpreet@9076
  1099
              </td>
harpreet@9076
  1100
              <td class="Button_LeftAlign_ContentCell">
harpreet@9076
  1101
                <div>
harpreet@9076
  1102
                  <button type="button" 
harpreet@9076
  1103
                    id="buttonCancel" 
harpreet@9076
  1104
                    class="ButtonLink" 
harpreet@9076
  1105
                    onclick="closeThisPage();return false;"
harpreet@9076
  1106
                    onfocus="buttonEvent('onfocus', this); window.status='Cancel'; return true;"
harpreet@9076
  1107
                    onblur="buttonEvent('onblur', this);"
harpreet@9076
  1108
                    onkeyup="buttonEvent('onkeyup', this);"
harpreet@9076
  1109
                    onkeydown="buttonEvent('onkeydown', this);"
harpreet@9076
  1110
                    onkeypress="buttonEvent('onkeypress', this);"
harpreet@9076
  1111
                    onmouseup="buttonEvent('onmouseup', this);"
harpreet@9076
  1112
                    onmousedown="buttonEvent('onmousedown', this);"
harpreet@9076
  1113
                    onmouseover="buttonEvent('onmouseover', this); window.status='Cancel'; return true;"
harpreet@9076
  1114
                    onmouseout="buttonEvent('onmouseout', this);">
harpreet@9076
  1115
                    <table class="Button">
harpreet@9076
  1116
                      <tr>
harpreet@9076
  1117
                        <td class="Button_left"><img class="Button_Icon Button_Icon_cancel" alt="Cancel" title="Cancel" src="../../../../../web/images/blank.gif" border="0" /></td>
harpreet@9076
  1118
                        <td class="Button_text Button_width">Cancel</td>
harpreet@9076
  1119
                        <td class="Button_right"></td>
harpreet@9076
  1120
                      </tr>
harpreet@9076
  1121
                    </table>
harpreet@9076
  1122
                  </button>
harpreet@9076
  1123
                </div>
harpreet@9076
  1124
              </td>
harpreet@9076
  1125
              <td></td>
harpreet@9076
  1126
              <td></td>
harpreet@9076
  1127
            </tr>
harpreet@9076
  1128
          </table>
harpreet@9076
  1129
        </div>
harpreet@9076
  1130
      </td>
harpreet@9076
  1131
    </tr>
harpreet@9076
  1132
  </table>
harpreet@9076
  1133
</form>
harpreet@9076
  1134
</body>
harpreet@9076
  1135
</html>