Added mechanism for user to know the rent amount on the invoice screen.
git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629/site@250 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -101,6 +101,9 @@ function resetForm() {
|
||||
$("#invoice-lease").html("INTERNAL ERROR");
|
||||
$("#invoice-unit").html("INTERNAL ERROR");
|
||||
$("#invoice-customer").html("INTERNAL ERROR");
|
||||
$("#invoice-rent").html("INTERNAL ERROR");
|
||||
$("#invoice-late").html("INTERNAL ERROR");
|
||||
$("#invoice-deposit").html("INTERNAL ERROR");
|
||||
|
||||
addChargeSource(false);
|
||||
datepickerNow('charge_date');
|
||||
@@ -116,6 +119,11 @@ function onRowSelect(grid_id, lease_id) {
|
||||
$("#invoice-lease").html($(grid_id).getCell(lease_id, 'Lease-number'));
|
||||
$("#invoice-unit").html($(grid_id).getCell(lease_id, 'Unit-name'));
|
||||
$("#invoice-customer").html($(grid_id).getCell(lease_id, 'Customer-name'));
|
||||
$("#invoice-rent").html($(grid_id).getCell(lease_id, 'Lease-rent'));
|
||||
$("#invoice-late").html('$10.00');
|
||||
$("#invoice-deposit").html($(grid_id).getCell(lease_id, 'Lease-deposit')
|
||||
? $(grid_id).getCell(lease_id, 'Lease-deposit')
|
||||
: '-');
|
||||
|
||||
// Hide the "no lease" message and show the current lease
|
||||
$("#no-lease").hide();
|
||||
@@ -185,16 +193,47 @@ echo $this->element('leases',
|
||||
'limit' => 10,
|
||||
));
|
||||
|
||||
echo ('<H2>' .
|
||||
'<SPAN id="current-lease" style="display:none">' .
|
||||
echo ('<SPAN id="current-lease" style="display:none">' .
|
||||
'<DIV>' .
|
||||
'<H2>' .
|
||||
'Lease <SPAN id="invoice-lease"></SPAN>' . ' / ' .
|
||||
'Unit: <SPAN id="invoice-unit"></SPAN>' . ' / ' .
|
||||
'Customer: <SPAN id="invoice-customer"></SPAN>' .
|
||||
'</H2>' .
|
||||
'</DIV>' .
|
||||
'<DIV>' .
|
||||
|
||||
/* '<H3>' . */
|
||||
/* 'Rent: <SPAN id="invoice-rent"></SPAN>' . */
|
||||
/* '<BR>' . */
|
||||
/* 'Late Fee: <SPAN id="invoice-late"></SPAN>' . */
|
||||
/* '<BR>' . */
|
||||
/* 'Deposit: <SPAN id="invoice-deposit"></SPAN>' . */
|
||||
/* '</H3>' . */
|
||||
|
||||
/* '<H3>' . */
|
||||
/* 'Rent: <SPAN id="invoice-rent"></SPAN>' . ' / ' . */
|
||||
/* 'Late Fee: <SPAN id="invoice-late"></SPAN>' . ' / ' . */
|
||||
/* 'Deposit: <SPAN id="invoice-deposit"></SPAN>' . */
|
||||
/* '</H3>' . */
|
||||
|
||||
'<H3>' .
|
||||
'<TABLE BORDER=0>' .
|
||||
'<TR><TD style="width:5em;">Rent:</TD><TD><SPAN id="invoice-rent"></SPAN></TD></TR>' .
|
||||
'<TR><TD>Late Fee:</TD><TD><SPAN id="invoice-late"></SPAN></TD></TR>' .
|
||||
'<TR><TD>Deposit:</TD><TD><SPAN id="invoice-deposit"></SPAN></TD></TR>' .
|
||||
'</TABLE>' .
|
||||
'</H3>' .
|
||||
'<BR />' .
|
||||
|
||||
'</DIV>' .
|
||||
'</SPAN>' .
|
||||
'<SPAN id="no-lease" style="display:none">' .
|
||||
'<H2>' .
|
||||
'Please select lease' .
|
||||
'</H2>' .
|
||||
'</SPAN>' .
|
||||
'</H2>' . "\n");
|
||||
"\n");
|
||||
|
||||
echo $form->create(null, array('id' => 'invoice-form',
|
||||
'url' => array('controller' => 'transactions',
|
||||
@@ -270,6 +309,9 @@ echo $form->submit('Generate Invoice') . "\n";
|
||||
$("#invoice-lease").html("<?php echo '#'.$lease['Lease']['number']; ?>");
|
||||
$("#invoice-unit").html("<?php echo $lease['Unit']['name']; ?>");
|
||||
$("#invoice-customer").html("<?php echo $lease['Customer']['name']; ?>");
|
||||
$("#invoice-rent").html("<?php echo FormatHelper::currency($lease['Lease']['rent']); ?>");
|
||||
$("#invoice-late").html('$10.00');
|
||||
$("#invoice-deposit").html("<?php echo FormatHelper::currency($lease['Lease']['deposit']); ?>");
|
||||
onGridState(null, 'hidden');
|
||||
<?php else: ?>
|
||||
onGridState(null, 'visible');
|
||||
|
||||
Reference in New Issue
Block a user