[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1898] trunk



Revision: 1898
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1898&view=rev
Author:   einhverfr
Date:     2007-11-24 00:09:03 -0800 (Sat, 24 Nov 2007)

Log Message:
-----------
Moving Customer templates to be generally used by vendors, etc.

Modified Paths:
--------------
    trunk/ledgersmb-httpd.conf
    trunk/scripts/customer.pl
    trunk/scripts/login.pl
    trunk/scripts/payment.pl

Added Paths:
-----------
    trunk/UI/Contact/contact.css
    trunk/UI/Contact/contact.html

Removed Paths:
-------------
    trunk/UI/Contact/customer.css
    trunk/UI/Contact/customer.html

Added: trunk/UI/Contact/contact.css
===================================================================
--- trunk/UI/Contact/contact.css	                        (rev 0)
+++ trunk/UI/Contact/contact.css	2007-11-24 08:09:03 UTC (rev 1898)
@@ -0,0 +1,20 @@
+label {
+	text-align: right;
+	margin-left: auto;
+	margin-right: 0em;
+}
+
+input { margin-left: 0em;
+	margin-right: auto;
+}
+
+ul.navigation li {
+	display: inline;
+	padding-left: 1em;
+	padding-right: 1em;
+	padding-top: 0.5em;
+	padding-bottom: 0.5em;
+	margin-right: 1em;
+	margin-left: 1em;
+	margin-bottom: 0em;
+}

