Removed monetary_source_type. It was redundant, and it's entirely unclear what purpose it ultimately would or could serve. Our use of different accounts for Check, Cash, etc likely obsoleted any intention we might have had for monetary_source_type

git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629/site@288 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-09 08:28:34 +00:00
parent 55413590a2
commit 0c8035b402
9 changed files with 19 additions and 75 deletions

View File

@@ -175,14 +175,12 @@ function addPaymentSource(flash) {
foreach(array('Cash', 'Check', 'Money Order', 'ACH', /*'Credit Card'*/ 'Concession') AS $name) {
$type = preg_replace("/ /", "", strtolower($name));
$acct = $name;
/* if ($acct === 'ACH') */
/* $acct = 'Bank'; */
$types[] = array('key' => $type, 'name' => $name, 'acct' => $acct);
}
foreach ($types AS $type) {
$div = '<DIV>';
$div .= '<INPUT TYPE="radio" NAME="data[LedgerEntry][%{id}][monetary_type_name]"';
$div .= '<INPUT TYPE="radio" NAME="data[LedgerEntry][%{id}][account_name]"';
$div .= ' ONCLICK="switchPaymentType(\\\'payment-type-div\\\', %{id}, \\\''.$type['key'].'\\\')"';
$div .= ' CLASS="payment-radio-%{id}" ID="payment-radio-%{id}-'.$type['key'].'"';
$div .= ' VALUE="'.$type['acct'].'" ' . ($type['name'] == 'Cash' ? 'CHECKED ' : '') . '/>';

View File

@@ -4,7 +4,6 @@
$cols = array();
$cols['ID'] = array('index' => 'MonetarySource.id', 'formatter' => 'id');
$cols['Name'] = array('index' => 'MonetarySource.name', 'formatter' => 'longname');
$cols['Type'] = array('index' => 'MonetaryType.name', 'formatter' => 'name');
$cols['Comment'] = array('index' => 'MonetarySource.comment', 'formatter' => 'comment');
// Set up search fields if requested by caller

View File

@@ -9,17 +9,14 @@ echo '<div class="monetary-source view">' . "\n";
* MonetarySource Detail Main Section
*/
$type = $monetarySource['MonetaryType'];
$source = $monetarySource['MonetarySource'];
$rows = array(array('ID', $source['id']),
array('Name', $source['name']),
array('Type', $type['name']),
array('Data 1', $source['data1']),
array('Data 2', $source['data2']),
array('Data 3', $source['data3']),
array('Data 4', $source['data4']),
array('Tillable', $type['tillable'] ? 'Yes' : 'No'),
array('Comment', $source['comment']));
echo $this->element('table',