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

SF.net SVN: ledger-smb:[4995] addons/1.3/crm-basic/trunk/UI



Revision: 4995
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4995&view=rev
Author:   einhverfr
Date:     2012-07-15 15:00:11 +0000 (Sun, 15 Jul 2012)
Log Message:
-----------
Completing crm backport for 1.3

Added Paths:
-----------
    addons/1.3/crm-basic/trunk/UI/crm/
    addons/1.3/crm-basic/trunk/UI/crm/contact.css
    addons/1.3/crm-basic/trunk/UI/crm/contact.html
    addons/1.3/crm-basic/trunk/UI/crm/contact.js
    addons/1.3/crm-basic/trunk/UI/crm/divs/
    addons/1.3/crm-basic/trunk/UI/crm/divs/address.html
    addons/1.3/crm-basic/trunk/UI/crm/divs/bank_act.html
    addons/1.3/crm-basic/trunk/UI/crm/divs/company.html
    addons/1.3/crm-basic/trunk/UI/crm/divs/contact_info.html
    addons/1.3/crm-basic/trunk/UI/crm/divs/country_us_w4.html
    addons/1.3/crm-basic/trunk/UI/crm/divs/credit.html
    addons/1.3/crm-basic/trunk/UI/crm/divs/employee.html
    addons/1.3/crm-basic/trunk/UI/crm/divs/files.html
    addons/1.3/crm-basic/trunk/UI/crm/divs/notes.html
    addons/1.3/crm-basic/trunk/UI/crm/divs/person.html
    addons/1.3/crm-basic/trunk/UI/crm/divs/user.html
    addons/1.3/crm-basic/trunk/UI/crm/divs/wage.html
    addons/1.3/crm-basic/trunk/UI/crm/pricelist.csv
    addons/1.3/crm-basic/trunk/UI/crm/pricelist.html
    addons/1.3/crm-basic/trunk/UI/crm/pricelist.odst
    addons/1.3/crm-basic/trunk/UI/crm/pricelist.tex

Added: addons/1.3/crm-basic/trunk/UI/crm/contact.css
===================================================================
--- addons/1.3/crm-basic/trunk/UI/crm/contact.css	                        (rev 0)
+++ addons/1.3/crm-basic/trunk/UI/crm/contact.css	2012-07-15 15:00:11 UTC (rev 4995)
@@ -0,0 +1,120 @@
+label {
+	text-align: right;
+	margin-left: auto;
+        margin-right: 1em
+}
+
+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;
+}
+
+div.note_contents {
+	white-space:pre
+}
+
+
+div label {
+	float: left;
+	display: block;
+	text-align: right;
+	margin-left: 1em;
+}
+
+div.container_hidden {
+	display: none;
+}
+div.container {
+	display: block;
+}
+
+div {
+        overflow: auto;
+}
+
+div.input_group {
+        display: block;
+        float: left;
+}
+div.input_group1 {
+        display: block;
+        float: left;
+}
+div.input_group2 {
+        display: block;
+        float: left; 
+}
+div.input_group3 {
+        display: block;
+        float: left;
+}
+
+#hr_div div.input_group {
+        width: 28em;
+}
+
+#hr_div label {
+        width: 9em;
+}
+
+#company_div div.input_group1 {
+        width: 25em;
+}
+
+#company_div div.input_group2 {
+}
+
+#company_div label {
+	width: 8em;
+}
+
+#company_div div.input_group2 label {
+	width: 8em;
+}
+
+#credit_div label {
+	width: 10em;
+}
+
+#address_div label {
+	width: 6em;
+}
+
+#contact_div label {
+	width: 6em;
+}
+
+#bank_div label {
+	width: 9em;
+}
+
+#notes_div label {
+	width: 6em;
+}
+
+#employee_div .g1 {
+        width: 27em;
+}
+
+#employee_div .g2 {
+        width: 25em;
+}
+
+#employee_div .g2 label {
+        width: 8em;
+}
+#employee_div .g1 label, #employee_div .solo label {
+        width: 10em;
+}
+
+

Added: addons/1.3/crm-basic/trunk/UI/crm/contact.html
===================================================================
--- addons/1.3/crm-basic/trunk/UI/crm/contact.html	                        (rev 0)
+++ addons/1.3/crm-basic/trunk/UI/crm/contact.html	2012-07-15 15:00:11 UTC (rev 4995)
@@ -0,0 +1,53 @@
+<?lsmb
+ INCLUDE 'ui-header.html'
+        stylesheet = USER.stylesheet
+	include_stylesheet = [
+		'UI/Contact/contact.css'
+	] 
+	include_script = [
+		'UI/Contact/contact.js'
+	]
+?>
+<?lsmb PROCESS 'elements.html';
+PROCESS "dynatable.html"  ?>
+<?lsmb IF !country_id; country_id = default_country; END -?>
+<?lsmb IF !country_id_t; country_id_t = default_country; END -?>
+<?lsmb  # Target_div handling now moved to controller script -- CT -?>
+
+<body onload="init('<?lsmb request.target_div ?>')">
+    <?lsmb IF name ?> 
+<div class="pageheading"><?lsmb text('Company') ?>: <?lsmb name ?></div>
+    <?lsmb END ?>
+    <?lsmb IF meta_number ?> 
+<div class="pageheading"><?lsmb text('Account') ?>: <?lsmb meta_number ?></div>
+    <?lsmb END ?>
+<?lsmb notice = line_one ?>
+    <?lsmb IF notice ?>
+    <div class="notice"><?lsmb notice ?></div>
+    <?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">
+        <?lsmb FOREACH nav IN DIVS ?>
+         <li class="nav"><a href="#<?lsmb nav ?>_div"><?lsmb DIV_LABEL.$nav 
+          ?></a></li>
+        <?lsmb  END ?>
+</ul>
+
+  <?lsmb FOREACH ITEM IN DIVS; 
+      INCLUDEDIV = "divs/" _ ITEM _ ".html";
+      INCLUDE $INCLUDEDIV;
+  END 
+?>
+</body>
+</html>

Added: addons/1.3/crm-basic/trunk/UI/crm/contact.js
===================================================================
--- addons/1.3/crm-basic/trunk/UI/crm/contact.js	                        (rev 0)
+++ addons/1.3/crm-basic/trunk/UI/crm/contact.js	2012-07-15 15:00:11 UTC (rev 4995)
@@ -0,0 +1,48 @@
+
+function init(div_id) {
+	var lis = document.getElementsByTagName('li');
+	for (var e in lis){
+		if (e != e * 1){
+			continue;
+                }
+		e = lis.item(e);
+		if (e.getAttribute('class') == "nav"){
+			e.addEventListener('click', function (e) {
+				for (var a in this.getElementsByTagName('a')){
+					if (a != a * 1){
+						continue;
+					}
+					a = this.getElementsByTagName('a').item(a);
+					var dest = a.getAttribute('href');
+					dest = dest.replace('#', '');
+					select_div(dest);
+					break;
+				}
+				return false;
+			},false);
+		}
+	}
+	if (div_id != '' && document.getElementById(div_id)){
+		select_div(div_id);
+	}
+}
+
+function select_div(div_id){
+	var divs = document.getElementsByTagName('div');
+	var i = 0;
+	for (i=0;i<=divs.length;i++){
+		var e = divs.item(i);
+		if (!e || !e.getAttribute || !e.getAttribute('class')){
+			continue;
+		}
+		if (e.getAttribute('class').match(/^container/)){
+			if (e.getAttribute('id') == div_id){
+				e.className = 'container';
+			}
+			else {
+				e.className = 'container_hidden';
+			}
+		}
+	}
+}
+