Added: trunk/UI/Contact/contact.html
===================================================================
--- trunk/UI/Contact/contact.html	                        (rev 0)
+++ trunk/UI/Contact/contact.html	2007-11-24 08:09:03 UTC (rev 1898)
@@ -0,0 +1,475 @@
+<?lsmb script_css = "Contact/contact.css" ?><?lsmb PROCESS 'ui-header.html' ?>
+<?lsmb PROCESS 'elements.html' ?>
+<body>
+    <?lsmb IF name ?> 
+    <div class="pageheading"><?lsmb name?></font>
+    <?lsmb END ?>
+<div class="navigation" id="nav_div">
+<?lsmb IF entity_id ?><?lsmb operation = "Edit" ?><?lsmb ELSE
+?><?lsmb operation = "Add"
+?><?lsmb END ?> 
+<!-- CT: Keys for localization scripts:
+<?lsmb text("Add Customer") ?>
+<?lsmb text("Edit Customer") ?>
+<?lsmb text("Add Vendor") ?>
+<?lsmb text("Edit Vendor") ?>
+<?lsmb text("Add Employee") ?>
+<?lsmb text("Edit Employee") ?>
+-->
+<ul class="navigation">
+	<li><a href="#customer_div"><?lsmb text('Account') ?></a></li>
+	<?lsmb IF entity_id ?>
+	<li><a href="#location_div"><?lsmb text('Addresses') ?></a></li>
+	<li><a href="#contact_div"><?lsmb text('Contact Info') ?></a></li>
+	<li><a href="#bank_div"><?lsmb text('Bank Accounts') ?></a></li>
+	<!-- Commented out as not yet implemented -CT
+	<li><a href="#notes_div"><?lsmb text('Notes') ?></a></li>
+	<li><a href="#history_div"><?lsmb text('History') ?></a></li>
+	-->
+	<?lsmb END ?>
+</ul>
+</div>
+<div class="container" id="customer_div">
+<?lsmb SWITCH entity_class
+	?><?lsmb CASE 1 ?><?lsmb entity_classname = "Vendor" 
+	?><?lsmb CASE 2 ?><?lsmb entity_classname = "Customer" 
+	?><?lsmb CASE 3 ?><?lsmb entity_classname = "Employee" 
+?><?lsmb END ?>
+<div class="listtop"><strong><?lsmb text("$operation $entity_classname") ?></strong></div>
+<?lsmb FOREACH n = notes ?>
+<div class="entity_note"><?lsmb n.note ?></div>
+<?lsmb END ?>
+<form name="customer" method="POST" action="<?lsmb script ?>">
+	<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "entity_id"
+		value = entity_id
+	} ?>	
+	<?lsmb PROCESS input element_data = {
+		label = text('Name:'),
+		type= "text",
+		name = "name",
+		value = name,
+		size = "20"
+	} ?><br/>
+	<?lsmb PROCESS input element_data = {
+		label = text('Account Number:'),
+		type= "text",
+		name = "meta_number",
+		value = meta_number,
+		size = "20"
+	} ?><br/>
+        <table>
+	<!-- TODO:  Create another tab for order history, and another one 
+		for notes -->
+        <tr>
+            <td>
+		<?lsmb PROCESS input element_data = {
+			label = text('Starting Date:'),
+			name = "startdate",
+			class = "date",
+			value = startdate,
+			type = "text",
+			size = "12",
+			maxlength = "10"
+		} ?>
+            </td>
+            <td>
+		<?lsmb PROCESS input element_data = {
+			label = text('End Date:'),
+			name = "enddate",
+			class = "date",
+			value = enddate,
+			type = "text",
+			size = "12",
+			maxlength = "10"
+		} ?>
+            </td>
+        </tr>
+        <tr>
+            <td>
+		<?lsmb PROCESS input element_data = {
+			label = text('Credit Limit:'),
+			name = "creditlimit",
+			value = creditlimit,
+			type = "text",
+			size = "20"
+		} ?>
+            </td>
+            <td>
+		<?lsmb PROCESS input element_data = {
+			label = text('Terms:'),
+			name = "terms",
+			value = terms,
+			type = "text",
+			size = "5"
+		} ?> <?lsmb text('days') ?>
+            </td>
+        </tr>
+        <tr>
+            
+            <td>
+		<?lsmb PROCESS input element_data = {
+			label = text('Tax Number/SSN:'),
+			name = "taxnumber",
+			value = taxnumber,
+			type = "text",
+			size = "19"
+		} ?>
+            </td>
+            <td>
+		<?lsmb PROCESS input element_data = {
+			label = text('Subcontract GIFI:'),
+			name = "gifi_accno",
+			value = gifi_accno,
+			type = "text",
+			size = "19"
+		} ?>
+            </td>
+        </tr>
+	<tr>
+            <td>
+		<?lsmb PROCESS input element_data = {
+			label = text('Discount:'),
+			name = "discount",
+			value = discount,
+			type = "text",
+			size = "3",
+			maxlength = 3
+		} ?>% / 
+		<?lsmb PROCESS input element_data = {
+			name = "discount_terms",
+			value = discount_terms,
+			type = "text",
+			size = "3",
+			maxlength = 3
+		} ?> <?lsmb text('days') ?>
+            </td>
+            <td>
+		<?lsmb PROCESS input element_data = {
+			label = text('SIC:'),
+			name = "sic_code",
+			value = sic_code,
+			type = "text",
+			size = "19",
+			class = 'sic'
+		} ?>
+            </td>
+        </tr>
+        <tr>
+            
+        <tr>
+            <td>
+		<!-- TODO:  Move to elements.html framework. -CT -->
+                <label for="notes"><?lsmb text('Notes:') ?></label><br/>
+
+                <textarea name="notes" rows="3" cols="40" id="notes"></textarea>
+            </td>
+        </tr>
+    </table>
+
+            <hr/>
+		<?lsmb PROCESS button element_data = {
+			text = text('Save'),
+			class="submit" 
+			type="submit" 
+			name="action" 
+			value="save" 
+			accesskey="S" 
+			title="Save [Alt-S]"
+		} ?>
+		<?lsmb PROCESS button element_data = {
+                        class="submit" 
+                        type="submit" 
+                        name="action" 
+                        value="ap_transaction" 
+                        accesskey="A" 
+                        title="AP Transaction [Alt-A]"
+			text = text('AP Transaction') 
+		} ?>
+		<?lsmb PROCESS button element_data = {
+                        class="submit" 
+                        type="submit" 
+                        name="action" 
+                        value="customer_invoice" 
+                        accesskey="I" 
+                        title="customer Invoice [Alt-I]"
+			text = text('Customer Invoice') 
+		} ?>
+		<?lsmb PROCESS button element_data = {
+                        class="submit" 
+                        type="submit" 
+                        name="action" 
+                        value="purchase_order" 
+                        accesskey="O" 
+                        title="Purchase Order [Alt-O]"
+			text = text('Purchase Order') 
+		} ?>
+		<?lsmb PROCESS button element_data = {
+                        class="submit" 
+                        type="submit" 
+                        name="action" 
+                        value="rfq" 
+                        accesskey="Q" 
+                        title="RFQ [Alt-Q]"
+			text = text('RFQ') 
+		} ?>
+		<?lsmb PROCESS button element_data = {
+                        class="submit" 
+                        type="submit" 
+                        name="action" 
+                        value="pricelist" 
+                        accesskey="P" 
+                        title="Pricelist [Alt-P]"
+			text = text('Pricelist') 
+		} ?>
+    </form>
+</div>
+<?lsmb IF entity_id ?>
+<div id="location_div" class="container">
+    <div class="listtop"><?lsmb text('Locations') ?></div>
+	<!-- This entire form should probably be optionaly automated with AJAX
+	in oder to prevent user confusion -->
+    <form id="location_form" action="<?lsmb script ?>">
+	<?lsmb PROCESS input element_data = {
+		type="hidden" 
+		name="entity_id" 
+		value=entity_id
+	} ?>
+	<?lsmb PROCESS input element_data = {
+		type="hidden" 
+		name="location_id" 
+		value=location_id
+	} ?>
+    <table width="100%">
+    <tr class="listheading">
+        <th class="type"><?lsmb text('Type') ?></th>
+        <th class="line_one"><?lsmb text('Address1') ?></th>
+        <th class="city"><?lsmb text('City') ?></th>
+        <th class="state"><?lsmb text('State/Province') ?></th>
+        <th class="mail_code"><?lsmb text('ZIP/Post Code') ?></th>
+        <th class="country"><?lsmb text('Country') ?></th>
+	<th class="actions"><?lsmb text('Actions') ?></th>
+    </tr>
+	<?lsmb FOREACH loc = locations ?>
+    <tr>
+	<td class="type"><?lsmb loc.class ?></td>
+	<td class="line_one"><?lsmb loc.line_one ?></td>
+	<td class="city"><?lsmb loc.city ?></td>
+	<td class="state"><?lsmb loc.state ?></td>
+	<td class="mail_code"><?lsmb loc.mail_code ?></td>
+	<td class="country"><?lsmb loc.country ?></td>
+	<td class="actions">
+		<!--  TODO:  Automate links with AJAX -->
+		<a href="<?lsmb script ?>?action=edit&entity_id=<?lsmb id 
+			?>&location_id=<?lsmb loc.id ?>">[edit]</a> 
+		<a href="<?lsmb script ?>?action=delete_location&entity_id=<?lsmb
+			id ?>&location_id=<?lmb loc.id ?>">[delete]</a>
+	</td>
+    </tr>
+	<?lsmb END ?>
+    </table>
+	<div> <!-- TODO:  Move to elements.html -CT -->
+		<label for="loc_type"><?lsmb text('Type:') ?></label>
+		<select id='loc_type' name="location_class">
+		<?lsmb FOREACH lc = location_class_list ?>
+		<option value="<?lsmb lc.id ?>"><?lsmb lc.class ?></option>
+		<?lsmb END ?>
+		</select>
+	</div>
+	<div> 
+		<?lsmb PROCESS input element_data = {
+			label = text('Address:'),
+			name = "line_one",
+			value = line_one,
+			type = "text",
+			size = "20"
+		} ?>
+	</div>
+	<div> 
+		<?lsmb PROCESS input element_data = {
+			name = "line_two",
+			value = line_two,
+			type = "text",
+			size = "20"
+		} ?>
+	</div>
+	<div> 
+		<?lsmb PROCESS input element_data = {
+			name = "line_three",
+			value = line_three,
+			type = "text",
+			size = "20"
+		} ?>
+	</div>
+	<div> 
+		<?lsmb PROCESS input element_data = {
+			label = text('City:'),
+			name = "city",
+			value = city,
+			type = "text",
+			size = "20"
+		} ?>
+	</div>
+	<div> 
+		<?lsmb PROCESS input element_data = {
+			label = text('State/Province:'),
+			name = "state",
+			value = state,
+			type = "text",
+			size = "20"
+		} ?>
+	</div>
+	<div> 
+		<?lsmb PROCESS input element_data = {
+			label = text('Zip/Post Code:'),
+			name = "mail_code",
+			value = mail_code,
+			type = "text",
+			size = "20"
+		} ?>
+	</div>
+	<div> <!-- TODO:  Move to elements.html -CT -->
+		<label for="country"><?lsmb text('Country:') ?></label>
+		<select name="country" id="country">
+		<?lsmb FOREACH c = country_list ?>
+		<option value="<?lsmb c.id ?>"><?lsmb c.name ?></option>
+		<?lsmb END ?>
+		</select>
+	</div>
+	<div><?lsmb PROCESS button element_data = {
+		class = "submit" 
+		name = "action" 
+		value = "add_location" 
+		id = "loc_save_location"
+		text = text('Save Location') 
+	} ?>
+	</div>
+    </form>
+</div>
+<div class="container" id="contact_div">
+	<div class="listtop"><?lsmb text('Contact Information') ?></div>
+	<table width="100%">
+	<tr class="listheading">
+		<th class="contact_class"><?lsmb text('Type:') ?></th>
+		<th class="contact"><?lsmb text('Contact Info:') ?></th>
+		<th class="contact_actions"><?lsmb text('Actions:') ?></th>
+	</tr>
+	<?lsmb FOREACH ct = contacts ?>
+	<tr>
+		<td class="contact_class"><?lsmb ct.class ?></td>
+		<td class="contact"><?lsmb ct.contact ?></td>
+		<td class="contact_actions">
+			<a href="<?lsmb script ?>?entity_id=<?lsmb entity_id 
+				?>&contact_id=<?lsmb ct.id 
+				?>&action=edit_contact"
+			>[<?lsmb text('Edit'); ?>]</a>&nbsp;&nbsp;
+			<a href="<?lsmb script ?>?entity_id=<?lsmb entity_id 
+				?>&contact_id=<?lsmb ct.id 
+				?>&action=delete_contact"
+			>[<?lsmb text('Delete'); ?>]</a>
+		</td>
+	</tr>
+	<?lsmb END ?>
+	</table>
+	<form action="<?lsmb script ?>">
+	<?lsmb PROCESS input element_data = {
+		type="hidden" 
+		name="entity_id" 
+		value=entity_id
+	} ?>
+	<?lsmb PROCESS input element_data = {
+		type="hidden" 
+		name="contact_id" 
+		value=contact_id
+	} ?>
+	<div><label for="contact_type"><?lsmb text('Type:') ?></label>
+		<select name="contact_class" id="contact_type">
+		<?lsmb FOREACH cc = contact_class_list ?>
+		<option value="<?lsmb cc.id ?>"><?lsmb cc.class ?></option>
+		<?lsmb END ?>
+		</select>
+		<!-- TODO:  Move the above select list to elements.html -CT -->
+	</div>
+	<div>
+		<?lsmb PROCESS input element_data = {
+			label = text('Contact Info:'),
+			name = "contact"
+			value = contact
+			type = "text"
+			size = "20"
+		} ?>
+	</div>
+	<div><?lsmb PROCESS button element_data = {
+		name = "action",
+		value = "save_contact",
+		text =  text('Save Contact'),
+		class = "submit"
+		} ?>
+	</div>
+</form>
+	
+</div>
+<div class="container" id="bank_div">
+<div class="listtop"><?lsmb text('Bank Accounts') ?></div>
+<table width="100%">
+<tr class="listheading">
+	<th class="bic"><?lsmb text('BIC/SWIFT Code') ?></th>
+	<th class="iban"><?lsmb text('Account Number') ?></th>
+	<th class="actions"><?lsmb text('Actions') ?></th>
+</tr>
+<?lsmb FOREACH ba = bank_account ?>
+<tr>
+	<td class="bic"><?lsmb ba.bic ?></td>
+	<td class="iban"><?lsmb ba.iban ?></td>
+	<td class="actions">
+		<a href="<?lsmb script ?>?action=edit_bank_acct&entity_id=<?lsmb
+			entity_id ?>&bank_account_id=<?lsmb ba.id ?>"
+			>[Edit]</a> 
+		<a href="<?lsmb script ?>?action=delete_bank_acct&entity_id=<?lsmb
+			entity_id ?>&bank_account_id=<?lsmb ba.id ?>"
+			>[Delete]</a> 
+	</td>
+</tr>
+<?lsmb END ?>
+</table>
+<form name="bank_acct" action="<?lsmb script ?>">
+	<?lsmb PROCESS input element_data = {
+		type="hidden" 
+		name="entity_id" 
+		value=entity_id
+	} ?>
+	<?lsmb PROCESS input element_data = {
+		type="hidden" 
+		name="bank_account_id" 
+		value=bank_account_id
+	} ?>
+	<div><label for="bic">
+	<?lsmb PROCESS input element_data = {
+		type="text" 
+		label = text('BIC/SWIFT Code:')
+		name="bic" 
+		value=bic
+		size=20
+	} ?>
+	</div>
+	<div><label for="iban">
+	<?lsmb PROCESS input element_data = {
+		type="text" 
+		label = text('Bank Account:')
+		name="iban" 
+		value=iban
+		size=20
+	} ?>
+	</div>
+	<div><?lsmb PROCESS button element_data = {
+		name="action" 
+		value="save_bank_account"
+		class="submit"
+		text = text('Save') 
+		} ?>
+	</div>
+</div>
+<?lsmb END ?>
+</body>
+</html>

