diff options
Diffstat (limited to 'UI/Customer/customer.html')
-rw-r--r-- | UI/Customer/customer.html | 194 |
1 files changed, 171 insertions, 23 deletions
diff --git a/UI/Customer/customer.html b/UI/Customer/customer.html index 88020d1d..759f4d72 100644 --- a/UI/Customer/customer.html +++ b/UI/Customer/customer.html @@ -1,13 +1,20 @@ -<?lsmb PROCESS 'ui-header.html' ?> +<?lsmb script_css = "Customer/customer.css" ?><?lsmb PROCESS 'ui-header.html' ?> +<?lsmb PROCESS 'elements.html' ?> <body> +<div class="navigation" id="nav_div"> +</div> +<div class="container" id="customer_div"> <div class="listtop"><strong><?lsmb text('Add/Edit Customer') ?></strong></div> -<div class="customer"> <?lsmb IF name ?> <font size="17"><?lsmb name?></font> <?lsmb END ?> -<form name="customer" method="POST" action="vendor.pl"> +<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> @@ -48,7 +55,7 @@ </tr> <tr> <td> - <label for"creditlimit"><?lsmb text('Credit Limit:') ?></label> + <label for="creditlimit"><?lsmb text('Credit Limit:') ?></label> <input id="creditlimit" name="creditlimit" type="text" value="<?lsmb creditlimit ?>"> </td> @@ -66,7 +73,7 @@ value="<?lsmb taxnumber ?>"> </td> <td> - <label for"gifi_accno"><?lsmb text('Subcontract GIFI:') ?> + <label for="gifi_accno"><?lsmb text('Subcontract GIFI:') ?> </label> <input id="gifi_accno" name="gifi_accno" type="text" value="<?lsmb gifi_accno ?>"> @@ -81,34 +88,22 @@ size="3" value="<?lsmb discount_days ?>"> </td> <td> - <label for"sic_code"><?lsmb text('SIC Code:') ?></label> + <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> - <td> - <label for"bic"><?lsmb text('BIC:') ?></label> - <input id="bic" name="bic" type="text" - value="<?lsmb bic ?>"> - </td> - <td> - <label for="iban"><?lsmb text('IBAN:') ?></label> - <input id="iban" name="iban" type="text" - value="<?lsmb iban ?>"> - </td> - </tr> - <tr> <td> <label for="notes"><?lsmb text('Notes:') ?></label><br/> <textarea name="notes" rows="3" cols="40" id="notes"><?lsmb notes ?></textarea> - <!-- The prior funny whitespace may look funny but it prevents - additional whitespace from being added to the data every time - it is saved --> + <!-- 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> @@ -156,13 +151,166 @@ <?lsmb text('Pricelist') ?></button> </form> </div> -<div id="locations"> +<?lsmb #IF id ?> +<div id="locations" 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="vendor.pl"> - <!-- todo, add location management! --> + <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.type ?></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 name='loc_type'> + <?lsmb FOREACH lc = location_class ?> + <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 ?> + <option value="<?lsmb c.id ?>"><?lsmb c.name ?></option> + <?lsmb END ?> + </select> + </div> + <div><button type=submit class="submit" name=submit value="add_location" + id="loc_save_location">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> + <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 ?> + <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> + +</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 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> |