Added: addons/1.3/crm-basic/trunk/UI/crm/divs/address.html
===================================================================
--- addons/1.3/crm-basic/trunk/UI/crm/divs/address.html	                        (rev 0)
+++ addons/1.3/crm-basic/trunk/UI/crm/divs/address.html	2012-07-15 15:00:11 UTC (rev 4995)
@@ -0,0 +1,185 @@
+<div id="address_div" class="container">
+    <div class="listtop"><?lsmb text('Locations') ?></div>
+	<!-- This entire form should probably be optionaly automated with AJAX
+	in order to prevent user confusion -CT -->
+    <form id="location_form" action="<?lsmb script ?>" method="post">
+<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "form_id"
+		value = form_id
+	} ?>
+<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "old_location_class"
+		value = request.location_class
+	} ?>
+<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "target_div"
+		value = 'location_div'
+	} ?>
+	<?lsmb PROCESS input element_data = {
+		type="hidden" 
+		name="entity_id" 
+		value=entity_id
+	} ?>
+	<?lsmb PROCESS input element_data = {
+		type="hidden" 
+		name="credit_id" 
+		value=credit_act.id
+	};
+    FOREACH LOC IN locations;
+        IF LOC.credit_id;
+           LOC.is_for_credit = 'X';
+        END;
+        IF LOC.location_class == 1;
+           LOC.type = text('Billing');
+        ELSIF LOC.location_class == 2;
+           LOC.type = text('Sales');
+        ELSIF LOC.location_class == 3;
+           LOC.type = text('Shipping');
+        END; 
+        LOC.edit = '[' _ text('Edit') _ ']';
+        LOC.delete= '[' _ text('Delete') _ ']';
+        LOC.edit_href_suffix= script _ '?action=edit&entity_id=' _ entity_id _
+    			'&location_id=' _ LOC.id _ '&credit_id=' _
+    			credit_act.id _ '&is_for_credit=' _ LOC.is_for_credit _
+                        '&target_div=address_div&location_class=' _
+                        LOC.location_class;
+        LOC.delete_href_suffix= script _ '?action=delete_location&entity_id=' _ 
+                        entity_id _ '&location_id=' _ LOC.id _ '&credit_id=' _
+    			credit_act.id _ '&is_for_credit=' _ LOC.is_for_credit _
+                        '&target_div=address_div&location_class=' _
+                        LOC.location_class;
+        IF LOC.id == request.location_id && request.action == 'edit';
+             DISPLAY = LOC;
+        END;
+    END; ?><?lsmb
+    PROCESS dynatable 
+               tbody = {rows = locations}
+          attributes = {id = 'location_table'
+                       width = '100%'}
+             columns = [
+       {col_id = 'is_for_credit', type = 'text', name = text('This Account') } #'
+       {col_id = 'type', type = 'text', name=text('Type') }
+       {col_id = 'line_one', type='text', name=text('Address1') }
+       {col_id = 'city', type='text', name=text('City') }
+       {col_id = 'state', type='text', name=text('State/Province') }
+       {col_id = 'mail_code', type='text', name=text('Zip/Post Code') } #'
+       {col_id = 'country', type='text', name=text('Country') }
+       {col_id = 'edit', type='href', name=' ', href_base='' }
+       {col_id = 'delete', type='href', name=' ', href_base='' } 
+    ];
+	PROCESS input element_data = {
+		type="hidden" 
+		name="location_id" 
+		value= DISPLAY.id
+	}; 
+       ?> <div>
+             <?lsmb IF credit_act.id;
+                       INCLUDE select element_data = {
+                          name            = "attach_to"
+                          default_options = ['3']
+                          options         = attach_level_options
+                          label           = text('Attach To') #'
+                       };
+                     ELSE ?>
+             <label><?lsmb text('Attach to') ?></label><?lsmb text('Entity');
+                    END; ?>
+	<div> 
+                <?lsmb INCLUDE select element_data = {
+                       name           = "location_class"
+                       default_values = [DISPLAY.location_class]
+                       options        = location_class_list
+                       text_attr      = "class"
+                       value_attr     = "id"
+                       label          = text('Type')
+                } ?>
+		</select>
+	</div>
+	<div> 
+		<?lsmb INCLUDE input element_data = {
+			label = text('Address'),
+			name = "line_one",
+			value = DISPLAY.line_one,
+			type = "text",
+			size = "20"
+		} ?>
+	</div>
+	<div> 
+		<?lsmb PROCESS input element_data = {
+                        label = ":"
+			name = "line_two"
+			class = "addl-address"
+			value = DISPLAY.line_two
+			type = "text"
+			size = "20"
+		} ?>
+	</div>
+	<div> 
+		<?lsmb PROCESS input element_data = {
+                        label = ":"
+			name = "line_three"
+			class = "addl-address"
+			value = DISPLAY.line_three
+			type = "text"
+			size = "20"
+		} ?>
+	</div>
+	<div> 
+		<?lsmb PROCESS input element_data = {
+			label = text('City'),
+			name = "city",
+			value = DISPLAY.city,
+			type = "text",
+			size = "20"
+		} ?>
+	</div>
+	<div> 
+		<?lsmb PROCESS input element_data = {
+			label = text('State/Province'),
+			name = "state",
+			value = DISPLAY.state,
+			type = "text",
+			size = "20"
+		} ?>
+	</div>
+	<div> 
+		<?lsmb PROCESS input element_data = {
+			label = text('Zip/Post Code'),
+			name = "mail_code",
+			value = DISPLAY.mail_code,
+			type = "text",
+			size = "20"
+		} #' ?>
+	</div>
+	<div> 
+		<?lsmb IF !country_id; country_id = default_country; END -?>
+		<?lsmb INCLUDE select element_data = {
+			text_attr = "name"
+			value_attr = "id"
+			default_values = [DISPLAY.country_id]
+			options = country_list
+			name = "country_id"
+			label = text('Country') 
+		} ?>
+	</div>
+	<div>
+             <?lsmb PROCESS button element_data = {
+		class = "submit" 
+		name = "action" 
+		value = "save_location" 
+		id = "loc_save_location"
+		text = text('Save Location') 
+	} #' ?>
+             <?lsmb PROCESS button element_data = {
+		class = "submit" 
+		name = "action" 
+		value = "save_new_location" 
+		id = "loc_save_new_location"
+		text = text('Save New Location') 
+	} #' ?>
+	</div>
+    </form>
+</div>
+</div>

Added: addons/1.3/crm-basic/trunk/UI/crm/divs/bank_act.html
===================================================================
--- addons/1.3/crm-basic/trunk/UI/crm/divs/bank_act.html	                        (rev 0)
+++ addons/1.3/crm-basic/trunk/UI/crm/divs/bank_act.html	2012-07-15 15:00:11 UTC (rev 4995)
@@ -0,0 +1,69 @@
+<div class="container" id="bank_act_div">
+<div class="listtop"><?lsmb text('Bank Accounts') ?></div>
+<?lsmb 
+href_base = script _ '?&entity_id=' _ entity_id _ '&target_div=bank_act_div' _
+            '&form_id=' _ form_id _ '&credit_id=' _ credit_id _ '&id=';
+FOREACH ba IN bank_account;
+    ba.iban_href_suffix = '&bic=' _ ba.bic _ '&iban=' _ ba.iban _
+         '&action=edit' _ '&id=' _ ba.id;
+    ba.delete_href_suffix=ba.id _ '&action=delete_bank_account';
+    ba.delete = '[' _ text('Delete') _ ']';
+END;
+PROCESS dynatable 
+   attributes = { id = 'bank_account_list', width = '100%' }
+   tbody = {rows = bank_account}
+   columns = [
+     { col_id='bic', type='text', name=text('BIC/SWIFT Code') } #'
+     { col_id='iban', type='href', href_base=href_base, 
+         name=text('Account Number')}#'
+     { col_id='delete', type='href', href_base=href_base, name=' ' }
+   ];
+?>
+<form name="bank_acct" action="<?lsmb script ?>" method="post">
+<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "form_id"
+		value = form_id
+	} ?>
+	<?lsmb PROCESS input element_data = {
+		type="hidden" 
+		name="entity_id" 
+		value=entity_id
+	} ?>
+	<?lsmb PROCESS input element_data = {
+		type="hidden" 
+		name="credit_id" 
+		value=credit_id
+	} ?>
+	<?lsmb PROCESS input element_data = {
+		type="hidden" 
+		name="bank_account_id" 
+		value=request.id
+	} ?>
+	<div>
+	<?lsmb INCLUDE input element_data = {
+		type="text" 
+		label = text('BIC/SWIFT Code')
+		name="bic" 
+		value=request.bic
+		size=20
+	} #' ?>
+	</div>
+	<div>
+	<?lsmb PROCESS input element_data = {
+		type="text" 
+		label = text('Bank Account')
+		name="iban" 
+		value=request.iban
+		size=20
+	} #' ?>
+	</div>
+	<div><?lsmb PROCESS button element_data = {
+		name="action" 
+		value="save_bank_account"
+		class="submit"
+		text = text('Save') 
+		} ?>
+	</div>
+</form>
+</div>