Deleted: trunk/UI/Contact/customer.css
===================================================================
--- trunk/UI/Contact/customer.css	2007-11-24 08:05:08 UTC (rev 1897)
+++ trunk/UI/Contact/customer.css	2007-11-24 08:09:03 UTC (rev 1898)
@@ -1,20 +0,0 @@
-label {
-	text-align: right;
-	margin-left: auto;
-	margin-right: 0em;
-}
-
-input { margin-left: 0em;
-	margin-right: auto;
-}
-
-ul.navigation li {
-	display: inline;
-	padding-left: 1em;
-	padding-right: 1em;
-	padding-top: 0.5em;
-	padding-bottom: 0.5em;
-	margin-right: 1em;
-	margin-left: 1em;
-	margin-bottom: 0em;
-}

Deleted: trunk/UI/Contact/customer.html
===================================================================
--- trunk/UI/Contact/customer.html	2007-11-24 08:05:08 UTC (rev 1897)
+++ trunk/UI/Contact/customer.html	2007-11-24 08:09:03 UTC (rev 1898)
@@ -1,329 +0,0 @@
-<?lsmb script_css = "Customer/customer.css" ?><?lsmb PROCESS 'ui-header.html' ?>
-<?lsmb PROCESS 'elements.html' ?>
-<body>
-    <?lsmb IF name ?> 
-    <div class="pageheading"><?lsmb name?></font>
-    <?lsmb END ?>
-<div class="navigation" id="nav_div">
-<ul class="navigation">
-	<li><a href="#customer_div"><?lsmb text('Account') ?></a></li>
-	<?lsmb IF entity_id ?>
-	<li><a href="#location_div"><?lsmb text('Addresses') ?></a></li>
-	<li><a href="#contact_div"><?lsmb text('Contact Info') ?></a></li>
-	<li><a href="#bank_div"><?lsmb text('Bank Accounts') ?></a></li>
-	<?lsmb END ?>
-</ul>
-</div>
-<div class="container" id="customer_div">
-<div class="listtop"><strong><?lsmb text('Add/Edit Customer') ?></strong></div>
-<?lsmb FOREACH n = notes ?>
-<div class="entity_note"><?lsmb n.note ?></div>
-<?lsmb END ?>
-<form name="customer" method="POST" action="customer.pl">
-	<input type="hidden" name="entity_id" value="<?lsmb entity_id ?>">
-	<label for="name"><?lsmb text('Name:') ?></label>
-	<input name="name" id="name" type="text" value="<?lsmb name ?>"><br/>
-	<label for="meta_number"><?lsmb text('Account Number:') ?></label>
-	<input name="meta_number" id="meta_number" type="text" 
-		value="<?lsmb meta_number?>"><br/>
-        <table>
-       <?lsmb IF ordered ?> 
-        <tr>
-            <td><b><?lsmb text('Shipping Address') ?></b></td>
-            
-            <td><b><?lsmb text('Billing Address (if different)') ?></p></td>
-            
-        </tr>
-	<?lsmb END ?>
-        
-        
-        <?lsmb FOREACH entry = ordered  ?>
-        <tr>
-            <td>
-                <label for="shipping_<?lsmb entry ?>"><?lsmb text(entry) ?>:
-		</label>
-                <input id="shipping_<?lsmb entry ?>" type="text" 
-			name="shipping_<?lsmb entry ?>" 
-			value="<?lsmb entry ?>">
-            </td>
-            <td>
-                <input type="text" name="billing_<?lsmb entry ?>" 
-			value="<?lsmb entry ?>">
-            </td>            
-        </tr>
-        <?lsmb END ?>
-        <tr>
-            <td>
-                <label for="startdate"><?lsmb text('Starting Date:') ?>
-			"<?lsmb startdate ?>"</label>
-                    <input id="startdate" type="text" name="startdate" 
-			class="date" value="<?lsmb startdate ?>">
-            </td>
-            <td>
-                <label for="enddate"><?lsmb('End date:') ?></label>
-                    <input id="enddate" type="text" name="startdate" 
-			class="date" value="<?lsmb enddate ?>">
-            </td>
-        </tr>
-        <tr>
-            <td>
-                <label for="creditlimit"><?lsmb text('Credit Limit:') ?></label>
-                <input id="creditlimit" name="creditlimit" type="text" 
-			value="<?lsmb creditlimit ?>">
-            </td>
-            <td>
-                <label for="terms"><?lsmb text('Terms:') ?></label>
-                <input id="terms" name="terms" type="text" 
-			value="<?lsmb terms ?>"> days
-            </td>
-        </tr>
-        <tr>
-            
-            <td>
-                <label for="taxnumber"><?lsmb text('Tax Number/SSN:') ?></label>
-                <input id="taxnumber" name="taxnumber" type="text" 
-			value="<?lsmb taxnumber ?>">                
-            </td>
-            <td>
-                <label for="gifi_accno"><?lsmb text('Subcontract GIFI:') ?>
-		</label>
-                <input id="gifi_accno" name="gifi_accno" type="text" 
-			value="<?lsmb gifi_accno ?>">
-            </td>
-        </tr>
-	<tr>
-            <td>
-                <label for="discount"><?lsmb text('Discount:') ?></label>
-                <input id="discount" name="discount" type="text" size="3" 
-			maxlength="3" value="<?lsmb discount ?>">%/
-		<input id="discountdays" name="discount_terms" type="text" 
-		size="3" value="<?lsmb discount_terms ?>">  days
-            </td>
-            <td>
-                <label for="sic_code"><?lsmb text('SIC Code:') ?></label>
-                <input id="sic_code" name="sic_code" type="text" 
-			value="<?lsmb sic_code ?>">
-            </td>
-        </tr>
-        <tr>
-            
-        <tr>
-            <td>
-                <label for="notes"><?lsmb text('Notes:') ?></label><br/>
-
-                <textarea name="notes" rows="3" cols="40" id="notes"></textarea>
-		<!-- CT: The prior funny whitespace may look funny but it 
-		prevents additional whitespace from being added to the data 
-		every time it is saved.  -->
-            </td>
-        </tr>
-    </table>
-
-            <hr/>
-                <button class="submit" 
-			type="submit" 
-			name="action" 
-			value="save" 
-			accesskey="S" 
-			title="Save [Alt-S]"><?lsmb text('Save') ?></button>
-                <button class="submit" 
-                        type="submit" 
-                        name="action" 
-                        value="ap_transaction" 
-                        accesskey="A" 
-                        title="AP Transaction [Alt-A]">
-			<?lsmb text('AP Transaction') ?></button>
-                <button class="submit" 
-                        type="submit" 
-                        name="action" 
-                        value="customer_invoice" 
-                        accesskey="I" 
-                        title="customer Invoice [Alt-I]">
-			<?lsmb text('Customer Invoice') ?></button>
-                <button class="submit" 
-                        type="submit" 
-                        name="action" 
-                        value="purchase_order" 
-                        accesskey="O" 
-                        title="Purchase Order [Alt-O]">
-			<?lsmb text('Purchase Order') ?></button>
-                <button class="submit" 
-                        type="submit" 
-                        name="action" 
-                        value="rfq" 
-                        accesskey="Q" 
-                        title="RFQ [Alt-Q]"><?lsmb text('RFQ') ?></button>
-                <button class="submit" 
-                        type="submit" 
-                        name="action" 
-                        value="pricelist" 
-                        accesskey="P" 
-                        title="Pricelist [Alt-P]">
-			<?lsmb text('Pricelist') ?></button>
-    </form>
-</div>
-<?lsmb IF entity_id ?>
-<div id="location_div" class="container">
-    <div class="listtop"><?lsmb text('Locations') ?></div>
-	<!-- This entire form should probably be optionaly automated with AJAX
-	in oder to prevent user confusion -->
-    <form id="location_form" action="customer.pl">
-	<input type="hidden" name="entity_id" value="<?lsmb entity_id ?>">
-	<input type="hidden" name="location_id" value="<?lsmb location_id ?>">
-    <table width="100%">
-    <tr class="listheading">
-        <th class="type"><?lsmb text('Type') ?></th>
-        <th class="line_one"><?lsmb text('Address1') ?></th>
-        <th class="city"><?lsmb text('City') ?></th>
-        <th class="state"><?lsmb text('State/Province') ?></th>
-        <th class="mail_code"><?lsmb text('ZIP/Post Code') ?></th>
-        <th class="country"><?lsmb text('Country') ?></th>
-	<th class="actions"><?lsmb text('Actions') ?></th>
-    </tr>
-	<?lsmb FOREACH loc = locations ?>
-    <tr>
-	<td class="type"><?lsmb loc.class ?></td>
-	<td class="line_one"><?lsmb loc.line_one ?></td>
-	<td class="city"><?lsmb loc.city ?></td>
-	<td class="state"><?lsmb loc.state ?></td>
-	<td class="mail_code"><?lsmb loc.mail_code ?></td>
-	<td class="country"><?lsmb loc.country ?></td>
-	<td class="actions">
-		<!--  TODO:  Automate links with AJAX -->
-		<a href="customer.pl?action=edit&entity_id=<?lsmb id 
-			?>&location_id=<?lsmb loc.id ?>">[edit]</a> 
-		<a href="customer.pl?action=delete_location&entity_id=<?lsmb
-			id ?>&location_id=<?lmb loc.id ?>">[delete]</a>
-	</td>
-    </tr>
-	<?lsmb END ?>
-    </table>
-	<div> 
-		<label for="loc_type"><?lsmb text('Type:') ?></label>
-		<select id='loc_type' name="location_class">
-		<?lsmb FOREACH lc = location_class_list ?>
-		<option value="<?lsmb lc.id ?>"><?lsmb lc.class ?></option>
-		<?lsmb END ?>
-		</select>
-	</div>
-	<div> 
-		<label for="line_one"><?lsmb text('Address:') ?></label>
-		<input name="line_one" id="line_one"/>
-	</div>
-	<div> 
-		<input name="line_two" id="line_two"/>
-	</div>
-	<div> 
-		<input name="line_three" id="line_three"/>
-	</div>
-	<div> 
-		<label for="city"><?lsmb text('City:') ?></label>
-		<input name="city" id="city"/>
-	</div>
-	<div> 
-		<label for="state"><?lsmb text('State/Province:') ?></label>
-		<input name="state" id="state"/>
-	</div>
-	<div> 
-		<label for="mail_code"><?lsmb text('Zip/Post Code:') ?></label>
-		<input name="mail_code" id="mail_code"/>
-	</div>
-	<div> 
-		<label for="country"><?lsmb text('Country:') ?></label>
-		<select name="country" id="country">
-		<?lsmb FOREACH c = country_list ?>
-		<option value="<?lsmb c.id ?>"><?lsmb c.name ?></option>
-		<?lsmb END ?>
-		</select>
-	</div>
-	<div><button type=submit class="submit" name="action" 
-		value="add_location" id="loc_save_location">
-		<?lsmb text('Save Location') ?></button>
-	</div>
-    </form>
-</div>
-<div class="container" id="contact_div">
-	<div class="listtop"><?lsmb text('Contact Information') ?></div>
-	<table width="100%">
-	<tr class="listheading">
-		<th class="contact_class"><?lsmb text('Type:') ?></th>
-		<th class="contact"><?lsmb text('Contact Info:') ?></th>
-		<th class="contact_actions"><?lsmb text('Actions:') ?></th>
-	</tr>
-	<?lsmb FOREACH ct = contacts ?>
-	<tr>
-		<td class="contact_class"><?lsmb ct.class ?></td>
-		<td class="contact"><?lsmb ct.contact ?></td>
-		<td class="contact_actions">
-			<a href="customer.pl?entity_id=<?lsmb entity_id 
-				?>&contact_id=<?lsmb ct.id 
-				?>&action=edit_contact"
-			>[<?lsmb text('Edit'); ?>]</a>&nbsp;&nbsp;
-			<a href="customer.pl?entity_id=<?lsmb entity_id 
-				?>&contact_id=<?lsmb ct.id 
-				?>&action=delete_contact"
-			>[<?lsmb text('Delete'); ?>]</a>
-		</td>
-	</tr>
-	<?lsmb END ?>
-	</table>
-	<form action="customer.pl">
-	<input type="hidden" name="entity_id" value="<?lsmb entity_id ?>">
-	<input type="hidden" name="contact_id" value="<?lsmb contact_id ?>">
-	<div><label for="contact_type"><?lsmb text('Type:') ?></label>
-		<select name="contact_class" id="contact_type">
-		<?lsmb FOREACH cc = contact_class_list ?>
-		<option value="<?lsmb cc.id ?>"><?lsmb cc.class ?></option>
-		<?lsmb END ?>
-		</select>
-	</div>
-	<div><label for="contact_info"><?lsmb text('Contact Info:') ?></label>
-	<input type="text" id="contact_info" name="contact" 
-		value="<?lsmb contact ?>">
-	</div>
-	<div><button name="action" id="contact_action_save" 
-		value="save_contact"><?lsmb text('Save Contact') ?></button>
-	</div>
-</form>
-	
-</div>
-<div class="container" id="bank_div">
-<div class="listtop"><?lsmb text('Bank Accounts') ?></div>
-<table width="100%">
-<tr class="listheading">
-	<th class="bic"><?lsmb text('BIC/SWIFT Code') ?></th>
-	<th class="iban"><?lsmb text('Account Number') ?></th>
-	<th class="actions"><?lsmb text('Actions>') ?></th>
-</tr>
-<?lsmb FOREACH ba = bank_account ?>
-<tr>
-	<td class="bic"><?lsmb ba.bic ?></td>
-	<td class="iban"><?lsmb ba.iban ?></td>
-	<td class="actions">
-		<a href="customer.pl?action=edit_bank_acct&entity_id=<?lsmb
-			entity_id ?>&bank_account_id=<?lsmb ba.id ?>"
-			>[Edit]</a> 
-		<a href="customer.pl?action=delete_bank_acct&entity_id=<?lsmb
-			entity_id ?>&bank_account_id=<?lsmb ba.id ?>"
-			>[Delete]</a> 
-	</td>
-</tr>
-<?lsmb END ?>
-</table>
-<form name="bank_acct" action="customer.pl">
-	<input type="hidden" name="entity_id" value="<?lsmb entity_id ?>">
-	<input type="hidden" name="bank_account_id" 
-		value="<?lsmb bank_account_id ?>">
-	<div><label for="bic"><?lsmb text('BIC/SWIFT Code:') ?></label>
-		<input type="text" name="bic" id="bic" value="<?lsmb bic ?>">
-	</div>
-	<div><label for="iban"><?lsmb text('Bank Account:') ?></label>
-		<input type="text" name="iban" id="iban" value="<?lsmb iban ?>">
-	</div>
-	<div><button id="bank_account_save" name="action" 
-		value="save_bank_account"><?lsmb text('Save') ?></button>
-	</div>
-</div>
-<?lsmb END ?>
-</body>
-</html>

