[ PHPXref.com ] [ Generated: Sun Jul 20 21:01:50 2008 ] [ webERP 3.0.4 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> GLBalanceSheet.php (source)

   1  <?php
   2  
   3  /* $Revision: 1.9 $ */
   4  
   5  /*Through deviousness and cunning, this system allows shows the balance sheets as at the end of any period selected - so first off need to show the input of criteria screen while the user is selecting the period end of the balance date meanwhile the system is posting any unposted transactions */
   6  
   7  $PageSecurity = 8;
   8  
   9  include  ('includes/session.inc');
  10  $title = _('Balance Sheet');
  11  include ('includes/SQL_CommonFunctions.inc');
  12  include ('includes/AccountSectionsDef.inc'); // This loads the $Sections variable
  13  
  14  if (! isset($_POST['BalancePeriodEnd']) OR isset($_POST['SelectADifferentPeriod'])){
  15  
  16      /*Show a form to allow input of criteria for TB to show */
  17      include ('includes/header.inc');
  18      echo "<FORM METHOD='POST' ACTION=" . $_SERVER['PHP_SELF'] . '?' . SID . '>';
  19      echo '<CENTER><TABLE><TR><TD>'._('Select the balance date').":</TD><TD><SELECT Name='BalancePeriodEnd'>";
  20  
  21      $sql = 'SELECT periodno, lastdate_in_period FROM periods';
  22      $Periods = DB_query($sql,$db);
  23  
  24      while ($myrow=DB_fetch_array($Periods,$db)){
  25          if( $_POST['BalancePeriodEnd']== $myrow['periodno']){
  26              echo '<OPTION SELECTED VALUE=' . $myrow['periodno'] . '>' . ConvertSQLDate($myrow['lastdate_in_period']);
  27          } else {
  28              echo '<OPTION VALUE=' . $myrow['periodno'] . '>' . ConvertSQLDate($myrow['lastdate_in_period']);
  29          }
  30      }
  31  
  32      echo '</SELECT></TD></TR>';
  33  
  34      echo '<TR><TD>'._('Detail Or Summary').":</TD><TD><SELECT Name='Detail'>";
  35      echo "<OPTION SELECTED VALUE='Summary'>"._('Summary');
  36      echo "<OPTION SELECTED VALUE='Detailed'>"._('All Accounts');
  37      echo '</SELECT></TD></TR>';
  38  
  39      echo '</TABLE>';
  40  
  41      echo "<INPUT TYPE=SUBMIT Name='ShowBalanceSheet' Value='"._('Show Balance Sheet')."'></CENTER>";
  42      echo "<CENTER><INPUT TYPE=SUBMIT Name='PrintPDF' Value='"._('Print PDF')."'></CENTER>";
  43  
  44      /*Now do the posting while the user is thinking about the period to select */
  45      include  ('includes/GLPostings.inc');
  46  
  47  } else if (isset($_POST['PrintPDF'])) {
  48  
  49      include ('includes/PDFStarter.php');
  50      $PageNumber = 0;
  51      $FontSize = 10;
  52      $pdf->addinfo('Title', _('Balance Sheet') );
  53      $pdf->addinfo('Subject', _('Balance Sheet') );
  54      $line_height = 12;
  55  
  56      $RetainedEarningsAct = $_SESSION['CompanyRecord']['retainedearnings'];
  57  
  58      $sql = 'SELECT lastdate_in_period FROM periods WHERE periodno=' . $_POST['BalancePeriodEnd'];
  59      $PrdResult = DB_query($sql, $db);
  60      $myrow = DB_fetch_row($PrdResult);
  61      $BalanceDate = ConvertSQLDate($myrow[0]);
  62  
  63      /*Calculate B/Fwd retained earnings */
  64  
  65      $SQL = 'SELECT Sum(CASE WHEN chartdetails.period=' . $_POST['BalancePeriodEnd'] . ' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS accumprofitbfwd,
  66              Sum(CASE WHEN chartdetails.period=' . ($_POST['BalancePeriodEnd'] - 12) . " THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lyaccumprofitbfwd
  67          FROM chartmaster INNER JOIN accountgroups
  68          ON chartmaster.group_ = accountgroups.groupname INNER JOIN chartdetails
  69          ON chartmaster.accountcode= chartdetails.accountcode
  70          WHERE accountgroups.pandl=1";
  71  
  72      $AccumProfitResult = DB_query($SQL,$db);
  73      if (DB_error_no($db) !=0) {
  74          $title = _('Balance Sheet') . ' - ' . _('Problem Report') . '....';
  75          include ('includes/header.inc');
  76          prnMsg( _('The accumulated profits brought forward could not be calculated by the SQL because') . ' - ' . DB_error_msg($db) );
  77          echo '<BR><A HREF="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</A>';
  78          if ($debug==1){
  79              echo '<BR>'. $SQL;
  80          }
  81          include ('includes/footer.inc');
  82          exit;
  83      }
  84  
  85      $AccumProfitRow = DB_fetch_array($AccumProfitResult); /*should only be one row returned */
  86  
  87      $SQL = 'SELECT accountgroups.sectioninaccounts, 
  88              accountgroups.groupname,
  89              chartdetails.accountcode ,
  90              chartmaster.accountname,
  91              Sum(CASE WHEN chartdetails.period=' . $_POST['BalancePeriodEnd'] . ' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS balancecfwd,
  92              Sum(CASE WHEN chartdetails.period=' . ($_POST['BalancePeriodEnd'] - 12) . ' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lybalancecfwd
  93          FROM chartmaster INNER JOIN accountgroups
  94          ON chartmaster.group_ = accountgroups.groupname INNER JOIN chartdetails
  95          ON chartmaster.accountcode= chartdetails.accountcode
  96          WHERE accountgroups.pandl=0
  97          GROUP BY accountgroups.groupname,
  98              chartdetails.accountcode,
  99              chartmaster.accountname,
 100              accountgroups.sequenceintb,
 101              accountgroups.sectioninaccounts
 102          ORDER BY accountgroups.sectioninaccounts, 
 103              accountgroups.sequenceintb, 
 104              chartdetails.accountcode';
 105  
 106      $AccountsResult = DB_query($SQL,$db);
 107      if (DB_error_no($db) !=0) {
 108          $title = _('Balance Sheet') . ' - ' . _('Problem Report') . '....';
 109          include ('includes/header.inc');
 110          prnMsg( _('No general ledger accounts were returned by the SQL because') . ' - ' . DB_error_msg($db) );
 111          echo '<BR><A HREF="' .$rootpath .'/index.php?' . SID . '">'. _('Back to the menu'). '</A>';
 112          if ($debug==1){
 113              echo '<BR>'. $SQL;
 114          }
 115          include ('includes/footer.inc');
 116          exit;
 117      }
 118  
 119      include ('includes/PDFBalanceSheetPageHeader.inc');
 120      
 121      $k=0; //row colour counter
 122      $Section='';
 123      $SectionBalance = 0;
 124      $SectionBalanceLY = 0;
 125  
 126      $LYCheckTotal = 0;
 127      $CheckTotal = 0;
 128  
 129      $ActGrp ='';
 130  
 131      $GroupTotal = 0;
 132      $LYGroupTotal = 0;
 133  
 134      while ($myrow=DB_fetch_array($AccountsResult)) {
 135  
 136          $AccountBalance = $myrow['balancecfwd'];
 137          $LYAccountBalance = $myrow['lybalancecfwd'];
 138  
 139          if ($myrow['accountcode'] == $RetainedEarningsAct){
 140              $AccountBalance += $AccumProfitRow['accumprofitbfwd'];
 141              $LYAccountBalance += $AccumProfitRow['lyaccumprofitbfwd'];
 142          }
 143  
 144          if ($myrow['groupname']!= $ActGrp AND $_POST['Detail']=='Summary' AND $ActGrp != '') {
 145              $YPos -= (2 * $line_height);
 146              $FontSize = 8;
 147              $pdf->selectFont('./fonts/Helvetica.afm');
 148              $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,200,$FontSize,$ActGrp);
 149              $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,number_format($GroupTotal),'right');
 150              $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,number_format($LYGroupTotal),'right');
 151              $YPos -= $line_height;
 152          }
 153          if ($myrow['sectioninaccounts']!= $Section){
 154  
 155              if ($SectionBalanceLY+$SectionBalance !=0){
 156                  $FontSize = 8;
 157                  $pdf->selectFont('./fonts/Helvetica-Bold.afm');
 158                  $LeftOvers = $pdf->addTextWrap($Left_Margin+10,$YPos,200,$FontSize,$Sections[$Section]);
 159                  $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,number_format($SectionBalance),'right');
 160                  $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,number_format($SectionBalanceLY),'right');
 161                  $YPos -= (2 * $line_height);
 162              }
 163              $SectionBalanceLY = 0;
 164              $SectionBalance = 0;
 165  
 166              $Section = $myrow['sectioninaccounts'];
 167              if ($_POST['Detail']=='Detailed'){
 168                  $FontSize = 10;
 169                  $pdf->selectFont('./fonts/Helvetica.afm');
 170                  $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,200,$FontSize,$Sections[$myrow['sectioninaccounts']]);
 171                  $YPos -= (2 * $line_height);
 172              }
 173          }
 174  
 175          if ($myrow['groupname']!= $ActGrp){
 176  
 177              if ($_POST['Detail']=='Detailed'){
 178                  $ActGrp = $myrow['groupname'];
 179                  $FontSize = 8;
 180                  $pdf->selectFont('./fonts/Helvetica.afm');
 181                  $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,200,$FontSize,$myrow['groupname']);
 182                  $YPos -= $line_height;
 183              }
 184              $GroupTotal=0;
 185              $LYGroupTotal=0;
 186              $ActGrp = $myrow['groupname'];
 187          }
 188  
 189          $SectionBalanceLY +=    $LYAccountBalance;
 190          $SectionBalance      +=    $AccountBalance;
 191  
 192          $LYGroupTotal      +=    $LYAccountBalance;
 193          $GroupTotal      +=    $AccountBalance;
 194  
 195          $LYCheckTotal       +=    $LYAccountBalance;
 196          $CheckTotal        +=    $AccountBalance;
 197  
 198  
 199          if ($_POST['Detail']=='Detailed'){
 200              $FontSize = 8;
 201              $pdf->selectFont('./fonts/Helvetica.afm');
 202              $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,50,$FontSize,$myrow['accountcode']);
 203              $LeftOvers = $pdf->addTextWrap($Left_Margin+55,$YPos,200,$FontSize,$myrow['accountname']);
 204              $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,number_format($AccountBalance),'right');
 205              $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,number_format($LYAccountBalance),'right');
 206              $YPos -= $line_height;
 207          }
 208          if ($YPos < ($Bottom_Margin)){
 209              include ('includes/PDFBalanceSheetPageHeader.inc');
 210          }
 211      }//end of loop
 212  
 213      if ($SectionBalanceLY+$SectionBalance !=0){
 214          if ($_POST['Detail']=='Summary'){
 215              $YPos -= (2 * $line_height);
 216              $FontSize = 8;
 217              $pdf->selectFont('./fonts/Helvetica.afm');
 218              $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,200,$FontSize,$ActGrp);
 219              $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,number_format($GroupTotal),'right');
 220              $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,number_format($LYGroupTotal),'right');
 221              $YPos -= $line_height;
 222          }
 223  
 224              $FontSize = 8;
 225              $pdf->selectFont('./fonts/Helvetica-Bold.afm');
 226              $LeftOvers = $pdf->addTextWrap($Left_Margin+10,$YPos,200,$FontSize,$Sections[$Section]);
 227              $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,number_format($SectionBalance),'right');
 228              $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,number_format($SectionBalanceLY),'right');
 229              $YPos -= $line_height;
 230      }
 231      
 232      $YPos -= $line_height;
 233      $FontSize = 8;
 234      $pdf->selectFont('./fonts/Helvetica.afm');
 235      $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,200,$FontSize,'Check Total');
 236      $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,number_format($CheckTotal),'right');
 237      $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,number_format($LYCheckTotal),'right');
 238  
 239      $pdfcode = $pdf->output();
 240      $len = strlen($pdfcode);
 241      
 242      if ($len<=20){
 243          $title = _('Print Balance Sheet Error');
 244          include ('includes/header.inc');
 245          echo '<p>';
 246          prnMsg( _('There were no entries to print out for the selections specified') );
 247          echo '<BR><A HREF="'. $rootpath.'/index.php?' . SID . '">'. _('Back to the menu'). '</A>';
 248          include ('includes/footer.inc');
 249          exit;
 250      } else {
 251          header('Content-type: application/pdf');
 252          header('Content-Length: ' . $len);
 253          header('Content-Disposition: inline; filename=CustomerList.pdf');
 254          header('Expires: 0');
 255          header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
 256          header('Pragma: public');
 257  
 258          $pdf->Stream();
 259  
 260      }
 261      exit;
 262  } else {
 263      include ('includes/header.inc');
 264      echo "<FORM METHOD='POST' ACTION=" . $_SERVER['PHP_SELF'] . '?' . SID . '>';
 265      echo "<INPUT TYPE=HIDDEN NAME='BalancePeriodEnd' VALUE=" . $_POST['BalancePeriodEnd'] . '>';
 266  
 267      $RetainedEarningsAct = $_SESSION['CompanyRecord']['retainedearnings'];
 268  
 269      $sql = 'SELECT lastdate_in_period FROM periods WHERE periodno=' . $_POST['BalancePeriodEnd'];
 270      $PrdResult = DB_query($sql, $db);
 271      $myrow = DB_fetch_row($PrdResult);
 272      $BalanceDate = ConvertSQLDate($myrow[0]);
 273  
 274      /*Calculate B/Fwd retained earnings */
 275  
 276      $SQL = 'SELECT Sum(CASE WHEN chartdetails.period=' . $_POST['BalancePeriodEnd'] . ' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS accumprofitbfwd,
 277              Sum(CASE WHEN chartdetails.period=' . ($_POST['BalancePeriodEnd'] - 12) . " THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lyaccumprofitbfwd
 278          FROM chartmaster INNER JOIN accountgroups
 279          ON chartmaster.group_ = accountgroups.groupname INNER JOIN chartdetails
 280          ON chartmaster.accountcode= chartdetails.accountcode
 281          WHERE accountgroups.pandl=1";
 282  
 283      $AccumProfitResult = DB_query($SQL,$db,_('The accumulated profits brought forward could not be calculated by the SQL because'));
 284  
 285      $AccumProfitRow = DB_fetch_array($AccumProfitResult); /*should only be one row returned */
 286  
 287      $SQL = 'SELECT accountgroups.sectioninaccounts, 
 288              accountgroups.groupname,
 289              chartdetails.accountcode ,
 290              chartmaster.accountname,
 291              Sum(CASE WHEN chartdetails.period=' . $_POST['BalancePeriodEnd'] . ' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS balancecfwd,
 292              Sum(CASE WHEN chartdetails.period=' . ($_POST['BalancePeriodEnd'] - 12) . ' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lybalancecfwd
 293          FROM chartmaster INNER JOIN accountgroups
 294          ON chartmaster.group_ = accountgroups.groupname INNER JOIN chartdetails
 295          ON chartmaster.accountcode= chartdetails.accountcode
 296          WHERE accountgroups.pandl=0
 297          GROUP BY accountgroups.groupname,
 298              chartdetails.accountcode,
 299              chartmaster.accountname,
 300              accountgroups.sequenceintb,
 301              accountgroups.sectioninaccounts
 302          ORDER BY accountgroups.sectioninaccounts, 
 303              accountgroups.sequenceintb, 
 304              chartdetails.accountcode';
 305  
 306      $AccountsResult = DB_query($SQL,$db,_('No general ledger accounts were returned by the SQL because'));
 307  
 308      echo '<CENTER><FONT SIZE=4 COLOR=BLUE><B>'._('Balance Sheet as at')." $BalanceDate</B></FONT><BR>";
 309  
 310      echo '<TABLE CELLPADDING=2>';
 311  
 312      if ($_POST['Detail']=='Detailed'){
 313          $TableHeader = "<TR>
 314                  <TD class='tableheader'>"._('Account')."</TD>
 315                  <TD class='tableheader'>"._('Account Name')."</TD>
 316                  <TD COLSPAN=2 class='tableheader' ALIGN=CENTER>$BalanceDate</TD>
 317                  <TD COLSPAN=2 class='tableheader' ALIGN=CENTER>"._('Last Year').'</TD>
 318                  </TR>';
 319      } else { /*summary */
 320          $TableHeader = "<TR>
 321                  <TD COLSPAN=2 class='tableheader'></TD>
 322                  <TD COLSPAN=2 class='tableheader' ALIGN=CENTER>$BalanceDate</TD>
 323                  <TD COLSPAN=2 class='tableheader' ALIGN=CENTER>"._('Last Year').'</TD>
 324                  </TR>';
 325      }
 326  
 327  
 328      $k=0; //row colour counter
 329      $Section='';
 330      $SectionBalance = 0;
 331      $SectionBalanceLY = 0;
 332  
 333      $LYCheckTotal = 0;
 334      $CheckTotal = 0;
 335  
 336      $ActGrp ='';
 337  
 338      $GroupTotal = 0;
 339      $LYGroupTotal = 0;
 340  
 341      while ($myrow=DB_fetch_array($AccountsResult)) {
 342  
 343          $AccountBalance = $myrow['balancecfwd'];
 344          $LYAccountBalance = $myrow['lybalancecfwd'];
 345  
 346          if ($myrow['accountcode'] == $RetainedEarningsAct){
 347              $AccountBalance += $AccumProfitRow['accumprofitbfwd'];
 348              $LYAccountBalance += $AccumProfitRow['lyaccumprofitbfwd'];
 349          }
 350  
 351          if ($myrow['groupname']!= $ActGrp AND $_POST['Detail']=='Summary' AND $ActGrp != '') {
 352  
 353              printf('<td COLSPAN=3>%s</td>
 354              <td ALIGN=RIGHT>%s</td>
 355              <TD></TD>
 356              <td ALIGN=RIGHT>%s</td>
 357              </tr>',
 358              $ActGrp,
 359              number_format($GroupTotal),
 360              number_format($LYGroupTotal)
 361              );
 362  
 363          }
 364          if ($myrow['sectioninaccounts']!= $Section){
 365  
 366              if ($SectionBalanceLY+$SectionBalance !=0){
 367                  if ($_POST['Detail']=='Detailed'){
 368                      echo '<TR>
 369                      <TD COLSPAN=2></TD>
 370                            <TD><HR></TD>
 371                      <TD></TD>
 372                      <TD><HR></TD>
 373                      <TD></TD>
 374                      </TR>';
 375                  } else {
 376                      echo '<TR>
 377                      <TD COLSPAN=3></TD>
 378                            <TD><HR></TD>
 379                      <TD></TD>
 380                      <TD><HR></TD>
 381                      </TR>';
 382                  }
 383  
 384                  printf('<TR>
 385                      <TD COLSPAN=3><FONT SIZE=4>%s</FONT></td>
 386                      <TD ALIGN=RIGHT>%s</TD>
 387                      <TD></TD>
 388                      <TD ALIGN=RIGHT>%s</TD>
 389                  </TR>',
 390                  $Sections[$Section],
 391                  number_format($SectionBalance),
 392                  number_format($SectionBalanceLY));
 393              }
 394              $SectionBalanceLY = 0;
 395              $SectionBalance = 0;
 396  
 397              $Section = $myrow['sectioninaccounts'];
 398  
 399              if ($_POST['Detail']=='Detailed'){
 400                  printf('<TR>
 401                      <TD COLSPAN=6><FONT SIZE=4 COLOR=BLUE><B>%s</B></FONT></TD>
 402                      </TR>',
 403                      $Sections[$myrow['sectioninaccounts']]);
 404              }
 405          }
 406  
 407          if ($myrow['groupname']!= $ActGrp){
 408  
 409              if ($_POST['Detail']=='Detailed'){
 410                  $ActGrp = $myrow['groupname'];
 411                  printf('<TR>
 412                  <td COLSPAN=6><FONT SIZE=2 COLOR=BLUE><B>%s</B></FONT></TD>
 413                  </TR>',
 414                  $myrow['groupname']);
 415                  echo $TableHeader;
 416              }
 417              $GroupTotal=0;
 418              $LYGroupTotal=0;
 419              $ActGrp = $myrow["groupname"];
 420          }
 421  
 422          $SectionBalanceLY +=    $LYAccountBalance;
 423          $SectionBalance      +=    $AccountBalance;
 424  
 425          $LYGroupTotal      +=    $LYAccountBalance;
 426          $GroupTotal      +=    $AccountBalance;
 427  
 428          $LYCheckTotal       +=    $LYAccountBalance;
 429          $CheckTotal        +=    $AccountBalance;
 430  
 431  
 432          if ($_POST['Detail']=='Detailed'){
 433  
 434              if ($k==1){
 435                  echo "<tr bgcolor='#CCCCCC'>";
 436                  $k=0;
 437              } else {
 438                  echo "<tr bgcolor='#EEEEEE'>";
 439                  $k++;
 440              }
 441  
 442              $ActEnquiryURL = "<A HREF='$rootpath/GLAccountInquiry.php?" . SID . "Period=" . $_POST['BalancePeriodEnd'] . '&Account=' . $myrow['accountcode'] . "'>" . $myrow['accountcode'] . '<A>';
 443  
 444              $PrintString = '<td>%s</td>
 445                      <td>%s</td>
 446                      <td ALIGN=RIGHT>%s</td>
 447                      <TD></TD>
 448                      <td ALIGN=RIGHT>%s</td>
 449                      <TD></TD>
 450                      </tr>';
 451  
 452              printf($PrintString,
 453                  $ActEnquiryURL,
 454                  $myrow['accountname'],
 455                  number_format($AccountBalance),
 456                  number_format($LYAccountBalance)
 457                  );
 458  
 459          }
 460      }
 461      //end of loop
 462  
 463  
 464      if ($SectionBalanceLY+$SectionBalance !=0){
 465          if ($_POST['Detail']=='Summary'){
 466              printf('<td COLSPAN=3>%s</td>
 467                  <td ALIGN=RIGHT>%s</td>
 468                  <TD></TD>
 469                  <td ALIGN=RIGHT>%s</td>
 470                  </tr>',
 471              $ActGrp,
 472              number_format($GroupTotal),
 473              number_format($LYGroupTotal)
 474              );
 475          }
 476          echo "<TR>
 477              <TD COLSPAN=3></TD>
 478                    <TD><HR></TD>
 479              <TD></TD>
 480              <TD><HR></TD>
 481              </TR>";
 482  
 483          printf('<TR>
 484              <TD COLSPAN=3><FONT SIZE=4>%s</FONT></td>
 485              <TD ALIGN=RIGHT>%s</TD>
 486              <TD></TD>
 487              <TD ALIGN=RIGHT>%s</TD>
 488              </TR>',
 489              $Sections[$Section],
 490              number_format($SectionBalance),
 491              number_format($SectionBalanceLY));
 492      }
 493  
 494      echo '<TR>
 495          <TD COLSPAN=3></TD>
 496                <TD><HR></TD>
 497          <TD></TD>
 498          <TD><HR></TD>
 499          </TR>';
 500  
 501      printf('<TR>
 502          <TD COLSPAN=3>'._('Check Total').'</FONT></td>
 503          <TD ALIGN=RIGHT>%s</TD>
 504          <TD></TD>
 505          <TD ALIGN=RIGHT>%s</TD>
 506          </TR>',
 507          number_format($CheckTotal),
 508          number_format($LYCheckTotal));
 509  
 510      echo '<TR>
 511          <TD COLSPAN=3></TD>
 512                <TD><HR></TD>
 513          <TD></TD>
 514          <TD><HR></TD>
 515          </TR>';
 516  
 517      echo '</TABLE>';
 518      echo "<INPUT TYPE=SUBMIT Name='SelectADifferentPeriod' Value='"._('Select A Different Balance Date')."'></CENTER>";
 519  }
 520  
 521  echo '</FORM>';
 522  include ('includes/footer.inc');
 523  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]