Added: addons/1.3/crm-basic/trunk/UI/crm/divs/company.html
===================================================================
--- addons/1.3/crm-basic/trunk/UI/crm/divs/company.html	                        (rev 0)
+++ addons/1.3/crm-basic/trunk/UI/crm/divs/company.html	2012-07-15 15:00:11 UTC (rev 4995)
@@ -0,0 +1,164 @@
+<div class="container" id="company_div">
+<?lsmb SWITCH entity_class
+	?><?lsmb CASE 1 ?><?lsmb entity_classname = "Vendor" 
+	?><?lsmb CASE 2 ?><?lsmb entity_classname = "Customer" 
+	?><?lsmb END ?>
+	<div class="listtop"><strong><?lsmb text("$operation $entity_classname") ?></strong></div>
+<form name="company" method="post" action="<?lsmb script ?>" method="post">
+<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "target_div"
+		value = 'company_div'
+	} ?>
+	<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "entity_id"
+		value = entity_id
+	} ?>	
+	<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "id"
+		value = company.id
+	} ?>	
+<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "form_id"
+		value = form_id
+	} ?>
+	<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "account_class"
+		value = account_class
+	} ?>	
+<div class="input_line">
+<div class="input_group1">
+	<?lsmb PROCESS input element_data = {
+		label = text('Control Code') #'
+		type= "text"
+		name = "control_code"
+		value = company.control_code
+		size = "20"
+	} ?>
+	<?lsmb IF !created_as_class;
+		created_as_class = entity_class;
+	END; # IF !created_as_class ?> 
+</div>
+<div class="input_group2">
+        <?lsmb company_entity_class = company.entity_class;
+        IF !company_entity_class;
+              company_entity_class = request.entity_class;
+        END;
+        PROCESS select element_data = {
+		name = "entity_class"
+		options = entity_classes
+		default_values = [company_entity_class]
+		text_attr = 'class'
+		value_attr = 'id'
+		label = text('Class')
+	} ?>
+	<?lsmb PROCESS button element_data = {
+		text = text('Generate Control Code') #'
+		type = "submit"
+		name = "action"
+		value = "generate_control_code"
+		class = "submit"
+        } ?>
+        <?lsmb PROCESS button element_data = {
+                text = text('Retrieve')
+                type = 'submit'
+                name = 'action'
+               value = 'get_by_cc'
+               class = 'submit'
+        } ?>
+</div>
+</div>
+<div class="input_line">
+<div class="input_group1">
+	<?lsmb PROCESS input element_data = {
+		label = text('Name')
+		type= "text"
+		name = "legal_name"
+		value = company.legal_name
+		size = "20"
+	} ?>
+</div>
+<div class="input_group2">
+       <?lsmb country_list.unshift({});
+                company_country_id = company.country_id;
+                IF !company_country_id; 
+                          company_country_id = default_country_id;
+                END;
+		INCLUDE select element_data = {
+			text_attr = "name"
+			value_attr = "id"
+			default_values = [company_country_id]
+			options = country_list
+			name = "country_id"
+			label = text('Country') 
+	} ?> 
+</div>
+</div>
+<div class="input_line">
+<div class="input_group1">
+		<?lsmb INCLUDE input element_data = {
+			label = text('Tax Number/SSN'),
+			name = "tax_id",
+			value = company.tax_id,
+			type = "text",
+			size = "19"
+		} #' ?>
+</div>
+<div class="input_group2">
+		<?lsmb INCLUDE input element_data = {
+			label = text('SIC'),
+			name = "sic_code",
+			value = company.sic_code,
+			type = "text",
+			size = "19",
+			class = 'sic'
+		} ?>
+</div>
+</div>
+<div class="input_line" id="sales-tax-info">
+<div class="input_group1">
+     <?lsmb INCLUDE input element_data = {
+         label = text('Sales Tax ID') #'
+          name = 'sales_tax_id'
+          type = 'text'
+         class = 'taxnumber'
+          size = '19'
+         value = company.sales_tax_id
+     } ?>
+</div>
+<div class="input_group2">
+     <?lsmb INCLUDE input element_data = {
+         label = text('License Number') #'
+          name = 'license_number'
+          type = 'text'
+         class = 'taxnumber'
+          size = '19'
+         value = company.license_number
+     } ?>
+</div>
+</div>
+<div class="input_line">
+            <hr/>
+<div class="input_group1">
+		<?lsmb INCLUDE button element_data = {
+			text = text('Save'),
+			class="submit" 
+			type="submit" 
+			name="action" 
+			value="save_company" 
+			accesskey="S" 
+			title="Save [Alt-S]"
+		} ?>
+</div>
+</div>
+</form>
+<?lsmb FOREACH n = notes ?>
+<div class="note">
+<div class="note_contents"><?lsmb n.note ?></div>
+</div>
+<?lsmb END ?>
+</div>

Added: addons/1.3/crm-basic/trunk/UI/crm/divs/contact_info.html
===================================================================
--- addons/1.3/crm-basic/trunk/UI/crm/divs/contact_info.html	                        (rev 0)
+++ addons/1.3/crm-basic/trunk/UI/crm/divs/contact_info.html	2012-07-15 15:00:11 UTC (rev 4995)
@@ -0,0 +1,124 @@
+<div class="container" id="contact_info_div">
+<div class="listtop"><?lsmb text('Contact Information') ?></div>
+<?lsmb 
+
+FOREACH ROW IN contacts;
+    ROW.edit = '[' _ text('Edit') _ ']';
+    ROW.delete = '[' _ text('Delete') _ ']';
+    ROW.edit_href_suffix = 
+               tt_url(script) _ '?entity_id=' _ entity_id _ '&contact=' _
+               tt_url(ROW.contact) _ '&class_id=' _ ROW.class_id _
+               '&description=' _ tt_url(ROW.description) _ '&credit_id=' _ 
+               credit_act.id _ '&action=edit&target_div=contact_div&for_credit='
+               _ ROW.credit_id;
+    ROW.delete_href_suffix = 
+               tt_url(script) _ '?entity_id=' _ entity_id _ '&contact=' _
+               tt_url(ROW.contact) _ '&class_id=' _ ROW.class_id _ 
+               '&description=' _ tt_url(ROW.description) _ '&credit_id=' _ 
+               credit_act.id _ '&action=delete_contact&' _
+               'target_div=contact_div&for_credit=' _ ROW.credit_id;
+    IF ROW.credit_id;
+         ROW.for_credit = 'X';
+    END;
+END;
+PROCESS dynatable 
+        attributes = {id = 'contact-list' }
+        tbody = {rows = contacts}
+        columns = [
+         {col_id='for_credit', type='text', name=text('This Account') }, #' 
+         {col_id='class', type='text', name=text('Type') },
+         {col_id='description', type='text', name=text('Description') },
+         {col_id='contact', type='text', name=text('Contact Info') } #'
+         {col_id='edit', type='href', href_base='', name='' }
+         {col_id='delete', type='href', href_base='', name='' }
+        ] ?>
+	<form action="<?lsmb script ?>" method="post">
+<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "form_id"
+		value = form_id
+	} ?>
+	<?lsmb PROCESS input element_data = {
+		type="hidden" 
+		name="entity_id" 
+		value=entity_id
+	} ?>
+	<?lsmb PROCESS input element_data = {
+		type="hidden" 
+		name="credit_id" 
+		value=credit_act.id
+	} ?>
+	<?lsmb PROCESS input element_data = {
+		type="hidden" 
+		name="old_contact_class" 
+		value=request.contact_class
+	} ?>
+	<?lsmb PROCESS input element_data = {
+		type="hidden" 
+		name="old_contact" 
+		value=request.contact
+	} ?>
+	<?lsmb PROCESS input element_data = {
+		type="hidden" 
+		name="contact_id" 
+		value=request.contact_id
+	} ?>
+        <div>
+           
+             <?lsmb IF credit_act.id;
+                       INCLUDE select element_data = {
+                          name            = "attach_to"
+                          default_options = ['3']
+                          options         = attach_level_options
+                          label           = text('Attach To') #'
+                       };
+                     ELSE ?>
+             <label><?lsmb text('Attach to') ?></label><?lsmb text('Entity');
+                    END; ?>
+	<div>
+		<?lsmb PROCESS select element_data = {
+			name = "class_id"
+			label = "Type"
+			text_attr = "class"
+			value_attr = "id"
+			default_values = [request.class_id]		
+			options = contact_class_list
+		} ?>
+	</div>
+	<div>
+		<?lsmb PROCESS input element_data = {
+			label = text('Description'),
+			name = "description"
+			value = request.description
+			type = "text"
+			size = "20"
+		} #' ?>
+	</div>
+	<div>
+		<?lsmb PROCESS input element_data = {
+			label = text('Contact Info'),
+			name = "contact"
+			value = request.contact
+			type = "text"
+			size = "20"
+		} #' ?>
+	</div>
+	<div><?lsmb PROCESS button element_data = {
+		name = "action",
+		value = "save_contact",
+		text =  text('Save Contact'),
+		class = "submit"
+		} #' ?>
+	<?lsmb IF contact.defined ?> 
+	<?lsmb PROCESS button element_data = {
+		name = "action",
+		value = "save_contact_new",
+		text =  text('Save As New'),
+		class = "submit"
+		} #' ?>
+ 	<?lsmb END # IF old_contact.defined ?>
+	</div>
+</form>
+	
+</div>
+</div>