Modified: trunk/ledgersmb-httpd.conf
===================================================================
--- trunk/ledgersmb-httpd.conf	2007-11-24 08:05:08 UTC (rev 1897)
+++ trunk/ledgersmb-httpd.conf	2007-11-24 08:09:03 UTC (rev 1898)
@@ -17,7 +17,7 @@
   # advised that you should use SSL protection on any and all network
   # connections that access this application in order to protect usernames and
   # passwords.
-  Order Allow,Deny
+  Order Deny,Allow
   Allow from 127.0.0.1
   Deny from All
 

Modified: trunk/scripts/customer.pl
===================================================================
--- trunk/scripts/customer.pl	2007-11-24 08:05:08 UTC (rev 1897)
+++ trunk/scripts/customer.pl	2007-11-24 08:09:03 UTC (rev 1898)
@@ -41,6 +41,7 @@
 
 =cut
 
+
 sub get {
     
     my ($request) = @_;
@@ -50,7 +51,8 @@
     my $result = $customer->get();
     
     my $template = LedgerSMB::Template->new( user => $user, 
-	template => 'Customer/customer', language => $user->{language}, 
+	template => 'contact', language => $user->{language}, 
+	path => 'UI/Contact',
         format => 'HTML');
     $template->render($results);
         
@@ -67,14 +69,7 @@
     
     $customer->get_metadata();
 
-    my $template = LedgerSMB::Template->new( 
-	user => $user, 
-	template => 'customer', 
-	path => 'UI/Customer',
-	locale => $request->{_locale}, 
-        format => 'HTML');
-    $request->{script} = 'Customer/customer';
-    $template->render($customer);
+    _render_main_screen($customer);
 	
 }
 
