diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-03-04 19:47:19 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-03-04 19:47:19 +0000 |
commit | 82254cc7c2fab1a48c291f75a0a04f2fdaaa6b11 (patch) | |
tree | 0f268e4b0153c5f41eacede46b4ffb9cc6f479d9 /UI | |
parent | 5c984b68bc2d43fb66dc8d2f60acc424b5a6ceca (diff) |
Adding David Mora's single-payment interface patches
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2098 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'UI')
-rw-r--r-- | UI/am-account-form.html | 73 | ||||
-rw-r--r-- | UI/payments/payment1.html | 70 | ||||
-rw-r--r-- | UI/payments/payment2.html | 157 |
3 files changed, 199 insertions, 101 deletions
diff --git a/UI/am-account-form.html b/UI/am-account-form.html index 34482b51..64bffb8b 100644 --- a/UI/am-account-form.html +++ b/UI/am-account-form.html @@ -10,14 +10,14 @@ <table> <tr> <th align="right"><?lsmb text('Account Number') ?></th> - <td><?lsmb PROCESS input element_data={ + <td><?lsmb INCLUDE input element_data={ name => 'accno', size => '20', value => form.accno} ?></td> </tr> <tr> <th align="right"><?lsmb text('Description') ?></th> - <td><?lsmb PROCESS input element_data={ + <td><?lsmb INCLUDE input element_data={ name => 'description', size => '40', value => form.description} ?></td> @@ -28,32 +28,32 @@ <table> <tr valign="top"> <td align="right"> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'category', type => 'radio', label => text('Asset'), value => 'A', ${checked.A_} => checked.A_, } ?><br /> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'category', type => 'radio', label => text('Liability'), ${checked.L_} => checked.L_, value => 'L'} ?><br /> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'category', type => 'radio', label => text('Equity'), ${checked.Q_} => checked.Q_, value => 'Q'} ?><br /> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'category', type => 'radio', label => text('Income'), ${checked.I_} => checked.I_, value => 'I'} ?><br /> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'category', type => 'radio', label => text('Expense'), @@ -61,7 +61,7 @@ value => 'E'} ?> </td> <td> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'contra', type => 'checkbox', label => text('Contra'), @@ -69,13 +69,13 @@ value => '1'} ?> </td> <td align="right"> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'charttype', type => 'radio', label => text('Heading'), ${checked.H} => checked.H, value => 'H'} ?><br /> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'charttype', type => 'radio', label => text('Account'), @@ -93,19 +93,19 @@ <tr> <th align="left"><?lsmb text('Is this a summary account to record') ?></th> <td> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'AR', type => 'checkbox', label => text('AR'), ${form.AR} => form.AR, value => 'AR'} ?> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'AP', type => 'checkbox', label => text('AP'), ${form.AP} => form.AP, value => 'AP'} ?> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'IC', type => 'checkbox', label => text('Inventory'), @@ -130,59 +130,72 @@ </tr> <tr> <td align="right"> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'AR_amount', type => 'checkbox', label => text('Income'), ${form.AR_amount} => form.AR_amount, value => 'AR_amount'} ?><br /> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'AR_paid', type => 'checkbox', label => text('Payment'), ${form.AR_paid} => form.AR_paid, value => 'AR_paid'} ?><br /> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'AR_tax', type => 'checkbox', label => text('Tax'), ${form.AR_tax} => form.AR_tax, - value => 'AR_tax'} ?> + value => 'AR_tax'} ?><br /> + <?lsmb INCLUDE input element_data={ + name => 'AR_overpayment', + type => 'checkbox', + label => text('Overpayment'), + ${form.AR_overpayment} => form.AR_overpayment, + value => 'AR_overpayment'} ?> + </td> <td align="right"> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'AP_amount', type => 'checkbox', label => text('Expense/Asset'), ${form.AP_amount} => form.AP_amount, value => 'AP_amount'} ?><br /> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'AP_paid', type => 'checkbox', label => text('Payment'), ${form.AP_paid} => form.AP_paid, value => 'AP_paid'} ?><br /> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'AP_tax', type => 'checkbox', label => text('Tax'), ${form.AP_tax} => form.AP_tax, - value => 'AP_tax'} ?> + value => 'AP_tax'} ?><br /> + <?lsmb INCLUDE input element_data={ + name => 'AP_overpayment', + type => 'checkbox', + label => text('Overpayment'), + ${form.AP_overpayment} => form.AP_overpayment, + value => 'AP_overpayment'} ?> </td> <td align="right"> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'IC_sale', type => 'checkbox', label => text('Income'), ${form.IC_sale} => form.IC_sale, value => 'IC_sale'} ?><br /> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'IC_cogs', type => 'checkbox', label => text('COGS'), ${form.IC_cogs} => form.IC_cogs, value => 'IC_cogs'} ?><br /> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'IC_taxpart', type => 'checkbox', label => text('Tax'), @@ -190,19 +203,19 @@ value => 'IC_taxpart'} ?> </td> <td align="right"> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'IC_income', type => 'checkbox', label => text('Income'), ${form.IC_income} => form.IC_income, value => 'IC_income'} ?><br /> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'IC_expense', type => 'checkbox', label => text('Expense'), ${form.IC_expense} => form.IC_expense, value => 'IC_expense'} ?><br /> - <?lsmb PROCESS input element_data={ + <?lsmb INCLUDE input element_data={ name => 'IC_taxservice', type => 'checkbox', label => text('Tax'), @@ -217,7 +230,7 @@ <tr><td> </td></tr> <tr> <th align="right"><?lsmb text('GIFI') ?></th> - <td><?lsmb PROCESS input element_data={ + <td><?lsmb INCLUDE input element_data={ name => 'gifi_accno', size => '9', value => form.gifi_accno} ?></td> @@ -228,12 +241,12 @@ <tr><td><hr size="3" noshade="noshade" /></td></tr> </table> <?lsmb FOREACH hidden IN hiddens.keys; - PROCESS input element_data={ + INCLUDE input element_data={ type => 'hidden', name => hidden, value => hiddens.item(hidden) }; END ?> -<?lsmb FOREACH button IN buttons; PROCESS button element_data=button; END ?> +<?lsmb FOREACH button IN buttons; INCLUDE button element_data=button; END ?> </form> </body> </html> diff --git a/UI/payments/payment1.html b/UI/payments/payment1.html index d064ad0e..6d2d2216 100644 --- a/UI/payments/payment1.html +++ b/UI/payments/payment1.html @@ -2,7 +2,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> - <title><?lsmb titlebar ?></title> + <title><?lsmb titlebar -?></title> <meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Expires" content="-1" /> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> @@ -16,46 +16,19 @@ <body id="payment-1-body"> <form name="search" method="post" action="payment.pl"> - -<?lsmb PROCESS elements.html # Include form elements helper. ?> - -<?lsmb PROCESS input element_data=sort ?> -<?lsmb PROCESS input element_data=nextsub ?> -<?lsmb PROCESS input element_data=selectcustomer ?> -<?lsmb PROCESS input element_data=selectaccount ?> -<?lsmb PROCESS input element_data=selectAR ?> -<?lsmb PROCESS input element_data=selectadvance ?> -<?lsmb PROCESS input element_data=defaultcurrency ?> -<?lsmb PROCESS input element_data=datepaid ?> -<?lsmb PROCESS input element_data=closedto ?> -<?lsmb PROCESS input element_data=path ?> -<?lsmb login.type = 'hidden' ; PROCESS input element_data=login ?> -<?lsmb accountclass.type = 'hidden'; PROCESS input element_data=accountclass?> -<?lsmb PROCESS input element_data=sessionid ?> -<?lsmb PROCESS input element_data=vc ?> - +<?lsmb PROCESS elements.html # Include form elements helper. -?> +<?lsmb login.type = 'hidden' ; PROCESS input element_data=login -?> +<?lsmb accountclass.type = 'hidden'; PROCESS input element_data=accountclass -?> <?lsmb type.type = "hidden"; PROCESS input element_data=type; - ?> - -<?lsmb PROCESS input element_data=selectdepartment ?> -<?lsmb PROCESS input element_data=callback ?> -<?lsmb PROCESS input element_data=ARAP ?> -<?lsmb PROCESS input element_data=nextsub ?> - -<table width=100%> + -?> +<table width="100%"> <tr id="top-bar" class="listtop"> <th id="top-bar-header" class="listtop"><label id="top-bar-header-label"><?lsmb text('Receipts') ?></th> </tr> </table> <table id="search-form-table"> - <tr id="search-form-row"> - <td id="projects-label-column" class="label-left"><?lsmb text('Projects') ?></td> - <td id="projects-column" colspan="5"> - <?lsmb PROCESS select element_data=projects ?> - </td> - </tr> <tr id="cost-center-row"> <td id="cost-center-label-column" class="label-left"><?lsmb text('Departments') ?></td> <td id="department-column"> @@ -78,19 +51,26 @@ <?lsmb PROCESS select element_data=curr ?> </td> </tr> - <tr id="daterange-row"> - <td id="daterange-label-column" class="label-left"><?lsmb text('Period') ?></td> - <td id="month-year-column" colspan="5"> - <?lsmb PROCESS select element_data=month ?> - <?lsmb PROCESS select element_data=year ?> - + <tr id="daterange-row"> + <td id="datefrom-label-column" class="label-left"><?lsmb text('Date from') ?> >=</td> + <td id="datefrom-gt-column"> <?lsmb - FOREACH interval_radio IN interval_radios; - interval_radio.type = "radio"; - interval_radio.class = "radio"; - PROCESS input element_data=interval_radio; - END; - ?> + datefrom.type = "text"; + datefrom.size = "10" ; + datefrom.maxlenght = "10" ; + datefrom.name = "datefrom"; + INCLUDE input element_data=datefrom; + -?> + </td> + <td id="dateto-label-column" class="label-left" align=right><?lsmb text('Date to') ?> <=</td> + <td id="dateto-column"> + <?lsmb + dateto.type = "text"; + dateto.size = "10" ; + dateto.maxlenght = "10" ; + dateto.name = "dateto"; + INCLUDE input element_data=dateto; + -?> </td> </tr> <tr id="total-row"> diff --git a/UI/payments/payment2.html b/UI/payments/payment2.html index e1a5964e..335fc778 100644 --- a/UI/payments/payment2.html +++ b/UI/payments/payment2.html @@ -7,11 +7,12 @@ <meta http-equiv="Expires" content="-1" /> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> <link rel="stylesheet" href="css/<?lsmb stylesheet ?>" type="text/css" /> - + <script language="JavaScript" src="UI/payments/javascript/maximize_minimize.js"></script> <meta http-equiv="content-type" content="text/html; charset=<?lsmb charset ?>" /> <meta name="robots" content="noindex,nofollow" /> </head> -<body id="payment_2_body"> +<body id="payment_2_body" +onLoad="maximize_minimize_on_load('div_topay_state', 'UI/payments/img/down.gif','UI/payments/img/up.gif') "> <form name="pay_single_dues" method="post" action="payment.pl"> <?lsmb PROCESS elements.html # Include form elements helper. ?> @@ -19,14 +20,14 @@ INCLUDE input element_data=accountclass ?> <?lsmb login.type = 'hidden' ; INCLUDE input element_data=login ?> - <table width=100%> + <table width="100%"> <tr id="top_bar" class="listtop"> <th id="top_bar_header" class="listtop"><?lsmb header.text ?></th> </tr> </table> - <table width=100% id="info_table"> - <tr valign=top id="info_row"> - <td width=50% id="info_data"> + <table width="100%" id="info_table"> + <tr valign="top" id="info_row"> + <td width="50%" id="info_data"> <table id="cv_info_table"> <tr id="cv_row"> <th class="label_left" id="cv_label_column"><?lsmb text('Vendor') ?></th> @@ -35,7 +36,7 @@ </td> </tr> <tr id="cv_address_row"> - <th valign="top" align="right" id="cv_address_label_column"><?lsmb text('Address') ?></th> + <th valign="top" align="right" id="cv_address_label_column"><?lsmb text('Location') ?></th> <td id="cv_address_column"> <table id="cv_address_table"> <?lsmb # this table will show the customer/vendor address, city, phone and others things that could help to reminds them?> @@ -116,15 +117,14 @@ <?lsmb # here goes the exchange rate of the selected currency, it can be done by the ajax script or the update button ?> <?lsmb IF defaultcurrency.text != curr.text # Only process element if one exists. ?> <tr id="exrate_row"> - <th valig="top" align="right" id="exrate_label_column"><?lsmb text('Exchange Rate') ?>:</th> <td id="exrate_column"> - <?lsmb IF exrate.value -?> - <?lsmb exrate.text -?> - <?lsmb exrate.type='hidden'; INCLUDE input element_data=exrate -?> + <?lsmb IF exrate.value -?> + <?lsmb exrate.text -?> + <?lsmb exrate.type='hidden'; INCLUDE input element_data=exrate -?> <?lsmb END -?> <?lsmb IF !exrate.value -?> - <?lsmb INCLUDE input element_data=exrate -?> + <?lsmb INCLUDE input element_data=exrate -?> <?lsmb END -?> </td> </tr> @@ -140,7 +140,7 @@ <?lsmb END ?> </tr> <?lsmb # We have to clear i for later usage :) ?> - <?lsmb i = '0' ?> + <?lsmb i = '0'; topay_subtotal = 0 -?> <?lsmb FOREACH row IN rows ?> <?lsmb i = i + 1; j = i % 2; alterning_style = "listrow$j" ?> <tr class="<?lsmb alterning_style ?>"=> @@ -157,9 +157,15 @@ <td><div id="<?lsmb "div_topay_invoice_$i" ?>"><?lsmb row.topay ?></div></td> <?lsmb END ?> <?lsmb #This should be computed and updated to the div using ?> - <td><?lsmb INCLUDE input element_data=row.topay_fx ?> - <div id="<?lsmb "div_topay_$i" ?>"> - <hr /> + <td><?lsmb INCLUDE input element_data=row.topay_fx; + topay_subtotal = topay_subtotal + row.topay_fx.value -?> + <?lsmb # A DEGRADABLE JAVASCRIPT IS USED, BECAUSE OF THE VISUAL IMPACT + # THAT CAUSES THE SIZE OF THIS DIV -?> + <img src="UI/payments/img/up.gif" id="button_topay_<?lsmb row.invoice.id ?>" name="<?lsmb "button_topay_$i" ?>" + onClick="maximize_minimize('div_topay_<?lsmb row.invoice.id ?>', + 'topaystate_<?lsmb row.invoice.id ?>' ,this, + 'UI/payments/img/down.gif', 'UI/payments/img/up.gif')"> + <div id="div_topay_<?lsmb row.invoice.id ?>"> <table> <tr id="<?lsmb "account-row$i"?>"> <?lsmb # here goes all the posible accounts were the paid can be done ?> @@ -193,25 +199,124 @@ </table> </div> </td> - <td valign="MIDDLE"><input type="checkbox" name="checkbox_<?lsmb - row.invoice.id ?>"></td> + <td valign="MIDDLE"><input type="checkbox" name="checkbox_<?lsmb row.invoice.id ?>"></td> <?lsmb END ?> </tr> - </table> - <hr /> - <?lsmb post.accesskey = 'U'; - INCLUDE button element_data=update ?> - <?lsmb post.accesskey = 'P'; - INCLUDE button element_data=post ?> - <?lsmb post_and_print.accesskey = 'R'; + <?lsmb IF exrate.text == 1 -?> + <?lsmb colspan = 5 # We will use this later on totals -?> + <?lsmb ELSE -?> + <?lsmb colspan = 8 # We will use this later on totals -?> + <?lsmb END -?> + <tr class="listsubtotal"> + <th colspan="<?lsmb colspan -?>" align="right"><?lsmb text('Subtotal') -?></th> + <th colspan="2"><?lsmb topay_subtotal -?> <?lsmb curr.value -?></th> + </tr> + </table> + <table width="100%"> + <tr> + <th class="listheading" colspan="5" ><?lsmb text('OVERPAYMENT / ADVANCED PAYMENT / PREPAYMENT') ?></th> + </tr> + <tr> + <th class="listheading"><?lsmb text('Item') ?></th> + <th class="listheading"><?lsmb text('Account') ?></th> + <th class="listheading"><?lsmb text('Source') ?></th> + <th class="listheading"><?lsmb text('Amount') ?></th> + <th class="listheading">X</th> + </tr> + <?lsmb # We have to insert the overpayment data -?> + <?lsmb overpayment_item = 0; overpayment_subtotal = 0 -?> + <?lsmb FOREACH item IN overpayment -?> + <?lsmb overpayment_item = overpayment_item + 1 -?> + <?lsmb j = overpayment_item % 2; alterning_style = "listrow$j" ?> + <tr class="<?lsmb alterning_style -?>"> + <td align="center"><?lsmb overpayment_item ?> </td> + <td align="center"> + <?lsmb item.account.accno -?>--<?lsmb item.account.description -?> + <input type="hidden" id="overpayment_account_<?lsmb overpayment_item -?>" name="overpayment_account_<?lsmb overpayment_item -?>" value="<?lsmb item.account.id -?>--<?lsmb item.account.accno ?>--<?lsmb item.account.description ?>" /> + </td> + <td align="center"> + <?lsmb item.source1 -?> <?lsmb item.source2 -?> + <input type="hidden" id="overpayment_source1_<?lsmb overpayment_item -?>" name="overpayment_source1_<?lsmb overpayment_item -?>" value="<?lsmb item.source1 -?>" /> + <input type="hidden" id="overpayment_source2_<?lsmb overpayment_item -?>" name="overpayment_source2_<?lsmb overpayment_item -?>" value="<?lsmb item.source2 -?>" /> + </td> + <td align="center"> + <?lsmb item.amount -?> + <input type="hidden" id="overpayment_topay_<?lsmb overpayment_item -?>" name="overpayment_topay_<?lsmb overpayment_item -?>" value="<?lsmb item.amount ?>" /> + <?lsmb overpayment_subtotal = overpayment_subtotal + item.amount -?> + </td> + <td align="center"><input type="checkbox" name="overpayment_checkbox_<?lsmb overpayment_item -?>"/></td> + </tr> + <?lsmb END -?> + <?lsmb #Now we insert an empty field to process a new overpayment -?> + <?lsmb overpayment_item = overpayment_item + 1; + j = overpayment_item % 2; + alterning_style = "listrow$j" -?> + <tr class="<?lsmb alterning_style -?>"> + <td align="center"><?lsmb overpayment_item -?></td> + <td align="center"> + <select id="overpayment_account_<?lsmb overpayment_item -?>" name="overpayment_account_<?lsmb overpayment_item -?>"> + <?lsmb FOREACH item IN overpayment_account -?> + <option value="<?lsmb item.id ?>--<?lsmb item.accno ?>--<?lsmb item.description ?>"> <?lsmb item.accno ?>--<?lsmb item.description -?></option> + <?lsmb END -?> + </select> + </td> + <td align="center"> + <select id="overpayment_source1_<?lsmb overpayment_item -?>" name="overpayment_source1_<?lsmb overpayment_item -?>"> + <?lsmb FOREACH item IN source -?> + <option value="<?lsmb item -?>"><?lsmb item -?></option> + <?lsmb END -?> + </select> + <input name="overpayment_source2_<?lsmb overpayment_item ?>" id="overpayment_source2_<?lsmb overpayment_item ?>" /> + <input type="hidden" name="overpayment_qty" id="overpayment_qty" value="<?lsmb overpayment_item ?>" /> + </td> + <td align="center"><input name="overpayment_topay_<?lsmb overpayment_item -?>" id="overpayment_topay_<?lsmboverpayment_item ?>" /></td> + <td align="center"><input type="checkbox" name="overpayment_checkbox_<?lsmb overpayment_item -?>"/></td> + </tr> + <tr class="listsubtotal"> + <th colspan="3" align="right"><?lsmb text('Subtotal') -?></th> + <th colspan="2"><?lsmb overpayment_subtotal -?> <?lsmb curr.value -?></th> + </tr> + <tr class="listtotal"> + <?lsmb payment_total = overpayment_subtotal + topay_subtotal -?> + <th colspan="3" align="right"><?lsmb text('Total') -?></th> + <th colspan="2"><?lsmb payment_total -?> <?lsmb curr.value -?></th> + </tr> + </table> + + <hr /> + <?lsmb update.accesskey = "U"; + update.title = "UPDATE ALT+U"; + update.name = "action"; + update.value = "payment2"; + update.text = text("UPDATE"); + INCLUDE button element_data=update -?> + <?lsmb post.accesskey = "P"; + post.title = "POST ALT+P"; + post.name = "action"; + post.value = "post"; + post.text = text("POST"); + INCLUDE button element_data=post -?> + <?lsmb post_and_print.accesskey = "R"; + post_and_print.title = "POST AND PRINT ALT+R"; + post_and_print.name = "action"; + post_and_print.value = "post_and_print"; + post_and_print.text = text("POST AND PRINT");; INCLUDE button element_data=post_and_print ?> <?lsmb INCLUDE select element_data=format ?> <?lsmb INCLUDE select element_data=media ?> <?lsmb FOREACH element_data IN selectedcheckboxes ?> - <?lsmb element_data.type ='hidden'; + <?lsmb # We should use a cipher here, to avoid XSS + element_data.type ='hidden'; element_data.value ='checked'; INCLUDE input element_data?> <?lsmb END ?> + <div id=div_topay_state> + <?lsmb FOREACH item IN topay_state -?> + <?lsmb item.type = "hidden"; + item.name = item.id; + INCLUDE input element_data=item ?> + <?lsmb END -?> + </div> </form> </body> </html>
\ No newline at end of file |