Added: addons/1.3/crm-basic/trunk/UI/crm/divs/country_us_w4.html
===================================================================
Added: addons/1.3/crm-basic/trunk/UI/crm/divs/credit.html
===================================================================
--- addons/1.3/crm-basic/trunk/UI/crm/divs/credit.html	                        (rev 0)
+++ addons/1.3/crm-basic/trunk/UI/crm/divs/credit.html	2012-07-15 15:00:11 UTC (rev 4995)
@@ -0,0 +1,324 @@
+<div id="credit_div" class="container">
+<div class="listtop"><strong>Accounts</strong></div>
+<?lsmb 
+
+FOREACH cl IN credit_list;
+   IF cl.entity_class == 1;
+        cl.account_class_label = text('Vendor');
+   ELSIF  cl.entity_class == 2;
+        cl.account_class_label = text('Customer');
+   END;
+   cl.meta_number_href_suffix = 'account_class=' _ cl.entity_class _ 
+      '&entity_id=' _ cl.entity_id _ '&meta_number=' _ cl.meta_number _
+      '&target_div=credit_div';
+END;
+
+PROCESS dynatable 
+      attributes = {id = 'credit_accounts_list' }
+      columns = [ 
+        { col_id = 'account_class_label', type = 'text', name = text('Type') }
+        { col_id = 'meta_number', type = 'href', name = text("Number"), 
+          href_base = "$script?action=get&" }
+        { col_id = 'description', type = 'text', name = text("Description") }
+        { col_id = 'credit_limit', type = 'text', name = text('Credit Limit') }
+        { col_id = 'start_date', type = 'text', name = text('Start Date') }
+        { col_id = 'end_date', type = 'text', name = text('End Date') }
+    ], #'
+    tbody = {rows = credit_list}; ?>
+    <form id="credit_form" name="credit_form" method="post" 
+	action="<?lsmb script ?>">
+<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "form_id"
+		value = form_id
+	} ?>
+	<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "entity_id"
+		value = entity_id
+	} ?>	
+	<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "id"
+		value = credit_act.id
+	} ?>	
+	<?lsmb ec = credit_act.entity_class;
+              IF !ec;
+                 ec=account_class;
+                 IF !ec;
+                    ec=entity_class;
+                 END;
+              END;
+              PROCESS input element_data = {
+		type = "hidden"
+		name = "entity_class"
+		value = ec
+	} ?>	
+        <table>
+	<tr class="eca_row">
+	<td>
+ 	<?lsmb PROCESS input element_data = {
+		label = text("$entity_classname Number"), #fixme for i18n
+		type= "text",
+		name = "meta_number",
+		value = credit_act.meta_number,
+		size = "10"
+	}  # " ?></td>
+	<td><?lsmb PROCESS input element_data = {
+		label = text("Description"),
+		type= "text",
+		name = "description",
+		value = credit_act.description,
+		size = "20"
+	} ?></td>
+	</tr>
+	<tr class="pay_to_row">
+	<td colspan = "2">
+	<?lsmb PROCESS input element_data = {
+		label = text('Pay To') #'
+		type = "text"
+		size = "50"
+		name = "pay_to_name"
+		value = credit_act.pay_to_name
+		class = "name"
+	} ?>
+	</td>
+        </tr>
+        <tr id="date-row">
+            <td>
+		<?lsmb PROCESS input element_data = {
+			label = text('Starting Date'),
+			name = "startdate",
+			class = "date",
+			value = credit_act.startdate,
+			type = "text",
+			size = "12",
+			maxlength = "10"
+		} #' ?>
+            </td>
+            <td>
+		<?lsmb PROCESS input element_data = {
+			label = text('End Date'),
+			name = "enddate",
+			class = "date",
+			value = credit.enddate,
+			type = "text",
+			size = "12",
+			maxlength = "10"
+		} #' ?>
+            </td>
+        </tr>
+        <tr id="credit-row">
+            <td>
+		<?lsmb INCLUDE input element_data = {
+			label = text('Credit Limit'),
+			name = "creditlimit",
+			value = credit_act.creditlimit,
+			type = "text",
+			size = "20"
+		} #' ?>
+            </td>
+            <td><span id="terms-span">
+		<?lsmb INCLUDE input element_data = {
+			label = text('Terms'),
+			name = "terms",
+			value = credit_act.terms,
+			type = "text",
+			size = "5"
+		} ?> <?lsmb text('days') ?></span>
+            </td>
+	</tr>
+	<tr id="discount-gifi-row">
+            <td>
+		<?lsmb INCLUDE input element_data = {
+			label = text('Discount'),
+			name = "discount",
+			value = credit_act.discount,
+			type = "text",
+			size = "3",
+			maxlength = 3
+		} ?>% / 
+		<?lsmb INCLUDE input element_data = {
+			name = "discount_terms",
+			value = credit_act.discount_terms,
+			type = "text",
+			size = "3",
+			maxlength = 3
+		} ?> <?lsmb text('days') ?>
+            </td>
+            <td>
+		<?lsmb INCLUDE input element_data = {
+			label = text('Subcontract GIFI'),
+			name = "gifi_accno",
+			value = credit_act.gifi_accno,
+			type = "text",
+			size = "19"
+		} #' ?>
+            </td>
+        </tr>
+        <tr id="account-link-row">
+           <td> <?lsmb INCLUDE select element_data = {
+			name = "ar_ap_account_id"
+			default_values = [credit_act.ar_ap_account_id]
+			options = ar_ap_acc_list
+			label = text((account_class == 1) ? 'AP' : 'AR')
+			text_attr = "text"
+			value_attr = "id"
+                } ?>
+           </td>
+           <td> <?lsmb INCLUDE select element_data = {
+			name = "cash_account_id"
+			default_values = [credit_act.cash_account_id]
+			options = cash_acc_list
+			label = text('Payment')
+			text_attr = "text"
+			value_attr = "id"
+                } ?>
+           </td>
+           <td> <?lsmb INCLUDE select element_data = {
+                        name = "discount_account_id"
+                        default_values = [credit_act.discount_account_id]
+                        options = discount_acc_list
+                        label = text('Discount')
+                        text_attr = "text"
+                        value_attr = "id"
+                } ?>
+           </td>
+        </tr>
+        <tr id="business-threshold-row">
+           <td> <?lsmb business_types.unshift({});
+                       INCLUDE select element_data = {
+			name = "business_id"
+			options = business_types
+			default_values = [credit_act.business_id]
+			text_attr = "description"
+			value_attr = "id"
+			label = text('Business Type') #'
+			} ?> 
+	  </td>
+          <td> <?lsmb INCLUDE input element_data = {
+			name = "threshold"
+			value = credit_act.threshold
+			type = "text"
+			size = "20"
+			label = text('Threshold')
+			class = "numeric"
+               } ?>
+	</tr>
+
+	<tr id="taxform-threshold-row">
+        <?lsmb taxform_list.unshift({}) ?>
+	
+	 <td> <?lsmb INCLUDE select element_data = {
+			name = "taxform_id"
+			options = taxform_list
+			default_values = [credit_act.taxform_id]
+			text_attr = "form_name"
+			value_attr = "id"
+			label = text('Taxforms') 
+			} ?> 
+	  </td>
+        <td> <?lsmb INCLUDE select element_data = {
+		label = text("Language")
+		name = "language_code"
+                default_values = [credit_act.language_code],
+                options = language_code_list
+		text_attr = "text"
+		value_attr = "code"
+                } ?>
+        </td>
+          <td> <?lsmb INCLUDE select element_data = {
+                        name = 'curr'
+                        options = all_currencies
+                        text_attr = 'text'
+                        value_attr = 'text'
+                        default_values = [credit_act.curr]
+                        label = text('Currency')
+               } ?>
+           </td>
+
+        </tr>
+
+        </table>
+        <div class="input_container" id="tax-credit-div">
+        <div class="listtop"><?lsmb text('Taxes') ?></div>
+        <?lsmb FOR tx = all_taxes ?> 
+        <div class="inputrow" id="taxrow-<?lsmb tx.chart_id ?>">
+        <span class="lable" id="txlabel-<?lsmb tx.chart_id ?>">
+            <?lsmb tx.accno ?>--<?lsmb tx.description ?></span>
+        <span class="input" id="txinput-<?lsmb tx.id ?>">
+            <?lsmb checked = "";  
+                   IF credit_act.tax_ids.grep(tx.id).size == 1;
+                       checked = "CHECKED";
+                   END;
+                   INCLUDE input element_data = {
+                           type = "checkbox"
+                           checked = checked
+                           name = "taxact_$tx.id"
+                           value = tx.id
+                   } ?><span></div>
+        <?lsmb END # FOR tx ?>
+         </div>
+		<?lsmb IF credit_act.id;
+		INCLUDE button element_data = {
+			text = text('Save Changes'), #'
+			class="submit" 
+			type="submit" 
+			name="action" 
+			value="save_credit" 
+			accesskey="C" 
+			title="Save Credit Account[Alt-C]"
+		};
+		END;
+		INCLUDE button element_data = {
+			text = text('Save New'), #'
+			class="submit" 
+			type="submit" 
+			name="action" 
+			value="save_credit_new"  
+			title="Save Credit Account as New" 
+		};
+                IF credit_act.id;
+		    INCLUDE button element_data = {
+                        class="submit" 
+                        type="submit" 
+                        name="action" 
+                        value="add_transaction" 
+                        accesskey="A" 
+                        title="Transaction [Alt-A]"
+			text = (entity_class == 1) ? text('AP Transaction') : text('AR Transaction')
+		    }; 
+		    INCLUDE button element_data = {
+                        class="submit" 
+                        type="submit" 
+                        name="action" 
+                        value="add_invoice" 
+                        accesskey="I" 
+                        title="Invoice [Alt-I]"
+			text = (entity_class == 1) ? text('Vendor Invoice')  : text('Customer Invoice') 
+		    };
+		    INCLUDE button element_data = {
+                        class="submit" 
+                        type="submit" 
+                        name="action" 
+                        value="add_order" 
+                        accesskey="O" 
+                        title="Order [Alt-O]"
+			text = (entity_class == 1) ? text('Purchase Order') : text('Sales Order')
+		    };
+		    INCLUDE button element_data = {
+                        class="submit" 
+                        type="submit" 
+                        name="action" 
+                        value="rfq" 
+                        accesskey="Q" 
+                        title="Quotation [Alt-Q]"
+			text = (entity_class == 1) ? text('RFQ') : text('Quotation')
+		    }; ?>
+                <A HREF="contact.pl?action=get_pricelist&credit_id=<?lsmb 
+                        credit_act.id ?>"><?lsmb text('Pricelist') ?></a>
+                <?lsmb END ?>
+	
+    </form>
+</div>
+</div>