@@ -93,6 +88,7 @@
 sub add {
     my ($request) = @_;
     my $customer = LedgerSMB::DBObject::Customer->new(base => $request, copy => 'all');
+    $customer->set( entity_class=> '2' );
     _render_main_screen($customer);
 }
 
@@ -123,7 +119,7 @@
         my $results = $customer->search($customer->{search_pattern});
 
         my $template = LedgerSMB::Template->new( user => $user, 
-    	template => 'Customer/customer', language => $user->{language}, 
+    	template => 'Contact/customer', language => $user->{language}, 
             format => 'HTML');
         $template->render($results);
         
@@ -134,7 +130,7 @@
         
         my $template = LedgerSMB::Template->new( 
 		user => $user,
-		path => 'UI/Customer' ,
+		path => 'UI/Contact' ,
     		template => 'customer_search', 
 		locale => $request->{_locale}, 
 		format => 'HTML');
@@ -178,12 +174,13 @@
 
     $customer->{creditlimit} = "$customer->{creditlimit}"; 
     $customer->{discount} = "$customer->{discount}"; 
+    $customer->{script} = "customer.pl";
 
     my $template = LedgerSMB::Template->new( 
 	user => $customer->{_user}, 
-    	template => 'customer', 
+    	template => 'contact', 
 	locale => $customer->{_locale},
-	path => 'UI/Customer',
+	path => 'UI/Contact',
         format => 'HTML'
     );
     $template->render($customer);

