X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_pay-pkgnum.html;fp=httemplate%2Fedit%2Fcust_pay-pkgnum.html;h=adb88ab09b952e28bef896054efb9b1311a8db7f;hb=1564f23d66008e6167af8b517dce364127d34c3c;hp=0000000000000000000000000000000000000000;hpb=19d8baa9a52d0c40b909d5323f59237f0ad557ef;p=freeside.git diff --git a/httemplate/edit/cust_pay-pkgnum.html b/httemplate/edit/cust_pay-pkgnum.html new file mode 100755 index 000000000..adb88ab09 --- /dev/null +++ b/httemplate/edit/cust_pay-pkgnum.html @@ -0,0 +1,93 @@ +<& /elements/header-popup.html, 'Change payment package' &> + +<& /elements/error.html &> + +
+ + +
+ +<% mt('Payment') |h %> +<% ntable("#cccccc", 2) %> + + + <% mt('Date') |h %> + <% time2str($date_format.' %r',$cust_pay->_date) |h %> + + + + + <% mt('Amount') |h %> + + <% $money_char. $cust_pay->paid %> + <% mt('by') |h %> + <% mt(FS::payby->payname($cust_pay->payby)) |h %> + + +% if ( $cust_pay->payby eq 'BILL' ) { + + <% mt('Check #') |h %> + <% $cust_pay->payinfo |h %> + +% } elsif ( $cust_pay->payby eq 'CASH' and $conf->exists('require_cash_deposit_info') ) { + + <% mt('Bank') |h %> + <% $cust_pay->bank |h %> + + + <% mt('Check #') |h %> + <% $cust_pay->payinfo |h %> + + + <% mt('Teller #') |h %> + <% $cust_pay->teller |h %> + + + <% mt('Depositor') |h %> + <% $cust_pay->depositor |h %> + + + <% mt('Account #') |h %> + <% $cust_pay->account |h %> + +% } + +% if ( $conf->exists('pkg-balances') ) { +% $cgi->param('pkgnum', $cust_pay->pkgnum); + <& /elements/tr-select-cust_pkg-balances.html, + 'custnum' => $cust_pay->custnum, + 'cgi' => $cgi, + &> +% } else { + +% } + + + +
+ + +
+ + + +<%init> + +my $conf = new FS::Conf; + +my $money_char = $conf->config('money_char') || '$'; +my $date_format = $conf->config('date_format') || '%m/%d/%Y'; + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Apply payment'); #own ACL? + +my $cust_pay = qsearchs({ + 'select' => 'cust_pay.*', + 'table' => 'cust_pay', + 'addl_from' => 'LEFT JOIN cust_main USING ( custnum )', + 'hashref' => { paynum => scalar($cgi->param('paynum')), }, + 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql, +}) + or die 'unknown payment'; + +