Added: addons/1.3/crm-basic/trunk/UI/crm/divs/employee.html
===================================================================
--- addons/1.3/crm-basic/trunk/UI/crm/divs/employee.html	                        (rev 0)
+++ addons/1.3/crm-basic/trunk/UI/crm/divs/employee.html	2012-07-15 15:00:11 UTC (rev 4995)
@@ -0,0 +1,182 @@
+<div id="employee_div" class="container">
+	<div class="listtop"><strong><?lsmb text("$operation Employee") ?></strong></div>
+<form name="hr" action="<?lsmb script ?>" method="post">
+<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "target_div"
+		value = 'hr_div'
+	} ?>
+<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "form_id"
+		value = form_id
+	} ?>
+<?lsmb PROCESS input element_data = {
+                type = "hidden"
+                name = "entity_id"
+               value = entity_id
+} ?>	
+<div class="input_line" id="person_name_div"><?lsmb #text('Name:')?>&nbsp;
+<div class="input_group g1">
+<!-- TODO:  Add Saluatation -->
+<?lsmb PROCESS input element_data = {
+	label = text('First Name') #'
+	name = "first_name"
+	value = employee.first_name
+	type = "text"
+	size = 20
+} ?>
+</div>
+<div class="input_group g2">
+<?lsmb PROCESS input element_data = {
+	label = text('Middle Name') #'
+	name = "middle_name"
+	value = employee.middle_name
+	type = "text"
+	size = 20
+} ?>
+</div>
+</div>
+<div class="input_line" id='person_name2_div'>
+<div class="input_group g1">
+<?lsmb PROCESS input element_data = {
+	label = text('Last Name') #'
+	name = "last_name"
+	value = employee.last_name
+	type = "text"
+	size = 20
+} ?>
+</div>
+<!-- Note that the strange # ' constructs are only necessary to help VIM avoid
+problems with multi-word single-quoted constructs in PI tags. -CT  -->
+<div class="input_group g2">
+<?lsmb PROCESS input element_data = {
+	label = text('Job Title')
+	name = "role"
+	value = employee.role
+	type = "text"
+	size = 20
+} # ' ?>
+</div>
+</div>
+<div class="input_line" id="person-role-div">
+<div class="input_group g1">
+<?lsmb PROCESS input element_data = {
+	label = text('Sales')
+	value = 1
+	type = "checkbox"
+	checked = employee.sales
+	name = "sales"
+} ?>
+</div>
+<div class="input_group g2">
+<?lsmb PROCESS input element_data = {
+        label = text('Manager')
+        value = 'manager'
+        type = "checkbox"
+        checked = employee.is_manager
+        name = "is_manager"
+} ?>
+</div>
+</div>
+<div class="input_line" id="person-country-div">
+<div class="input_group solo">
+       <?lsmb country_list.unshift({}) ?>
+		<?lsmb INCLUDE select element_data = {
+			text_attr = "name"
+			value_attr = "id"
+			default_values = [employee.country_id]
+			options = country_list
+			name = "country_id"
+			label = text('Country') 
+	} ?> 
+</div>
+</div>
+<div id="employee_div" class="input_line">
+<div class="input_group g1">
+<?lsmb PROCESS input element_data = {
+	label = text('Employee Number') #'
+	value = employee.employeenumber
+	name = "employeenumber"
+	type = "text"
+	size = 20
+}  ?>
+</div>
+<div class="input_group g2">
+<?lsmb PROCESS select element_data = {
+         label = text('Manager')
+          name = 'manager_id'
+       options = all_managers
+default_values = [employee.manager_id]
+     text_attr = 'label'
+    value_attr = 'id'
+} ?> 
+</div>
+<div class="input_group g3">
+<?lsmb PROCESS input element_data = {
+        label = text('Tax ID/SSN') #'
+         name = "ssn"
+        value = employee.ssn
+         type = "text"
+        class = "tax_id"
+         size = "16"
+} ?>
+</div>
+</div>
+<div class="input_line" id="hr_dates_div">
+<div class="input_group g1">
+<?lsmb PROCESS input element_data = {
+	label = text('DOB')
+	name = "dob"
+	value = employee.dob
+	type = "text"
+	class = "date"
+	size = 10
+}  ?>
+</div>
+<div class="input_group g2">
+<?lsmb PROCESS input element_data = {
+	label = text('Start Date')
+	name = "start_date"
+	value = employee.start_date
+	type = "text"
+	class = "date"
+	size = 10
+} # '  ?>
+</div>
+<div class="input_group g3">
+<?lsmb PROCESS input element_data = {
+	label = text('End Date')
+	name = "end_date"
+	value = employee.end_date
+	class = "text"
+	type = "text"
+	size = 10
+} # ' ?>
+</div>
+</div>
+<div>
+<?lsmb PROCESS button element_data = {
+	text = text('Save')
+	class = "submit"
+	type = "submit"
+        name = 'action'
+	value = "save_employee"
+} ?>
+<?lsmb 
+IF manage_users and entity_id;
+   IF user_id ?>
+       <a href="admin.pl?action=edit_user&user_id=<?lsmb user_id ?>"
+       >[<?lsmb text('Edit User') ?>]</a><?lsmb 
+   ELSE ?>
+       <a href="admin.pl?action=new_user&first_name=<?lsmb tt_url(first_name) 
+                ?>&last_name=<?lsmb tt_url(last_name) 
+                ?>&employeenumber=<?lsmb tt_url(employeenumber) 
+                ?>&country_id=<?lsmb tt_url(country_id) 
+                ?>&entity_id=<?lsmb tt_url(entity_id) ?>"
+       >[<?lsmb text('Add User') ?>]</a><?lsmb
+   END;
+END ?>
+</div>
+</form>
+</div>