Modified: trunk/scripts/login.pl
===================================================================
--- trunk/scripts/login.pl	2007-11-24 08:05:08 UTC (rev 1897)
+++ trunk/scripts/login.pl	2007-11-24 08:09:03 UTC (rev 1898)
@@ -18,6 +18,9 @@
     $locale = LedgerSMB::Locale->get_handle(${LedgerSMB::Sysconfig::language})
       or $request->error( __FILE__ . ':' . __LINE__ . 
          ": Locale not loaded: $!\n" );         
+
+    $request->{stylesheet} = "ledgersmb.css";
+    $request->{titlebar} = "LedgerSMB $request->{VERSION}";
      my $template = LedgerSMB::Template->new(
         user =>$request->{_user}, 
         locale => $locale,

Modified: trunk/scripts/payment.pl
===================================================================
--- trunk/scripts/payment.pl	2007-11-24 08:05:08 UTC (rev 1897)
+++ trunk/scripts/payment.pl	2007-11-24 08:09:03 UTC (rev 1898)
@@ -51,6 +51,12 @@
 use LedgerSMB::DBObject::Payment;
 use LedgerSMB::DBObject::Date;
 use strict; 
+
+# CT:  A few notes for future refactoring of this code:
+# 1:  I don't think it is a good idea to make the UI too dependant on internal
+#     code structures but I don't see a good alternative at the moment.
+# 2:  CamelCasing: -1
+
 =pod
 
 =item payment


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.