diff --git a/views/bootstrap/class.ReceiptDocument.php b/views/bootstrap/class.ReceiptDocument.php
index 7b15b77ed..46ccdc353 100644
--- a/views/bootstrap/class.ReceiptDocument.php
+++ b/views/bootstrap/class.ReceiptDocument.php
@@ -37,8 +37,8 @@ class SeedDMS_View_ReceiptDocument extends SeedDMS_Bootstrap_Style {
function checkIndForm()
{
msg = new Array();
- if (document.form1.reviewStatus.value == "") msg.push("");
- if (document.form1.comment.value == "") msg.push("");
+ if (document.formind.reviewStatus.value == "") msg.push("");
+ if (document.formind.comment.value == "") msg.push("");
if (msg != "") {
noty({
text: msg.join('
'),
@@ -55,10 +55,10 @@ function checkIndForm()
}
function checkGrpForm()
{
- msg = "";
- if (document.form2.reviewGroup.value == "") msg += "\n";
- if (document.form2.reviewStatus.value == "") msg += "\n";
- if (document.form2.comment.value == "") msg += "\n";
+ msg = new Array();
+ if (document.formgrp.reviewGroup.value == "") msg.push("");
+ if (document.formgrp.reviewStatus.value == "") msg.push("");
+ if (document.formgrp.comment.value == "") msg.push("");
if (msg != "")
{
noty({
@@ -75,11 +75,11 @@ function checkGrpForm()
return true;
}
$(document).ready(function() {
- $('body').on('submit', '#form1', function(ev){
+ $('body').on('submit', '#formind', function(ev){
if(checkIndForm()) return;
event.preventDefault();
});
- $('body').on('submit', '#form2', function(ev){
+ $('body').on('submit', '#formgrp', function(ev){
if(checkGrpForm()) return;
event.preventDefault();
});
@@ -110,24 +110,24 @@ $(document).ready(function() {
$this->contentContainerStart();
// Display the Receipt form.
- if ($receiptStatus['type'] == 0) {
- if($receiptStatus["status"]!=0) {
+ $receipttype = ($receiptStatus['type'] == 0) ? 'ind' : 'grp';
+ if($receiptStatus["status"]!=0) {
- print "
";
- print "".getMLText("status")." | ";
- print "".getMLText("comment")." | ";
- print "".getMLText("last_update")." | ";
- print "
";
- print "";
- printReceiptStatusText($receiptStatus["status"]);
- print " | ";
- print "".htmlspecialchars($receiptStatus["comment"])." | ";
- $indUser = $dms->getUser($receiptStatus["userID"]);
- print "".$receiptStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) ." | ";
- print "
";
- }
+ print "";
+ print "".getMLText("status")." | ";
+ print "".getMLText("comment")." | ";
+ print "".getMLText("last_update")." | ";
+ print "
";
+ print "";
+ printReceiptStatusText($receiptStatus["status"]);
+ print " | ";
+ print "".htmlspecialchars($receiptStatus["comment"])." | ";
+ $indUser = $dms->getUser($receiptStatus["userID"]);
+ print "".$receiptStatus["date"]." - ". htmlspecialchars($indUser->getFullname()) ." | ";
+ print "
\n";
+ }
?>
-