Added: addons/1.3/crm-basic/trunk/UI/crm/divs/files.html
===================================================================
--- addons/1.3/crm-basic/trunk/UI/crm/divs/files.html	                        (rev 0)
+++ addons/1.3/crm-basic/trunk/UI/crm/divs/files.html	2012-07-15 15:00:11 UTC (rev 4995)
@@ -0,0 +1,55 @@
+<div class="container" id="files_div">
+<?lsmb callback="contact.pl?action=get&entity_class=" _ 
+                credit_act.entity_class _ "&entity_id=" _ entity_id _
+                "&credit_id=" _ credit_act.id; 
+columns = [{ col_id = 'file_name', name = text('File name'), #'
+               type = 'href', href_base="file.pl&action=get"}
+           { col_id = 'mime_type_text', name = text('File Type'), #'
+               type = 'text'}
+           { col_id = 'attached_at', name = text('Attached At'), #'
+               type = 'text'}
+           { col_id = 'attached_by', name = text('Attached By'), #'
+               type = 'text'}]; ?>
+<div class="listtop"><?lsmb text('Files attached to Entity') ?></div>
+<?lsmb 
+  FOREACH COL IN columns;
+         IF COL.col_id == file_name;
+                  COL.href_base='file.pl&action=get&file_class=4&id=';
+         END;
+  END;
+  FOREACH ROW IN entity_files;
+       ROW.row_id = ROW.id;
+  END;
+
+INCLUDE dynatable
+      columns = columns
+      attributes = {id = 'entity-files', width = '100%'}
+      tbody = {rows = entity_files };
+?>
+<?lsmb IF credit_act.id ?>
+<div class="listtop"><?lsmb text('Files attached to Credit Account') ?></div>
+<?lsmb 
+  FOREACH COL IN columns;
+         IF COL.col_id == file_name;
+                  COL.href_base='file.pl&action=get&file_class=5&id=';
+         END;
+  END;
+  FOREACH ROW IN credit_files;
+       ROW.row_id = ROW.id;
+  END;
+
+INCLUDE dynatable
+      columns = columns
+      attributes = {id = 'eca-files', width = '100%'}
+      tbody = {rows = eca_files };
+END;
+?>
+<a href="file.pl?action=show_attachment_screen&ref_key=<?lsmb entity_id 
+         ?>&file_class=4&callback=<?lsmb tt_url(callback) ?>"
+>[<?lsmb text('Attach to Entity') ?>]</a>
+<?lsmb IF credit_act.id ?>
+<a href="file.pl?action=show_attachment_screen&ref_key=<?lsmb credit_act.id
+    ?>&file_class=5&callback=<?lsmb tt_url(callback) ?>"
+>[<?lsmb text('Attach to Credit Account') ?>]</a>
+<?lsmb END ?>
+</div>

Added: addons/1.3/crm-basic/trunk/UI/crm/divs/notes.html
===================================================================
--- addons/1.3/crm-basic/trunk/UI/crm/divs/notes.html	                        (rev 0)
+++ addons/1.3/crm-basic/trunk/UI/crm/divs/notes.html	2012-07-15 15:00:11 UTC (rev 4995)
@@ -0,0 +1,69 @@
+<div id="notes_div" class="container">
+<div class="listtop"><?lsmb text('Notes') ?></div>
+<form action="<?lsmb script ?>" method="post">
+<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "target_div"
+		value = 'notes_div'
+	} ?>
+<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "form_id"
+		value = form_id
+	} ?>
+	<?lsmb PROCESS input element_data = {
+		type="hidden" 
+		name="entity_id" 
+		value=entity_id
+	} ?>
+	<?lsmb PROCESS input element_data = {
+		type="hidden" 
+		name="credit_id" 
+		value=credit_act.id
+	} ?>
+<div class="input">
+   <?lsmb PROCESS input element_data = {
+      label = text('Subject'),
+      name = "subject"
+      value = subject
+      type = "text"
+      size = "20"
+	} ?>
+</div>
+<div class="input">
+<?lsmb 
+IF credit_act.id;
+    PROCESS select element_data = {
+			name = "note_class"
+			default_values = [note_class]
+			options = attach_level_options
+			label = text("Note Class") #"
+			value_attr = "value"
+	};
+ELSE ?>
+<label><?lsmb text('Note Class') ?></label><?lsmb text('Entity');
+END; ?>
+</div>
+<div class="input"><?lsmb PROCESS textarea element_data = {
+	label = text('Notes')
+	name = 'note'
+} ?></div>
+<div class="input">
+<?lsmb PROCESS button element_data = {
+	text = text('Save')
+	class = 'submit'
+	name = 'action'
+	value = 'save_notes'
+} ?>
+
+</form>
+<?lsmb FOREACH n = notes ?>
+<div class="note<?lsmb IF n.note_class == 3; ' eca_note'; END ?>">
+    <div class="note_subject"><?lsmb text('Subject: [_1]', n.subject)?></div>
+    <div class="timestamp"><?lsmb text('Entered at: [_1]', n.created) ?></div>
+    <div class="author"><?lsmb text("Author: [_1]", n.created_by) ?></div>
+    <div class="note_contents"><?lsmb n.note ?></div>
+</div>
+<?lsmb END ?>
+</div>
+</div>

Added: addons/1.3/crm-basic/trunk/UI/crm/divs/person.html
===================================================================
--- addons/1.3/crm-basic/trunk/UI/crm/divs/person.html	                        (rev 0)
+++ addons/1.3/crm-basic/trunk/UI/crm/divs/person.html	2012-07-15 15:00:11 UTC (rev 4995)
@@ -0,0 +1,159 @@
+<div class="container" id="person_div">
+<?lsmb SWITCH entity_class
+	?><?lsmb CASE 1 ?><?lsmb entity_classname = "Vendor" 
+	?><?lsmb CASE 2 ?><?lsmb entity_classname = "Customer" 
+	?><?lsmb END ?>
+	<div class="listtop"><strong><?lsmb text("$operation $entity_classname") ?></strong></div>
+<form name="customer" method="post" action="<?lsmb script ?>">
+<?lsmb PROCESS input element_data = { # Only for generate_control_code
+		type = "hidden"
+		name = "target_div"
+		value = 'person_div'
+	} ?>
+	<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "entity_id"
+		value = entity_id
+	} ?>	
+	<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "id"
+		value = person.id
+	} ?>	
+<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "form_id"
+		value = form_id
+	} ?>
+	<?lsmb PROCESS input element_data = {
+		type = "hidden"
+		name = "account_class"
+		value = account_class
+	} ?>	
+<div class="input_line">
+<div class="input_group1">
+	<?lsmb PROCESS input element_data = {
+		label = text('Control Code') #'
+		type= "text"
+		name = "control_code"
+		value = person.control_code
+		size = "20"
+	} ?>
+	<?lsmb IF !created_as_class;
+		created_as_class = entity_class;
+	END; # IF !created_as_class ?> 
+</div>
+<div class="input_group2">
+        <?lsmb company_entity_class =persony.entity_class;
+        IF !company_entity_class;
+              company_entity_class = request.entity_class;
+        END;
+        PROCESS select element_data = {
+		name = "entity_class"
+		options = entity_classes
+		default_values = [person_entity_class]
+		text_attr = 'class'
+		value_attr = 'id'
+		label = text('Class')
+	} ?>
+	<?lsmb PROCESS button element_data = {
+		text = text('Generate Control Code') #'
+		type = "submit"
+		name = "action"
+		value = "generate_control_code"
+		class = "submit"
+        } ?>
+        <?lsmb PROCESS button element_data = {
+                text = text('Retrieve')
+                type = 'submit'
+                name = 'action'
+               value = 'get_by_cc'
+               class = 'submit'
+        } ?>
+</div>
+</div>
+<div class="input_line">
+<div class="input_group1">
+     <?lsmb 
+        PROCESS select element_data = {
+                  label = text('Salutation')
+                   name = 'salutation_id'
+         default_values = [salutation_id]
+                options = salutations
+                  class = 'salutations'
+              text_attr = 'salutation'
+             value_attr = 'id'
+    } ?>
+</div>
+</div>
+<div class="input_line">
+<div class="input_group1">
+	<?lsmb PROCESS input element_data = {
+		label = text('Given Name') #'
+		type= "text"
+		name = "first_name"
+		value = person.first_name
+		size = "20"
+	} ?>
+</div>
+</div>
+<div class="input_line">
+<div class="input_group1">
+        <?lsmb PROCESS input element_data = {
+                label = text('Middle Name') #'
+                type= "text"
+                name = "middle_name"
+                value = person.middle_name
+                size = "20"
+        } ?>
+</div>
+</div>
+<div class="input_line">
+<div class="input_group1">
+        <?lsmb PROCESS input element_data = {
+                label = text('Surname') 
+                type= "text"
+                name = "last_name"
+                value = person.last_name
+                size = "20"
+        } ?>
+</div>
+</div>
+<div class="input_line">
+<div class="input_group1">
+       <?lsmb 
+                person_country_id = person.country_id;
+                IF !person_country_id; 
+                          person_country_id = default_country_id;
+                END;
+		INCLUDE select element_data = {
+			text_attr = "name"
+			value_attr = "id"
+			default_values = [company_country_id]
+			options = country_list
+			name = "country_id"
+			label = text('Country') 
+	} ?> 
+</div>
+</div>
+<div class="input_line">
+            <hr/>
+<div class="input_group1">
+		<?lsmb INCLUDE button element_data = {
+			text = text('Save'),
+			class="submit" 
+			type="submit" 
+			name="action" 
+			value="save_person" 
+			accesskey="S" 
+			title="Save [Alt-S]"
+		} ?>
+</div>
+</div>
+</form>
+<?lsmb FOREACH n = notes ?>
+<div class="note">
+<div class="note_contents"><?lsmb n.note ?></div>
+</div>
+<?lsmb END ?>
+</div>

Added: addons/1.3/crm-basic/trunk/UI/crm/divs/user.html
===================================================================
--- addons/1.3/crm-basic/trunk/UI/crm/divs/user.html	                        (rev 0)
+++ addons/1.3/crm-basic/trunk/UI/crm/divs/user.html	2012-07-15 15:00:11 UTC (rev 4995)
@@ -0,0 +1,142 @@
+<?lsmb PROCESS 'elements.html' ?>
+<div id="user_div" class="container">
+	<div class="listtop">
+            <?lsmb 
+               IF request.import;
+                       text('Importing User');
+                       action = 'save_user';
+                ELSIF user.username;
+                      text('Editing User');
+                      action = 'edit_user';
+                ELSE;
+                      text('New User');
+                      action = 'save_user';
+                END ?>
+        </div>
+    
+    <form method="POST" action="admin.pl">
+        <input type="hidden" name="entity_id" value="<?lsmb entity_id ?>"/>
+        <table>
+
+            <?lsmb IF user.username?>
+            <tr>
+                <td><?lsmb text('Username') ?></td>
+                <td>
+                    <?lsmb user.username;
+                    INCLUDE input element_data = {
+                            name  = 'username'
+                            type  = 'hidden'
+                            value = user.username
+                    } ?>
+                </td>
+            </tr>
+            
+            <?lsmb ELSE ?>
+            <tr>
+                <td><?lsmb text('Username') ?></td>
+                <td>
+                    <input type="text" name="username" value="<?lsmb user.username ?>"/>
+                </td>
+            </tr>
+            <?lsmb END?>
+            <?lsmb UNLESS request.import ?>
+            <tr>
+                <td><?lsmb text('Password') ?></td>
+                <td>
+                    <input type="password" name="password" value="<?lsmb user.user.password ?>"/>
+                </td>
+            </tr>
+            <?lsmb END ?>
+            <?lsmb IF (request.import == 1) OR !user.username ?>
+            <tr>
+                <td><?lsmb text('Import') ?></td>
+                <?lsmb 
+                  IF request.import;
+                      importc1 = 'CHECKED';
+                      importc0 = '';
+                  ELSE;
+                      importc1 = '';
+                      importc0 = 'CHECKED';
+                  END; ?> 
+                <td><?lsmb INCLUDE input element_data = {
+                           label   = 'Yes'
+                           value   = '1'
+                           checked = importc1
+                           name    = 'import'
+                           type    = 'radio'
+                   };
+                   INCLUDE input element_data = {
+                           label   = 'No'
+                           value   = '0'
+                           checked = importc0
+                           name    = 'import'
+                           type    = 'radio'
+                   } ?>
+            </tr>
+            <?lsmb END # unless employee.entity_id ?>
+        </table>
+           <?lsmb IF user.username;
+                PROCESS button element_data  = {
+                         text = text('Reset Password') #'
+                         name = 'action'
+                         type = 'submit'
+                        class = 'submit'
+                        value = 'reset_password'
+                };
+           ELSE; 
+                PROCESS button element_data  = {
+                         text = text('Add User') #'
+                         name = 'action'
+                         type = 'submit'
+                        class = 'submit'
+                        value = 'create_user'
+                };
+           END;
+    ?>
+    </form>
+    <?lsmb IF user.username AND request.import != 1 ?>
+        <hr /> 
+        <form name="groups" method="POST" action="admin.pl">
+            <?lsmb PROCESS input element_data = {
+               type="hidden"
+               name="user_id"
+               value= user.user.id 
+           } ?>
+            <table>
+                <!-- Groups section -->
+                <tr>
+                <?lsmb FOREACH role IN roles ?>
+                <?lsmb IF loop.count % 2 == 0?>
+                </tr>
+                <tr>
+                <?lsmb END?>
+                    <td>
+                        <?lsmb rolcheck = undef; 
+                           IF user.role_list.grep(role.rolname).size;
+                              rolcheck = "checked";
+                           END ?>
+                        <?lsmb PROCESS input element_data = {
+                               type = "checkbox"
+                               label = role.rolname
+                               value = 1
+                               name = role.rolname
+                               checked = rolcheck
+                         }, label_pos = 1 ?>
+                    </td>
+                <?lsmb END?>
+                </tr>
+            </table>
+        
+            <table>
+                <tr>
+                    <td><?lsmb PROCESS button element_data = {
+                          text = text('Save Groups') #'
+                          class = "submit"
+                          name = "action"
+                          value = "save_roles"
+                    } ?></td>
+                </tr>
+            </table>
+        </form>   
+<?lsmb END?>
+</div>

Added: addons/1.3/crm-basic/trunk/UI/crm/divs/wage.html
===================================================================
--- addons/1.3/crm-basic/trunk/UI/crm/divs/wage.html	                        (rev 0)
+++ addons/1.3/crm-basic/trunk/UI/crm/divs/wage.html	2012-07-15 15:00:11 UTC (rev 4995)
@@ -0,0 +1,72 @@
+<div class="container" id="wage_div">
+<?lsmb 
+columns = [{ col_id = 'type', name = text('Type'), type = 'text' },
+           { col_id = 'rate', name = text('Amount/Rate'), type = 'text' }];
+
+PROCESS dynatable
+        columns = columns
+        attributes = {id = 'wage-table', width='100%' }
+        t_body = {rows = wages};
+
+PROCESS dynatable
+        columns = columns
+        attributes = {id = 'deduction-table', width='100%' }
+        t_body = {rows = deductions}; ?>
+
+<table>
+<tr>
+<form action="<?lsmb script ?>" method="post" name="wage">
+<td><?lsmb PROCESS select element_data = {
+                options = wage_types
+             value_attr = 'id'
+              text_attr = 'label'
+                   name = 'type_id'
+} ?></td>
+<td><?lsmb PROCESS input element_data = {
+              name = 'rate'
+             value = rate
+             class = 'number'
+              type = 'text'
+} ?></td>
+<?lsmb PROCESS input element_data = { 
+          name = 'entity_id'
+          type = 'hidden'
+         value = entity_id
+} ?>
+<td><?lsmb PROCESS button element_data = {
+          text = text('Add/Change Wage') #'
+          name = 'action'
+          type = 'submit'
+         class = 'submit'
+} ?></td>
+</form>
+</tr>
+<tr>
+<form action="<?lsmb script ?>" method="post" name="deduction">
+<td><?lsmb PROCESS select element_data = {
+                options = deduction_types
+             value_attr = 'id'
+              text_attr = 'label'
+                   name = 'type_id'
+} ?></td>
+<td><?lsmb PROCESS input element_data = {
+              name = 'rate'
+             value = rate
+             class = 'number'
+              type = 'text'
+} ?></td>
+<?lsmb PROCESS input element_data = { 
+          name = 'entity_id'
+          type = 'hidden'
+         value = entity_id
+} ?>
+<td><?lsmb PROCESS button element_data = {
+          text = text('Add/Change Deductions') #'
+          name = 'action'
+          type = 'submit'
+         class = 'submit'
+} ?></td>
+</form>
+</tr>
+</table>
+</div>

Added: addons/1.3/crm-basic/trunk/UI/crm/pricelist.csv
===================================================================
--- addons/1.3/crm-basic/trunk/UI/crm/pricelist.csv	                        (rev 0)
+++ addons/1.3/crm-basic/trunk/UI/crm/pricelist.csv	2012-07-15 15:00:11 UTC (rev 4995)
@@ -0,0 +1,49 @@
+<?lsmb- PROCESS 'dynatable.csv' -?>
+<?lsmb-
+    columns = [ 
+              { col_id = 'parts_id',
+                  type = 'hidden' },
+              { col_id = 'int_partnumber'
+                  name = text('Partnumber')
+                  type = 'text'
+                },
+                { col_id = 'description'
+                  name = text('Description')
+                  type = 'text'
+                } ];
+     IF account_class == 1;
+         columns.push(
+                  {col_id = 'lastcost'
+                     name = text('Last Cost') 
+                     type = 'text_input'},
+                  {col_id = 'partnumber',
+                     name = text('Vendor Partnumber') 
+                     type = 'text_input'},
+                  {col_id = 'leadtime',
+                     name = text('Lead Time') 
+                     type = 'input_text'}
+         );
+
+     ELSE;
+
+         columns.push(
+                  {col_id = 'sellprice'
+                     name = text('Sell Price') 
+                     type = 'input_text'},
+                  {col_id = 'validfrom',
+                     name = text('Valid From') 
+                     type = 'input_text'},
+                  {col_id = 'validto',
+                     name = text('Valid To') 
+                     type = 'input_text'},
+         );
+                        
+     END;
+     columns.push({col_id = 'currency',
+                     name = text('Currency'),
+                     type = 'text'},
+     );
+      PROCESS dynatable
+         tbody = { rows = pricematrix }
+
+-?>

Added: addons/1.3/crm-basic/trunk/UI/crm/pricelist.html
===================================================================
--- addons/1.3/crm-basic/trunk/UI/crm/pricelist.html	                        (rev 0)
+++ addons/1.3/crm-basic/trunk/UI/crm/pricelist.html	2012-07-15 15:00:11 UTC (rev 4995)
@@ -0,0 +1,104 @@
+<?lsmb INCLUDE 'ui-header.html' ?>
+<?lsmb PROCESS 'elements.html' ?>
+<?lsmb PROCESS 'dynatable.html' ?>
+<!-- 
+
+The overall structure here is imagined to be a list of individual price
+listings followed by the listings for the pricegroup.  The reason for including
+both is simply that it makes it easier for someone to see what's going on when
+checking a price deal for a customer.
+
+-CT
+
+-->
+<?lsmb account_class = entity_class ?>
+<body>
+<div class="listtop"><?lsmb text('Pricelist') ?> <?lsmb pricematrix.length ?></div>
+<?lsmb 
+    columns = [ 
+              { col_id = 'parts_id',
+                  type = 'hidden' },
+              { col_id = 'int_partnumber'
+                  name = text('Partnumber')
+                  type = 'text'
+                },
+                { col_id = 'description'
+                  name = text('Description')
+                  type = 'text'
+                } ];
+     IF account_class == 1;
+         columns.push(
+                  {col_id = 'lastcost'
+                     name = text('Last Cost') #'
+                     type = 'text_input'},
+                  {col_id = 'partnumber',
+                     name = text('Vendor Partnumber') #'
+                     type = 'text_input'},
+                  {col_id = 'leadtime',
+                     name = text('Lead Time') #'
+                     type = 'input_text'}
+         );
+     ELSE;
+         columns.push(
+                  {col_id = 'sellprice'
+                     name = text('Sell Price') #'
+                     type = 'input_text'},
+                  {col_id = 'validfrom',
+                     name = text('Valid From') #'
+                     type = 'input_text'},
+                  {col_id = 'validto',
+                     name = text('Valid To') #'
+                     type = 'input_text'},
+         );
+                        
+     END;
+     columns.push({col_id = 'currency',
+                     name = text('Currency'),
+                     type = 'text'},
+                  {col_id = 'delete',
+                     name = '&nbsp;',
+                     type = 'href',
+                href_base = script _ '?action=delete_pricematrix&credit_id=' 
+                            _ id _ '&entry_id=' }
+     );
+     FOREACH pm IN pricematrix;
+         pm.delete = '[' _ text('Delete') _ ']';
+         pm.row_id = pm.entry_id;
+     END ?>
+<form name="pricematrix" action="<?lsmb script ?>" method="post">
+ <input type="hidden" name="entity_class"  value="<?lsmb account_class ?>" />
+ <input type="hidden" name="credit_id" value="<?lsmb credit_id ?>" />
+ <input type="hidden" name="entity_id" value="<?lsmb entity_id ?>" /><?lsmb
+      PROCESS dynatable
+    attributes = { id = 'pricematrix' }
+         tbody = { rows = pricematrix }
+         tfoot = { coltypes = { int_partnumber = 'input_text',
+                                   description = 'input_text', }
+                   rows = [{}]} ?>
+<?lsmb PROCESS button element_data = {
+    type = "submit"
+   class = "submit"
+    name = "action"
+    text = text('Save')
+   value = "save_pricelist"
+} ;
+
+IF FORMATS.grep('PDF').size() ?> <a href="customer.pl?action=pricelist&format=PDF&credit_id=<?lsmb 
+             credit_id ?>&entity_id=<?lsmb entity_id 
+     ?>">[<?lsmb text('PDF') ?>]</a>
+<?lsmb END;
+
+IF FORMATS.grep('ODS').size() 
+?> <a href="customer.pl?action=pricelist&format=ODS&credit_id=<?lsmb 
+             credit_id ?>&entity_id=<?lsmb entity_id 
+     ?>">[<?lsmb text('ODS') ?>]</a>
+<?lsmb END ?>
+ <a href="customer.pl?action=pricelist&format=CSV&credit_id=<?lsmb 
+             credit_id ?>&entity_id=<?lsmb entity_id 
+     ?>">[<?lsmb text('CSV') ?>]</a>
+<?lsmb IF pricematrix_pricegroup;
+     PROCESS dynatable
+         tbody = { rows = pricematrix_pricegroup };
+       END ?>
+</body>
+</html>

Added: addons/1.3/crm-basic/trunk/UI/crm/pricelist.odst
===================================================================
--- addons/1.3/crm-basic/trunk/UI/crm/pricelist.odst	                        (rev 0)
+++ addons/1.3/crm-basic/trunk/UI/crm/pricelist.odst	2012-07-15 15:00:11 UTC (rev 4995)
@@ -0,0 +1,54 @@
+<workbook>
+<?lsmb 
+    PROCESS 'dynatable.odst';
+    columns = [ 
+              { col_id = 'parts_id',
+                  type = 'hidden' },
+              { col_id = 'int_partnumber'
+                  name = text('Partnumber')
+                  type = 'text'
+                },
+                { col_id = 'description'
+                  name = text('Description')
+                  type = 'text'
+                } ];
+     IF account_class == 1;
+         columns.push(
+                  {col_id = 'lastcost'
+                     name = text('Last Cost') #'
+                     type = 'text_input'},
+                  {col_id = 'partnumber',
+                     name = text('Vendor Partnumber') #'
+                     type = 'text_input'},
+                  {col_id = 'leadtime',
+                     name = text('Lead Time') #'
+                     type = 'input_text'}
+         );
+     ELSE;
+         columns.push(
+                  {col_id = 'sellprice'
+                     name = text('Sell Price') #'
+                     type = 'input_text'},
+                  {col_id = 'validfrom',
+                     name = text('Valid From') #'
+                     type = 'input_text'},
+                  {col_id = 'validto',
+                     name = text('Valid To') #'
+                     type = 'input_text'},
+         );
+                        
+     END;
+     columns.push({col_id = 'currency',
+                     name = text('Currency'),
+                     type = 'text'}
+     ); 
+    PROCESS dynatable
+         attributes = { id = 'pricematrix' }
+         tbody = { rows = pricematrix };
+    IF pricematrix_pricegroup.size;
+         PROCESS dynatable
+             attributes = { id = 'pricegroup' }
+             tbody = { rows = pricematrix_pricegroup };
+    END;
+?>
+</workbook>

Added: addons/1.3/crm-basic/trunk/UI/crm/pricelist.tex
===================================================================
--- addons/1.3/crm-basic/trunk/UI/crm/pricelist.tex	                        (rev 0)
+++ addons/1.3/crm-basic/trunk/UI/crm/pricelist.tex	2012-07-15 15:00:11 UTC (rev 4995)
@@ -0,0 +1,65 @@
+<?lsmb   FILTER latex ?>
+\documentclass[a4paper]{article}
+\usepackage{longtable}
+\usepackage[margin=1cm]{geometry}
+\begin{document}
+<?lsmb- PROCESS 'dynatable.tex' -?>
+<?lsmb-
+    columns = [ 
+              { col_id = 'parts_id',
+                  type = 'hidden' },
+              { col_id = 'int_partnumber'
+                  name = text('Partnumber')
+                  type = 'text'
+                },
+                { col_id = 'description'
+                  name = text('Description')
+                  type = 'text'
+                } ];
+?> <?lsmb-
+     IF account_class == 1;
+         columns.push(
+                  {col_id = 'lastcost'
+                     name = text('Last Cost') 
+                     type = 'text_input'},
+                  {col_id = 'partnumber',
+                     name = text('Vendor Partnumber') 
+                     type = 'text_input'},
+                  {col_id = 'leadtime',
+                     name = text('Lead Time') 
+                     type = 'input_text'}
+         );
+
+     ELSE;
+
+         columns.push(
+                  {col_id = 'sellprice'
+                     name = text('Sell Price') 
+                     type = 'input_text'},
+                  {col_id = 'validfrom',
+                     name = text('Valid From') 
+                     type = 'input_text'},
+                  {col_id = 'validto',
+                     name = text('Valid To') 
+                     type = 'input_text'},
+         );
+                        
+     END;
+-?><?lsmb-
+     columns.push({col_id = 'currency',
+                     name = text('Currency'),
+                     type = 'text'},
+     );
+      PROCESS dynatable
+    attributes = { id = 'pricematrix' }
+         tbody = { rows = pricematrix }
+    firsthead = '\multicolumn{4}{l}{' _ text('Pricelist for [_1]', name)
+                  _ '}';
+
+   IF pricematrix_pricegroup.size() > 0 ;
+     PROCESS dynatable
+         tbody = { rows = pricematrix_pricegroup };
+   END;
+-?>
+\end{document}
+<?lsmb  END ?>

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