From 0c525f3ba7b2b6730b8939b950e4d76dd16802a9 Mon Sep 17 00:00:00 2001 From: cvs2git Date: Thu, 5 Jan 2006 09:34:30 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'SQL_LEDGER_2_4_4'. --- httemplate/.htaccess | 3 - httemplate/autohandler | 21 - httemplate/browse/addr_block.cgi | 76 - httemplate/browse/agent.cgi | 226 --- httemplate/browse/agent_type.cgi | 60 - httemplate/browse/cust_main_county.cgi | 142 -- httemplate/browse/cust_pay_batch.cgi | 76 - httemplate/browse/generic.cgi | 46 - httemplate/browse/msgcat.cgi | 50 - httemplate/browse/nas.cgi | 80 - httemplate/browse/part_bill_event.cgi | 71 - httemplate/browse/part_export.cgi | 39 - httemplate/browse/part_pkg.cgi | 169 -- httemplate/browse/part_referral.cgi | 97 -- httemplate/browse/part_svc.cgi | 137 -- httemplate/browse/part_virtual_field.cgi | 39 - httemplate/browse/payment_gateway.html | 70 - httemplate/browse/queue.cgi | 5 - httemplate/browse/rate.cgi | 34 - httemplate/browse/router.cgi | 57 - httemplate/browse/svc_acct_pop.cgi | 63 - httemplate/config/config-process.cgi | 51 - httemplate/config/config-view.cgi | 80 - httemplate/config/config.cgi | 191 --- httemplate/docs/ach.html | 10 - httemplate/docs/admin.html | 82 - httemplate/docs/billing.html | 68 - httemplate/docs/config.html | 36 - httemplate/docs/cvv2.html | 24 - httemplate/docs/export.html | 19 - httemplate/docs/ieak.html | 75 - httemplate/docs/index.html | 36 - httemplate/docs/install-rt.html | 78 - httemplate/docs/install.html | 214 --- httemplate/docs/legacy.html | 39 - .../docs/man/FS/part_export/.cvs_is_on_crack | 0 httemplate/docs/overview-new.dia | Bin 2422 -> 0 bytes httemplate/docs/overview-new.png | Bin 29062 -> 0 bytes httemplate/docs/overview.dia | Bin 2800 -> 0 bytes httemplate/docs/overview.png | Bin 13064 -> 0 bytes httemplate/docs/passwd.html | 23 - httemplate/docs/schema.dia | Bin 16364 -> 0 bytes httemplate/docs/schema.html | 523 ------ httemplate/docs/schema.png | Bin 681043 -> 0 bytes httemplate/docs/selfservice.html | 78 - httemplate/docs/session.html | 59 - httemplate/docs/signup.html | 54 - httemplate/docs/ssh.html | 16 - httemplate/docs/trouble.html | 26 - httemplate/docs/upgrade-1.4.2.html | 27 - httemplate/docs/upgrade10.html | 93 -- httemplate/docs/upgrade7.html | 24 - httemplate/docs/upgrade8.html | 394 ----- httemplate/docs/upgrade9.html | 28 - httemplate/edit/REAL_cust_pkg.cgi | 179 -- httemplate/edit/agent.cgi | 109 -- httemplate/edit/agent_payment_gateway.html | 64 - httemplate/edit/agent_type.cgi | 75 - httemplate/edit/bulk-cust_svc.html | 97 -- httemplate/edit/cust_bill_pay.cgi | 95 -- httemplate/edit/cust_credit.cgi | 63 - httemplate/edit/cust_credit_bill.cgi | 101 -- httemplate/edit/cust_main.cgi | 439 ----- httemplate/edit/cust_main/billing.html | 443 ----- httemplate/edit/cust_main/contact.html | 125 -- httemplate/edit/cust_main/select-country.html | 72 - httemplate/edit/cust_main/select-county.html | 91 -- httemplate/edit/cust_main/select-state.html | 27 - httemplate/edit/cust_main_county-expand.cgi | 54 - httemplate/edit/cust_main_county.cgi | 98 -- httemplate/edit/cust_pay.cgi | 135 -- httemplate/edit/cust_pkg.cgi | 130 -- httemplate/edit/cust_refund.cgi | 94 -- httemplate/edit/msgcat.cgi | 58 - httemplate/edit/part_bill_event.cgi | 376 ----- httemplate/edit/part_export.cgi | 128 -- httemplate/edit/part_pkg.cgi | 335 ---- httemplate/edit/part_referral.cgi | 48 - httemplate/edit/part_svc.cgi | 290 ---- httemplate/edit/part_virtual_field.cgi | 92 -- httemplate/edit/payment_gateway.html | 109 -- httemplate/edit/prepay_credit.cgi | 56 - httemplate/edit/process/REAL_cust_pkg.cgi | 34 - httemplate/edit/process/addr_block/add.cgi | 20 - httemplate/edit/process/addr_block/allocate.cgi | 25 - httemplate/edit/process/addr_block/deallocate.cgi | 24 - httemplate/edit/process/addr_block/split.cgi | 19 - httemplate/edit/process/agent.cgi | 28 - httemplate/edit/process/agent_payment_gateway.html | 25 - httemplate/edit/process/agent_type.cgi | 55 - httemplate/edit/process/bulk-cust_svc.cgi | 3 - httemplate/edit/process/cust_bill_pay.cgi | 43 - httemplate/edit/process/cust_credit.cgi | 26 - httemplate/edit/process/cust_credit_bill.cgi | 44 - httemplate/edit/process/cust_main.cgi | 155 -- .../edit/process/cust_main_county-collapse.cgi | 35 - .../edit/process/cust_main_county-expand.cgi | 58 - httemplate/edit/process/cust_main_county.cgi | 30 - httemplate/edit/process/cust_pay.cgi | 42 - httemplate/edit/process/cust_pkg.cgi | 43 - httemplate/edit/process/cust_refund.cgi | 42 - httemplate/edit/process/cust_svc.cgi | 30 - httemplate/edit/process/domain_record.cgi | 34 - httemplate/edit/process/generic.cgi | 70 - httemplate/edit/process/msgcat.cgi | 20 - httemplate/edit/process/part_bill_event.cgi | 54 - httemplate/edit/process/part_export.cgi | 39 - httemplate/edit/process/part_pkg.cgi | 61 - httemplate/edit/process/part_referral.cgi | 28 - httemplate/edit/process/part_svc.cgi | 3 - httemplate/edit/process/payment_gateway.html | 33 - httemplate/edit/process/prepay_credit.cgi | 51 - httemplate/edit/process/quick-charge.cgi | 41 - httemplate/edit/process/quick-cust_pkg.cgi | 25 - httemplate/edit/process/rate.cgi | 3 - httemplate/edit/process/rate_region.cgi | 51 - httemplate/edit/process/reg_code.cgi | 44 - httemplate/edit/process/router.cgi | 67 - httemplate/edit/process/svc_acct.cgi | 49 - httemplate/edit/process/svc_acct_pop.cgi | 28 - httemplate/edit/process/svc_broadband.cgi | 36 - httemplate/edit/process/svc_domain.cgi | 31 - httemplate/edit/process/svc_external.cgi | 29 - httemplate/edit/process/svc_forward.cgi | 29 - httemplate/edit/process/svc_www.cgi | 36 - httemplate/edit/rate.cgi | 110 -- httemplate/edit/rate_region.cgi | 114 -- httemplate/edit/reg_code.cgi | 36 - httemplate/edit/router.cgi | 77 - httemplate/edit/svc_acct.cgi | 446 ----- httemplate/edit/svc_acct_pop.cgi | 56 - httemplate/edit/svc_broadband.cgi | 175 -- httemplate/edit/svc_domain.cgi | 98 -- httemplate/edit/svc_external.cgi | 105 -- httemplate/edit/svc_forward.cgi | 177 -- httemplate/edit/svc_www.cgi | 222 --- httemplate/elements/calendar-en.js | 123 -- httemplate/elements/calendar-setup.js | 181 --- httemplate/elements/calendar-win2k-2.css | 270 --- httemplate/elements/calendar.js | 1715 -------------------- httemplate/elements/calendar_stripped.js | 12 - httemplate/elements/header.html | 21 - httemplate/elements/jsrsClient.js | 356 ---- httemplate/elements/jsrsServer.html | 3 - httemplate/elements/menubar.html | 8 - httemplate/elements/overlibmws.js | 709 -------- httemplate/elements/overlibmws_draggable.js | 78 - httemplate/elements/overlibmws_iframe.js | 93 -- httemplate/elements/pager.html | 42 - httemplate/elements/progress-init.html | 81 - httemplate/elements/progress-popup.html | 96 -- httemplate/elements/qlib/box.js | 29 - httemplate/elements/qlib/boxctrl.js | 48 - httemplate/elements/qlib/boxres.js | 42 - httemplate/elements/qlib/button.js | 74 - httemplate/elements/qlib/buttonres.js | 23 - httemplate/elements/qlib/control.js | 51 - httemplate/elements/qlib/counter.js | 81 - httemplate/elements/qlib/imagelist.js | 25 - httemplate/elements/qlib/label.js | 72 - httemplate/elements/qlib/messagebox.js | 57 - httemplate/elements/qlib/progress.js | 73 - httemplate/elements/qlib/sound.js | 47 - httemplate/elements/qlib/sprite.js | 125 -- httemplate/elements/qlib/window.js | 25 - httemplate/elements/qlib/wndctrl.js | 322 ---- httemplate/elements/select-agent.html | 24 - httemplate/elements/select-month_year.html | 50 - httemplate/elements/select-taxclass.html | 42 - httemplate/elements/small_custview.html | 2 - httemplate/elements/table-grid.html | 8 - httemplate/elements/table.html | 8 - httemplate/elements/tr-input-beginning_ending.html | 39 - httemplate/elements/tr-select-agent.html | 29 - httemplate/elements/xmlhttp.html | 109 -- httemplate/graph/money_time-graph.cgi | 68 - httemplate/graph/money_time.cgi | 125 -- httemplate/images/ach.png | Bin 29759 -> 0 bytes httemplate/images/calendar.png | Bin 426 -> 0 bytes httemplate/images/cvv2.png | Bin 7791 -> 0 bytes httemplate/images/cvv2_amex.png | Bin 9539 -> 0 bytes httemplate/images/progressbar-empty.png | Bin 90 -> 0 bytes httemplate/images/progressbar-full.png | Bin 79 -> 0 bytes httemplate/images/small-logo.png | Bin 4887 -> 0 bytes httemplate/index.html | 293 ---- httemplate/misc/batch-cust_pay.html | 396 ----- httemplate/misc/bill.cgi | 38 - httemplate/misc/cancel-unaudited.cgi | 34 - httemplate/misc/cancel_pkg.cgi | 15 - httemplate/misc/catchall.cgi | 133 -- httemplate/misc/change_pkg.cgi | 66 - httemplate/misc/counties.cgi | 17 - httemplate/misc/cust_main-cancel.cgi | 22 - httemplate/misc/cust_main-import.cgi | 51 - httemplate/misc/cust_main-import_charges.cgi | 14 - httemplate/misc/delete-cust_credit.cgi | 16 - httemplate/misc/delete-cust_pay.cgi | 16 - httemplate/misc/delete-customer.cgi | 60 - httemplate/misc/delete-domain_record.cgi | 15 - httemplate/misc/delete-part_export.cgi | 15 - httemplate/misc/download-batch.cgi | 16 - httemplate/misc/dump.cgi | 19 - httemplate/misc/email-invoice.cgi | 17 - httemplate/misc/email_invoice_events.cgi | 6 - httemplate/misc/email_invoices.cgi | 6 - httemplate/misc/expire_pkg.cgi | 55 - httemplate/misc/fax-invoice.cgi | 17 - httemplate/misc/fax_invoice_events.cgi | 6 - httemplate/misc/fax_invoices.cgi | 6 - httemplate/misc/link.cgi | 74 - httemplate/misc/meta-import.cgi | 64 - httemplate/misc/payment.cgi | 209 --- httemplate/misc/print-invoice.cgi | 17 - httemplate/misc/print_invoice_events.cgi | 6 - httemplate/misc/print_invoices.cgi | 6 - httemplate/misc/process/batch-cust_pay.cgi | 42 - httemplate/misc/process/catchall.cgi | 33 - httemplate/misc/process/cust_main-import.cgi | 30 - .../misc/process/cust_main-import_charges.cgi | 26 - httemplate/misc/process/delete-customer.cgi | 29 - httemplate/misc/process/expire_pkg.cgi | 25 - httemplate/misc/process/link.cgi | 76 - httemplate/misc/process/meta-import.cgi | 178 -- httemplate/misc/process/payment.cgi | 148 -- httemplate/misc/queue.cgi | 47 - httemplate/misc/states.cgi | 16 - httemplate/misc/susp_pkg.cgi | 15 - httemplate/misc/unapply-cust_credit.cgi | 18 - httemplate/misc/unapply-cust_pay.cgi | 18 - httemplate/misc/unprovision.cgi | 29 - httemplate/misc/unsusp_pkg.cgi | 15 - httemplate/misc/unvoid-cust_pay_void.cgi | 16 - httemplate/misc/upload-batch.cgi | 30 - httemplate/misc/void-cust_pay.cgi | 16 - httemplate/misc/whois.cgi | 25 - httemplate/misc/xmlhttp-cust_main-search.cgi | 21 - httemplate/misc/xmlrpc.cgi | 17 - httemplate/search/cust_bill.cgi | 165 -- httemplate/search/cust_bill.html | 179 -- httemplate/search/cust_bill_event.cgi | 137 -- httemplate/search/cust_bill_event.html | 58 - httemplate/search/cust_bill_pkg.cgi | 148 -- httemplate/search/cust_credit.html | 97 -- httemplate/search/cust_main-otaker.cgi | 28 - httemplate/search/cust_main-payinfo.html | 20 - httemplate/search/cust_main-quickpay.html | 44 - httemplate/search/cust_main.cgi | 685 -------- httemplate/search/cust_main.html | 42 - httemplate/search/cust_pay.cgi | 192 --- httemplate/search/cust_pay.html | 18 - httemplate/search/cust_pkg.cgi | 234 --- httemplate/search/cust_pkg_report.cgi | 23 - httemplate/search/elements/search.html | 392 ----- httemplate/search/prepay_credit.html | 43 - httemplate/search/reg_code.html | 36 - httemplate/search/report_cust_bill.html | 28 - httemplate/search/report_cust_credit.html | 36 - httemplate/search/report_cust_pay.html | 38 - httemplate/search/report_prepaid_income.cgi | 86 - httemplate/search/report_prepaid_income.html | 39 - httemplate/search/report_receivables.cgi | 232 --- httemplate/search/report_tax.cgi | 432 ----- httemplate/search/report_tax.html | 22 - httemplate/search/sql.html | 7 - httemplate/search/sqlradius.cgi | 290 ---- httemplate/search/sqlradius.html | 94 -- httemplate/search/svc_acct.cgi | 140 -- httemplate/search/svc_acct.html | 19 - httemplate/search/svc_broadband.cgi | 96 -- httemplate/search/svc_domain.cgi | 85 - httemplate/search/svc_domain.html | 19 - httemplate/search/svc_external.cgi | 101 -- httemplate/search/svc_forward.cgi | 120 -- httemplate/search/svc_www.cgi | 69 - httemplate/view/cust_bill-logo.cgi | 15 - httemplate/view/cust_bill-pdf.cgi | 17 - httemplate/view/cust_bill-ps.cgi | 13 - httemplate/view/cust_bill.cgi | 151 -- httemplate/view/cust_main.cgi | 138 -- httemplate/view/cust_main/billing.html | 164 -- httemplate/view/cust_main/contacts.html | 131 -- httemplate/view/cust_main/misc.html | 75 - httemplate/view/cust_main/order_pkg.html | 39 - httemplate/view/cust_main/packages.html | 494 ------ httemplate/view/cust_main/payment_history.html | 428 ----- httemplate/view/cust_main/quick-charge.html | 18 - httemplate/view/cust_main/tickets.html | 54 - httemplate/view/cust_pkg.cgi | 165 -- httemplate/view/svc_acct.cgi | 332 ---- httemplate/view/svc_broadband.cgi | 155 -- httemplate/view/svc_domain.cgi | 108 -- httemplate/view/svc_external.cgi | 54 - httemplate/view/svc_forward.cgi | 84 - httemplate/view/svc_www.cgi | 73 - 294 files changed, 26334 deletions(-) delete mode 100755 httemplate/.htaccess delete mode 100644 httemplate/autohandler delete mode 100644 httemplate/browse/addr_block.cgi delete mode 100755 httemplate/browse/agent.cgi delete mode 100755 httemplate/browse/agent_type.cgi delete mode 100755 httemplate/browse/cust_main_county.cgi delete mode 100755 httemplate/browse/cust_pay_batch.cgi delete mode 100644 httemplate/browse/generic.cgi delete mode 100755 httemplate/browse/msgcat.cgi delete mode 100755 httemplate/browse/nas.cgi delete mode 100755 httemplate/browse/part_bill_event.cgi delete mode 100755 httemplate/browse/part_export.cgi delete mode 100755 httemplate/browse/part_pkg.cgi delete mode 100755 httemplate/browse/part_referral.cgi delete mode 100755 httemplate/browse/part_svc.cgi delete mode 100644 httemplate/browse/part_virtual_field.cgi delete mode 100644 httemplate/browse/payment_gateway.html delete mode 100755 httemplate/browse/queue.cgi delete mode 100644 httemplate/browse/rate.cgi delete mode 100644 httemplate/browse/router.cgi delete mode 100755 httemplate/browse/svc_acct_pop.cgi delete mode 100644 httemplate/config/config-process.cgi delete mode 100644 httemplate/config/config-view.cgi delete mode 100644 httemplate/config/config.cgi delete mode 100644 httemplate/docs/ach.html delete mode 100755 httemplate/docs/admin.html delete mode 100644 httemplate/docs/billing.html delete mode 100644 httemplate/docs/config.html delete mode 100644 httemplate/docs/cvv2.html delete mode 100755 httemplate/docs/export.html delete mode 100644 httemplate/docs/ieak.html delete mode 100644 httemplate/docs/index.html delete mode 100644 httemplate/docs/install-rt.html delete mode 100644 httemplate/docs/install.html delete mode 100755 httemplate/docs/legacy.html delete mode 100644 httemplate/docs/man/FS/part_export/.cvs_is_on_crack delete mode 100644 httemplate/docs/overview-new.dia delete mode 100644 httemplate/docs/overview-new.png delete mode 100644 httemplate/docs/overview.dia delete mode 100644 httemplate/docs/overview.png delete mode 100755 httemplate/docs/passwd.html delete mode 100644 httemplate/docs/schema.dia delete mode 100644 httemplate/docs/schema.html delete mode 100644 httemplate/docs/schema.png delete mode 100644 httemplate/docs/selfservice.html delete mode 100644 httemplate/docs/session.html delete mode 100644 httemplate/docs/signup.html delete mode 100755 httemplate/docs/ssh.html delete mode 100755 httemplate/docs/trouble.html delete mode 100644 httemplate/docs/upgrade-1.4.2.html delete mode 100644 httemplate/docs/upgrade10.html delete mode 100644 httemplate/docs/upgrade7.html delete mode 100644 httemplate/docs/upgrade8.html delete mode 100644 httemplate/docs/upgrade9.html delete mode 100755 httemplate/edit/REAL_cust_pkg.cgi delete mode 100755 httemplate/edit/agent.cgi delete mode 100644 httemplate/edit/agent_payment_gateway.html delete mode 100755 httemplate/edit/agent_type.cgi delete mode 100644 httemplate/edit/bulk-cust_svc.html delete mode 100755 httemplate/edit/cust_bill_pay.cgi delete mode 100755 httemplate/edit/cust_credit.cgi delete mode 100755 httemplate/edit/cust_credit_bill.cgi delete mode 100755 httemplate/edit/cust_main.cgi delete mode 100644 httemplate/edit/cust_main/billing.html delete mode 100644 httemplate/edit/cust_main/contact.html delete mode 100644 httemplate/edit/cust_main/select-country.html delete mode 100644 httemplate/edit/cust_main/select-county.html delete mode 100644 httemplate/edit/cust_main/select-state.html delete mode 100755 httemplate/edit/cust_main_county-expand.cgi delete mode 100755 httemplate/edit/cust_main_county.cgi delete mode 100755 httemplate/edit/cust_pay.cgi delete mode 100755 httemplate/edit/cust_pkg.cgi delete mode 100755 httemplate/edit/cust_refund.cgi delete mode 100755 httemplate/edit/msgcat.cgi delete mode 100755 httemplate/edit/part_bill_event.cgi delete mode 100644 httemplate/edit/part_export.cgi delete mode 100755 httemplate/edit/part_pkg.cgi delete mode 100755 httemplate/edit/part_referral.cgi delete mode 100755 httemplate/edit/part_svc.cgi delete mode 100644 httemplate/edit/part_virtual_field.cgi delete mode 100644 httemplate/edit/payment_gateway.html delete mode 100644 httemplate/edit/prepay_credit.cgi delete mode 100755 httemplate/edit/process/REAL_cust_pkg.cgi delete mode 100755 httemplate/edit/process/addr_block/add.cgi delete mode 100755 httemplate/edit/process/addr_block/allocate.cgi delete mode 100755 httemplate/edit/process/addr_block/deallocate.cgi delete mode 100755 httemplate/edit/process/addr_block/split.cgi delete mode 100755 httemplate/edit/process/agent.cgi delete mode 100644 httemplate/edit/process/agent_payment_gateway.html delete mode 100755 httemplate/edit/process/agent_type.cgi delete mode 100644 httemplate/edit/process/bulk-cust_svc.cgi delete mode 100755 httemplate/edit/process/cust_bill_pay.cgi delete mode 100755 httemplate/edit/process/cust_credit.cgi delete mode 100755 httemplate/edit/process/cust_credit_bill.cgi delete mode 100755 httemplate/edit/process/cust_main.cgi delete mode 100755 httemplate/edit/process/cust_main_county-collapse.cgi delete mode 100755 httemplate/edit/process/cust_main_county-expand.cgi delete mode 100755 httemplate/edit/process/cust_main_county.cgi delete mode 100755 httemplate/edit/process/cust_pay.cgi delete mode 100755 httemplate/edit/process/cust_pkg.cgi delete mode 100755 httemplate/edit/process/cust_refund.cgi delete mode 100644 httemplate/edit/process/cust_svc.cgi delete mode 100755 httemplate/edit/process/domain_record.cgi delete mode 100644 httemplate/edit/process/generic.cgi delete mode 100644 httemplate/edit/process/msgcat.cgi delete mode 100755 httemplate/edit/process/part_bill_event.cgi delete mode 100644 httemplate/edit/process/part_export.cgi delete mode 100755 httemplate/edit/process/part_pkg.cgi delete mode 100755 httemplate/edit/process/part_referral.cgi delete mode 100755 httemplate/edit/process/part_svc.cgi delete mode 100644 httemplate/edit/process/payment_gateway.html delete mode 100644 httemplate/edit/process/prepay_credit.cgi delete mode 100644 httemplate/edit/process/quick-charge.cgi delete mode 100644 httemplate/edit/process/quick-cust_pkg.cgi delete mode 100755 httemplate/edit/process/rate.cgi delete mode 100755 httemplate/edit/process/rate_region.cgi delete mode 100644 httemplate/edit/process/reg_code.cgi delete mode 100644 httemplate/edit/process/router.cgi delete mode 100755 httemplate/edit/process/svc_acct.cgi delete mode 100755 httemplate/edit/process/svc_acct_pop.cgi delete mode 100644 httemplate/edit/process/svc_broadband.cgi delete mode 100755 httemplate/edit/process/svc_domain.cgi delete mode 100755 httemplate/edit/process/svc_external.cgi delete mode 100755 httemplate/edit/process/svc_forward.cgi delete mode 100644 httemplate/edit/process/svc_www.cgi delete mode 100644 httemplate/edit/rate.cgi delete mode 100644 httemplate/edit/rate_region.cgi delete mode 100644 httemplate/edit/reg_code.cgi delete mode 100755 httemplate/edit/router.cgi delete mode 100755 httemplate/edit/svc_acct.cgi delete mode 100755 httemplate/edit/svc_acct_pop.cgi delete mode 100644 httemplate/edit/svc_broadband.cgi delete mode 100755 httemplate/edit/svc_domain.cgi delete mode 100644 httemplate/edit/svc_external.cgi delete mode 100755 httemplate/edit/svc_forward.cgi delete mode 100644 httemplate/edit/svc_www.cgi delete mode 100644 httemplate/elements/calendar-en.js delete mode 100644 httemplate/elements/calendar-setup.js delete mode 100644 httemplate/elements/calendar-win2k-2.css delete mode 100644 httemplate/elements/calendar.js delete mode 100644 httemplate/elements/calendar_stripped.js delete mode 100644 httemplate/elements/header.html delete mode 100644 httemplate/elements/jsrsClient.js delete mode 100644 httemplate/elements/jsrsServer.html delete mode 100644 httemplate/elements/menubar.html delete mode 100644 httemplate/elements/overlibmws.js delete mode 100644 httemplate/elements/overlibmws_draggable.js delete mode 100644 httemplate/elements/overlibmws_iframe.js delete mode 100644 httemplate/elements/pager.html delete mode 100644 httemplate/elements/progress-init.html delete mode 100644 httemplate/elements/progress-popup.html delete mode 100644 httemplate/elements/qlib/box.js delete mode 100644 httemplate/elements/qlib/boxctrl.js delete mode 100644 httemplate/elements/qlib/boxres.js delete mode 100644 httemplate/elements/qlib/button.js delete mode 100644 httemplate/elements/qlib/buttonres.js delete mode 100644 httemplate/elements/qlib/control.js delete mode 100644 httemplate/elements/qlib/counter.js delete mode 100644 httemplate/elements/qlib/imagelist.js delete mode 100644 httemplate/elements/qlib/label.js delete mode 100644 httemplate/elements/qlib/messagebox.js delete mode 100644 httemplate/elements/qlib/progress.js delete mode 100644 httemplate/elements/qlib/sound.js delete mode 100644 httemplate/elements/qlib/sprite.js delete mode 100644 httemplate/elements/qlib/window.js delete mode 100644 httemplate/elements/qlib/wndctrl.js delete mode 100644 httemplate/elements/select-agent.html delete mode 100644 httemplate/elements/select-month_year.html delete mode 100644 httemplate/elements/select-taxclass.html delete mode 100644 httemplate/elements/small_custview.html delete mode 100644 httemplate/elements/table-grid.html delete mode 100644 httemplate/elements/table.html delete mode 100644 httemplate/elements/tr-input-beginning_ending.html delete mode 100644 httemplate/elements/tr-select-agent.html delete mode 100644 httemplate/elements/xmlhttp.html delete mode 100755 httemplate/graph/money_time-graph.cgi delete mode 100644 httemplate/graph/money_time.cgi delete mode 100644 httemplate/images/ach.png delete mode 100644 httemplate/images/calendar.png delete mode 100644 httemplate/images/cvv2.png delete mode 100644 httemplate/images/cvv2_amex.png delete mode 100644 httemplate/images/progressbar-empty.png delete mode 100644 httemplate/images/progressbar-full.png delete mode 100644 httemplate/images/small-logo.png delete mode 100644 httemplate/index.html delete mode 100644 httemplate/misc/batch-cust_pay.html delete mode 100755 httemplate/misc/bill.cgi delete mode 100755 httemplate/misc/cancel-unaudited.cgi delete mode 100755 httemplate/misc/cancel_pkg.cgi delete mode 100755 httemplate/misc/catchall.cgi delete mode 100755 httemplate/misc/change_pkg.cgi delete mode 100644 httemplate/misc/counties.cgi delete mode 100755 httemplate/misc/cust_main-cancel.cgi delete mode 100644 httemplate/misc/cust_main-import.cgi delete mode 100644 httemplate/misc/cust_main-import_charges.cgi delete mode 100755 httemplate/misc/delete-cust_credit.cgi delete mode 100755 httemplate/misc/delete-cust_pay.cgi delete mode 100755 httemplate/misc/delete-customer.cgi delete mode 100755 httemplate/misc/delete-domain_record.cgi delete mode 100755 httemplate/misc/delete-part_export.cgi delete mode 100644 httemplate/misc/download-batch.cgi delete mode 100644 httemplate/misc/dump.cgi delete mode 100755 httemplate/misc/email-invoice.cgi delete mode 100644 httemplate/misc/email_invoice_events.cgi delete mode 100644 httemplate/misc/email_invoices.cgi delete mode 100755 httemplate/misc/expire_pkg.cgi delete mode 100755 httemplate/misc/fax-invoice.cgi delete mode 100644 httemplate/misc/fax_invoice_events.cgi delete mode 100644 httemplate/misc/fax_invoices.cgi delete mode 100755 httemplate/misc/link.cgi delete mode 100644 httemplate/misc/meta-import.cgi delete mode 100644 httemplate/misc/payment.cgi delete mode 100755 httemplate/misc/print-invoice.cgi delete mode 100644 httemplate/misc/print_invoice_events.cgi delete mode 100644 httemplate/misc/print_invoices.cgi delete mode 100644 httemplate/misc/process/batch-cust_pay.cgi delete mode 100755 httemplate/misc/process/catchall.cgi delete mode 100644 httemplate/misc/process/cust_main-import.cgi delete mode 100644 httemplate/misc/process/cust_main-import_charges.cgi delete mode 100755 httemplate/misc/process/delete-customer.cgi delete mode 100755 httemplate/misc/process/expire_pkg.cgi delete mode 100755 httemplate/misc/process/link.cgi delete mode 100644 httemplate/misc/process/meta-import.cgi delete mode 100644 httemplate/misc/process/payment.cgi delete mode 100644 httemplate/misc/queue.cgi delete mode 100644 httemplate/misc/states.cgi delete mode 100755 httemplate/misc/susp_pkg.cgi delete mode 100755 httemplate/misc/unapply-cust_credit.cgi delete mode 100755 httemplate/misc/unapply-cust_pay.cgi delete mode 100755 httemplate/misc/unprovision.cgi delete mode 100755 httemplate/misc/unsusp_pkg.cgi delete mode 100755 httemplate/misc/unvoid-cust_pay_void.cgi delete mode 100644 httemplate/misc/upload-batch.cgi delete mode 100755 httemplate/misc/void-cust_pay.cgi delete mode 100644 httemplate/misc/whois.cgi delete mode 100644 httemplate/misc/xmlhttp-cust_main-search.cgi delete mode 100644 httemplate/misc/xmlrpc.cgi delete mode 100755 httemplate/search/cust_bill.cgi delete mode 100755 httemplate/search/cust_bill.html delete mode 100644 httemplate/search/cust_bill_event.cgi delete mode 100755 httemplate/search/cust_bill_event.html delete mode 100644 httemplate/search/cust_bill_pkg.cgi delete mode 100755 httemplate/search/cust_credit.html delete mode 100755 httemplate/search/cust_main-otaker.cgi delete mode 100755 httemplate/search/cust_main-payinfo.html delete mode 100755 httemplate/search/cust_main-quickpay.html delete mode 100755 httemplate/search/cust_main.cgi delete mode 100755 httemplate/search/cust_main.html delete mode 100755 httemplate/search/cust_pay.cgi delete mode 100755 httemplate/search/cust_pay.html delete mode 100755 httemplate/search/cust_pkg.cgi delete mode 100755 httemplate/search/cust_pkg_report.cgi delete mode 100644 httemplate/search/elements/search.html delete mode 100644 httemplate/search/prepay_credit.html delete mode 100644 httemplate/search/reg_code.html delete mode 100644 httemplate/search/report_cust_bill.html delete mode 100644 httemplate/search/report_cust_credit.html delete mode 100644 httemplate/search/report_cust_pay.html delete mode 100644 httemplate/search/report_prepaid_income.cgi delete mode 100644 httemplate/search/report_prepaid_income.html delete mode 100755 httemplate/search/report_receivables.cgi delete mode 100755 httemplate/search/report_tax.cgi delete mode 100755 httemplate/search/report_tax.html delete mode 100644 httemplate/search/sql.html delete mode 100644 httemplate/search/sqlradius.cgi delete mode 100644 httemplate/search/sqlradius.html delete mode 100755 httemplate/search/svc_acct.cgi delete mode 100755 httemplate/search/svc_acct.html delete mode 100755 httemplate/search/svc_broadband.cgi delete mode 100755 httemplate/search/svc_domain.cgi delete mode 100755 httemplate/search/svc_domain.html delete mode 100755 httemplate/search/svc_external.cgi delete mode 100755 httemplate/search/svc_forward.cgi delete mode 100755 httemplate/search/svc_www.cgi delete mode 100755 httemplate/view/cust_bill-logo.cgi delete mode 100755 httemplate/view/cust_bill-pdf.cgi delete mode 100755 httemplate/view/cust_bill-ps.cgi delete mode 100755 httemplate/view/cust_bill.cgi delete mode 100755 httemplate/view/cust_main.cgi delete mode 100644 httemplate/view/cust_main/billing.html delete mode 100644 httemplate/view/cust_main/contacts.html delete mode 100644 httemplate/view/cust_main/misc.html delete mode 100644 httemplate/view/cust_main/order_pkg.html delete mode 100755 httemplate/view/cust_main/packages.html delete mode 100644 httemplate/view/cust_main/payment_history.html delete mode 100644 httemplate/view/cust_main/quick-charge.html delete mode 100644 httemplate/view/cust_main/tickets.html delete mode 100755 httemplate/view/cust_pkg.cgi delete mode 100755 httemplate/view/svc_acct.cgi delete mode 100644 httemplate/view/svc_broadband.cgi delete mode 100755 httemplate/view/svc_domain.cgi delete mode 100644 httemplate/view/svc_external.cgi delete mode 100755 httemplate/view/svc_forward.cgi delete mode 100644 httemplate/view/svc_www.cgi (limited to 'httemplate') diff --git a/httemplate/.htaccess b/httemplate/.htaccess deleted file mode 100755 index f8c6b9c0c..000000000 --- a/httemplate/.htaccess +++ /dev/null @@ -1,3 +0,0 @@ -AuthName Freeside -AuthType Basic -require valid-user diff --git a/httemplate/autohandler b/httemplate/autohandler deleted file mode 100644 index a3f7eb008..000000000 --- a/httemplate/autohandler +++ /dev/null @@ -1,21 +0,0 @@ -% $m->call_next; -<%init> - dbh->{'private_profile'} = {} if UNIVERSAL::can(dbh, 'sprintProfile'); - -<%filter> - -my $profile = ''; -if ( UNIVERSAL::can(dbh, 'sprintProfile') ) { - - if ( lc($r->content_type) eq 'text/html' ) { - - $profile = '
'. encode_entities(dbh->sprintProfile()).
-               #"\n\n". &sprintAutoProfile(). '
'; - "\n\n". ''; - } - - dbh->{'private_profile'} = {}; -} - -s/(<\/BODY>[\s\n]*<\/HTML>[\s\n]*)$/$profile$1/i; - diff --git a/httemplate/browse/addr_block.cgi b/httemplate/browse/addr_block.cgi deleted file mode 100644 index 06ac556cf..000000000 --- a/httemplate/browse/addr_block.cgi +++ /dev/null @@ -1,76 +0,0 @@ -<%= header('Address Blocks', menubar('Main Menu' => $p)) %> -<% - -use NetAddr::IP; - -my @addr_block = qsearch('addr_block', {}); -my @router = qsearch('router', {}); -my $block; -my $p2 = popurl(2); -my $path = $p2 . "edit/process/addr_block"; - -%> - -<% if ($cgi->param('error')) { %> - Error: <%=$cgi->param('error')%> -

-<% } %> - -<%=table()%> - -<% foreach $block (sort {$a->NetAddr cmp $b->NetAddr} @addr_block) { %> - - <%=$block->NetAddr%> - <% if (my $router = $block->router) { %> - <% if (scalar($block->svc_broadband) == 0) { %> - - <%=$router->routername%> - - -
- - -
- - <% } else { %> - - <%=$router->routername%> - - <% } %> - <% } else { %> - -
- - - -
- - -
- - -
- - -<% } - } %> -
- -
- Gateway/Netmask - - / - - - - -
- - - - - diff --git a/httemplate/browse/agent.cgi b/httemplate/browse/agent.cgi deleted file mode 100755 index 05300d0bd..000000000 --- a/httemplate/browse/agent.cgi +++ /dev/null @@ -1,226 +0,0 @@ -<% - - my %search; - if ( $cgi->param('showdisabled') - || !dbdef->table('agent')->column('disabled') ) { - %search = (); - } else { - %search = ( 'disabled' => '' ); - } - - my $conf = new FS::Conf; - -%> -<%= header('Agent Listing', menubar( - 'Main Menu' => $p, - 'Agent Types' => $p. 'browse/agent_type.cgi', -# 'Add new agent' => '../edit/agent.cgi' -)) %> -Agents are resellers of your service. Agents may be limited to a subset of your -full offerings (via their type).

-Add a new agent

- -<% if ( dbdef->table('agent')->column('disabled') ) { %> - <%= $cgi->param('showdisabled') - ? do { $cgi->param('showdisabled', 0); - '( hide disabled agents )'; } - : do { $cgi->param('showdisabled', 1); - '( show disabled agents )'; } - %> -<% } %> - -<%= table() %> - - param('showdisabled') || !dbdef->table('agent')->column('disabled') ) ? 2 : 3 %>>Agent - Type - Customers - Customer
packages
- Reports - Registration codes - Prepaid cards - <% if ( $conf->config('ticket_system') ) { %> - Ticketing - <% } %> - Payment Gateway Overrides - Freq. - Prog. - -<% -# Agent # -# Agent - -foreach my $agent ( sort { - #$a->getfield('agentnum') <=> $b->getfield('agentnum') - $a->getfield('agent') cmp $b->getfield('agent') -} qsearch('agent', \%search ) ) { - - my $cust_main_link = $p. 'search/cust_main.cgi?agentnum_on=1&'. - 'agentnum='. $agent->agentnum; - - my $cust_pkg_link = $p. 'search/cust_pkg.cgi?agentnum='. $agent->agentnum; - -%> - - - - <%= $agent->agentnum %> -<% if ( dbdef->table('agent')->column('disabled') - && !$cgi->param('showdisabled') ) { %> - <%= $agent->disabled ? 'DISABLED' : '' %> -<% } %> - - - <%= $agent->agent %> - <%= $agent->agent_type->atype %> - - - - - - - - - - - - - - - - - - -
- <%= my $num_prospect = $agent->num_prospect_cust_main %>  - - <% if ( $num_prospect ) { %> - <% } %>prospects<% if ($num_prospect ) { %><% } %> - -
- - <%= my $num_active = $agent->num_active_cust_main %>  - - - <% if ( $num_active ) { %> - <% } %>active<% if ( $num_active ) { %><% } %> -
- - <%= my $num_susp = $agent->num_susp_cust_main %>  - - - <% if ( $num_susp ) { %> - <% } %>suspended<% if ( $num_susp ) { %><% } %> -
- - <%= my $num_cancel = $agent->num_cancel_cust_main %>  - - - <% if ( $num_cancel ) { %> - <% } %>cancelled<% if ( $num_cancel ) { %><% } %> -
- - - - - - - - - - - - - - - - -
- - <%= my $num_active_pkg = $agent->num_active_cust_pkg %>  - - - <% if ( $num_active_pkg ) { %> - <% } %>active<% if ( $num_active_pkg ) { %><% } %> -
- - <%= my $num_susp_pkg = $agent->num_susp_cust_pkg %>  - - - <% if ( $num_susp_pkg ) { %> - <% } %>suspended<% if ( $num_susp_pkg ) { %><% } %> -
- - <%= my $num_cancel_pkg = $agent->num_cancel_cust_pkg %>  - - - <% if ( $num_cancel_pkg ) { %> - <% } %>cancelled<% if ( $num_cancel_pkg ) { %><% } %> -
- - - - Payments -
Credits -
A/R Aging - - - - - - <%= my $num_reg_code = $agent->num_reg_code %> - <% if ( $num_reg_code ) { %> - <% } %>Unused<% if ( $num_reg_code ) { %><% } %> -
Generate codes - - - - <%= my $num_prepay_credit = $agent->num_prepay_credit %> - <% if ( $num_prepay_credit ) { %> - <% } %>Unused<% if ( $num_prepay_credit ) { %><% } %> -
Generate cards - - - <% if ( $conf->config('ticket_system') ) { %> - - - <% if ( $agent->ticketing_queueid ) { %> - Queue: <%= $agent->ticketing_queueid %>: <%= $agent->ticketing_queue %>
- <% } %> - - - <% } %> - - - - <% foreach my $override ( - # sort { } want taxclass-full stuff first? and default cards (empty cardtype) - qsearch('agent_payment_gateway', { 'agentnum' => $agent->agentnum } ) - ) { - %> - - - - <% } %> - - - -
- <%= $override->cardtype || 'Default' %> to <%= $override->payment_gateway->gateway_module %> (<%= $override->payment_gateway->gateway_username %>) - <%= $override->taxclass - ? ' for '. $override->taxclass. ' only' - : '' - %> - (delete) -
(add override)
- - - <%= $agent->freq %> - <%= $agent->prog %> - - - -<% } %> - - - - diff --git a/httemplate/browse/agent_type.cgi b/httemplate/browse/agent_type.cgi deleted file mode 100755 index 5473804e8..000000000 --- a/httemplate/browse/agent_type.cgi +++ /dev/null @@ -1,60 +0,0 @@ - -<%= header("Agent Type Listing", menubar( - 'Main Menu' => $p, - 'Agents' => $p. 'browse/agent.cgi', -)) %> -Agent types define groups of packages that you can then assign to particular -agents.

-Add a new agent type

- -<%= table() %> - - Agent Type - Packages - - -<% -foreach my $agent_type ( sort { - $a->getfield('typenum') <=> $b->getfield('typenum') -} qsearch('agent_type',{}) ) { - my $hashref = $agent_type->hashref; - #more efficient to do this with SQL... - my @type_pkgs = grep { $_->part_pkg and ! $_->part_pkg->disabled } - qsearch('type_pkgs',{'typenum'=> $hashref->{typenum} }); - my $rowspan = scalar(@type_pkgs); - $rowspan = int($rowspan/2+0.5) ; - print < - - $hashref->{typenum} - - $hashref->{atype} -END - - my($type_pkgs); - my($tdcount) = -1 ; - foreach $type_pkgs ( @type_pkgs ) { - my($pkgpart)=$type_pkgs->getfield('pkgpart'); - my($part_pkg) = qsearchs('part_pkg',{'pkgpart'=> $pkgpart }); - print qq!! if ($tdcount == 0) ; - $tdcount = 0 if ($tdcount == -1) ; - print qq!!, - $part_pkg->getfield('pkg'),""; - $tdcount ++ ; - if ($tdcount == 2) - { - print qq!\n! ; - $tdcount = 0 ; - } - } - - print ""; -} - -print < - - -END - -%> diff --git a/httemplate/browse/cust_main_county.cgi b/httemplate/browse/cust_main_county.cgi deleted file mode 100755 index 1e0e0880c..000000000 --- a/httemplate/browse/cust_main_county.cgi +++ /dev/null @@ -1,142 +0,0 @@ - -<% - -my $conf = new FS::Conf; -my $enable_taxclasses = $conf->exists('enable_taxclasses'); - -print header("Tax Rate Listing", menubar( - 'Main Menu' => $p, - 'Edit tax rates' => $p. "edit/cust_main_county.cgi", -)),<expand country to specify a country's tax rates by state. -
Click on expand state to specify a state's tax rates by county. -END - -if ( $enable_taxclasses ) { - print '
Click on expand taxclasses to specify tax classes'; -} - -print '

'. &table(). < - Country - State - County - Taxclass
(per-package classification) - Tax name
(printed on invoices) - Tax - Exemption - -END - -my @regions = sort { $a->country cmp $b->country - or $a->state cmp $b->state - or $a->county cmp $b->county - or $a->taxclass cmp $b->taxclass - } qsearch('cust_main_county',{}); - -my $sup=0; -#foreach $cust_main_county ( @regions ) { -for ( my $i=0; $i<@regions; $i++ ) { - my $cust_main_county = $regions[$i]; - my $hashref = $cust_main_county->hashref; - print < - $hashref->{country} -END - - my $j; - if ( $sup ) { - $sup--; - } else { - - #lookahead - for ( $j=1; $i+$j<@regions; $j++ ) { - last if $hashref->{country} ne $regions[$i+$j]->country - || $hashref->{state} ne $regions[$i+$j]->state - || $hashref->{tax} != $regions[$i+$j]->tax - || $hashref->{exempt_amount} != $regions[$i+$j]->exempt_amount - || $hashref->{setuptax} ne $regions[$i+$j]->setuptax - || $hashref->{recurtax} ne $regions[$i+$j]->recurtax; - } - - my $newsup=0; - if ( $j>1 && $i+$j+1 < @regions - && ( $hashref->{state} ne $regions[$i+$j+1]->state - || $hashref->{country} ne $regions[$i+$j+1]->country - ) - && ( ! $i - || $hashref->{state} ne $regions[$i-1]->state - || $hashref->{country} ne $regions[$i-1]->country - ) - ) { - $sup = $j-1; - } else { - $j = 1; - } - - print "{state} - ? ' BGCOLOR="#ffffff">'. $hashref->{state} - : qq! BGCOLOR="#cccccc">(ALL) !. - qq!expand country!; - - print qq! collapse state! if $j>1; - - print ""; - } - -# $sup=$newsup; - - print "{county} ) { - print ' BGCOLOR="#ffffff">'. $hashref->{county}; - } else { - print ' BGCOLOR="#cccccc">(ALL)'; - if ( $hashref->{state} ) { - print qq!!. - qq!expand state!; - } - } - print ""; - - print "{taxclass} ) { - print ' BGCOLOR="#ffffff">'. $hashref->{taxclass}; - } else { - print ' BGCOLOR="#cccccc">(ALL)'; - if ( $enable_taxclasses ) { - print qq!!. - qq!expand taxclasses!; - } - - } - print ""; - - print "{taxname} ) { - print ' BGCOLOR="#ffffff">'. $hashref->{taxname}; - } else { - print ' BGCOLOR="#cccccc">Tax'; - } - print ""; - - print "$hashref->{tax}%". - ''; - print '$'. sprintf("%.2f", $hashref->{exempt_amount} ). - ' per month
' - if $hashref->{exempt_amount} > 0; - print 'Setup fee
' if $hashref->{setuptax} =~ /^Y$/i; - print 'Recurring fee
' if $hashref->{recurtax} =~ /^Y$/i; - print ''; - -} - -print < - - -END - -%> diff --git a/httemplate/browse/cust_pay_batch.cgi b/httemplate/browse/cust_pay_batch.cgi deleted file mode 100755 index 3420e97b6..000000000 --- a/httemplate/browse/cust_pay_batch.cgi +++ /dev/null @@ -1,76 +0,0 @@ - -<%= header("Pending credit card batch", menubar( 'Main Menu' => $p,)) %> - -
-Download batch in format
-

- -
-Upload results
-Filename
-Format
-
-
- -<% - my $statement = "SELECT SUM(amount) from cust_pay_batch"; - my $sth = dbh->prepare($statement) or die dbh->errstr. "doing $statement"; - $sth->execute or die "Error executing \"$statement\": ". $sth->errstr; - my $total = $sth->fetchrow_arrayref->[0]; - - my $c_statement = "SELECT COUNT(*) from cust_pay_batch"; - my $c_sth = dbh->prepare($c_statement) - or die dbh->errstr. "doing $c_statement"; - $c_sth->execute or die "Error executing \"$c_statement\": ". $c_sth->errstr; - my $cards = $c_sth->fetchrow_arrayref->[0]; -%> -<%= $cards %> credit card payments batched
-$<%= sprintf("%.2f", $total) %> total in pending batch
- -
-<%= &table() %> - - # - inv# - Customer - Card name - Card - Exp - Amount - - -<% -foreach my $cust_pay_batch ( sort { $a->paybatchnum <=> $b->paybatchnum } - qsearch('cust_pay_batch', {} ) -) { - my $cardnum = $cust_pay_batch->cardnum; - #$cardnum =~ s/.{4}$/xxxx/; - $cardnum = 'x'x(length($cardnum)-4). substr($cardnum,(length($cardnum)-4)); - - $cust_pay_batch->exp =~ /^\d{2}(\d{2})[\/\-](\d+)[\/\-]\d+$/; - my( $mon, $year ) = ( $2, $1 ); - $mon = "0$mon" if $mon < 10; - my $exp = "$mon/$year"; - -%> - - - <%= $cust_pay_batch->paybatchnum %> - <%= $cust_pay_batch->invnum %> - <%= $cust_pay_batch->custnum %> - <%= $cust_pay_batch->get('last'). ', '. $cust_pay_batch->first %> - <%= $cust_pay_batch->payname %> - <%= $cardnum %> - <%= $exp %> - $<%= $cust_pay_batch->amount %> - - -<% } %> - - - - diff --git a/httemplate/browse/generic.cgi b/httemplate/browse/generic.cgi deleted file mode 100644 index 9ac0f2391..000000000 --- a/httemplate/browse/generic.cgi +++ /dev/null @@ -1,46 +0,0 @@ -<% - -use FS::Record qw(qsearch dbdef); -use DBIx::DBSchema; -use DBIx::DBSchema::Table; - -my $error; -my $p2 = popurl(2); -my ($table) = $cgi->keywords; -my $dbdef = dbdef or die "Cannot fetch dbdef!"; -my $dbdef_table = $dbdef->table($table) or die "Cannot fetch schema for $table"; - -my $pkey = $dbdef_table->primary_key or die "Cannot fetch pkey for $table"; -print header("Browse $table", menubar('Main Menu' => $p)); - -my @rec = qsearch($table, {}); -my @col = $dbdef_table->columns; - -if ($cgi->param('error')) { %> - Error: <%=$cgi->param('error')%> -

-<% } -%> -
Add a new <%=$table%>

- -<%=table()%> - -<% foreach (grep { $_ ne $pkey } @col) { - %><%=$_%> - <% } %> - -<% foreach $rec (sort {$a->getfield($pkey) cmp $b->getfield($pkey) } @rec) { - %> - - - - <%=$rec->getfield($pkey)%> <% - foreach $col (grep { $_ ne $pkey } @col) { %> - <%=$rec->getfield($col)%> <% } %> - - -<% } %> - - - - diff --git a/httemplate/browse/msgcat.cgi b/httemplate/browse/msgcat.cgi deleted file mode 100755 index d4adf9f1a..000000000 --- a/httemplate/browse/msgcat.cgi +++ /dev/null @@ -1,50 +0,0 @@ - -<% - -print header("View Message catalog", menubar( - 'Main Menu' => $p, - 'Edit message catalog' => $p. "edit/msgcat.cgi", -)), '
'; - -my $widget = new HTML::Widgets::SelectLayers( - 'selected_layer' => 'en_US', - 'options' => { 'en_US'=>'en_US' }, - 'layer_callback' => sub { - my $layer = shift; - my $html = "
Messages for locale $layer
". table(). - "Code". - "Message"; - $html .= "en_US Message" unless $layer eq 'en_US'; - $html .= ''; - - #foreach my $msgcat ( sort { $a->msgcode cmp $b->msgcode } - # qsearch('msgcat', { 'locale' => $layer } ) ) { - foreach my $msgcat ( qsearch('msgcat', { 'locale' => $layer } ) ) { - $html .= ''. $msgcat->msgnum. ''. - ''. $msgcat->msgcode. ''. - ''. $msgcat->msg. ''; - unless ( $layer eq 'en_US' ) { - my $en_msgcat = qsearchs('msgcat', { - 'locale' => 'en_US', - 'msgcode' => $msgcat->msgcode, - } ); - $html .= ''. $en_msgcat->msg. ''; - } - $html .= ''; - } - - $html .= ''; - $html; - }, - -); - -print $widget->html; - -print < - - -END - -%> diff --git a/httemplate/browse/nas.cgi b/httemplate/browse/nas.cgi deleted file mode 100755 index 9ccbfe632..000000000 --- a/httemplate/browse/nas.cgi +++ /dev/null @@ -1,80 +0,0 @@ - -<% - -print header('NAS ports', menubar( - 'Main Menu' => $p, -)); - -my $now = time; - -foreach my $nas ( sort { $a->nasnum <=> $b->nasnum } qsearch( 'nas', {} ) ) { - print $nas->nasnum. ": ". $nas->nas. " ". - $nas->nasfqdn. " (". $nas->nasip. ") ". - "as of ". time2str("%c",$nas->last). - " (". &pretty_interval($now - $nas->last). " ago)
". - &table(). "Nas
Port #Global
Port #
". - "IP addressUserSinceDuration", - ; - foreach my $port ( sort { - $a->nasport <=> $b->nasport || $a->portnum <=> $b->portnum - } qsearch( 'port', { 'nasnum' => $nas->nasnum } ) ) { - my $session = $port->session; - my($user, $since, $pretty_since, $duration); - if ( ! $session ) { - $user = "(empty)"; - $since = 0; - $pretty_since = "(never)"; - $duration = ''; - } elsif ( $session->logout ) { - $user = "(empty)"; - $since = $session->logout; - } else { - my $svc_acct = $session->svc_acct; - $user = "svcnum. "\">". - $svc_acct->username. ""; - $since = $session->login; - } - $pretty_since = time2str("%c", $since) if $since; - $duration = pretty_interval( $now - $since ). " ago" - unless defined($duration); - print "". $port->nasport. "". $port->portnum. "". - $port->ip. "$user$pretty_since". - "$duration" - ; - } - print "
"; -} - -#Time::Duration?? -sub pretty_interval { - my $interval = shift; - my %howlong = ( - '604800' => 'week', - '86400' => 'day', - '3600' => 'hour', - '60' => 'minute', - '1' => 'second', - ); - - my $pretty = ""; - foreach my $key ( sort { $b <=> $a } keys %howlong ) { - my $value = int( $interval / $key ); - if ( $value ) { - if ( $value == 1 ) { - $pretty .= - ( $howlong{$key} eq 'hour' ? 'an ' : 'a ' ). $howlong{$key}. " " - } else { - $pretty .= $value. ' '. $howlong{$key}. 's '; - } - } - $interval -= $value * $key; - } - $pretty =~ /^\s*(\S.*\S)\s*$/; - $1; -} - -#print &table(), < -# # -# NAS diff --git a/httemplate/browse/part_bill_event.cgi b/httemplate/browse/part_bill_event.cgi deleted file mode 100755 index 670474d48..000000000 --- a/httemplate/browse/part_bill_event.cgi +++ /dev/null @@ -1,71 +0,0 @@ - -<% - -my %search; -if ( $cgi->param('showdisabled') ) { - %search = (); -} else { - %search = ( 'disabled' => '' ); -} - -my @part_bill_event = qsearch('part_bill_event', \%search ); -my $total = scalar(@part_bill_event); - -%> -<%= header('Invoice Event Listing', menubar( 'Main Menu' => $p) ) %> - - Invoice events are actions taken on overdue invoices.

-Add a new invoice event -

-<%= $total %> events -<%= $cgi->param('showdisabled') - ? do { $cgi->param('showdisabled', 0); - '( hide disabled events )'; } - : do { $cgi->param('showdisabled', 1); - '( show disabled events )'; } -%> -<%= table() %> - - param('showdisabled') ? 2 : 3 %>>Event - Payby - After - Action - Options - Code - - -<% foreach my $part_bill_event ( sort { $a->payby cmp $b->payby - || $a->seconds <=> $b->seconds - || $a->weight <=> $b->weight - || $a->eventpart <=> $b->eventpart - } @part_bill_event ) { - my $url = "${p}edit/part_bill_event.cgi?". $part_bill_event->eventpart; - use Time::Duration; - my $delay = duration_exact($part_bill_event->seconds); - my $plandata = $part_bill_event->plandata; - $plandata =~ s/\n/
/go; -%> - - - <%= $part_bill_event->eventpart %> -<% unless ( $cgi->param('showdisabled') ) { %> - - <%= $part_bill_event->disabled ? 'DISABLED' : '' %> -<% } %> - - <%= $part_bill_event->event %> - - <%= $part_bill_event->payby %> - - <%= $delay %> - - <%= $part_bill_event->plan %> - - <%= $plandata %> - - <%= $part_bill_event->eventcode %> - -<% } %> - - - diff --git a/httemplate/browse/part_export.cgi b/httemplate/browse/part_export.cgi deleted file mode 100755 index 79c57aefc..000000000 --- a/httemplate/browse/part_export.cgi +++ /dev/null @@ -1,39 +0,0 @@ - -<%= header("Export Listing", menubar( 'Main Menu' => "$p#sysadmin" )) %> -Provisioning services to external machines, databases and APIs.

-Add a new export

- - -<%= table() %> - - Export - Options - - -<% foreach my $part_export ( sort { - $a->getfield('exportnum') <=> $b->getfield('exportnum') - } qsearch('part_export',{}) ) { -%> - - <%= $part_export->exportnum %> - <%= $part_export->exporttype %> to <%= $part_export->machine %> (edit | delete) - - <%= itable() %> - <% my %opt = $part_export->options; - foreach my $opt ( keys %opt ) { %> - <%= $opt %><%= encode_entities($opt{$opt}) %> - <% } %> - - - - -<% } %> - - - - diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi deleted file mode 100755 index 8d5b55451..000000000 --- a/httemplate/browse/part_pkg.cgi +++ /dev/null @@ -1,169 +0,0 @@ - -<% - -my %search; -if ( $cgi->param('showdisabled') ) { - %search = (); -} else { - %search = ( 'disabled' => '' ); -} - -my @part_pkg = qsearch('part_pkg', \%search ); -my $total = scalar(@part_pkg); - -my $sortby; -my %num_active_cust_pkg = (); -my( $suspended_sth, $canceled_sth ) = ( '', '' ); -if ( $cgi->param('active') ) { - my $active_sth = dbh->prepare( - 'SELECT COUNT(*) FROM cust_pkg WHERE pkgpart = ?'. - ' AND ( cancel IS NULL OR cancel = 0 )'. - ' AND ( susp IS NULL OR susp = 0 )' - ) or die dbh->errstr; - foreach my $part_pkg ( @part_pkg ) { - $active_sth->execute($part_pkg->pkgpart) or die $active_sth->errstr; - $num_active_cust_pkg{$part_pkg->pkgpart} = - $active_sth->fetchrow_arrayref->[0]; - } - $sortby = sub { - $num_active_cust_pkg{$b->pkgpart} <=> $num_active_cust_pkg{$a->pkgpart}; - }; - - $suspended_sth = dbh->prepare( - 'SELECT COUNT(*) FROM cust_pkg WHERE pkgpart = ?'. - ' AND ( cancel IS NULL OR cancel = 0 )'. - ' AND susp IS NOT NULL AND susp != 0' - ) or die dbh->errstr; - - $canceled_sth = dbh->prepare( - 'SELECT COUNT(*) FROM cust_pkg WHERE pkgpart = ?'. - ' AND cancel IS NOT NULL AND cancel != 0' - ) or die dbh->errstr; - -} else { - $sortby = sub { $a->pkgpart <=> $b->pkgpart; }; -} - -my $conf = new FS::Conf; -my $taxclasses = $conf->exists('enable_taxclasses'); - -%> -<%= header("Package Definition Listing",menubar( 'Main Menu' => $p )) %> -<% unless ( $cgi->param('active') ) { %> - One or more service definitions are grouped together into a package - definition and given pricing information. Customers purchase packages - rather than purchase services directly.

- Add a new package definition -

-<% } %> - -<%= $total %> package definitions -<% if ( $cgi->param('showdisabled') ) { $cgi->param('showdisabled', 0); %> - ( hide disabled packages ) -<% } else { $cgi->param('showdisabled', 1); %> - ( show disabled packages ) -<% } %> - -<% my $colspan = $cgi->param('showdisabled') ? 2 : 3; %> - -<%= &table() %> - - >Package - Comment -<% if ( $cgi->param('active') ) { %> - Customer
packages
-<% } %> - Freq. -<% if ( $taxclasses ) { %> - Taxclass -<% } %> - Plan - Data - Service - Quan. -<% if ( dbdef->table('pkg_svc')->column('primary_svc') ) { %> - Primary -<% } %> - - - -<% -foreach my $part_pkg ( sort $sortby @part_pkg ) { - my @pkg_svc = $part_pkg->pkg_svc; - my($rowspan)=scalar(@pkg_svc); - my $plandata; - if ( $part_pkg->plan ) { - $plandata = $part_pkg->plandata; - $plandata =~ s/^(\w+)=/$1 /mg; - $plandata =~ s/\n/
/g; - } else { - $part_pkg->plan('(legacy)'); - $plandata = "Setup ". $part_pkg->setup. - "
Recur ". $part_pkg->recur; - } -%> - - ><%= $part_pkg->pkgpart %> - -<% unless ( $cgi->param('showdisabled') ) { %> - > - <% if ( $part_pkg->disabled ) { %> - DISABLED - <% } %> - -<% } %> - - ><%= $part_pkg->pkg %> - ><%= $part_pkg->comment %> - -<% if ( $cgi->param('active') ) { %> - > - <%= $num_active_cust_pkg{$part_pkg->pkgpart} %> active
- - <% $suspended_sth->execute( $part_pkg->pkgpart ) - or die $suspended_sth->errstr; - my $num_suspended = $suspended_sth->fetchrow_arrayref->[0]; - %> - <%= $num_suspended %> suspended
- - <% $canceled_sth->execute( $part_pkg->pkgpart ) - or die $canceled_sth->errstr; - my $num_canceled = $canceled_sth->fetchrow_arrayref->[0]; - %> - <%= $num_canceled %> canceled - -<% } %> - - ><%= $part_pkg->freq_pretty %> - -<% if ( $taxclasses ) { %> - ><%= $part_pkg->taxclass || ' ' %> -<% } %> - - ><%= $part_pkg->plan %> - ><%= $plandata %> - -<% - my($n)=""; - foreach my $pkg_svc ( @pkg_svc ) { - my($svcpart)=$pkg_svc->getfield('svcpart'); - my($part_svc) = qsearchs('part_svc',{'svcpart'=> $svcpart }); - print $n,qq!!, - $part_svc->getfield('svc'),"", - $pkg_svc->getfield('quantity'),""; - if ( dbdef->table('pkg_svc')->column('primary_svc') ) { - print ''; - print 'PRIMARY' if $pkg_svc->primary_svc =~ /^Y/i; - print ''; - } - print "\n"; - $n=""; - } -%> - - -<% } %> - - - - diff --git a/httemplate/browse/part_referral.cgi b/httemplate/browse/part_referral.cgi deleted file mode 100755 index 581e01bb6..000000000 --- a/httemplate/browse/part_referral.cgi +++ /dev/null @@ -1,97 +0,0 @@ - -<%= header("Advertising source Listing", menubar( - 'Main Menu' => $p, -# 'Add new referral' => "../edit/part_referral.cgi", -)) %> -Where a customer heard about your service. Tracked for informational purposes. -

-Add a new advertising source -

- -<% - my $today = timelocal(0, 0, 0, (localtime(time))[3..5] ); - my %after; - tie %after, 'Tie::IxHash', - 'Today' => 0, - 'Yesterday' => 86400, # 60sec * 60min * 24hrs - 'Past week' => 518400, # 60sec * 60min * 24hrs * 6days - 'Past 30 days' => 2505600, # 60sec * 60min * 24hrs * 29days - 'Past 60 days' => 5097600, # 60sec * 60min * 24hrs * 59days - 'Past 90 days' => 7689600, # 60sec * 60min * 24hrs * 89days - 'Past 6 months' => 15724800, # 60sec * 60min * 24hrs * 182days - 'Past year' => 31486000, # 60sec * 60min * 24hrs * 364days - 'Total' => $today, - ; - my %before = ( - 'Today' => 86400, # 60sec * 60min * 24hrs - 'Yesterday' => 0, - 'Past week' => 86400, # 60sec * 60min * 24hrs - 'Past 30 days' => 86400, # 60sec * 60min * 24hrs - 'Past 60 days' => 86400, # 60sec * 60min * 24hrs - 'Past 90 days' => 86400, # 60sec * 60min * 24hrs - 'Past 6 months' => 86400, # 60sec * 60min * 24hrs - 'Past year' => 86400, # 60sec * 60min * 24hrs - 'Total' => 86400, # 60sec * 60min * 24hrs - ); - - my $statement = "SELECT COUNT(*) FROM h_cust_main - WHERE history_action = 'insert' - AND refnum = ? - AND history_date >= ? - AND history_date < ? - "; - my $sth = dbh->prepare($statement) - or die dbh->errstr; -%> - -<%= table() %> - - Advertising source - >Customers - -<% for my $period ( keys %after ) { %> - <%= $period %> -<% } %> - - -<% -foreach my $part_referral ( sort { - $a->getfield('refnum') <=> $b->getfield('refnum') -} qsearch('part_referral',{}) ) { -%> - - - <%= $part_referral->refnum %> - - <%= $part_referral->referral %> - <% for my $period ( keys %after ) { - $sth->execute( $part_referral->refnum, - $today-$after{$period}, - $today+$before{$period}, - ) or die $sth->errstr; - my $number = $sth->fetchrow_arrayref->[0]; - %> - <%= $number %> - <% } %> - -<% } %> - -<% - $statement =~ s/AND refnum = \?//; - $sth = dbh->prepare($statement) - or die dbh->errstr; -%> - - Total - <% for my $period ( keys %after ) { - $sth->execute( $today-$after{$period}, - $today+$before{$period}, - ) or die $sth->errstr; - my $number = $sth->fetchrow_arrayref->[0]; - %> - <%= $number %> - <% } %> - - - - diff --git a/httemplate/browse/part_svc.cgi b/httemplate/browse/part_svc.cgi deleted file mode 100755 index a725dc051..000000000 --- a/httemplate/browse/part_svc.cgi +++ /dev/null @@ -1,137 +0,0 @@ -<% - -my %flag = ( - 'D' => 'Default', - 'F' => 'Fixed', - '' => '', -); - -my %search; -if ( $cgi->param('showdisabled') ) { - %search = (); -} else { - %search = ( 'disabled' => '' ); -} - -my @part_svc = - sort { $a->getfield('svcpart') <=> $b->getfield('svcpart') } - qsearch('part_svc', \%search ); -my $total = scalar(@part_svc); - -my %num_active_cust_svc = map { $_->svcpart => $_->num_cust_svc } @part_svc; - -if ( $cgi->param('orderby') eq 'active' ) { - @part_svc = sort { $num_active_cust_svc{$b->svcpart} <=> - $num_active_cust_svc{$a->svcpart} } @part_svc; -} elsif ( $cgi->param('orderby') eq 'svc' ) { - @part_svc = sort { lc($a->svc) cmp lc($b->svc) } @part_svc; -} - -%> -<%= header('Service Definition Listing', menubar( 'Main Menu' => $p) ) %> - - - - Service definitions are the templates for items you offer to your customers.

- -
-Add a new service definition<% if ( @part_svc ) { %> or  -<% } %> -

- -<%= $total %> service definitions -<%= $cgi->param('showdisabled') - ? do { $cgi->param('showdisabled', 0); - '( hide disabled services )'; } - : do { $cgi->param('showdisabled', 1); - '( show disabled services )'; } -%> -<% $cgi->param('showdisabled', ( 1 ^ $cgi->param('showdisabled') ) ); %> -<%= table() %> - - # - <% if ( $cgi->param('showdisabled') ) { %> - Status - <% } %> - Service - Table - Customer
Services
- Export - Field - Modifier - - -<% foreach my $part_svc ( @part_svc ) { - my $svcdb = $part_svc->svcdb; - my $svc_x = "FS::$svcdb"->new( { svcpart => $part_svc->svcpart } ); - my @dfields = $svc_x->fields; - push @dfields, 'usergroup' if $svcdb eq 'svc_acct'; #kludge - my @fields = - grep { $svc_x->pvf($_) - or $_ ne 'svcnum' && $part_svc->part_svc_column($_)->columnflag } - @dfields ; - my $rowspan = scalar(@fields) || 1; - my $url = "${p}edit/part_svc.cgi?". $part_svc->svcpart; -%> - - - > - <%= $part_svc->svcpart %> -<% if ( $cgi->param('showdisabled') ) { %> - > - <%= $part_svc->disabled - ? 'Disabled' - : 'Enabled' - %> - -<% } %> - > - <%= $part_svc->svc %> - > - <%= $svcdb %> - > - <%= $num_active_cust_svc{$part_svc->svcpart} %> active - <% if ( $num_active_cust_svc{$part_svc->svcpart} ) { %> -
[ change ] - <% } %> - - ><%= itable() %> -<% -# my @part_export = -map { qsearchs('part_export', { exportnum => $_->exportnum } ) } qsearch('export_svc', { svcpart => $part_svc->svcpart } ) ; - foreach my $part_export ( - map { qsearchs('part_export', { exportnum => $_->exportnum } ) } - qsearch('export_svc', { svcpart => $part_svc->svcpart } ) - ) { -%> - - <%= $part_export->exportnum %>: <%= $part_export->exporttype %> to <%= $part_export->machine %> -<% } %> - - -<% my($n1)=''; - foreach my $field ( @fields ) { - my $flag = $part_svc->part_svc_column($field)->columnflag; -%> - <%= $n1 %> - <%= $field %> - <%= $flag{$flag} %> - <%= $part_svc->part_svc_column($field)->columnvalue%> - -<% $n1=""; - } -%> - -<% } %> - - - diff --git a/httemplate/browse/part_virtual_field.cgi b/httemplate/browse/part_virtual_field.cgi deleted file mode 100644 index a0009dabd..000000000 --- a/httemplate/browse/part_virtual_field.cgi +++ /dev/null @@ -1,39 +0,0 @@ -<%= header('Virtual field definitions', menubar('Main Menu' => $p)) %> -<% - -my %pvfs; -my $block; -my $p2 = popurl(2); -my $dbtable; - -foreach (qsearch('part_virtual_field', {})) { - push @{ $pvfs{$_->dbtable} }, $_; -} -%> - -<% if ($cgi->param('error')) { %> - Error: <%=$cgi->param('error')%> -

-<% } %> - -Add a new field

- -<% foreach $dbtable (sort { $a cmp $b } keys (%pvfs)) { %> -

<%=$dbtable%>

- -<%=table()%> -Field nameDescription -<% foreach my $pvf (sort {$a->name cmp $b->name} @{ $pvfs{$dbtable} }) { %> - - - - - <%=$pvf->name%> - <%=$pvf->label%> - -<% } %> - -<% } %> - - - diff --git a/httemplate/browse/payment_gateway.html b/httemplate/browse/payment_gateway.html deleted file mode 100644 index bb7f31514..000000000 --- a/httemplate/browse/payment_gateway.html +++ /dev/null @@ -1,70 +0,0 @@ -<% - - my %search; - if ( $cgi->param('showdisabled') ) { - %search = (); - } else { - %search = ( 'disabled' => '' ); - } - -%> -<%= header('Payment gateways', menubar( - 'Main Menu' => $p, - 'Agents' => $p. 'browse/agent.cgi', -)) %> - -Add a new payment gateway

- -<%= $cgi->param('showdisabled') - ? do { $cgi->param('showdisabled', 0); - '( hide disabled gateways )'; } - : do { $cgi->param('showdisabled', 1); - '( show disabled gateways )'; } -%> - -<%= table() %> - - param('showdisabled') ? 1 : 2 %>># - Gateway - Username - Password - Action - Options - - -<% foreach my $payment_gateway ( qsearch( 'payment_gateway', \%search ) ) { %> - - - <%= $payment_gateway->gatewaynum %> - <% if ( !$cgi->param('showdisabled') ) { %> - <%= $payment_gateway->disabled ? 'DISABLED' : '' %> - <% } %> - <%= $payment_gateway->gateway_module %> - <%= !$payment_gateway->disabled - ? ' (disable)' - : '' - %> - - <%= $payment_gateway->gateway_username %> - - - <%= $payment_gateway->gateway_action %> - - - <% my %options = $payment_gateway->options; - foreach my $option ( keys %options ) { - %> - - - - - <% } %> -
<%= $option %>:<%= $options{$option} %>
- - - -<% } %> - - - - - diff --git a/httemplate/browse/queue.cgi b/httemplate/browse/queue.cgi deleted file mode 100755 index 0afdd48d7..000000000 --- a/httemplate/browse/queue.cgi +++ /dev/null @@ -1,5 +0,0 @@ - -<%= header("Job Queue", menubar( 'Main Menu' => $p, )) %> -<%= joblisting({}) %> - - diff --git a/httemplate/browse/rate.cgi b/httemplate/browse/rate.cgi deleted file mode 100644 index c31260166..000000000 --- a/httemplate/browse/rate.cgi +++ /dev/null @@ -1,34 +0,0 @@ - -<%= header("Rate plan listing", menubar( 'Main Menu' => "$p#sysadmin" )) %> -Rate plans, regions and prefixes for VoIP and call billing.

-Add a rate plan -| Add a region -

- - -<%= table() %> - - Rate plan - - -<% foreach my $rate ( sort { - $a->getfield('ratenum') <=> $b->getfield('ratenum') - } qsearch('rate',{}) ) { -%> - - <%= $rate->ratenum %> - <%= $rate->ratename %> - - -<% } %> - - - - - - diff --git a/httemplate/browse/router.cgi b/httemplate/browse/router.cgi deleted file mode 100644 index 149db4903..000000000 --- a/httemplate/browse/router.cgi +++ /dev/null @@ -1,57 +0,0 @@ -<%= header('Routers', menubar('Main Menu' => $p)) %> -<% - -my @router = qsearch('router', {}); -my $p2 = popurl(2); - -%> - -<% if ($cgi->param('error')) { %> - Error: <%=$cgi->param('error')%> -

-<% } %> - -<% -my $hidecustomerrouters = 0; -my $hideurl = ''; -if ($cgi->param('hidecustomerrouters') eq '1') { - $hidecustomerrouters = 1; - $cgi->param('hidecustomerrouters', 0); - $hideurl = 'Show customer routers'; -} else { - $hidecustomerrouters = 0; - $cgi->param('hidecustomerrouters', 1); - $hideurl = 'Hide customer routers'; -} -%> - -Add a new router | <%=$hideurl%> - -<%=table()%> - - Router name - Address block(s) - -<% foreach my $router (sort {$a->routernum <=> $b->routernum} @router) { - next if $hidecustomerrouters && $router->svcnum; - my @addr_block = $router->addr_block; - if (scalar(@addr_block) == 0) { - push @addr_block, ' '; - } -%> - - - <%=$router->routername%> - - - <% foreach my $block ( @addr_block ) { %> - - <%=UNIVERSAL::isa($block, 'FS::addr_block') ? $block->NetAddr : ' '%> - - <% } %> - -<% } %> - - - - diff --git a/httemplate/browse/svc_acct_pop.cgi b/httemplate/browse/svc_acct_pop.cgi deleted file mode 100755 index 44cda81ad..000000000 --- a/httemplate/browse/svc_acct_pop.cgi +++ /dev/null @@ -1,63 +0,0 @@ - -<% - my $accounts_sth = dbh->prepare("SELECT COUNT(*) FROM svc_acct - WHERE popnum = ? ") - or die dbh->errstr; -%> -<%= header('Access Number Listing', menubar( 'Main Menu' => $p )) %> -Points of Presence

-Add new Access Number

-<%= table() %> - - - City - State - Area code - Exchange - Local - Accounts - - -<% -foreach my $svc_acct_pop ( sort { - #$a->getfield('popnum') <=> $b->getfield('popnum') - $a->state cmp $b->state || $a->city cmp $b->city - || $a->ac <=> $b->ac || $a->exch <=> $b->exch || $a->loc <=> $b->loc -} qsearch('svc_acct_pop',{}) ) { - - my $svc_acct_pop_link = $p . 'edit/svc_acct_pop.cgi?'. $svc_acct_pop->popnum; - - $accounts_sth->execute($svc_acct_pop->popnum) or die $accounts_sth->errstr; - my $num_accounts = $accounts_sth->fetchrow_arrayref->[0]; - - my $svc_acct_link = $p. 'search/svc_acct.cgi?popnum='. $svc_acct_pop->popnum; - -%> - - - <%= $svc_acct_pop->popnum %> - - <%= $svc_acct_pop->city %> - - <%= $svc_acct_pop->state %> - - <%= $svc_acct_pop->ac %> - - <%= $svc_acct_pop->exch %> - - <%= $svc_acct_pop->loc %> - - <%= $num_accounts %> - <% if ( $num_accounts ) { %><% } %> - active - <% if ( $num_accounts ) { %><% } %> - - -<% } %> - - - - - - - diff --git a/httemplate/config/config-process.cgi b/httemplate/config/config-process.cgi deleted file mode 100644 index 259713260..000000000 --- a/httemplate/config/config-process.cgi +++ /dev/null @@ -1,51 +0,0 @@ -<% - my $conf = new FS::Conf; - $FS::Conf::DEBUG = 1; - my @config_items = $conf->config_items; - - foreach my $i ( @config_items ) { - my @touch = (); - my @delete = (); - my $n = 0; - foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) { - if ( $type eq '' ) { - } elsif ( $type eq 'textarea' ) { - if ( $cgi->param($i->key. $n) ne '' ) { - my $value = $cgi->param($i->key. $n); - $value =~ s/\r\n/\n/g; #browsers? - $conf->set($i->key, $value); - } else { - $conf->delete($i->key); - } - } elsif ( $type eq 'checkbox' ) { -# if ( defined($cgi->param($i->key. $n)) && $cgi->param($i->key. $n) ) { - if ( defined $cgi->param($i->key. $n) ) { - #$conf->touch($i->key); - push @touch, $i->key; - } else { - #$conf->delete($i->key); - push @delete, $i->key; - } - } elsif ( $type eq 'text' || $type eq 'select' ) { - if ( $cgi->param($i->key. $n) ne '' ) { - $conf->set($i->key, $cgi->param($i->key. $n)); - } else { - $conf->delete($i->key); - } - } elsif ( $type eq 'editlist' || $type eq 'selectmultiple' ) { - if ( scalar(@{[ $cgi->param($i->key. $n) ]}) ) { - $conf->set($i->key, join("\n", @{[ $cgi->param($i->key. $n) ]} )); - } else { - $conf->delete($i->key); - } - } else { - } - $n++; - } - # warn @touch; - $conf->touch($_) foreach @touch; - $conf->delete($_) foreach @delete; - } - -%> -<%= $cgi->redirect("config-view.cgi") %> diff --git a/httemplate/config/config-view.cgi b/httemplate/config/config-view.cgi deleted file mode 100644 index 8011e7697..000000000 --- a/httemplate/config/config-view.cgi +++ /dev/null @@ -1,80 +0,0 @@ - -<%= header('View Configuration', menubar( 'Main Menu' => $p, - 'Edit Configuration' => 'config.cgi' ) ) %> - -<% my $conf = new FS::Conf; my @config_items = $conf->config_items; %> - -<% foreach my $section ( qw(required billing username password UI session - shell BIND - ), - '', 'deprecated') { %> - - - <% foreach my $nav_section ( qw(required billing username password UI session - shell BIND - ), - '', 'deprecated') { %> - <% if ( $section eq $nav_section ) { %> - [<%= ucfirst($nav_section || 'unclassified') %>] - <% } else { %> - [<%= ucfirst($nav_section || 'unclassified') %>] - <% } %> - <% } %> -
- <%= table("#cccccc", 2) %> - - - <%= ucfirst($section || 'unclassified') %> configuration options - - - <% foreach my $i (grep $_->section eq $section, @config_items) { %> - - - <%= $i->key %> - <%= $i->description %> - - - <% foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) { - my $n = 0; %> - <% if ( $type eq '' ) { %> - - - - <% } elsif ( $type eq 'textarea' - || $type eq 'editlist' - || $type eq 'selectmultiple' ) { %> - - - - <% } elsif ( $type eq 'checkbox' ) { %> - - - - <% } elsif ( $type eq 'text' || $type eq 'select' ) { %> - - - <% } elsif ( $type eq 'select-sub' ) { %> - - - - <% } else { %> - - <% } %> - <% $n++; } %> -
no type
-
-<%= encode_entities(join("\n", $conf->config($i->key) ) ) %>
-
-
YES' : 'ff0000">NO' %>
- <%= $conf->exists($i->key) ? $conf->config($i->key) : '' %> -
- <%= $conf->config($i->key) %>: - <%= &{ $i->option_sub }( $conf->config($i->key) ) %> -
- unknown type <%= $type %> -
- - <% } %> -

-<% } %> - - diff --git a/httemplate/config/config.cgi b/httemplate/config/config.cgi deleted file mode 100644 index ff29d8578..000000000 --- a/httemplate/config/config.cgi +++ /dev/null @@ -1,191 +0,0 @@ - -<%= header('Edit Configuration', menubar( 'Main Menu' => $p ) ) %> - - -<% my $conf = new FS::Conf; my @config_items = $conf->config_items; %> - -
- -<% foreach my $section ( qw(required billing username password UI session - shell BIND - ), - '', 'deprecated') { %> - - - <% foreach my $nav_section ( qw(required billing username password UI session - shell BIND - ), - '', 'deprecated') { %> - <% if ( $section eq $nav_section ) { %> - [<%= ucfirst($nav_section || 'unclassified') %>] - <% } else { %> - [<%= ucfirst($nav_section || 'unclassified') %>] - <% } %> - <% } %> -
- <%= table("#cccccc", 2) %> - - - <%= ucfirst($section || 'unclassified') %> configuration options - - - <% foreach my $i (grep $_->section eq $section, @config_items) { %> - - - <% my $n = 0; - foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) { - #warn $i->key unless defined($type); - %> - <% if ( $type eq '' ) { %> - no type - <% } elsif ( $type eq 'textarea' ) { %> - - <% } elsif ( $type eq 'checkbox' ) { %> - exists($i->key) ? ' CHECKED' : '' %>> - <% } elsif ( $type eq 'text' ) { %> - - <% } elsif ( $type eq 'select' || $type eq 'selectmultiple' ) { %> - - <% } elsif ( $type eq 'select-sub' ) { %> - - <% } elsif ( $type eq 'editlist' ) { %> - -
- - -
- <%= itable() %> - <% if ( defined $i->editlist_parts ) { %> - <% my $pnum=0; foreach my $part ( @{$i->editlist_parts} ) { %> - - <% if ( $part->{type} eq 'text' ) { %> - "> - <% } elsif ( $part->{type} eq 'immutable' ) { %> - <%= $part->{value} %>" value="<%= $part->{value} %>"> - <% } elsif ( $part->{type} eq 'select' ) { %> - - <% } else { %> - unknown type <%= $part->type %> - <% } %> - - <% $pnum++; } %> - <% } else { %> - - <% } %> - - - <% } else { %> - unknown type <%= $type %> - <% } %> - <% $n++; } %> - - - <%= $i->key %> - <%= $i->description %> - - - <% } %> -
- - You may need to restart Apache and/or freeside-queued for configuration - changes to take effect.
- -

- -<% } %> - -
- - diff --git a/httemplate/docs/ach.html b/httemplate/docs/ach.html deleted file mode 100644 index b8a17c87d..000000000 --- a/httemplate/docs/ach.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - Electronic check (ACH) information - - - - - - diff --git a/httemplate/docs/admin.html b/httemplate/docs/admin.html deleted file mode 100755 index 9ce259c2b..000000000 --- a/httemplate/docs/admin.html +++ /dev/null @@ -1,82 +0,0 @@ - - Administration - - -

Administration

- -
    -
  • Open up the root of the Freeside document tree in your web - browser. For example, if you created the Freeside document tree in - /home/httpd/html/freeside, and your web browser's DocumentRoot is - /home/httpd/html, open https://your_host/freeside/. Replace - "your_host" with the name or network address of your web server. -
  • Select Configuration from the main menu and update your configuration values. -
  • Next you must create a service definition. An example of a service - definition would be a dial-up account or a domain. First, it is - necessary to create a domain definition. Click on View/Edit service - definitions and Add a new service definition with Table - svc_domain (and no modifiers). - -
  • Now that you have created your first service, you must create a package - including this service which you can sell to customers. Zero, one, or many - services are bundled into a package. Click on View/Edit package - definitions and Add a new package definition which includes - quantity 1 of the svc_domain service you created above. - -
  • After you create your first package, then you must define who is - able to sell that package by creating an agent type. An example of - an agent type would be an internal sales representitive which sells - regular and promotional packages, as opposed to an external sales - representitive which would only sell regular packages of services. Click on - View/Edit agent types and Add a new agent type. Allow this - agent type to sell the package you created above. - -
  • After creating a new agent type, you must create an agent. Click on - View/Edit agents and Add a new agent. - -
  • Set up at least one Advertising source. Advertising sources will help - you keep track of how effective your advertising is, tracking where customers - heard of your service offerings. You must create at least one advertising - source. If you do not wish to use the referral functionality, simply create - a single advertising source only. Click on View/Edit advertising - sources and Add a new advertising source. - -
  • Click on New Customer and create a new customer for your system - accounts with billing type Complimentary. Leave the First - package dropdown set to (none). - -
  • From the Customer View screen of the newly created customer, order the - package you defined above. - -
  • From the Package View screen of the newly created package, choose - (Provision) to add the customer's service for this new package. - -
  • Add your own domain. - -
  • Go back to View/Edit service definitions on the main menu, and - Add a new service definition with Table svc_acct. - Select your domain in the domsvc Modifier. Set Fixed to define - a service locked-in to this domain, or Default to define a service - which may select from among this domain and the customer's domains. - -
  • - - - -
    Create at least POP (Point of Presence) by selecting - View/Edit POPs from the main menu. OR If you are not doing dialup, set slipip to fixed and blank for all your - Service Definitions which have Table svc_acct.
    - -
  • If you are using Freeside to keep track of sales taxes, define tax - information for your locales by clicking on the View/Edit locales and tax - rates on the main menu. - -
  • If you would like Freeside to notify your customers when their credit - cards and other billing arrangements are about to expire, arrange for - freeside-expiration-alerter to be run daily by cron or similar - facility. The message it sends can be configured from the - Configuration choice of the main menu as alerter_template. - -
- - diff --git a/httemplate/docs/billing.html b/httemplate/docs/billing.html deleted file mode 100644 index adaac17dc..000000000 --- a/httemplate/docs/billing.html +++ /dev/null @@ -1,68 +0,0 @@ - - Billing - - -

Billing

-
    -
  • Add one or more Invoice events implmenting your business rules for re-sending invoices, retrying cards, suspending, etc. -
  • You can bill individual customers by clicking on the Bill now link on the main customer view. -
  • The freeside-daily script should be run daily to bill customers and run invoice collection events. -
  • Real-time credit card processing: Install the Business::OnlinePayment module for your processor. Configure the business-onlinepayment configuration option. Disable the default Batch card invoice event and add one for Business::OnlinePayment. -
  • Optional: Credit card expiration alerts: Customize alerter_template configuration option and run freeside-expiration-alerter daily. -
  • Credit card decline alerts: Customize the declinetemplate configuration option and set the emaildecline configuration option. -
  • Typeset (LaTeX) invoice templates -
      -
    • Install teTeX and Ghostscript (included with most distributions). -
    • Place your logo in EPS (Encapsulated PostScript) format with size 90pt X 36pt (epsffit -c 0 0 90 33 yourlogo.eps >logo.eps) at /usr/local/etc/freeside/conf.your_datasrc/logo.eps. -
    • Edit the invoice_latexreturnaddress, invoice_latexfooter, invoice_latexnotes, and invoice_latexsmallfooter configuration options. If you are adventurous, edit invoice_latex as well. -
    -
  • Plaintext invoice templates -
      -
    • See the Text::Template documentation for details on the substitution language. -
    • You must call the invoice_lines() function at least once - pass it a number of lines, and it returns a list of array references, each of two elements: a service description column, and a price column. Alternatively, call invoice_lines() with no arguments, and pagination will be disabled - all invoice line items will print on one page, with no padding (recommended for email invoices). -
    • In addition, the following variables are available: -
        -
      • $invnum - invoice number -
      • $date - as a UNIX timestamp (see Date::Format for conversion functions). -
      • $page - current page -
      • $total_pages - total pages -
      • @address - A six-element array containing the customer name, company, and address. - -
      -
    -
  • HTML invoice templates -
      -
    • Place your logo in PNG format at /usr/local/etc/freeside/conf.your_datasrc/logo.png. -
    • HTML invoices also use Text::Template. -
    • Edit the invoice_html configuration option. -
    • The following configuration options can be set to override the default behaviour of using the invoice_latex* data: invoice_htmlreturnaddress, and invoice_htmlfooter, invoice_htmlnotes. -
    - -
- diff --git a/httemplate/docs/config.html b/httemplate/docs/config.html deleted file mode 100644 index 9caf3bb3a..000000000 --- a/httemplate/docs/config.html +++ /dev/null @@ -1,36 +0,0 @@ - - Configuration files - - -

Configuration files

-Configuration is now done by the top-level Makefile and web interface. The instructions below are no longer necessary. -
    -
  • Create the /usr/local/etc/freeside directory to hold your configuration. -
  • Setting up Apache user authetication is mandatory. -
  • Create the /usr/local/etc/freeside/mapsecrets file, which maps Apache users to a secrets file which contains a DBI data source, username and password. Every -line in /usr/local/etc/freeside/mapsecrets should contain a username and -filename, separated by whitespace. Note that these are not local usernames - -they are passed from Apache. -Apache user authetication is mandatory. For example, if you had the Apache users admin, -john, and sam, -you mapsecrets file might look like: -
    -admin secretfile
    -john secretfile
    -sam secretfile
    -
    -
  • Next, the filename(s) referenced in /usr/local/etc/freeside/mapsecrets file should be created in the /usr/local/etc/freeside/ directory. Each file contains three lines: DBI data source (for example, - DBI:mysql:freeside or DBI:Pg:host=localhost;dbname=freeside), database username, and database password. - These files should not be world readable. See the DBI manpage and the manpage for your DBD for the exact syntax of a DBI data source. In a normal installation such as the example above, a single file /usr/local/etc/freeside/secretfile would be created - for example: -
    -DBI:Pg:host=localhost;dbname=freeside
    -dbusername
    -dbpassword
    -
    -
  • Create the /usr/local/etc/freeside/conf.datasource directory, for example, /usr/local/etc/freeside/conf.DBI:Pg:host=localhost;dbname=freeside (remember to backslash-escape the ; character when creating directories in the shell: -
    mkdir /usr/local/etc/freeside/conf.DBI:Pg:host=localhost\;dbname=freeside
    -
    -
  • The rest of the configuration can be done with the web interface. Select Configuration from the main menu and update your configuration values. -
- - diff --git a/httemplate/docs/cvv2.html b/httemplate/docs/cvv2.html deleted file mode 100644 index 767098537..000000000 --- a/httemplate/docs/cvv2.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - CVV2 information - - - - The CVV2 number (also called CVC2 or CID) is a three- or four-digit - security code used to reduce credit card fraud.

- - - - - - - - -
Visa / MasterCard / DiscoverAmerican Express
- Visa/MasterCard/Discover - - American Express -
- - diff --git a/httemplate/docs/export.html b/httemplate/docs/export.html deleted file mode 100755 index c6c6abd0d..000000000 --- a/httemplate/docs/export.html +++ /dev/null @@ -1,19 +0,0 @@ - - Exports - - -

Exports

-

Exports allow you to provision services to remote machines, databases and - APIs. Some exports, such as sqlradius and - sqlradius_withdomain, enable a feed for retreiving rating/usage data. -

Exports can be added and edited under - Sysadmin | View/Edit Exports. -

Selecting an export on the - Sysadmin | View/Edit Exports | Add a new export page will - show more information on that specific export, including available - options, setup and usage. -

Exports are activated by associating them with one or more service - definitions: Sysadmin | View/Edit Service definitions. - - - diff --git a/httemplate/docs/ieak.html b/httemplate/docs/ieak.html deleted file mode 100644 index 00c53423c..000000000 --- a/httemplate/docs/ieak.html +++ /dev/null @@ -1,75 +0,0 @@ -

-this is incomplete
-mostly it should be merged into signup.html and fs_signup/ieak.template
-
-- download and install the IEAK from
-  http://www.microsoft.com/windows/ieak/default.asp
-
-- Good examples may be found in 
-  C:\Program Files\IEAK\toolkit\isp\server\ICW\signup\perl\signup08.pl
-  C:\Program Files\IEAK\toolkit\isp\server\ICW\reconfig\perl\reconfig04.pl
-  C:\Program Files\IEAK6\toolkit\isp\servless\basic\sample.ins
-  C:\Program Files\IEAK6\toolkit\isp\servless\advanced\4567.ins
-  C:\Program Files\IEAK6\toolkit\isp\servless\advanced\4568.ins
-  C:\Program Files\IEAK6\toolkit\isp\servless\advanced\7890.ins
-  C:\Program Files\IEAK6\toolkit\isp\servless\advanced\7891.ins
-
-- Full documentation on all the settings available in .INS files is
-  avaialble under Program Files | Microsoft IEAK 6 | IEAK Help 
-                  | Reference | Internet Settings (.ins) Files
-
-- Freeside will make the following substitutions before sending the file
-  to the user:
-
-  { $ac }         - area code of selected POP
-  { $exch }       - exchange of selected POP
-  { $loc }        - local part of selected POP
-  { $username }
-  { $password }
-  { $email_name } - first and last name
-  { $pkg }        - package name
-
-- Simple example follows:
-
-[Entry]
-Entry Name = IEAK Sample
-[Phone]
-Dial_As_Is = No
-Phone_Number = { $exch }{ $loc }
-Area_Code = { $ac }
-Country_Code = 1
-Country_Id = 1
-[Server]
-Type = PPP
-SW_Compress = Yes
-PW_Encrypt = Yes
-Negotiate_TCP/IP = Yes
-Disable_LCP = No
-[TCP/IP]
-Specity_IP_Address = No
-Specity_Server_Address = No
-IP_Header_Compress = Yes
-Gateway_On_Remote = Yes
-[User]
-Name = { $username }
-Passowrd = { $password }
-Display_Password = Yes
-[Internet_Mail]
-Email_Name = { $email_name }
-Email_Address = { $username }@example.com
-POP_Server = mail.example.com
-POP_Server_Port_Number = 110
-POP_Logon_Password = { $password }
-SMTP_Server = mail.example.com
-SMTP_Server_Port_Number = 25
-Install_Mail = 1
-[URL]
-Help_Page = http://www.ieaksample.net/helpdesk
-Home_Page = http://www.ieaksample.net
-Search_Page = http://www.ieaksample,net/search
-[Favorites]
-IEAK Sample \\ IEAK Sample Home Page.url = http://acme.ieaksample.net/
-[Branding]
-Window_Title = Internet Explorer from Acme Internet Services
-
-
diff --git a/httemplate/docs/index.html b/httemplate/docs/index.html deleted file mode 100644 index 7254d76f3..000000000 --- a/httemplate/docs/index.html +++ /dev/null @@ -1,36 +0,0 @@ - - Freeside Documentation - - -

Freeside Documentation

- -

Installation and upgrades

- -

Configuration and setup

- -

Developer

- - diff --git a/httemplate/docs/install-rt.html b/httemplate/docs/install-rt.html deleted file mode 100644 index da0941a09..000000000 --- a/httemplate/docs/install-rt.html +++ /dev/null @@ -1,78 +0,0 @@ - - Installing integrated RT ticketing - - -

Installing integrated RT ticketing

- -

Integrated ticketing is an new feature and these instructions are preliminary. Documentation contributions are welcome. - -

There is also support for running this integration against an external RT installation, but it is not (yet) documented. - -

Perl minimum version 5.8.3 is required. HTML::Mason is required. - -

Install the following perl modules: -

- -

Create a new Unix group called 'rt' - -

Edit the top-level Makefile, set RT_ENABLED to 1 and set the RT_DOMAIN, RT_TIMEZONE, and FREESIDE_URL variables. - -

make configure-rt
-make create-rt
-make install-rt
-
- -

Add the following to your httpd.conf: -

-# replace /var/www/freeside with your freeside document root
-<DirectoryMatch "^/var/www/freeside/rt/.*NoAuth">
-<Limit GET POST>
-allow from all
-Satisfy any   
-SetHandler perl-script
-PerlHandler HTML::Mason
-</Limit>
-</DirectoryMatch>
-# replace /var/www/freeside with your freeside document root
-<DirectoryMatch "^/var/www/freeside/rt/.*NoAuth/images">
-SetHandler None
-</DirectoryMatch>
-# replace /var/www/freeside with your freeside document root
-<Directory /var/www/freeside/rt/Ticket/Attachment> 
-SetHandler perl-script 
-PerlHandler HTML::Mason 
-</Directory>
-
- -

Set the ticket_system configuration value to RT_Internal. You may also wish to set ticket_system-default_queueid once you have RT configured. - -

Bootstrap RT's permissions: -

    -
  • Click on "Ticketing Main" on the Freeside main menu to auto-create an RT login for your username -
  • Run freeside-adduser -h /usr/local/etc/freeside/htpasswd root and set a (temporary) password -
  • Log into your Freeside installation as the "root" user you just created, by closing your browser or using https://root@yourmachone/freeside/ syntax. -
  • Click on "Ticketing Main" on the Freeside main menu. Click on "Configuration", then "Global", and then "User Rights". Grant the "SuperUser" right to your RT login. -
  • Remove the temporary "root" user from /usr/local/etc/freeside/mapsecrets and /usr/local/etc/freeside/htpasswd -
- -

Follow the regular RT documentation to configure RT, setup the mailgate, etc. - - diff --git a/httemplate/docs/install.html b/httemplate/docs/install.html deleted file mode 100644 index 1f80db1a7..000000000 --- a/httemplate/docs/install.html +++ /dev/null @@ -1,214 +0,0 @@ - - Installation - - -

Installation

-Note: Install Freeside on a firewalled, private server, not a public (web, RADIUS, etc.) server.

-Before installing, you need: - -Install the Freeside distribution: -
    -
  • Add the user and group `freeside' to your system. -
  • Allow the freeside user full access to the freeside database. -
      -
    • with PostgreSQL: -
      -$ su postgres (pgsql on some distributions)
      -$ createuser -P freeside
      -Enter password for user "freeside": 
      -Enter it again: 
      -Shall the new user be allowed to create databases? (y/n) y
      -Shall the new user be allowed to create more new users? (y/n) n
      -CREATE USER
      -
    • with MySQL: -
      -$ mysqladmin -u root password 'set_a_root_database_password'
      -$ mysql -u root -p
      -mysql> GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE,DROP on freeside.* TO freeside@localhost IDENTIFIED BY 'set_a_freeside_database_password';
      -
    - -
  • Edit the top-level Makefile: -
      -
    • Set DATASOURCE to your DBI data source, for example, DBI:Pg:dbname=freeside for PostgresSQL or DBI:mysql:freeside for MySQL. See the DBI manpage and the manpage for your DBD for the exact syntax of your DBI data source. -
    • Set DB_PASSWORD to the freeside database user's password. -
    -
  • Add the freeside database to your database engine: -
      -
    • with Postgres: -
      -$ su freeside
      -$ createdb -E sql_ascii freeside
      -
    • with MySQL: -
      -$ mysqladmin -u freeside -p create freeside 
      -
    -
  • Build and install the Perl modules: -
    -$ make perl-modules
    -$ su
    -# make install-perl-modules
    -
  • Create the necessary configuration files:
    -$ su
    -# make create-config
    -
    -
  • Run a separate iteration of Apache[-SSL] with mod_perl enabled as the freeside user. -
  • Edit the Makefile and set TEMPLATE to asp or mason. Also set FREESIDE_DOCUMENT_ROOT. -
  • Run make install-docs. -
- - - - - - - - - - - -
Mason (recommended)Apache::ASP (deprecated)
    -
  • Configure Apache: -
    -PerlModule HTML::Mason
    -# your freeside docuemnt root
    -<Directory /var/www/freeside>
    -<Files ~ (\.cgi|\.html)>
    -AddHandler perl-script .cgi .html
    -PerlHandler HTML::Mason
    -</Files>
    -<Perl>
    -require "/usr/local/etc/freeside/handler.pl";
    -</Perl>
    -</Directory>
    -
    -
    -
  • Configure Apache: -
    -PerlModule Apache::ASP
    -# your freeside document root
    -<Directory /var/www/freeside>
    -<Files ~ (\.cgi|\.html)>
    -AddHandler perl-script .cgi .html
    -PerlHandler Apache::ASP
    -</Files>
    -<Perl>
    -$MLDBM::RemoveTaint = 1;
    -</Perl>
    -PerlSetVar Global /usr/local/etc/freeside/asp-global/
    -PerlSetVar Debug 2
    -PerlSetVar RequestBinaryRead Off
    -# your freeside document root
    -PerlSetVar IncludesDir /var/www/freeside
    -</Directory>
    -
    -
-
    -
  • Restrict access to this web interface - see the Apache documentation on user authentication. For example, to configure user authentication with mod_auth (flat files), add something like the following to your Apache httpd.conf file, adjusting for your actual paths: -
    -#your freeside document root
    -<Directory /var/www/freeside>
    -AuthName Freeside
    -AuthType Basic
    -AuthUserFile /usr/local/etc/freeside/htpasswd
    -require valid-user
    -</Directory>
    -
    -
  • Create one or more Freeside users (your internal sales/tech folks, not customer accounts). These users are setup using using Apache authentication, not UNIX user accounts. For example, using mod_auth (flat files): -
      -
    • First user: -
      $ su
      -# freeside-adduser -c -h /usr/local/etc/freeside/htpasswd username
      -
    • Additional users: -
      $ su
      -# freeside-adduser -h /usr/local/etc/freeside/htpasswd username
      -
    - (using other auth types, add each user to your Apache authentication and then run: freeside-adduser username) -
  • Create the Freeside system users: -
    $ su
    -# freeside-adduser fs_queue
    -# freeside-adduser fs_selfservice
    -
  • As the freeside UNIX user, run freeside-setup username to create the database tables, passing the username of a Freeside user you created above: -
    -$ su freeside
    -$ freeside-setup username
    -
    - Alternately, use the -s option to enable shipping addresses: freeside-setup -s username -
  • As the freeside UNIX user, run bin/populate-msgcat username (in the untar'ed freeside directory) to populate the message catalog, passing the username of a Freeside user you created above: -
    -$ su freeside
    -$ cd /path/to/freeside/
    -$ bin/populate-msgcat username
    -
    -
  • freeside-queued was installed with the Perl modules. Start it now and ensure that is run upon system startup (Do this manually, or edit the top-level Makefile, replacing INIT_FILE with the appropriate location on your systemand QUEUED_USER with the username of a Freeside user you created above, and run make install-init) -
  • Now proceed to the initial administration of your installation. -
- diff --git a/httemplate/docs/legacy.html b/httemplate/docs/legacy.html deleted file mode 100755 index 94efe53af..000000000 --- a/httemplate/docs/legacy.html +++ /dev/null @@ -1,39 +0,0 @@ - - Importing legacy data - - -

Importing legacy data

-In almost all cases, legacy data import will require writing custom code to deal with your particular legacy data. The example scripts here will probably not work "out-of-the-box", and are provided as a starting point only. -

Some import scripts may require installation of the Array-PrintCols and Term-Query (make test broken; install manually) modules.
-
    -
  • bin/bind.import - Import domain information from BIND named -
  • bin/passwd.import - Just import `passwd' and `shadow' or `master.passwd', no RADIUS import. -
  • bin/svc_acct.import - Import `passwd', ( `shadow' or `master.passwd' ) and RADIUS `users'. Before running bin/svc_acct.import, you need services (with table svc_acct) as follows: -
      -
    • Most accounts probably have entries in passwd and users (with Port-Limit nonexistant or 1) -
    • Some accounts have entries in passwd and users, but with Port-Limit 2 (or more) -
    • Some accounts might have entries in users only (Port-Limit 1) -
    • Some accounts might have entries in users only (Port-Limit >= 2) -
    • POP mail accounts have entries in passwd only, and have a particular shell. -
    • Everything else in passwd is a shell account. -
    - -
  • Importing customer data -
      -
    • Manually -
        -
      • Add a new customer -
      • Add one or more packages for this customer -
      • Enter a package by clicking on the package number -
      • Pick the `Link to existing' option -
      -
    • Batch - You will need to write a script to import your particular legacy data. You can use eg/TEMPLATE_cust_main.import as a starting point. -
    -
- - diff --git a/httemplate/docs/man/FS/part_export/.cvs_is_on_crack b/httemplate/docs/man/FS/part_export/.cvs_is_on_crack deleted file mode 100644 index e69de29bb..000000000 diff --git a/httemplate/docs/overview-new.dia b/httemplate/docs/overview-new.dia deleted file mode 100644 index d9989a359..000000000 Binary files a/httemplate/docs/overview-new.dia and /dev/null differ diff --git a/httemplate/docs/overview-new.png b/httemplate/docs/overview-new.png deleted file mode 100644 index bf815463b..000000000 Binary files a/httemplate/docs/overview-new.png and /dev/null differ diff --git a/httemplate/docs/overview.dia b/httemplate/docs/overview.dia deleted file mode 100644 index a0e34c30e..000000000 Binary files a/httemplate/docs/overview.dia and /dev/null differ diff --git a/httemplate/docs/overview.png b/httemplate/docs/overview.png deleted file mode 100644 index bf2dbc26c..000000000 Binary files a/httemplate/docs/overview.png and /dev/null differ diff --git a/httemplate/docs/passwd.html b/httemplate/docs/passwd.html deleted file mode 100755 index fc1dde956..000000000 --- a/httemplate/docs/passwd.html +++ /dev/null @@ -1,23 +0,0 @@ - - fs_passwd - - -

fs_passwd

-You may use fs_passwd/fs_passwd as a "passwd", "chfn" and "chsh" replacement on your shell machine(s) to cause password, gecos and shell changes to update your freeside machine. You can also use the fs_passwd/fs_passwd.html and fs_passwd/fs_passwd.cgi to run a public password change CGI on a public web server. This can pose a security risk if not configured correctly. Do not use this feature unless you understand what you are doing! -

Currently it is assumed that the the crypt(3) function in the C library is the same on the Freeside machine as on the target machine. -
    -
  • Create a freeside account on the shell or web machine(s). -
  • Setup SSH keys: -
      -
    • As the freeside user (on your freeside machine), generate an authentication key using ssh-keygen. Since this is for unattended operation, use a blank passphrase. -
    • Append the newly-created identity.pub file to ~freeside -/.ssh/authorized_keys on the shell or web machine(s). -
    • Some new SSH v2 implementation accept v2 style keys only. Use the -t option to ssh-keygen, and append the created id_dsa.pub or id_rsa.pub to ~freeside/.ssh/authorized_keys2 on the remote machine(s). -
    -
  • Copy fs_passwd/fs_passwdd to /usr/local/sbin on the shell or web machine(s). (chown freeside, chmod 500) -
  • Create /usr/local/freeside on the shell or web machine(s). (chown freeside, chmod 700) -
  • Run an iteration of "fs_passwd/fs_passwd_server user shell.machine" as the freeside user for each shell or web machine (this is a daemon process). user refers to a freeside user added by freeside-adduser. -
  • Copy fs_passwd/fs_passwd to /usr/local/bin on the shell machine(s). (chown freeside, chmod 4755). You may link it to passwd, chfn and chsh as well. -
  • Copy fs_passwd/fs_passwd.cgi to the cgi-bin directory on your web machine(s). Use suEXEC or suidperl to run fs_passwd.cgi as the freeside user. -
- diff --git a/httemplate/docs/schema.dia b/httemplate/docs/schema.dia deleted file mode 100644 index e00f59ce1..000000000 Binary files a/httemplate/docs/schema.dia and /dev/null differ diff --git a/httemplate/docs/schema.html b/httemplate/docs/schema.html deleted file mode 100644 index cdb59a2e9..000000000 --- a/httemplate/docs/schema.html +++ /dev/null @@ -1,523 +0,0 @@ - - Schema reference - - -

Schema reference

- Schema diagram (1.4.1): as a giant .png or dia source (dia homepage). -
    -
  • agent - Agents are resellers of your service. Agents may be limited to a subset of your full offerings (via their agent type). -
      -
    • agentnum - primary key -
    • agent - name of this agent -
    • typenum - agent type -
    • prog - (unimplemented) -
    • freq - (unimplemented) -
    • disabled - Disabled flag, empty or 'Y' -
    • username - Username for the Agent interface -
    • _password - Password for the Agent interface -
    -
  • agent_type - Agent types define groups of packages that you can then assign to particular agents. -
      -
    • typenum - primary key -
    • atype - name of this agent type -
    -
  • cust_bill - Invoices. Declarations that a customer owes you money. The specific charges are itemized in cust_bill_pkg. -
      -
    • billpkgnum - primary_key -
    • invnum - primary key -
    • custnum - customer -
    • _date -
    • charged - amount of this invoice -
    • printed - how many times this invoice has been printed automatically -
    • closed - books closed flag, empty or `Y' -
    -
  • cust_bill_event - Invoice event history - -
  • part_bill_event - Invoice event definitions -
      -
    • eventpart - primary key -
    • payby - CARD, DCRD, CHEK, DCHK, LECB, BILL, or COMP -
    • event - event name -
    • eventcode - event action -
    • seconds - how long after the invoice date (cust_bill._date) events of this type are triggered -
    • weight - ordering for events with identical seconds -
    • plan - eventcode plan -
    • plandata - additional plan data -
    • disabled - Disabled flag, empty or `Y' -
    • taxclass - Texas tax class flag, empty or "none", "access", or "hosting" -
    -
  • cust_bill_pkg - Invoice line items -
      -
    • invnum - (multiple) key -
    • pkgnum - package or 0 for the special virtual sales tax package -
    • setup - setup fee -
    • recur - recurring fee -
    • sdate - starting date -
    • edate - ending date -
    • itemdesc - Line item description (currently used only when pkgnum is 0) -
    -
  • cust_bill_pkg_detail - Invoice line items detail -
      -
    • detailnum - primary key -
    • pkgnum - -
    • invnum - -
    • detail - Detail description -
    -
  • cust_credit - Credits. The equivalent of a negative cust_bill record. -
      -
    • crednum - primary key -
    • custnum - customer -
    • amount - amount credited -
    • _date -
    • otaker - order taker -
    • reason -
    • closed - books closed flag, empty or `Y' -
    -
  • cust_credit_bill - Credit invoice application. Links a credit to an invoice. -
      -
    • creditbillnum - primary key -
    • crednum - credit being applied -
    • invnum - invoice to which credit is applied -
    • amount - amount applied -
    • _date -
    -
  • cust_credit_bill - Refund payment application. Links a refund to a payment. -
      -
    • payrefundnum - primary key -
    • paynum - payment -
    • refundnum - refund -
    • amount - amount applied -
    • _date -
    -
  • cust_main - Customers -
      -
    • custnum - primary key -
    • agentnum - agent -
    • refnum - referral -
    • first - name -
    • last - name -
    • ss - social security number -
    • company -
    • address1 -
    • address2 -
    • city -
    • county -
    • state -
    • zip -
    • country -
    • daytime - phone -
    • night - phone -
    • fax - phone -
    • ship_first -
    • ship_last -
    • ship_company -
    • ship_address1 -
    • ship_address2 -
    • ship_city -
    • ship_county -
    • ship_state -
    • ship_zip -
    • ship_country -
    • ship_daytime -
    • ship_night -
    • ship_fax -
    • payby - CARD, DCHK, CHEK, DCHK, LECB, BILL, or COMP -
    • payinfo - card number, P.O.#, or comp issuer -
    • paycvv - Card Verification Value, "CVV2" (also known as CVC2 or CID), the 3 or 4 digit number on the back (or front, for American Express) of the credit card -
    • paydate - expiration date -
    • payname - billing name (name on card) -
    • tax - tax exempt, Y or null -
    • otaker - order taker -
    • referral_custnum -
    • comments -
    - (columns in italics are optional) -
  • cust_main_invoice - Invoice destinations for email invoices. Note that a customer can have many email destinations for their invoice (either literal or via svcnum), but only one postal destination. -
      -
    • destnum - primary key -
    • custnum - customer -
    • dest - Invoice destination. Freeside supports three types of invoice delivery: send directly to a service defined in Freeside, send to an arbitrary email address, or print the invoice to a printer and have someone send it out via snail mail. Freeside determines which method to use based on the contents of the dest field. If the contents are numeric, a svcnum pointing to a valid service is expected in the field. If the contents are a string, a literal email address is expected to be in the field. If the special keyword `POST' is present, the snail mail method is used (which is the default if no cust_main_invoice records exist). Snail mail invoices get their address information from cust_main and are printed with the printer defined in the configuration files. -
    -
  • cust_main_county - Tax rates -
      -
    • taxnum - primary key -
    • state -
    • county -
    • country -
    • tax - % rate -
    • taxclass -
    • exempt_amount -
    • taxname - if defined, printed on invoices instead of "Tax" -
    • setuptax - if 'Y', this tax does not apply to setup fees -
    • recurtax - if 'Y', this tax does not apply to recurring fees -
    -
  • cust_tax_exempt - Tax exemption record -
      -
    • exemptnum - primary key -
    • taxnum - tax rate -
    • year -
    • month -
    • amount -
    -
  • cust_pay - Payments. Money being transferred from a customer. -
      -
    • paynum - primary key -
    • custnum - customer -
    • paid - amount -
    • _date -
    • payby - CARD, CHEK, LECB, BILL, or COMP -
    • payinfo - card number, P.O.#, or comp issuer -
    • paybatch - text field for tracking card processor batches -
    • closed - books closed flag, empty or `Y' -
    -
  • cust_pay_void - Voided payments. -
      -
    • paynum - primary key -
    • custnum - customer -
    • paid - amount -
    • _date -
    • payby - CARD, CHEK, LECB, BILL, or COMP -
    • payinfo - card number, P.O.#, or comp issuer -
    • paybatch - text field for tracking card processor batches -
    • closed - books closed flag, empty or `Y' -
    • void_date -
    • reason -
    • otaker - order taker -
    -
  • cust_bill_pay - Applicaton of a payment to a specific invoice. -
      -
    • billpaynum -
    • invnum - invoice -
    • paynum - payment -
    • amount -
    • _date -
    -
  • cust_pay_batch - Pending batch -
      -
    • paybatchnum -
    • cardnum -
    • exp - card expiration -
    • amount -
    • invnum - invoice -
    • custnum - customer -
    • payname - name on card -
    • first - name -
    • last - name -
    • address1 -
    • address2 -
    • city -
    • state -
    • zip -
    • country -
    -
  • cust_pkg - Customer billing items -
      -
    • pkgnum - primary key -
    • custnum - customer -
    • pkgpart - Package definition -
    • setup - date -
    • bill - next bill date -
    • last_bill - last bill date -
    • susp - (past) suspension date -
    • expire - (future) cancellation date -
    • cancel - (past) cancellation date -
    • otaker - order taker -
    • manual_flag - If this field is set to 1, disables the automatic unsuspensiond of this package when using the unsuspendauto config file. -
    -
  • cust_refund - Refunds. The transfer of money to a customer; equivalent to a negative cust_pay record. -
      -
    • refundnum - primary key -
    • custnum - customer -
    • refund - amount -
    • _date -
    • payby - CARD, CHEK, LECB, BILL or COMP -
    • payinfo - card number, P.O.#, or comp issuer -
    • otaker - order taker -
    • closed - books closed flag, empty or `Y' -
    -
  • cust_credit_refund - Applicaton of a refund to a specific credit. -
      -
    • creditrefundnum - primary key -
    • crednum - credit -
    • refundnum - refund -
    • amount -
    • _date -
    -
  • cust_svc - Customer services - -
  • nas - Network Access Server (terminal server) -
      -
    • nasnum - primary key -
    • nas - NAS name -
    • nasip - NAS ip address -
    • nasfqdn - NAS fully-qualified domain name -
    • last - timestamp indicating the last instant the NAS was in a known state (used by the session monitoring). -
    -
  • part_pkg - Package definitions -
      -
    • pkgpart - primary key -
    • pkg - package name -
    • comment - non-customer visable package comment -
    • promo_code - promotional code -
    • deprecated setup - setup fee expression -
    • freq - recurring frequency (months) -
    • deprecated recur - recurring fee expression -
    • setuptax - Setup fee tax exempt flag, empty or `Y' -
    • recurtax - Recurring fee tax exempt flag, empty or `Y' -
    • plan - price plan -
    • deprecated plandata - additional price plan data -
    • disabled - Disabled flag, empty or `Y' -
    -
  • part_pkg_option - Package definition options -
      -
    • optionnum - primary key -
    • pkgpart - Package definition -
    • optionname - option name -
    • optionvalue - option value -
    -
  • reg_code - One-time registration codes -
      -
    • codenum - primary key -
    • code -
    • agentnum - Agent -
    -
  • reg_code_pkg - Registration code link to package definitions - -
  • part_referral - Referral listing -
      -
    • refnum - primary key -
    • referral - referral -
    -
  • part_svc - Service definitions -
      -
    • svcpart - primary key -
    • svc - name of this service -
    • svcdb - table used for this service: svc_acct, svc_forward, svc_domain, svc_charge or svc_wo -
    • disabled - Disabled flag, empty or `Y' - -
    -
  • part_svc_column -
      -
    • columnnum - primary key -
    • svcpart - Service definition -
    • columnname - column name in part_svc.svcdb table -
    • columnvalue - default or fixed value for the column -
    • columnflag - null, D or F -
    -
  • pkg_svc -
      -
    • pkgsvcnum - primary key -
    • pkgpart - Package definition -
    • svcpart - Service definition -
    • quantity - quantity of this service that this package includes -
    • primary_svc - blank or Y: primary service -
    -
  • export_svc - -
  • part_export - Export to external provisioning -
      -
    • exportnum - primary key -
    • machine - Machine name -
    • exporttype - Export type -
    • nodomain - blank or Y: usernames are exported to this service with no domain -
    -
  • part_export_option - provisioning options -
      -
    • optionnum - primary key -
    • exportnum - Export -
    • optionname - option name -
    • optionvalue - option value -
    -
  • port - individual port on a nas -
      -
    • portnum - primary key -
    • ip - IP address of this port -
    • nasport - port number on the NAS -
    • nasnum - NAS -
    -
  • prepay_credit - prepaid cards -
      -
    • prepaynum - primary key -
    • identifier - text or numeric string of prepaid card -
    • amount - amount of prepayment -
    • seconds - prepaid time instead of (or in addition to) monetary value -
    • agentnum - optional agent assignment for prepaid cards -
    -
  • session -
      -
    • sessionnum - primary key -
    • portnum - Port -
    • svcnum - Account -
    • login - timestamp indicating the beginning of this user session. -
    • logout - timestamp indicating the end of this user session. May be null, which indicates a currently open session. -
    - -
  • svc_acct - Accounts -
      -
    • svcnum - primary key -
    • username -
    • _password -
    • sec_phrase - security phrase -
    • popnum - Point of Presence -
    • uid -
    • gid -
    • finger - GECOS -
    • dir -
    • shell -
    • quota - (unimplementd) -
    • slipip - IP address -
    • seconds -
    • domsvc -
    • radius_Radius_Reply_Attribute - Radius-Reply-Attribute -
    • rc_Radius_Check_Attribute - Radius-Check-Attribute -
    -
  • svc_acct_pop - Points of Presence -
      -
    • popnum - primary key -
    • city -
    • state -
    • ac - area code -
    • exch - exchange -
    • loc - rest of number -
    -
  • part_pop_local - Local calling areas -
      -
    • localnum - primary key -
    • popnum - primary key -
    • city -
    • state -
    • npa - area code -
    • nxx - exchange -
    -
  • svc_domain - Domains - -
  • svc_forward - Mail forwarding aliases - -
  • domain_record - Domain zone detail -
      -
    • recnum - primary key -
    • svcnum - Domain (by svcnum) -
    • reczone - zone for this line -
    • recaf - address family, usually IN -
    • rectype - type for this record (A, MX, etc.) -
    • recdata - data for this record -
    -
  • svc_www - -
  • type_pkgs - -
  • queue - job queue -
      -
    • jobnum - primary key -
    • job -
    • _date -
    • status -
    • statustext -
    • svcnum -
    -
  • queue_arg - job arguments -
      -
    • argnum - primary key -
    • jobnum - job -
    • arg - argument -
    -
  • queue_depend - job dependancies -
      -
    • dependnum - primary key -
    • jobnum - source jobnum -
    • depend_jobnum - dependancy jobnum -
    -
  • radius_usergroup - Link users to RADIUS groups. -
      -
    • usergroupnum - primary key -
    • svcnum - account -
    • groupname -
    -
  • rate - Call rate plans -
      -
    • ratenum - primary key -
    • ratename -
    -
  • rate_detail - Call rate detail -
      -
    • ratedetailnum - primary key -
    • ratenum - rate plan -
    • orig_regionnum - call origination region -
    • dest_regionnum - call destination region -
    • min_included - included minutes -
    • min_charge - charge per minute -
    • sec_granularity - granularity in seconds, i.e. 6 or 60 -
    -
  • rate_region - Call rate region -
      -
    • regionnum - primary key -
    • regionname -
    -
  • rate_prefix - Call rate prefix -
      -
    • prefixnum - primary key -
    • regionnum - rate region -
    • countrycode -
    • npa -
    • nxx -
    -
  • msgcat - i18n message catalog -
      -
    • msgnum - primary key -
    • msgcode - message code -
    • locale - locale -
    • msg - Message text -
    -
  • clientapi_session - ClientAPI session store -
      -
    • sessionnum - primary key -
    • sessionid - session ID -
    • namespace - session namespace -
    -
  • clientapi_session_field - Client API session store data -
      -
    • fieldnum - primary key -
    • sessionnum - session -
    • fieldname -
    • fieldvalue -
    -
- diff --git a/httemplate/docs/schema.png b/httemplate/docs/schema.png deleted file mode 100644 index d0392e76f..000000000 Binary files a/httemplate/docs/schema.png and /dev/null differ diff --git a/httemplate/docs/selfservice.html b/httemplate/docs/selfservice.html deleted file mode 100644 index 9dc8f2a5e..000000000 --- a/httemplate/docs/selfservice.html +++ /dev/null @@ -1,78 +0,0 @@ - - Signup, self-service and reseller interfaces - - -

Signup, self-service and reseller interfaces

-For security reasons, the self-service interface should run on a public -machine, not the backend Freeside server. On the public machine, install: - -Then: -
    -
  • Set the signup_server-default_agentnum configuration value to a default agent number. -
  • Set the signup_server-default_refnum configuration value to a default advertising source. -
  • Set the signup_server-payby configuration value to the acceptable payment types for signups. -
  • Set the signup_server-realtime configuration value to run billing for signups immediately. -
  • Add the user `freeside' to the the external machine. -
  • Copy or symlink the fs_selfservice/FS-SelfService/cgi/ directory into the web server's document space. Optionally, customize the .html templates. "Entry points" (useful places to link to) are: -
      -
    • signup.cgi - Signup -
    • selfservice.cgi - Customer self-service -
    • agent.cgi - Reseller interface -
    • passwd.cgi - Simple password-changing interface -
    • promocode.html - Promotional code pre-signup -
    • regcode.html - Registration code pre-signup -
    • stateselect.html - State selection pre-signup -
    -
  • Enable CGI execution for files with the `.cgi' extension. (with Apache), for example:
    -#directory where selfservice .cgi scripts and .html templates are located
    -<Directory /var/www/selfservice>
    -AddHandler cgi-script .cgi
    -Options +ExecCGI
    -</Directory>
    -
  • Create the /usr/local/freeside directory on the external machine (owned by the freeside user). -
  • touch /usr/local/freeside/selfservice_socket; chown freeside /usr/local/freeside/selfservice_socket; chmod 600 /usr/local/freeside/selfservice_socket -
  • Use suEXEC or setuid to run signup.cgi, selfservice.cgi, agent.cgi and passwd.cgi as the freeside user. Do not run your public web server as the freeside user! -
  • Append the identity.pub from the freeside user on your freeside machine to the authorized_keys file of the newly created freeside user on the external machine(s). -
  • Run an instance of
    freeside-selfservice-server user machine
    on the Freeside machine for each external machine. -
      -
    • user is a user from the mapsecrets file. -
    • machine is the name of the external machine. - - -
    -
-Optional: -
    -
  • You can install the files in the fs_selfservice/FS-SelfService/cgi/ directory multiple places in your web server's document space, and customize the .html templates differently for each. You can set the agentnum used for each signup by editing signup.html and including a hidden field with the agentnum: -
    -  <INPUT TYPE="hidden" NAME="agentnum" VALUE="3">
    -
  • When linking to signup.cgi, you can include a referring custnum in the URL as follows: http://public.web.server/path/signup.cgi?ref=1542 -
  • If you create a /usr/local/freeside/ieak.template file on the external machine, it will be sent to IE users with MIME type application/x-Internet-signup. This file will be processed with Text::Template with the variables listed below available. - (an example file is included as fs_selfservice/FS-SelfService/ieak.template) See the section on internet settings files in the IEAK documentation for more information. - -
  • Variable substitutions available in ieak.template and success.html: -
      -
    • $ac - area code of selected POP -
    • $exch - exchange of selected POP -
    • $loc - local part of selected POP -
    • $username -
    • $password -
    • $email_name - first and last name -
    • $pkg - package name -
    - - -
- diff --git a/httemplate/docs/session.html b/httemplate/docs/session.html deleted file mode 100644 index 72e16424e..000000000 --- a/httemplate/docs/session.html +++ /dev/null @@ -1,59 +0,0 @@ - - Session monitor - - -

Session monitor

-

Installation

-For security reasons, the client portion of the session montior may run on one -or more external public machine(s). On these machines, install: -
    -
  • Perl (at l -east 5.004_05 for the 5.004 series or 5.005_03 for the 5.005 series. Don't enable experimental features like threads or the PerlIO abstraction layer.) -
  • FS::SessionClient (copy the fs_session/FS-SessionClient directory to the external machine, then: perl Makefile.PL; make; make install) -
-Then: -
    -
  • Add the user `freeside' to the the external machine. -
  • Create the /usr/local/freeside directory on the external machine (owned by the freeside user). -
  • touch /usr/local/freeside/fs_sessiond_socket; chown freeside /usr/local/freeside/fs_sessiond_socket; chmod 600 /usr/local/freeside/fs_sessiond_socket -
  • Append the identity.pub from the freeside user on your freeside machine to the authorized_keys file of the newly created freeside user on the external machine(s). -
  • Run
    fs_session_server user machine
    on the Freeside machine. -
      -
    • user is a user from the mapsecrets file. -
    • machine is the name of the external machine. -
    -
-

Usage

-
    -
  • Web -
      -
    • Copy FS-SessionClient/cgi/login.cgi and logout.cgi to your web - server's document space. -
    • Use suEXEC or setuid (see install.html for details) to run login.cgi and logout.cgi as the freeside user. -
    -
  • Command-line -
    freeside-login username ( portnum | ip | nasnum nasport )
    -freeside-logout username ( portnum | ip | nasnum nasport )
    -
      -
    • username is a customer username from the svc_acct table -
    • portnum, ip or nasport and nasnum uniquely identify a port in the port database table. -
    -
  • RADIUS - One of: -
      -
    • Run the freeside-sqlradius-radacctd daemon to import radacct - records from all configured sqlradius exports: - freeside-sqlradius-radacctd username -
    • Configure your RADIUS server's login and logout callbacks to use the command-line freeside-login and freeside-logout utilites. -
    • (incomplete)Use the fs_radlog/fs_radlogd tool to - import records from a text radacct file. -
    -
-

Callbacks

-
    -
  • Sesstion start - The command(s) specified in the session-start configuration file are executed on the Freeside machine. The contents of the file are treated as a double-quoted perl string, with the following variables available: $ip, $nasip and $nasfqdn, which are the IP address of the starting session, and the IP address and fully-qualified domain name of the NAS this session is on. -
  • Session end - The command(s) specified in the session-stop configuration file are executed on the Freeside machine. The contents of the file are treated as a double-quoted perl string, with the following variables available: $ip, $nasip and $nasfqdn, which are the IP address of the starting session, and the IP address and fully-qualified domain name of the NAS this session is on. -
-

Dropping expired users

-Run
bin/freeside-session-kill username
periodically from cron. - - diff --git a/httemplate/docs/signup.html b/httemplate/docs/signup.html deleted file mode 100644 index 97d7aa794..000000000 --- a/httemplate/docs/signup.html +++ /dev/null @@ -1,54 +0,0 @@ - - Signup server - - -

Signup server

-For security reasons, the signup server should run on an external public -webserver. On this machine, install: - -Then: -
    -
  • Add the user `freeside' to the the external machine. -
  • Copy or symlink fs_signup/FS-SignupClient/cgi/signup.cgi into the web server's document space. -
  • When linking to signup.cgi, you can include a referring custnum in the URL as follows: http://public.web.server/path/signup.cgi?ref=1542 -
  • Enable CGI execution for files with the `.cgi' extension. (with Apache) -
  • Create the /usr/local/freeside directory on the external machine (owned by the freeside user). -
  • touch /usr/local/freeside/fs_signupd_socket; chown freeside /usr/local/freeside/fs_signupd_socket; chmod 600 /usr/local/freeside/fs_signupd_socket -
  • Use suEXEC or setuid (see install.html for details) to run signup.cgi as the freeside user. -
  • Append the identity.pub from the freeside user on your freeside machine to the authorized_keys file of the newly created freeside user on the external machine(s). -
  • Run
    fs_signup_server user machine agentnum refnum
    on the Freeside machine. -
      -
    • user is a user from the mapsecrets file. -
    • machine is the name of the external machine. -
    • agentnum and refnum are the agent and referral, respectively, to use for customers who sign up via this signup server. -
    -
-Optional: -
    -
  • If you create a /usr/local/freeside/ieak.template file on the external machine, it will be sent to IE users with MIME type application/x-Internet-signup. This file will be processed with Text::Template with the variables listed below available. - (an example file is included as fs_signup/ieak.template) See the section on internet settings files in the IEAK documentation for more information. -
  • If you create a /usr/local/freeside/success.html file on the external machine, it will be used as the success HTML page. Although template substiutions are available, a regular HTML file will work fine here, unlike signup.html. An example file is included as fs_signup/FS-SignupClient/cgi/success.html -
  • Variable substitutions available in ieak.template, cck.template and success.html: -
      -
    • $ac - area code of selected POP -
    • $exch - exchange of selected POP -
    • $loc - local part of selected POP -
    • $username -
    • $password -
    • $email_name - first and last name -
    • $pkg - package name -
    -
  • If you create a /usr/local/freeside/signup.html file on the external machine, it will be used as a template for the form HTML. This requires the template to be constructed appropriately; probably best to start with the example file included as fs_signup/FS-SignupClient/cgi/signup.html. -
  • If there are any entries in the prepay_credit table, a user can enter a string matching the identifier column to receive the credit specified in the amount column, and/or the time specified in the seconds column (for use with the session monitor), after which that identifier is no longer valid. This can be used to implement pre-paid "calling card" type signups. The bin/generate-prepay script can be used to populate the prepay_credit table. -
- diff --git a/httemplate/docs/ssh.html b/httemplate/docs/ssh.html deleted file mode 100755 index d2c501e35..000000000 --- a/httemplate/docs/ssh.html +++ /dev/null @@ -1,16 +0,0 @@ - - Unattended SSH - - -

Unattended SSH

-
Unattended remote login - Freeside can login to remote machines unattended using SSH. This can pose a security risk if not configured correctly, and will allow an intruder who breaks into your freeside machine full access to your remote machines. Do not use this feature unless you understand what you are doing! -
    -
  • As the freeside user (on your freeside machine), generate an authentication key using ssh-keygen. Since this is for unattended operation, use a blank passphrase. -
  • Append the newly-created identity.pub file to ~root/.ssh/authorized_keys (or the appopriate ~username/.ssh/authorized_keys) on the remote machine(s). -
  • Some new SSH v2 implementation accept v2 style keys only. Use the -t option to ssh-keygen, and append the created id_dsa.pub or id_rsa.pub to ~root/.ssh/authorized_keys2 (or the appopriate ~username/.ssh/authorized_keys) on the remote machine(s). -
  • You may need to set PermitRootLogin without-password (meaning with keys only) in your sshd_config file on the remote machine(s). -
  • You may want to set ForwardX11 = no in ~root/.ssh/config to prevent spurious errors if your distribution turns on X11 forwarding by default. -
- - - diff --git a/httemplate/docs/trouble.html b/httemplate/docs/trouble.html deleted file mode 100755 index fce743928..000000000 --- a/httemplate/docs/trouble.html +++ /dev/null @@ -1,26 +0,0 @@ - - Troubleshooting - - -

Troubleshooting

-
    -
  • When troubleshooting the web interface, helpful information is often in your web server's error log. -
  • If bin/svc_acct.import fails with an "Out of memory!" error using MySQL, upgrede MySQL and recompile the Perl DBD. There was a memory leak in some older versions of MySQL. -
  • If you get tons of errors in your web server's error log like this: -
    -Ambiguous use of value => resolved to "value" =>
    -at /usr/lib/perl5/site_perl/File/CounterFile.pm line 132.
    -
    - This clutters up your log files but is otherwise harmless. Upgrade to the latest File::CounterFile. -
  • If you get errors like this: -
    -UID.pm: Can't open /var/spool/freeside/conf/secrets: Permission denied 
    -at /your/path/site_perl/FS/UID.pm line 26.
    -BEGIN failed--compilation aborted at
    -/your/path/edit/process/part_svc.cgi line 15.
    -
    - Then the scripts are not running as the freeside freeside user. See -the New Installation section of the documentation. -
  • If you receive `can not connect to server' errors using MySQL on a system that doesn't support native threading, you may need to specify the full hostname in your DBI datasource. See the MySQL documentation, DBI manpage and the DBD::mysql manpage for details. -
- diff --git a/httemplate/docs/upgrade-1.4.2.html b/httemplate/docs/upgrade-1.4.2.html deleted file mode 100644 index a24661142..000000000 --- a/httemplate/docs/upgrade-1.4.2.html +++ /dev/null @@ -1,27 +0,0 @@ - - Upgrading to 1.4.2 - - -

Upgrading to 1.4.2 from 1.4.1

-
    -
  • If migrating from less than 1.4.1, see these instructions first. -
  • Back up your data and current Freeside installation. -
  • Install Locale::SubCountry -
  • Install IPC::ShareLite -
  • Install HTML::Widgets::SelectLayers 0.04. -
  • Install DBIx::DBSchema 0.23. -
  • Install DBD::Pg 1.32. -
  • Install Cache::Cache. -
  • Install Net::SSH 0.08. -
  • Install Crypt::PasswdMD5 -
  • Install Net::Whois::Raw -
  • CGI.pm minimum version 2.47 is required. You will probably need to install a current CGI.pm from CPAN if you are using Perl 5.005 or earlier. -
  • File::Temp minimum version 0.14 is required. You will probably need to install a currrent File::Temp from CPAN if you are using Perl 5.6 or earlier. -
  • If using Apache::ASP, add PerlSetVar RequestBinaryRead Off to your Apache configuration and make sure you are using Apache::ASP minimum version 2.55. -
  • Run make aspdocs or make masondocs. -
  • Copy aspdocs/ or masondocs/ to your web server's document space. -
  • Run make install-perl-modules. -
  • The signup server and password server are deprecated in 1.4.2. Their functionality has been incorperated into the self-service server. Edit or reinstall your init script, and set the "signup_server-default_agentnum" and "signup_server-default_refnum" configuration options. The FS::SignupClient interface is still available as a compatibility wrapper, so you should be able to continue to use your current signup.cgi. -
  • Optional: To use typeset invoices, install tetex and ghostscript, and copy conf/invoice_latex, conf/invoice_latexnotes, and conf/invoice_latexfooter to /usr/local/etc/freeside/conf./ -
  • Restart Apache and freeside-queued. - diff --git a/httemplate/docs/upgrade10.html b/httemplate/docs/upgrade10.html deleted file mode 100644 index ac2c6238d..000000000 --- a/httemplate/docs/upgrade10.html +++ /dev/null @@ -1,93 +0,0 @@ -
    -this is incomplete
    -
    -NOTE: Version numbering has been simplified.  1.5.7 is the version after
    -1.5.0pre6.  It is still a development version - releases with odd numbered 
    -middle parts (NN in x.NN.x) are development versions, like Perl or Linux.
    -
    -If migrating from 1.5.7, see README.1.5.8 instead
    -
    -If migrating from 1.5.0pre6, see README.1.5.7 instead
    -
    -install DBD::Pg 1.32, 1.41 or later (not 1.40) (or, if you're using a Perl version before 5.6, you could try installing DBD::Pg 1.22 with this patch and commenting out the "use DBD::Pg 1.32" at the top of DBIx/DBSchema/DBD/Pg.pm)
    -install DBIx::DBSchema 0.27 (or later)
    -  (if you are running Pg version 7.2.x or earlier, install at least
    -   DBIx::DBSchema 0.29)
    -install Net::SSH 0.08
    -install HTML::Widgets::SelectLayers 0.05
    -install Business::CreditCard 0.28
    -
    -- If using Apache::ASP, add PerlSetVar RequestBinaryRead Off and PerlSetVar IncludesDir /your/freeside/document/root/ to your Apache configuration and make sure you are using Apache::ASP minimum version 2.55.
    -- In httpd.conf, change <Files ~ \.cgi> to  <Files ~ (\.cgi|\.html)>
    -- In httpd.conf, change AddHandler perl-script .cgi or SetHandler perl-script to AddHandler perl-script .cgi .html
    -
    -install NetAddr::IP, Chart::Base, Locale::SubCountry, Text::CSV_XS, 
    -Spreadsheet::WriteExcel, IO-stringy (IO::Scalar), Frontier::RPC
    -(Frontier::RPC2), MIME::Entity (MIME-tools), IPC::Run3, Net::Whois::Raw,
    -JSON and Term::ReadKey
    -
    -
    -INSERT INTO msgcat ( msgnum, msgcode, locale, msg ) VALUES ( 20, 'svc_external-id', 'en_US', 'External ID' );
    -INSERT INTO msgcat ( msgnum, msgcode, locale, msg ) VALUES ( 21, 'svc_external-title', 'en_US', 'Title' );
    -
    -DROP INDEX cust_bill_pkg1;
    -
    -On recent Pg versions:
    -
    -ALTER TABLE cust_main ALTER COLUMN payinfo varchar(512) NULL;
    -ALTER TABLE h_cust_main ALTER COLUMN payinfo varchar(512) NULL;
    -
    -Or on older Pg versions that don't support altering columns directly:
    -(dump database, edit & reload)
    -
    -On recent Pg versions:
    -
    -ALTER TABLE svc_forward ALTER COLUMN srcsvc DROP NOT NULL;
    -ALTER TABLE h_svc_forward ALTER COLUMN srcsvc DROP NOT NULL;
    -ALTER TABLE svc_forward ALTER COLUMN dstsvc DROP NOT NULL;
    -ALTER TABLE h_svc_forward ALTER COLUMN dstsvc DROP NOT NULL;
    -ALTER TABLE cust_main ALTER COLUMN zip DROP NOT NULL;
    -ALTER TABLE h_cust_main ALTER COLUMN zip DROP NOT NULL;
    -
    -Or on Pg versions that don't support DROP NOT NULL (tested on 7.1 and 7.2 so far):
    -UPDATE pg_attribute SET attnotnull = FALSE WHERE ( attname = 'srcsvc' OR attname = 'dstsvc' ) AND ( attrelid = ( SELECT oid FROM pg_class WHERE relname = 'svc_forward' ) OR attrelid = ( SELECT oid FROM pg_class WHERE relname = 'h_svc_forward' ) );
    -UPDATE pg_attribute SET attnotnull = FALSE WHERE ( attname = 'zip' ) AND ( attrelid = ( SELECT oid FROM pg_class WHERE relname = 'cust_main' ) OR attrelid = ( SELECT oid FROM pg_class WHERE relname = 'h_cust_main' ) );
    -
    -If you created your database with a version before 1.4.2, dump database, edit:
    -- cust_main and h_cust_main: increase otaker from 8 to 32
    -- cust_main and h_cust_main: change ss from char(11) to varchar(11) ( "character(11)" to "character varying(11)" )
    -- cust_credit and h_cust_credit: increase otaker from 8 to 32
    -- cust_pkg and h_cust_pkg: increase otaker from 8 to 32
    -- cust_refund and h_cust_refund: increase otaker from 8 to 32
    -- domain_record and h_domain_record: increase reczone from 80 to 255
    -- domain_record and h_domain_record: change rectype from char to varchar ( "character(5)" to "character varying(5)" )
    -- domain_record and h_domain_record: increase recdata from 80 to 255
    -then reload
    -
    -mandatory again:
    -
    -make install-perl-modules to install the new libraries and CLI utilities
    -run "freeside-upgrade username" to create the remaining new tables and columns
    -
    -optionally:
    -
    -CREATE INDEX cust_main4 ON cust_main ( daytime );
    -CREATE INDEX cust_main5 ON cust_main ( night );
    -CREATE INDEX cust_main6 ON cust_main ( fax );
    -CREATE INDEX cust_main7 ON cust_main ( refnum );
    -CREATE INDEX cust_main8 ON cust_main ( county );
    -CREATE INDEX cust_main9 ON cust_main ( state );
    -CREATE INDEX cust_main10 ON cust_main ( country );
    -CREATE INDEX cust_main11 ON cust_main ( ship_last );
    -CREATE INDEX cust_main12 ON cust_main ( ship_company );
    -CREATE INDEX cust_main13 ON cust_main ( ship_daytime );
    -CREATE INDEX cust_main14 ON cust_main ( ship_night );
    -CREATE INDEX cust_main15 ON cust_main ( ship_fax );
    -CREATE INDEX agent2 ON agent ( disabled );
    -CREATE INDEX part_bill_event2 ON part_bill_event ( disabled );
    -CREATE INDEX cust_pay4 ON cust_pay (_date);
    -CREATE INDEX part_referral1 ON part_referral ( disabled );
    -CREATE INDEX part_pkg2 ON part_pkg ( promo_code );
    -CREATE INDEX h_part_pkg2 ON h_part_pkg ( promo_code );
    -
    -
    diff --git a/httemplate/docs/upgrade7.html b/httemplate/docs/upgrade7.html deleted file mode 100644 index d9dcfe2ae..000000000 --- a/httemplate/docs/upgrade7.html +++ /dev/null @@ -1,24 +0,0 @@ - - Upgrading to 1.3.1 - - -

    Upgrading to 1.3.1 from 1.3.0

    -
      -
    • If migrating from 1.0.0, see these instructions first. -
    • If migrating from less than 1.1.4, see these instructions first. -
    • If migrating from less than 1.2.0, see these instructions first. -
    • If migrating from less than 1.2.2, see these instructions first. -
    • If migrating from less than 1.2.3, see these instructions first. -
    • If migrating from less than 1.3.0, see these instructions first. -
    • Back up your data and current Freeside installation. -
    • Copy or symlink htdocs to the new copy. -
    • Change to the FS directory in the new tarball, and build and install the - Perl modules: -
      -$ cd FS/
      -$ perl Makefile.PL
      -$ make
      -$ su
      -# make install UNINST=1
      -
    • Run bin/dbdef-create. - diff --git a/httemplate/docs/upgrade8.html b/httemplate/docs/upgrade8.html deleted file mode 100644 index 9ca7cb7b9..000000000 --- a/httemplate/docs/upgrade8.html +++ /dev/null @@ -1,394 +0,0 @@ - - Upgrading to 1.4.0 - - -

      Upgrading to 1.4.0 from 1.3.1

      - - - - - - - - - -
      Apache::ASPMason
        -
      • Run make aspdocs -
      • Copy aspdocs/ to your web server's document space. -
      • Create a Global directory, such as /usr/local/etc/freeside/asp-global/ -
      • Copy htetc/global.asa to the Global directory. -
      • Configure Apache for the Global directory and to execute .cgi files using Apache::ASP. For example: -
        -<Directory /usr/local/apache/htdocs/freeside-asp>
        -<Files ~ (\.cgi)>
        -AddHandler perl-script .cgi
        -PerlHandler Apache::ASP
        -</Files>
        -<Perl>
        -$MLDBM::RemoveTaint = 1;
        -</Perl>
        -PerlSetVar Global /usr/local/etc/freeside/asp-global/
        -</Directory>
        -
        -
        -
      • (use version 1.0x - Freeside is not yet compatible with version 1.1x) -
      • Run make masondocs -
      • Copy masondocs/ to your web server's document space. -
      • Copy htetc/handler.pl to your web server's configuration directory. -
      • Edit handler.pl and set an appropriate data_dir, such as /usr/local/etc/freeside/mason-data -
      • Configure Apache to use the handler.pl file and to execute .cgi files using HTML::Mason. For example: -
        -<Directory /usr/local/apache/htdocs/freeside-mason>
        -<Files ~ (\.cgi)>
        -AddHandler perl-script .cgi
        -PerlHandler HTML::Mason
        -</Files>
        -<Perl>
        -require "/usr/local/apache/conf/handler.pl";
        -</Perl>
        -</Directory>
        -
        -
      -
        -
      • Build and install the Perl modules: -
        -$ su
        -# make install-perl-modules
        -
      • Apply the following changes to your database: -
        -CREATE TABLE svc_forward (
        -  svcnum int NOT NULL,
        -  srcsvc int NOT NULL,
        -  dstsvc int NOT NULL,
        -  dst varchar(80),
        -  PRIMARY KEY (svcnum)
        -);
        -ALTER TABLE part_svc ADD svc_forward__srcsvc varchar(80) NULL;
        -ALTER TABLE part_svc ADD svc_forward__srcsvc_flag char(1) NULL;
        -ALTER TABLE part_svc ADD svc_forward__dstsvc varchar(80) NULL;
        -ALTER TABLE part_svc ADD svc_forward__dstsvc_flag char(1) NULL;
        -ALTER TABLE part_svc ADD svc_forward__dst varchar(80) NULL;
        -ALTER TABLE part_svc ADD svc_forward__dst_flag char(1) NULL;
        -
        -CREATE TABLE cust_credit_bill (
        -  creditbillnum int primary key,
        -  crednum int not null,
        -  invnum int not null,
        -  _date int not null,
        -  amount decimal(10,2) not null
        -);
        -
        -CREATE TABLE cust_bill_pay (
        -  billpaynum int primary key,
        -  invnum int not null,
        -  paynum int not null,
        -  _date int not null,
        -  amount decimal(10,2) not null
        -);
        -
        -CREATE TABLE cust_credit_refund (
        -  creditrefundnum int primary key,
        -  crednum int not null,
        -  refundnum int not null,
        -  _date int not null,
        -  amount decimal(10,2) not null
        -);
        -
        -CREATE TABLE part_svc_column (
        -  columnnum int primary key,
        -  svcpart int not null,
        -  columnname varchar(64) not null,
        -  columnvalue varchar(80) null,
        -  columnflag char(1) null
        -);
        -
        -CREATE TABLE queue (
        -  jobnum int primary key,
        -  job text not null,
        -  _date int not null,
        -  status varchar(80) not null,
        -  statustext text null,
        -  svcnum int null
        -);
        -CREATE INDEX queue1 ON queue ( svcnum );
        -CREATE INDEX queue2 ON queue ( status );
        -
        -CREATE TABLE queue_arg (
        -  argnum int primary key,
        -  jobnum int not null,
        -  arg text null
        -);
        -CREATE INDEX queue_arg1 ON queue_arg ( jobnum );
        -
        -CREATE TABLE queue_depend (
        -  dependnum int primary key,
        -  jobnum int not null,
        -  depend_jobnum int not null
        -);
        -CREATE INDEX queue_depend1 ON queue_depend ( jobnum );
        -CREATE INDEX queue_depend2 ON queue_depend ( depend_jobnum );
        -
        -CREATE TABLE part_pop_local (
        -  localnum int primary key,
        -  popnum int not null,
        -  city varchar(80) null,
        -  state char(2) null,
        -  npa char(3) not null,
        -  nxx char(3) not null
        -);
        -CREATE UNIQUE INDEX part_pop_local1 ON part_pop_local ( npa, nxx );
        -
        -CREATE TABLE cust_bill_event (
        -  eventnum int primary key,
        -  invnum int not null,
        -  eventpart int not null,
        -  _date int not null,
        -  status varchar(80) not null, 
        -  statustext text
        -);
        -CREATE UNIQUE INDEX cust_bill_event1 ON cust_bill_event ( eventpart, invnum );
        -CREATE INDEX cust_bill_event2 ON cust_bill_event ( invnum );
        -
        -CREATE TABLE part_bill_event (
        -  eventpart int primary key,
        -  payby char(4) not null,
        -  event varchar(80) not null,
        -  eventcode text null,
        -  seconds int null,
        -  weight int not null,
        -  plan varchar(80) null,
        -  plandata text null,
        -  disabled char(1) null
        -);
        -CREATE INDEX part_bill_event1 ON part_bill_event ( payby );
        -
        -CREATE TABLE export_svc (
        -  exportsvcnum int primary key,
        -  exportnum int not null,
        -  svcpart int not null
        -);
        -CREATE UNIQUE INDEX export_svc1 ON export_svc ( exportnum, svcpart );
        -CREATE INDEX export_svc2 ON export_svc ( exportnum );
        -CREATE INDEX export_svc3 ON export_svc ( svcpart );
        -
        -CREATE TABLE part_export (
        -  exportnum int primary key,
        -  machine varchar(80) not null,
        -  exporttype varchar(80) not null,
        -  nodomain char(1) NULL
        -);
        -CREATE INDEX part_export1 ON part_export ( machine );
        -CREATE INDEX part_export2 ON part_export ( exporttype );
        -
        -CREATE TABLE part_export_option (
        -  optionnum int primary key,
        -  exportnum int not null,
        -  optionname varchar(80) not null,
        -  optionvalue text NULL
        -);
        -CREATE INDEX part_export_option1 ON part_export_option ( exportnum );
        -CREATE INDEX part_export_option2 ON part_export_option ( optionname );
        -
        -CREATE TABLE radius_usergroup (
        -  usergroupnum int primary key,
        -  svcnum int not null,
        -  groupname varchar(80) not null
        -);
        -CREATE INDEX radius_usergroup1 ON radius_usergroup ( svcnum );
        -CREATE INDEX radius_usergroup2 ON radius_usergroup ( groupname );
        -
        -CREATE TABLE msgcat (
        -  msgnum int primary key,
        -  msgcode varchar(80) not null,
        -  locale varchar(16) not null,
        -  msg text not null
        -);
        -CREATE INDEX msgcat1 ON msgcat ( msgcode, locale );
        -
        -CREATE TABLE cust_tax_exempt (
        -  exemptnum int primary key,
        -  custnum int not null,
        -  taxnum int not null,
        -  year int not null,
        -  month int not null,
        -  amount decimal(10,2)
        -);
        -CREATE UNIQUE INDEX cust_tax_exempt1 ON cust_tax_exempt ( taxnum, year, month );
        -
        -ALTER TABLE svc_acct ADD domsvc integer NULL;
        -ALTER TABLE part_svc ADD svc_acct__domsvc varchar(80) NULL;
        -ALTER TABLE part_svc ADD svc_acct__domsvc_flag char(1) NULL;
        -ALTER TABLE svc_domain ADD catchall integer NULL;
        -ALTER TABLE cust_main ADD referral_custnum integer NULL;
        -ALTER TABLE cust_main ADD comments text NULL;
        -ALTER TABLE cust_pay ADD custnum integer;
        -ALTER TABLE cust_pay_batch ADD paybatchnum integer;
        -ALTER TABLE cust_refund ADD custnum integer;
        -ALTER TABLE cust_pkg ADD manual_flag char(1) NULL;
        -ALTER TABLE part_pkg ADD plan varchar(80) NULL;
        -ALTER TABLE part_pkg ADD plandata text NULL;
        -ALTER TABLE part_pkg ADD setuptax char(1) NULL;
        -ALTER TABLE part_pkg ADD recurtax char(1) NULL;
        -ALTER TABLE part_pkg ADD disabled char(1) NULL;
        -ALTER TABLE part_svc ADD disabled char(1) NULL;
        -ALTER TABLE cust_bill ADD closed char(1) NULL;
        -ALTER TABLE cust_pay ADD closed char(1) NULL;
        -ALTER TABLE cust_credit ADD closed char(1) NULL;
        -ALTER TABLE cust_refund ADD closed char(1) NULL;
        -ALTER TABLE cust_bill_event ADD status varchar(80);
        -ALTER TABLE cust_bill_event ADD statustext text NULL;
        -ALTER TABLE svc_acct ADD sec_phrase varchar(80) NULL;
        -ALTER TABLE part_svc ADD svc_acct__sec_phrase varchar(80) NULL;
        -ALTER TABLE part_svc ADD svc_acct__sec_phrase_flag char(1) NULL;
        -ALTER TABLE part_pkg ADD taxclass varchar(80) NULL;
        -ALTER TABLE cust_main_county ADD taxclass varchar(80) NULL;
        -ALTER TABLE cust_main_county ADD exempt_amount decimal(10,2);
        -CREATE INDEX cust_main3 ON cust_main ( referral_custnum );
        -CREATE INDEX cust_credit_bill1 ON cust_credit_bill ( crednum );
        -CREATE INDEX cust_credit_bill2 ON cust_credit_bill ( invnum );
        -CREATE INDEX cust_bill_pay1 ON cust_bill_pay ( invnum );
        -CREATE INDEX cust_bill_pay2 ON cust_bill_pay ( paynum );
        -CREATE INDEX cust_credit_refund1 ON cust_credit_refund ( crednum );
        -CREATE INDEX cust_credit_refund2 ON cust_credit_refund ( refundnum );
        -CREATE UNIQUE INDEX cust_pay_batch_pkey ON cust_pay_batch ( paybatchnum );
        -CREATE UNIQUE INDEX part_svc_column1 ON part_svc_column ( svcpart, columnname );
        -CREATE INDEX cust_pay2 ON cust_pay ( paynum );
        -CREATE INDEX cust_pay3 ON cust_pay ( custnum );
        -CREATE INDEX cust_pay4 ON cust_pay ( paybatch );
        -
        - -
      • If you are using PostgreSQL, apply the following changes to your database: -
        -CREATE UNIQUE INDEX agent_pkey ON agent ( agentnum );
        -CREATE UNIQUE INDEX agent_type_pkey ON agent_type ( typenum );
        -CREATE UNIQUE INDEX cust_bill_pkey ON cust_bill ( invnum );
        -CREATE UNIQUE INDEX cust_credit_pkey ON cust_credit ( crednum );
        -CREATE UNIQUE INDEX cust_main_pkey ON cust_main ( custnum );
        -CREATE UNIQUE INDEX cust_main_county_pkey ON cust_main_county ( taxnum );
        -CREATE UNIQUE INDEX cust_main_invoice_pkey ON cust_main_invoice ( destnum );
        -CREATE UNIQUE INDEX cust_pay_pkey ON cust_pay ( paynum );
        -CREATE UNIQUE INDEX cust_pkg_pkey ON cust_pkg ( pkgnum );
        -CREATE UNIQUE INDEX cust_refund_pkey ON cust_refund ( refundnum );
        -CREATE UNIQUE INDEX cust_svc_pkey ON cust_svc ( svcnum );
        -CREATE UNIQUE INDEX domain_record_pkey ON domain_record ( recnum );
        -CREATE UNIQUE INDEX nas_pkey ON nas ( nasnum );
        -CREATE UNIQUE INDEX part_pkg_pkey ON part_pkg ( pkgpart );
        -CREATE UNIQUE INDEX part_referral_pkey ON part_referral ( refnum );
        -CREATE UNIQUE INDEX part_svc_pkey ON part_svc ( svcpart );
        -CREATE UNIQUE INDEX port_pkey ON port ( portnum );
        -CREATE UNIQUE INDEX prepay_credit_pkey ON prepay_credit ( prepaynum );
        -CREATE UNIQUE INDEX session_pkey ON session ( sessionnum );
        -CREATE UNIQUE INDEX svc_acct_pkey ON svc_acct ( svcnum );
        -CREATE UNIQUE INDEX svc_acct_pop_pkey ON svc_acct_pop ( popnum );
        -CREATE UNIQUE INDEX svc_acct_sm_pkey ON svc_acct_sm ( svcnum );
        -CREATE UNIQUE INDEX svc_domain_pkey ON svc_domain ( svcnum );
        -CREATE UNIQUE INDEX svc_www_pkey ON svc_www ( svcnum );
        -
        -
      • If you wish to enable service/shipping addresses, apply the following - changes to your database: -
        -ALTER TABLE cust_main ADD COLUMN ship_last varchar(80) NULL;
        -ALTER TABLE cust_main ADD COLUMN ship_first varchar(80) NULL;
        -ALTER TABLE cust_main ADD COLUMN ship_company varchar(80) NULL;
        -ALTER TABLE cust_main ADD COLUMN ship_address1 varchar(80) NULL;
        -ALTER TABLE cust_main ADD COLUMN ship_address2 varchar(80) NULL;
        -ALTER TABLE cust_main ADD COLUMN ship_city varchar(80) NULL;
        -ALTER TABLE cust_main ADD COLUMN ship_county varchar(80) NULL;
        -ALTER TABLE cust_main ADD COLUMN ship_state varchar(80) NULL;
        -ALTER TABLE cust_main ADD COLUMN ship_zip varchar(10) NULL;
        -ALTER TABLE cust_main ADD COLUMN ship_country char(2) NULL;
        -ALTER TABLE cust_main ADD COLUMN ship_daytime varchar(20) NULL;
        -ALTER TABLE cust_main ADD COLUMN ship_night varchar(20) NULL;
        -ALTER TABLE cust_main ADD COLUMN ship_fax varchar(12) NULL;
        -CREATE INDEX cust_main4 ON cust_main ( ship_last );
        -CREATE INDEX cust_main5 ON cust_main ( ship_company );
        -
        -
      • If you are using the signup server, reinstall it according to the instructions. The 1.3.x signup server is not compatible with 1.4.x. -
      • Run bin/dbdef-create username -
      • If you have svc_acct_sm records or service definitions: -
          -
        • Create a service definition with table svc_forward -
        • Run bin/fs-migrate-svc_acct_sm username -
        -
      • Or if you just have svc_acct records: -
          -
        • Order and provision a package for your default domain and note down the Service # or svcnum. -
        • UPDATE svc_acct SET domsvc = svcnum -
        • Update your service definitions to have default (or fixed) domsvc. -
        -
      • Run bin/fs-migrate-payrefusername -
      • Run bin/fs-migrate-part_svcusername -
      • After running bin/fs-migrate-payref, apply the following changes to your database: - -
        PostgreSQLMySQL, others
        -
        -CREATE TABLE cust_pay_temp (
        -  paynum int primary key,
        -  custnum int not null,
        -  paid decimal(10,2) not null,
        -  _date int null,
        -  payby char(4) not null,
        -  payinfo varchar(16) null,
        -  paybatch varchar(80) null,
        -  closed char(1) null
        -);
        -INSERT INTO cust_pay_temp SELECT paynum, custnum, paid, _date, payby, payinfo, paybatch, closed FROM cust_pay;
        -DROP TABLE cust_pay;
        -ALTER TABLE cust_pay_temp RENAME TO cust_pay;
        -CREATE UNIQUE INDEX cust_pay1 ON cust_pay (paynum);
        -CREATE TABLE cust_refund_temp (
        -  refundnum int primary key,
        -  custnum int not null,
        -  _date int null,
        -  refund decimal(10,2) not null,
        -  otaker varchar(8) not null,
        -  reason varchar(80) not null,
        -  payby char(4) not null,
        -  payinfo varchar(16) null,
        -  paybatch varchar(80) null,
        -  closed char(1) null
        -);
        -INSERT INTO cust_refund_temp SELECT refundnum, custnum, _date, refund, otaker, reason, payby, payinfo, '', closed from cust_refund;
        -DROP TABLE cust_refund;
        -ALTER TABLE cust_refund_temp RENAME TO cust_refund;
        -CREATE UNIQUE INDEX cust_refund1 ON cust_refund (refundnum);
        -
        -
        -
        -ALTER TABLE cust_pay DROP COLUMN invnum;
        -ALTER TABLE cust_refund DROP COLUMN crednum;
        -
        -
        -
      • IMPORTANT: After applying the second set of database changes, run bin/dbdef-create username again. -
      • IMPORTANT: run bin/create-history-tables username -
      • IMPORTANT: After running bin/create-history-tables, run bin/dbdef-create username again. -
      • As the freeside UNIX user, run bin/populate-msgcat username to populate the message catalog - -
      • set the locale configuration value to en_US. -
      • the mxmachines, nsmachines, arecords and cnamerecords configuration values have been deprecated. Set the defaultrecords configuration value instead. -
      • Create the `/usr/local/etc/freeside/cache.datasrc' directory - (owned by the freeside user). -
      • freeside-queued was installed with the Perl modules. Start it now and ensure that is run upon system startup. -
      • Set appropriate invoice events for your site. At the very least, you'll want to set some invoice events "After 0 days": a BILL invoice event to print invoices, a CARD invoice event to batch or run cards real-time, and a COMP invoice event to "pay" complimentary customers. If you were using the -i option to freeside-bill it should be removed. -
      • Use freeside-daily instead of freeside-bill. -
      • If you would like Freeside to notify your customers when their credit - cards and other billing arrangements are about to expire, arrange for - freeside-expiration-alerter to be run daily by cron or similar - facility. The message it sends can be configured from the - Configuration choice of the main menu as alerter_template. -
      • Export has been rewritten. If you were using the icradiusmachines, - icradius_mysqldest, icradius_mysqlsource, or icradius_secrets files, add - an appropriate "sqlradius" export to all relevant Service Definitions - instead. Use MySQL replication or - point the "sqlradius" export directly at your external ICRADIUS or FreeRADIUS - database (or through an SSL-necrypting proxy...) -
      - diff --git a/httemplate/docs/upgrade9.html b/httemplate/docs/upgrade9.html deleted file mode 100644 index 6a8fd965d..000000000 --- a/httemplate/docs/upgrade9.html +++ /dev/null @@ -1,28 +0,0 @@ - - Upgrading to 1.4.1 - - -

      Upgrading to 1.4.1 from 1.4.0

      -
        -
      • If migrating from less than 1.4.0, see these instructions first. -
      • Back up your data and current Freeside installation. -
      • Run make aspdocs or make masondocs. -
      • Copy aspdocs/ or masondocs/ to your web server's document space. -
      • Run make install-perl-modules. -
      • Install Net::SSH minimum version 0.07 -
      • Apply the following changes to your database: -
        -INSERT INTO msgcat ( msgnum, msgcode, locale, msg ) VALUES ( 18, 'daytime', 'en_US', 'Day Phone' );
        -INSERT INTO msgcat ( msgnum, msgcode, locale, msg ) VALUES ( 19, 'night', 'en_US', 'Night Phone' );
        -
        -
      • Optionally, apply the following changes to your database (performance improvements): -
        -CREATE INDEX part_pkg1 ON part_pkg ( disabled );
        -CREATE INDEX part_svc1 ON part_svc ( disabled );
        -CREATE INDEX cust_bill2 ON cust_bill ( _date );
        -
        -
      • If you want to use ACH (electronic checks), you will need to make changes to your database. The easiest way to make these changes is to dump your database (with pg_dump), change the payinfo field in the cust_pay, cust_refund, h_cust_pay and h_cust_refund tables from varchar(16) to varchar(80), reload the database from the dump. -
      • If you will be doing bind exports you should make additional changes to your database. Follow the directions above to dump the database and change the reczone and recdata fields in the domain_record and h_domain_record tables from varchar(80) to varchar(255). -
      • If you made changes to your db schema from a dump as listed above run dbdef-create. -
      • Restart Apache and freeside-queued. - diff --git a/httemplate/edit/REAL_cust_pkg.cgi b/httemplate/edit/REAL_cust_pkg.cgi deleted file mode 100755 index 78dd0fafa..000000000 --- a/httemplate/edit/REAL_cust_pkg.cgi +++ /dev/null @@ -1,179 +0,0 @@ -<% - -my $error =''; -my $pkgnum = ''; -if ( $cgi->param('error') ) { - $error = $cgi->param('error'); - $pkgnum = $cgi->param('pkgnum'); - if ( $error eq '_bill_areyousure' ) { - my $bill = $cgi->param('bill'); - $error = "You are attempting to set the next bill date to $bill, which is - in the past. This will charge the customer for the interval - from $bill until now. Are you sure you want to do this? ". - ''; - } -} else { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/ or die "no pkgnum"; - $pkgnum = $1; -} - -#get package record -my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); -die "No package!" unless $cust_pkg; -my $part_pkg = qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->getfield('pkgpart')}); - -if ( $error ) { - #$cust_pkg->$_(str2time($cgi->param($_)) foreach qw(setup bill); - $cust_pkg->setup(str2time($cgi->param('setup'))); - $cust_pkg->bill(str2time($cgi->param('bill'))); - $cust_pkg->last_bill(str2time($cgi->param('last_bill'))); -} - -#my $custnum = $cust_pkg->getfield('custnum'); -%> - -<%= header('Customer package - Edit dates') %> -<% -#, menubar( -# "View this customer (#$custnum)" => popurl(2). "view/cust_main.cgi?$custnum", -# 'Main Menu' => popurl(2) -#)); -%> - - - - - - -<% - -#print info -my($susp,$cancel,$expire)=( - $cust_pkg->getfield('susp'), - $cust_pkg->getfield('cancel'), - $cust_pkg->getfield('expire'), -); -my($pkg,$comment)=($part_pkg->getfield('pkg'),$part_pkg->getfield('comment')); -my($setup,$bill)=($cust_pkg->getfield('setup'),$cust_pkg->getfield('bill')); -my $otaker = $cust_pkg->getfield('otaker'); - -%> - -
        - - -<% if ( $error ) { %> - Error: <%= $error %> -<% } %> - -<% - -#my $format = "%c %z (%Z)"; -my $format = "%m/%d/%Y %T %z (%Z)"; - -#false laziness w/view/cust_main/packages.html -#my( $billed_or_prepaid, -my( $last_bill_or_renewed, $next_bill_or_prepaid_until ); -unless ( $part_pkg->is_prepaid ) { - #$billed_or_prepaid = 'billed'; - $last_bill_or_renewed = 'Last bill'; - $next_bill_or_prepaid_until = 'Next bill'; -} else { - #$billed_or_prepaid = 'prepaid'; - $last_bill_or_renewed = 'Renewed'; - $next_bill_or_prepaid_until = 'Prepaid until'; -} - -%> - -<%= ntable("#cccccc",2) %> - - - Package number - <%= $pkgnum %> - - - - Package - <%= $pkg %> - - - - Comment - <%= $comment %> - - - - Order taker - <%= $otaker %> - - - - Setup date - - "> - - - - - - <%= $last_bill_or_renewed %> date - - "> - - - - - - <%= $next_bill_or_prepaid_until %> date - - "> - - - - - <% if ( $susp ) { %> - - Suspension date - <%= time2str($format, $susp) %> - - <% } %> - - - Expiration date - - "> - -
        (will cancel this package when the date is reached) - - - - <% if ( $cancel ) { %> - - Cancellation date - <%= time2str($format, $cancel) %> - - <% } %> - - - - -
        -
        - - diff --git a/httemplate/edit/agent.cgi b/httemplate/edit/agent.cgi deleted file mode 100755 index cb64ad8cd..000000000 --- a/httemplate/edit/agent.cgi +++ /dev/null @@ -1,109 +0,0 @@ -<% - -my $agent; -if ( $cgi->param('error') ) { - $agent = new FS::agent ( { - map { $_, scalar($cgi->param($_)) } fields('agent') - } ); -} elsif ( $cgi->keywords ) { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $agent = qsearchs( 'agent', { 'agentnum' => $1 } ); -} else { #adding - $agent = new FS::agent {}; -} -my $action = $agent->agentnum ? 'Edit' : 'Add'; -my $hashref = $agent->hashref; - -my $conf = new FS::Conf; - -%> - -<%= header("$action Agent", menubar( - 'Main Menu' => $p, - 'View all agents' => $p. 'browse/agent.cgi', -)) %> - -<% if ( $cgi->param('error') ) { %> -Error: <%= $cgi->param('error') %> -<% } %> - -
        - -Agent #<%= $hashref->{agentnum} ? $hashref->{agentnum} : "(NEW)" %> - -<%= &ntable("#cccccc", 2, '') %> - - - Agent - - - - - Agent type - - - - - Disable - {disabled} eq 'Y' ? ' CHECKED' : '' %>> - - - - - - - - - - - - - <% if ( $conf->config('ticket_system') ) { - my $default_queueid = $conf->config('ticket_system-default_queueid'); - my $default_queue = FS::TicketSystem->queue($default_queueid); - $default_queue = "(default) $default_queueid: $default_queue" - if $default_queueid; - my %queues = FS::TicketSystem->queues(); - my @queueids = sort { $a <=> $b } keys %queues; - %> - - Ticketing queue - - - - - <% } %> - - - Agent interface username - - - - - - - Agent interface password - - - - - - - -
        "> -
        - - diff --git a/httemplate/edit/agent_payment_gateway.html b/httemplate/edit/agent_payment_gateway.html deleted file mode 100644 index 61d29e0e9..000000000 --- a/httemplate/edit/agent_payment_gateway.html +++ /dev/null @@ -1,64 +0,0 @@ -<% - -$cgi->param('agentnum') =~ /(\d+)$/ or die "illegal agentnum"; -my $agent = qsearchs('agent', { 'agentnum' => $1 } ); -die "agentnum $1 not found" unless $agent; - -#my @agent_payment_gateway; -if ( $cgi->param('error') ) { -} - -my $action = 'Add'; - -%> - -<%= header("$action payment gateway override for ". $agent->agent, menubar( - 'Main Menu' => $p, - #'View all payment gateways' => $p. 'browse/payment_gateway.html', - 'View all agents' => $p. 'browse/agent.html', -)) %> - -<% if ( $cgi->param('error') ) { %> -Error: <%= $cgi->param('error') %> -<% } %> - -
        - - -Use gateway -

        - -for -

        - -(optional) when invoice contains only items of taxclass -

        - - -
        - - diff --git a/httemplate/edit/agent_type.cgi b/httemplate/edit/agent_type.cgi deleted file mode 100755 index 5addbbd4c..000000000 --- a/httemplate/edit/agent_type.cgi +++ /dev/null @@ -1,75 +0,0 @@ -<% - -my($agent_type); -if ( $cgi->param('error') ) { - $agent_type = new FS::agent_type ( { - map { $_, scalar($cgi->param($_)) } fields('agent') - } ); -} elsif ( $cgi->keywords ) { #editing - my( $query ) = $cgi->keywords; - $query =~ /^(\d+)$/; - $agent_type=qsearchs('agent_type',{'typenum'=>$1}); -} else { #adding - $agent_type = new FS::agent_type {}; -} -my $action = $agent_type->typenum ? 'Edit' : 'Add'; - -%> - -<%= header("$action Agent Type", menubar( - 'Main Menu' => "$p", - 'View all agent types' => "${p}browse/agent_type.cgi", -)) -%> - -<% if ( $cgi->param('error') ) { %> - Error: <%= $cgi->param('error') %> -<% } %> - -
        - -Agent Type #<%= $agent_type->typenum || "(NEW)" %> -

        - -Agent Type - -

        - -Select which packages agents of this type may sell to customers
        - -<% foreach my $part_pkg ( - qsearch({ 'table' => 'part_pkg', - 'hashref' => { 'disabled' => '' }, - 'select' => 'part_pkg.*', - 'addl_from' => 'LEFT JOIN type_pkgs USING ( pkgpart )', - 'extra_sql' => ( $agent_type->typenum - ? 'OR typenum = '. $agent_type->typenum - : '' - ), - }) - ) { -%> - -
        - $agent_type->typenum, - 'pkgpart' => $part_pkg->pkgpart, - }) - ? 'CHECKED ' - : '' - %> VALUE="ON"> - - <%= $part_pkg->pkgpart %>: - <%= $part_pkg->pkg %> - <%= $part_pkg->comment %> - <%= $part_pkg->disabled =~ /^Y/i ? ' (DISABLED)' : '' %> - -<% } %> - -

        - -"> - -
        - - diff --git a/httemplate/edit/bulk-cust_svc.html b/httemplate/edit/bulk-cust_svc.html deleted file mode 100644 index 332b5b67c..000000000 --- a/httemplate/edit/bulk-cust_svc.html +++ /dev/null @@ -1,97 +0,0 @@ -<%= header( 'Bulk customer service change', - menubar( - 'Main Menu' => $p, - ), - ) -%> - - - - - -<%= include('/elements/progress-init.html', - 'OneTrueForm', - [qw( old_svcpart new_svcpart pkgpart )], - 'process/bulk-cust_svc.cgi', - $p.'browse/part_svc.cgi', - ) -%> - -
        - -<% - $cgi->param('svcpart') =~ /^(\d+)$/ - or die "illegal svcpart: ". $cgi->param('svcpart'); - - my $old_svcpart = $1; - my $src_part_svc = qsearchs('part_svc', { 'svcpart' => $old_svcpart } ) - or die "unknown svcpart: $old_svcpart"; -%> - - -Change - - -
        - -to new service definition - -
        - -
        - - - - - -
        - - - - - - diff --git a/httemplate/edit/cust_bill_pay.cgi b/httemplate/edit/cust_bill_pay.cgi deleted file mode 100755 index 24bce308a..000000000 --- a/httemplate/edit/cust_bill_pay.cgi +++ /dev/null @@ -1,95 +0,0 @@ - -<% - -my($paynum, $amount, $invnum); -if ( $cgi->param('error') ) { - $paynum = $cgi->param('paynum'); - $amount = $cgi->param('amount'); - $invnum = $cgi->param('invnum'); -} else { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $paynum = $1; - $amount = ''; - $invnum = ''; -} - -my $otaker = getotaker; - -my $p1 = popurl(1); - -print header("Apply Payment", ''); -print qq!Error: !, $cgi->param('error'), - "

        " - if $cgi->param('error'); -print < -END - -my $cust_pay = qsearchs('cust_pay', { 'paynum' => $paynum } ); -die "payment $paynum not found!" unless $cust_pay; - -my $unapplied = $cust_pay->unapplied; - -print "Payment # $paynum". - qq!!. - '
        Date: '. time2str("%D", $cust_pay->_date). ''. - '
        Amount: $'. $cust_pay->paid. ''. - "
        Unapplied amount: \$$unapplied" - ; - -my @cust_bill = grep $_->owed != 0, - qsearch('cust_bill', { 'custnum' => $cust_pay->custnum } ); - -print < -function changed(what) { - cust_bill = what.options[what.selectedIndex].value; -END - -foreach my $cust_bill ( @cust_bill ) { - my $invnum = $cust_bill->invnum; - my $changeto = $cust_bill->owed < $unapplied - ? $cust_bill->owed - : $unapplied; - print < -END - -print qq!
        Invoice #"; - -print qq!
        Amount \$!; - -print < - -END - -print < - - -END - -%> diff --git a/httemplate/edit/cust_credit.cgi b/httemplate/edit/cust_credit.cgi deleted file mode 100755 index aae0df2fc..000000000 --- a/httemplate/edit/cust_credit.cgi +++ /dev/null @@ -1,63 +0,0 @@ - -<% - -my $conf = new FS::Conf; -my($custnum, $amount, $reason); -if ( $cgi->param('error') ) { - #$cust_credit = new FS::cust_credit ( { - # map { $_, scalar($cgi->param($_)) } fields('cust_credit') - #} ); - $custnum = $cgi->param('custnum'); - $amount = $cgi->param('amount'); - #$refund = $cgi->param('refund'); - $reason = $cgi->param('reason'); -} else { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $custnum = $1; - $amount = ''; - #$refund = 'yes'; - $reason = ''; -} -my $_date = time; - -my $otaker = getotaker; - -my $p1 = popurl(1); - -print header("Post Credit", ''); -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); -print <config('countrydefault')); -
        - - - - - - -END - -print '

        Credit'. ntable("#cccccc", 2). - 'Date'. - time2str("%D",$_date). ''; - -print qq!Amount\$!; - -#print qq! Also post refund!; - -print qq!Reason!; - -print qq!Auto-apply
        to invoices!; - -print < -
        - - - - -END - -%> diff --git a/httemplate/edit/cust_credit_bill.cgi b/httemplate/edit/cust_credit_bill.cgi deleted file mode 100755 index 1a97e1312..000000000 --- a/httemplate/edit/cust_credit_bill.cgi +++ /dev/null @@ -1,101 +0,0 @@ - -<% - -my($crednum, $amount, $invnum); -if ( $cgi->param('error') ) { - #$cust_credit_bill = new FS::cust_credit_bill ( { - # map { $_, scalar($cgi->param($_)) } fields('cust_credit_bill') - #} ); - $crednum = $cgi->param('crednum'); - $amount = $cgi->param('amount'); - #$refund = $cgi->param('refund'); - $invnum = $cgi->param('invnum'); -} else { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $crednum = $1; - $amount = ''; - #$refund = 'yes'; - $invnum = ''; -} - -my $otaker = getotaker; - -my $p1 = popurl(1); - -print header("Apply Credit", ''); -print qq!Error: !, $cgi->param('error'), - "

        " - if $cgi->param('error'); -print < -END - -my $cust_credit = qsearchs('cust_credit', { 'crednum' => $crednum } ); -die "credit $crednum not found!" unless $cust_credit; - -my $credited = $cust_credit->credited; - -print "Credit # $crednum". - qq!!. - '
        Date: '. time2str("%D", $cust_credit->_date). ''. - '
        Amount: $'. $cust_credit->amount. ''. - "
        Unapplied amount: \$$credited". - '
        Reason: '. $cust_credit->reason. '' - ; - -my @cust_bill = grep $_->owed != 0, - qsearch('cust_bill', { 'custnum' => $cust_credit->custnum } ); - -print < -function changed(what) { - cust_bill = what.options[what.selectedIndex].value; -END - -foreach my $cust_bill ( @cust_bill ) { - my $invnum = $cust_bill->invnum; - my $changeto = $cust_bill->owed < $cust_credit->credited - ? $cust_bill->owed - : $cust_credit->credited; - print < -END - -print qq!
        Invoice #"; - -print qq!
        Amount \$!; - -print < - -END - -print < - - -END - -%> diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi deleted file mode 100755 index 144d5405c..000000000 --- a/httemplate/edit/cust_main.cgi +++ /dev/null @@ -1,439 +0,0 @@ -<% - - #for misplaced logic below - #use FS::part_pkg; - - #for false laziness below (now more properly lazy) - #use FS::svc_acct_pop; - - #for (other) false laziness below - #use FS::agent; - #use FS::type_pkgs; - -my $conf = new FS::Conf; - -#get record - -my $error = ''; -my($custnum, $username, $password, $popnum, $cust_main, $saved_pkgpart); -my(@invoicing_list); -my $same = ''; -if ( $cgi->param('error') ) { - $error = $cgi->param('error'); - $cust_main = new FS::cust_main ( { - map { $_, scalar($cgi->param($_)) } fields('cust_main') - } ); - $custnum = $cust_main->custnum; - $saved_pkgpart = $cgi->param('pkgpart_svcpart') || ''; - if ( $saved_pkgpart =~ /^(\d+)_/ ) { - $saved_pkgpart = $1; - } else { - $saved_pkgpart = ''; - } - $username = $cgi->param('username'); - $password = $cgi->param('_password'); - $popnum = $cgi->param('popnum'); - @invoicing_list = split( /\s*,\s*/, $cgi->param('invoicing_list') ); - $same = $cgi->param('same'); - $cust_main->setfield('paid' => $cgi->param('paid')) if $cgi->param('paid'); -} elsif ( $cgi->keywords ) { #editing - my( $query ) = $cgi->keywords; - $query =~ /^(\d+)$/; - $custnum=$1; - $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ); - if ( $cust_main->dbdef_table->column('paycvv') - && length($cust_main->paycvv) ) { - my $paycvv = $cust_main->paycvv; - $paycvv =~ s/./*/g; - $cust_main->paycvv($paycvv); - } - $saved_pkgpart = 0; - $username = ''; - $password = ''; - $popnum = 0; - @invoicing_list = $cust_main->invoicing_list; -} else { - $custnum=''; - $cust_main = new FS::cust_main ( {} ); - $cust_main->otaker( &getotaker ); - $cust_main->referral_custnum( $cgi->param('referral_custnum') ); - $saved_pkgpart = 0; - $username = ''; - $password = ''; - $popnum = 0; - @invoicing_list = (); -} -$cgi->delete_all(); -my $action = $custnum ? 'Edit' : 'Add'; - -%> - - - -<%= header("Customer $action", '', ' onUnload="myclose()"') %> - -<% if ( $error ) { %> -Error: <%= $error %> -<% } %> - -
        - -Customer # <%= $custnum ? "$custnum" : " (NEW)" %> - - - -<% - -my $r = qq!* !; - -my %agent_search = dbdef->table('agent')->column('disabled') - ? ( 'disabled' => '' ) : (); -my @agents = qsearch( 'agent', \%agent_search ); -#die "No agents created!" unless @agents; -eidiot "You have not created any agents (or all agents are disabled). You must create at least one agent before adding a customer. Go to ". popurl(2). "browse/agent.cgi and create one or more agents." unless @agents; -my $agentnum = $cust_main->agentnum || $agents[0]->agentnum; #default to first - -%> - -<% if ( scalar(@agents) == 1 ) { %> - -<% } else { %> -

        <%=$r%>Agent -<% } %> - - - -<% -my $refnum = $cust_main->refnum || $conf->config('referraldefault') || 0; -if ( $custnum && ! $conf->exists('editreferrals') ) { -%> - - - -<% - } else { - - my(@referrals) = qsearch('part_referral',{}); - if ( scalar(@referrals) == 0 ) { - eidiot "You have not created any advertising sources. You must create at least one advertising source before adding a customer. Go to ". popurl(2). "browse/part_referral.cgi and create one or more advertising sources."; - } elsif ( scalar(@referrals) == 1 ) { - $refnum ||= $referrals[0]->refnum; -%> - - - -<% } else { %> - -

        <%=$r%>Advertising source - -<% } %> - -<% } %> - - - -<% -my $referring_cust_main = ''; -if ( $cust_main->referral_custnum - and $referring_cust_main = - qsearchs('cust_main', { custnum => $cust_main->referral_custnum } ) -) { -%> - -

        Referring Customer: - <%= $cust_main->referral_custnum %>: <%= $referring_cust_main->name %> - - -<% } elsif ( ! $conf->exists('disable_customer_referrals') ) { %> - -

        Referring customer number: - - -<% } else { %> - - - -<% } %> - - - -

        -Billing address -<%= include('cust_main/contact.html', $cust_main, '', 'bill_changed(this)', '' ) %> - - - -<% if ( defined $cust_main->dbdef_table->column('ship_last') ) { %> - - - -<% - my $checked = ''; - my $disabled = ''; - my $disabledselect = ''; - unless ( $cust_main->ship_last && $same ne 'Y' ) { - $checked = 'CHECKED'; - $disabled = 'DISABLED style="background-color: #dddddd"'; - foreach ( - qw( last first company address1 address2 city county state zip country - daytime night fax ) - ) { - $cust_main->set("ship_$_", $cust_main->get($_) ); - } - } -%> - -
        -Service address -(>same as billing address) -<%= include('cust_main/contact.html', $cust_main, 'ship_', '', $disabled ) %> - -<% } %> - - - -<%= include( 'cust_main/billing.html', $cust_main, - 'invoicing_list' => \@invoicing_list, - ) -%> - - - - - -<% foreach my $hidden ( - 'custnum', 'agentnum', 'refnum', 'referral_custnum', - 'last', 'first', 'ss', 'company', - 'address1', 'address2', 'city', - 'county', 'state', 'zip', 'country', - 'daytime', 'night', 'fax', - - 'same', - - 'ship_last', 'ship_first', 'ship_company', - 'ship_address1', 'ship_address2', 'ship_city', - 'ship_county', 'ship_state', 'ship_zip', 'ship_country', - 'ship_daytime','ship_night', 'ship_fax', - - 'select', #XXX key - - 'payauto', - 'payinfo', 'payinfo1', 'payinfo2', - 'payname', 'exp_month', 'exp_year', 'paycvv', - 'paystart_month', 'paystart_year', 'payissue', - 'payip', - 'paid', - - 'tax', - 'invoicing_list', 'invoicing_list_POST', 'invoicing_list_FAX' - ) { -%> - -<% } %> - -
        Comments -<%= &ntable("#cccccc") %> - - - - - - - -<% - -unless ( $custnum ) { - # pry the wrong place for this logic. also pretty expensive - #use FS::part_pkg; - - #false laziness, copied from FS::cust_pkg::order - my $pkgpart; - if ( scalar(@agents) == 1 ) { - # $pkgpart->{PKGPART} is true iff $custnum may purchase PKGPART - my($agent)=qsearchs('agent',{'agentnum'=> $agentnum }); - $pkgpart = $agent->pkgpart_hashref; - } else { - #can't know (agent not chosen), so, allow all - my %typenum; - foreach my $agent ( @agents ) { - next if $typenum{$agent->typenum}++; - #fixed in 5.004_05 #$pkgpart->{$_}++ foreach keys %{ $agent->pkgpart_hashref } - foreach ( keys %{ $agent->pkgpart_hashref } ) { $pkgpart->{$_}++; } #5.004_04 workaround - } - } - #eslaf - - my @part_pkg = grep { $_->svcpart('svc_acct') && $pkgpart->{ $_->pkgpart } } - qsearch( 'part_pkg', { 'disabled' => '' } ); - - if ( @part_pkg ) { - -# print "

        First package", &itable("#cccccc", "0 ALIGN=LEFT"), -#apiabuse & undesirable wrapping - print "
        First package", &ntable("#cccccc"), - qq!"; - - #false laziness: (mostly) copied from edit/svc_acct.cgi - #$ulen = $svc_acct->dbdef_table->column('username')->length; - my $ulen = dbdef->table('svc_acct')->column('username')->length; - my $ulen2 = $ulen+2; - my $passwordmax = $conf->config('passwordmax') || 8; - my $pmax2 = $passwordmax + 2; - print <Username - -Password - -(blank to generate) -END - - print 'Access number' - . - &FS::svc_acct_pop::popselector($popnum). - '' - ; - } -} - -my $otaker = $cust_main->otaker; -print qq!!, - qq!

        !, - "", -; - -%> diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html deleted file mode 100644 index 96f777baa..000000000 --- a/httemplate/edit/cust_main/billing.html +++ /dev/null @@ -1,443 +0,0 @@ -<% - -my( $cust_main, %options ) = @_; -my @invoicing_list = @{ $options{'invoicing_list'} }; -my $conf = new FS::Conf; -my $payby_default = $conf->config('payby-default'); - -my @payby = grep /\w/, $conf->config('payby'); -#@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH WEST COMP )) -@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH COMP )) - unless @payby; - -if ( $payby_default eq 'HIDE' ) { - - $cust_main->payby('BILL') unless $cust_main->payby; - -%> - - - - - -
        <% # XXX key %> - - <% foreach my $field (qw( payinfo payname paycvv paystart_month paystart_year payissue payip )) { %> - - - - <% } %> - - <% - #false laziness w/elements/select-month_year.html & view/cust_main/billing.html - my( $mon, $year ); - my $date = $cust_main->paydate || '12-2037'; - if ( $date =~ /^(\d{4})-(\d{1,2})-\d{1,2}$/ ) { #PostgreSQL date format - ( $mon, $year ) = ( $2, $1 ); - } elsif ( $date =~ /^(\d{1,2})-(\d{1,2}-)?(\d{4}$)/ ) { - ( $mon, $year ) = ( $1, $3 ); - } else { - die "unrecognized expiration date format: $date"; - } - %> - - - - -
        - -
        - - - - - -
        - -<% } else { - - my $r = qq!* !; - -%> - -
        Billing information - <%= &ntable("#cccccc") %> - - - <%=$r%>Billing type - - - - - - - - - <% - - my($payby, $payinfo, $payname)=( - $cust_main->payby, - $cust_main->payinfo, - $cust_main->payname, - ); - my( $account, $aba ) = split('@', $payinfo); - - my $disabled = 'DISABLED style="background-color: #dddddd"'; - my $text_disabled = 'style="color: #999999"'; - if ( $payby =~ /^(CARD|DCRD)$/ && cardtype($payinfo) =~ /^(Switch|Solo)$/ ) { - $disabled = 'style="background-color: #ffffff"'; - $text_disabled = 'style="color: #000000";' - } - - my %payby = ( - - 'CARD' => - - ''. - - qq!!. - qq!!. - - qq!!. - ''. - - qq!!. - '!. - '!. - - qq!!. - qq!!. - - qq!'. - - '
        ${r}Card number
        ${r}Expiration '. - - include('/elements/select-month_year.html', - 'prefix' => 'exp', - 'selected_date' => - ( $payby =~ /^(CARD|DCRD)$/ ? $cust_main->paydate : '' ), - ). - - '
        CVV2 !. - - qq!(help)!. - qq!'. - - - qq!
        Start date '. - - include('/elements/select-month_year.html', - 'prefix' => 'paystart', - 'disabled' => $disabled, - 'empty_option' => 1, - 'start_year' => 2000, - 'end_year' => (localtime())[5] + 1900, - 'selected_date' => ( - ( $payby =~ /^(CARD|DCRD)$/ - && cardtype($payinfo) =~ /^(Switch|Solo)$/ ) - ? $cust_main->paystart_month. '-'. - $cust_main->paystart_year - : '' - ) - ). - - qq! or Issue number !. - '
        ${r}Exact name on card
        Charge future payments to this card automatically
        ', - - 'CHEK' => - - ''. - - qq!!. - qq!'. - - qq!!. - qq!!. - - qq!!. - qq!!. - - qq!!. - qq!!. - - qq!'. - - ''. - ''. - ''. - - '
        ${r}Account number
        ${r}ABA/Routing number !. - qq!(help)!. - qq!
        ${r}Bank name
        Charge future payments to this electronic check automatically
         
         
         
        ', - - 'LECB' => - - ''. - - qq!!. - qq!!. - - qq!!. - qq!!. - qq!!. - - ''. - ''. - ''. - ''. - ''. - ''. - - '
        ${r}Phone number
         
         
         
         
         
         
        ', - - 'BILL' => - - ''. - - qq!!. - qq!!. - - qq!!. - qq!!. - - qq!!. - qq!!. - - ''. - ''. - ''. - ''. - ''. - - '
        P.O.
        Attention
         
         
         
         
         
        ', - - 'COMP' => - - ''. - - qq!!. - qq!!. - - qq!!. - ''. - - ''. - ''. - ''. - ''. - ''. - - '
        ${r}Approved by
        ${r}Expiration '. - - include('/elements/select-month_year.html', - 'prefix' => 'exp', - 'selected_date' => - ( $payby eq 'COMP' ? $cust_main->paydate : '' ), - ). - - '
         
         
         
         
         
        ', - - 'CASH' => - - ''. - - qq!!. - qq!!. - - ''. - ''. - ''. - ''. - ''. - ''. - - '
        ${r}Amount
         
         
         
         
         
         
        ', - - 'WEST' => - - ''. - - qq!!. - qq!!. - - ''. - ''. - ''. - ''. - ''. - ''. - - '
        ${r}Amount
         
         
         
         
         
         
        ', - - 'MCRD' => - - ''. - - qq!!. - qq!!. - - ''. - ''. - ''. - ''. - ''. - ''. - - '
        ${r}Amount
         
         
         
         
         
         
        ', - - ); - - - my %allopt = ( - 'CARD' => 'Credit card', - 'CHEK' => 'Electronic check', - 'LECB' => 'Phone bill billing', - 'BILL' => 'Billing', - 'CASH' => 'Cash', # initial payment, then billing', - 'WEST' => 'Western Union', # initial payment, then billing', - 'MCRD' => 'Manual credit card', # initial payment, then billing', - 'COMP' => 'Complimentary', - ); - if ( $cust_main->custnum ) { #don't offer CASH/WEST/MCRD initial payment types - # when editing customer - delete $allopt{$_} for qw(CASH WEST MCRD); - } - - tie my %options, 'Tie::IxHash', - map { $_ => $allopt{$_} } - grep { exists $allopt{$_} } - @payby; - - my %payby2option = ( - ( map { $_ => $_ } keys %options ), - 'DCRD' => 'CARD', - 'DCHK' => 'CHEK', - ); - - my $widget = new HTML::Widgets::SelectLayers( - 'options' => \%options, - #'form_name' => 'dummy', - #'form_action' => 'nothingyet', - #chops bottom of page in IE# 'under_position' => 'absolute', - 'html_between' => '', - 'selected_layer' => $payby2option{$payby || $payby_default || $payby[0] }, - 'layer_callback' => sub { my $layer = shift; $payby{$layer}; }, - ); - - %> - - <%= $widget->html %> - -
        - - <%= &ntable("#cccccc") %> - -   - - - tax eq "Y" ? 'CHECKED' : '' %>> Tax Exempt - - - - exists('disablepostalinvoicedefault') - && ! $cust_main->custnum - ) - || grep { $_ eq 'POST' } @invoicing_list ) - - ? 'CHECKED' - : '' - - %>> Postal mail invoice - - - - - - > Fax invoice - - - - - - Email invoice - - - - - -
        - - <%= $r %> required fields - -<% } %> - diff --git a/httemplate/edit/cust_main/contact.html b/httemplate/edit/cust_main/contact.html deleted file mode 100644 index e0cd06f56..000000000 --- a/httemplate/edit/cust_main/contact.html +++ /dev/null @@ -1,125 +0,0 @@ -<% - -my( $cust_main, $pre, $onchange, $disabled ) = @_; -my $conf = new FS::Conf; - -#false laziness with ship state -my $countrydefault = $conf->config('countrydefault') || 'US'; -$cust_main->set($pre.'country', $countrydefault ) - unless $cust_main->get($pre.'country'); - -my $statedefault = $conf->config('statedefault') - || ($countrydefault eq 'US' ? 'CA' : ''); -$cust_main->set($pre.'state', $statedefault ) - unless $cust_main->get($pre.'state') - || $cust_main->get($pre.'country') ne $countrydefault; - -#my($county_html, $state_html, $country_html) = -# FS::cust_main_county::regionselector( $cust_main->get($pre.'county'), -# $cust_main->get($pre.'state'), -# $cust_main->get($pre.'country'), -# $pre, -# $onchange, -# $disabled, -# ); - -my %select_hash = ( - 'county' => $cust_main->get($pre.'county'), - 'state' => $cust_main->get($pre.'state'), - 'country' => $cust_main->get($pre.'country'), - 'prefix' => $pre, - 'onchange' => $onchange, - 'disabled' => $disabled, -); - -my $daytime_label = FS::Msgcat::_gettext('daytime') || 'Day Phone'; -my $night_label = FS::Msgcat::_gettext('night') || 'Night Phone'; - -my $r = qq!* !; - -%> - -<%= &ntable("#cccccc") %> - - - <%=$r%>Contact name
        (last, first) - - > , - > - - -<% if ( $conf->exists('show_ss') && !$pre ) { %> - SS# - -<% } elsif ( !$pre ) { %> - -<% } %> - - - - - Company - - > - - - - - <%=$r%>Address - - > - - - - -   - - > - - - - - <%=$r%>City - - > - - <%=$r%>State - - <%= include('select-county.html', %select_hash ) %> - <%= include('select-state.html', %select_hash ) %> - - <%=$r%>Zip - - > - - - - - <%=$r%>Country - <%= include('select-country.html', %select_hash ) %> - - - - <%= $daytime_label %> - - > - - - - - <%= $night_label %> - - > - - - - - Fax - - > - - - - -<%=$r%>required fields
        - diff --git a/httemplate/edit/cust_main/select-country.html b/httemplate/edit/cust_main/select-country.html deleted file mode 100644 index 014effd66..000000000 --- a/httemplate/edit/cust_main/select-country.html +++ /dev/null @@ -1,72 +0,0 @@ -<% - - my %opt = @_; - foreach my $opt (qw( county state country prefix onchange disabled )) { - $opt{$_} = '' unless exists($opt{$_}) && defined($opt{$_}); - } - - my $conf = new FS::Conf; - my $countrydefault = $conf->config('countrydefault') || 'US'; - -%> - -<%= include('/elements/xmlhttp.html', - 'url' => $p.'misc/states.cgi', - 'subs' => [ $opt{'prefix'}. 'get_states' ], - ) -%> - - - - - diff --git a/httemplate/edit/cust_main/select-county.html b/httemplate/edit/cust_main/select-county.html deleted file mode 100644 index 3de380b31..000000000 --- a/httemplate/edit/cust_main/select-county.html +++ /dev/null @@ -1,91 +0,0 @@ -<% - - my %opt = @_; - foreach my $opt (qw( county state country prefix onchange disabled )) { - $opt{$_} = '' unless exists($opt{$_}) && defined($opt{$_}); - } - - my $sql = "SELECT COUNT(*) FROM cust_main_county". - " WHERE county IS NOT NULL AND county != ''"; - my $sth = dbh->prepare($sql) or die dbh->errstr; - $sth->execute or die $sth->errstr; - my $countyflag = $sth->fetchrow_arrayref->[0]; - -%> - -<% if ( $countyflag ) { %> - - <%= include('/elements/xmlhttp.html', - 'url' => $p.'misc/counties.cgi', - 'subs' => [ $opt{'prefix'}. 'get_counties' ], - ) -%> - - - - - -<% } else { %> - - - - - -<% } %> diff --git a/httemplate/edit/cust_main/select-state.html b/httemplate/edit/cust_main/select-state.html deleted file mode 100644 index 98e685ab8..000000000 --- a/httemplate/edit/cust_main/select-state.html +++ /dev/null @@ -1,27 +0,0 @@ -<% - - my %opt = @_; - foreach my $opt (qw( county state country prefix onchange disabled )) { - $opt{$_} = '' unless exists($opt{$_}) && defined($opt{$_}); - } - -%> - - - diff --git a/httemplate/edit/cust_main_county-expand.cgi b/httemplate/edit/cust_main_county-expand.cgi deleted file mode 100755 index 9f314a457..000000000 --- a/httemplate/edit/cust_main_county-expand.cgi +++ /dev/null @@ -1,54 +0,0 @@ - -<% - -my($taxnum, $delim, $expansion, $taxclass ); -my($query) = $cgi->keywords; -if ( $cgi->param('error') ) { - $taxnum = $cgi->param('taxnum'); - $delim = $cgi->param('delim'); - $expansion = $cgi->param('expansion'); - $taxclass = $cgi->param('taxclass'); -} else { - $query =~ /^(taxclass)?(\d+)$/ - or die "Illegal taxnum (query $query)"; - $taxclass = $1 ? 'taxclass' : ''; - $taxnum = $2; - $delim = 'n'; - $expansion = ''; -} - -my $cust_main_county = qsearchs('cust_main_county',{'taxnum'=>$taxnum}) - or die "cust_main_county.taxnum $taxnum not found"; -die "Can't expand entry!" if $cust_main_county->getfield('county'); - -my $p1 = popurl(1); -print header("Tax Rate (expand)", menubar( - 'Main Menu' => popurl(2), -)); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print < - - - Separate by -END -print 'line (broken on some browsers) or', - 'whitespace.'; -print < -
        - - - - -END - -%> diff --git a/httemplate/edit/cust_main_county.cgi b/httemplate/edit/cust_main_county.cgi deleted file mode 100755 index 4bcfcbe9b..000000000 --- a/httemplate/edit/cust_main_county.cgi +++ /dev/null @@ -1,98 +0,0 @@ - -<% - -print header("Edit tax rates", menubar( - 'Main Menu' => popurl(2), -)); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print qq!
        !, &table(), < - Country - State - County - Taxclass
        (per-package classification) -END - -if ( dbdef->table('cust_main_county')->column('taxname') ) { - print 'Tax name
        (printed on invoices)'; -} - -print <Tax - Exempt
        per
        month -END - -if ( dbdef->table('cust_main_county')->column('setuptax') ) { - print 'Setup
        fee
        exempt'; -} -if ( dbdef->table('cust_main_county')->column('recurtax') ) { - print 'Recurring
        fee
        exempt'; -} - -print ''; - -foreach my $cust_main_county ( sort { $a->country cmp $b->country - or $a->state cmp $b->state - or $a->county cmp $b->county - } qsearch('cust_main_county',{}) ) { - my($hashref)=$cust_main_county->hashref; - print < - $hashref->{country} -END - - print "{state} - ? ' BGCOLOR="#ffffff">'.$hashref->{state} - : ' BGCOLOR="#cccccc">(ALL)' - , ""; - - print "{county} - ? ' BGCOLOR="#ffffff">'. $hashref->{county} - : ' BGCOLOR="#cccccc">(ALL)' - , ""; - - print "{taxclass} - ? ' BGCOLOR="#ffffff">'. $hashref->{taxclass} - : ' BGCOLOR="#cccccc">(ALL)' - , ""; - - print qq!! - if dbdef->table('cust_main_county')->column('taxname'); - - print qq!
        %
        !; - print qq!
        \$
        !; - - print qq!{setuptax} =~ /^Y$/i ? ' CHECKED' : '' ). - '>' - if dbdef->table('cust_main_county')->column('setuptax'); - - print qq!{recurtax} =~ /^Y$/i ? ' CHECKED' : '' ). - '>' - if dbdef->table('cust_main_county')->column('recurtax'); - - print ''; - -} - -print < - - - - - -END - -%> diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi deleted file mode 100755 index 0370ab726..000000000 --- a/httemplate/edit/cust_pay.cgi +++ /dev/null @@ -1,135 +0,0 @@ -<% - -my $conf = new FS::Conf; - -my %payby = ( - 'BILL' => 'Check', - 'CASH' => 'Cash', - 'WEST' => 'Western Union', - 'MCRD' => 'Manual credit card', -); - -my($link, $linknum, $paid, $payby, $payinfo, $quickpay, $_date); -if ( $cgi->param('error') ) { - $link = $cgi->param('link'); - $linknum = $cgi->param('linknum'); - $paid = $cgi->param('paid'); - $payby = $cgi->param('payby'); - $payinfo = $cgi->param('payinfo'); - $quickpay = $cgi->param('quickpay'); - $_date = $cgi->param('_date') ? str2time($cgi->param('_date')) : time; -} elsif ( $cgi->param('custnum') =~ /^(\d+)$/ ) { - $link = 'custnum'; - $linknum = $1; - $paid = ''; - $payby = $cgi->param('payby') || 'BILL'; - $payinfo = ''; - $quickpay = $cgi->param('quickpay'); - $_date = time; -} elsif ( $cgi->param('invnum') =~ /^(\d+)$/ ) { - $link = 'invnum'; - $linknum = $1; - $paid = ''; - $payby = $cgi->param('payby') || 'BILL'; - $payinfo = ""; - $quickpay = ''; - $_date = time; -} else { - die "illegal query ". $cgi->keywords; -} - -my $paybatch = "webui-$_date-$$-". rand() * 2**32; - -my $title = 'Post '. $payby{$payby}. ' payment'; -$title .= " against Invoice #$linknum" if $link eq 'invnum'; - -%> - -<%= header($title, '') %> - -<% if ( $cgi->param('error') ) { %> -Error: <%= $cgi->param('error') %> -

        -<% } %> - -<%= ntable("#cccccc",2) %> - - - - - - -
        - - - - -<% -my $money_char = $conf->config('money_char') || '$'; -my $custnum; -if ( $link eq 'invnum' ) { - my $cust_bill = qsearchs('cust_bill', { 'invnum' => $linknum } ) - or die "unknown invnum $linknum"; - $custnum = $cust_bill->custnum; -} elsif ( $link eq 'custnum' ) { - $custnum = $linknum; -} -%> - -<%= small_custview($custnum, $conf->config('countrydefault')) %> - - - -

        -Payment -<%= ntable("#cccccc", 2) %> - - Date - - "> - - - - - - Amount - <%= $money_char %> - by <%= $payby{$payby} %> - - -<% if ( $payby eq 'BILL' ) { %> - - - Check # - - - -<% } %> - - -<% if ( $link eq 'custnum' ) { %> - Auto-apply
        to invoices - -<% } elsif ( $link eq 'invnum' ) { %> - Apply to - Invoice #<%= $linknum %> only - -<% } %> - - - - - - -
        - -
        - - diff --git a/httemplate/edit/cust_pkg.cgi b/httemplate/edit/cust_pkg.cgi deleted file mode 100755 index ce1c86612..000000000 --- a/httemplate/edit/cust_pkg.cgi +++ /dev/null @@ -1,130 +0,0 @@ - -<% - -my %pkg = (); -my %comment = (); -my %all_pkg = (); -my %all_comment = (); -#foreach (qsearch('part_pkg', { 'disabled' => '' })) { -# $pkg{ $_ -> getfield('pkgpart') } = $_->getfield('pkg'); -# $comment{ $_ -> getfield('pkgpart') } = $_->getfield('comment'); -#} -foreach (qsearch('part_pkg', {} )) { - $all_pkg{ $_ -> getfield('pkgpart') } = $_->getfield('pkg'); - $all_comment{ $_ -> getfield('pkgpart') } = $_->getfield('comment'); - next if $_->disabled; - $pkg{ $_ -> getfield('pkgpart') } = $_->getfield('pkg'); - $comment{ $_ -> getfield('pkgpart') } = $_->getfield('comment'); -} - -my($custnum, %remove_pkg); -if ( $cgi->param('error') ) { - $custnum = $cgi->param('custnum'); - %remove_pkg = map { $_ => 1 } $cgi->param('remove_pkg'); -} else { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $custnum = $1; - %remove_pkg = (); -} - -my $p1 = popurl(1); -print header("Add/Edit Packages", ''); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print qq!
        !; - -print qq!!; - -#current packages -my @cust_pkg = qsearch('cust_pkg',{ 'custnum' => $custnum, 'cancel' => '' } ); - -if (@cust_pkg) { - print < - - Pkg # - Package description - -

        -END - - foreach (sort { $all_pkg{$a->getfield('pkgpart')} cmp $all_pkg{$b->getfield('pkgpart')} } @cust_pkg) { - my($pkgnum,$pkgpart)=( $_->getfield('pkgnum'), $_->getfield('pkgpart') ); - my $checked = $remove_pkg{$pkgnum} ? ' CHECKED' : ''; - print < - - $pkgnum:\n - $all_pkg{$pkgpart} - $all_comment{$pkgpart} - -END - } - print qq!

        !; -} - -print <
        -END - -my $cust_main = qsearchs('cust_main',{'custnum'=>$custnum}); -my $agent = qsearchs('agent',{'agentnum'=> $cust_main->agentnum }); - -my %agent_pkgs = map { ( $_->pkgpart , $all_pkg{$_->pkgpart} ) } - qsearch('type_pkgs',{'typenum'=> $agent->typenum }); - -my $count = 0; -my $pkgparts = 0; -print < - - Qty. - Package Description - -END -#foreach my $type_pkgs ( qsearch('type_pkgs',{'typenum'=> $agent->typenum }) ) { -foreach my $pkgpart ( sort { $agent_pkgs{$a} cmp $agent_pkgs{$b} } - keys(%agent_pkgs) ) { - $pkgparts++; - next unless exists $pkg{$pkgpart}; #skip disabled ones - #print qq!! if ( $count == 0 ); - my $value = $cgi->param("pkg$pkgpart") || 0; - print < - - $pkgpart: - $pkg{$pkgpart} - $comment{$pkgpart} - -END - $count ++ ; - #if ( $count == 2 ) { - # print qq!\n! ; - # $count = 0; - #} -} -print qq!!; - -unless ( $pkgparts ) { - my $p2 = popurl(2); - my $typenum = $agent->typenum; - my $agent_type = qsearchs( 'agent_type', { 'typenum' => $typenum } ); - my $atype = $agent_type->atype; - print <package definitions, or agent type -$atype not allowed to purchase -any packages.) -END -} - -#submit -print < - - - -END -%> diff --git a/httemplate/edit/cust_refund.cgi b/httemplate/edit/cust_refund.cgi deleted file mode 100755 index 8955c7cee..000000000 --- a/httemplate/edit/cust_refund.cgi +++ /dev/null @@ -1,94 +0,0 @@ - -<% - -my $conf = new FS::Conf; -my $custnum = $cgi->param('custnum'); -my $refund = $cgi->param('refund'); -my $payby = $cgi->param('payby'); -my $reason = $cgi->param('reason'); - -my( $paynum, $cust_pay ) = ( '', '' ); -if ( $cgi->param('paynum') =~ /^(\d+)$/ ) { - $paynum = $1; - $cust_pay = qsearchs('cust_pay', { paynum=>$paynum } ) - or die "unknown payment # $paynum"; - $refund ||= $cust_pay->unrefunded; - if ( $custnum ) { - die "payment # $paynum is not for specified customer # $custnum" - unless $custnum == $cust_pay->custnum; - } else { - $custnum = $cust_pay->custnum; - } -} -die "no custnum or paynum specified!" unless $custnum; - -my $_date = time; - -my $p1 = popurl(1); - -print header('Refund '. ucfirst(lc($payby)). ' payment', ''); -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); -print <config('countrydefault')); -
        - - - - - - - - -
        -END - -if ( $cust_pay ) { - - #false laziness w/FS/FS/cust_pay.pm - my $payby = $cust_pay->payby; - my $payinfo = $cust_pay->payinfo; - $payby =~ s/^BILL$/Check/ if $payinfo; - $payby =~ s/^CHEK$/Electronic check/; - $payinfo = $cust_pay->payinfo_masked if $payby eq 'CARD'; - - print '
        Payment'. ntable("#cccccc", 2). - 'Amount$'. - $cust_pay->paid. ''. - 'Date'. - time2str("%D",$cust_pay->_date). ''. - 'Method'. - ucfirst(lc($payby)). ' # '. $payinfo. ''; - #false laziness w/FS/FS/cust_main::realtime_refund_bop - if ( $cust_pay->paybatch =~ /^(\w+):(\w+)(:(\w+))?$/ ) { - my ( $processor, $auth, $order_number ) = ( $1, $2, $4 ); - print 'Processor'. - $processor. ''; - print 'Authorization'. - $auth. '' - if length($auth); - print 'Order number'. - $order_number. '' - if length($order_number); - } - print ''; -} - -print '
        Refund'. ntable("#cccccc", 2). - 'Date'. - time2str("%D",$_date). ''; - -print qq!Amount\$!; - -print qq!Reason!; - -print < -
        - - - - -END - -%> diff --git a/httemplate/edit/msgcat.cgi b/httemplate/edit/msgcat.cgi deleted file mode 100755 index ee9b1c6b3..000000000 --- a/httemplate/edit/msgcat.cgi +++ /dev/null @@ -1,58 +0,0 @@ - -<% - -print header("Edit Message catalog", menubar( -# 'Main Menu' => $p, -)), '
        '; - -print qq!Error: !. $cgi->param('error'). - '

        ' - if $cgi->param('error'); - -my $widget = new HTML::Widgets::SelectLayers( - 'selected_layer' => 'en_US', - 'options' => { 'en_US'=>'en_US' }, - 'form_action' => 'process/msgcat.cgi', - 'layer_callback' => sub { - my $layer = shift; - my $html = qq!!. - "
        Messages for locale $layer
        ". table(). - "Code". - "Message"; - $html .= "en_US Message" unless $layer eq 'en_US'; - $html .= ''; - - #foreach my $msgcat ( sort { $a->msgcode cmp $b->msgcode } - # qsearch('msgcat', { 'locale' => $layer } ) ) { - foreach my $msgcat ( qsearch('msgcat', { 'locale' => $layer } ) ) { - $html .= - ''. $msgcat->msgnum. ''. $msgcat->msgcode. ''. - '!; - unless ( $layer eq 'en_US' ) { - my $en_msgcat = qsearchs('msgcat', { - 'locale' => 'en_US', - 'msgcode' => $msgcat->msgcode, - } ); - $html .= ''. $en_msgcat->msg. ''; - } - $html .= ''; - } - - $html .= '
        '; - - $html; - }, - -); - -print $widget->html; - -print < - - -END - -%> diff --git a/httemplate/edit/part_bill_event.cgi b/httemplate/edit/part_bill_event.cgi deleted file mode 100755 index 32ca47af4..000000000 --- a/httemplate/edit/part_bill_event.cgi +++ /dev/null @@ -1,376 +0,0 @@ - -<% - -if ( $cgi->param('eventpart') && $cgi->param('eventpart') =~ /^(\d+)$/ ) { - $cgi->param('eventpart', $1); -} else { - $cgi->param('eventpart', ''); -} - -my ($query) = $cgi->keywords; -my $action = ''; -my $part_bill_event = ''; -if ( $cgi->param('error') ) { - $part_bill_event = new FS::part_bill_event ( { - map { $_, scalar($cgi->param($_)) } fields('part_bill_event') - } ); -} -if ( $query && $query =~ /^(\d+)$/ ) { - $part_bill_event ||= qsearchs('part_bill_event',{'eventpart'=>$1}); -} else { - $part_bill_event ||= new FS::part_bill_event {}; -} -$action ||= $part_bill_event->eventpart ? 'Edit' : 'Add'; -my $hashref = $part_bill_event->hashref; - -print header("$action Invoice Event Definition", menubar( - 'Main Menu' => popurl(2), - 'View all invoice events' => popurl(2). 'browse/part_bill_event.cgi', -)); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print '
        '. - ''; -print "Invoice Event #", $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)"; - -print ntable("#cccccc",2), <Payby -After days -END - -print 'Disabled'; -print '{disabled} eq "Y"; -print '>'; -print ''; - -print 'Action'; - -#print ntable(); - -sub select_pkgpart { - my $label = shift; - my $plandata = shift; - my %selected = map { $_=>1 } split(/,\s*/, $plandata->{$label}); - qq('; -} - -sub select_agentnum { - my $plandata = shift; - #my $agentnum = $plandata->{'agentnum'}; - my %agentnums = map { $_=>1 } split(/,\s*/, $plandata->{'agentnum'}); - ''; -} - -my $conf = new FS::Conf; -my $money_char = $conf->config('money_char') || '$'; - -#this is pretty kludgy right here. -tie my %events, 'Tie::IxHash', - - 'fee' => { - 'name' => 'Late fee', - 'code' => '$cust_main->charge( %%%charge%%%, \'%%%reason%%%\' );', - 'html' => - 'Amount '. - '
        Reason ', - 'weight' => 10, - }, - 'suspend' => { - 'name' => 'Suspend', - 'code' => '$cust_main->suspend();', - 'weight' => 10, - }, - 'suspend' => { - 'name' => 'Suspend if balance (this invoice and previous) over', - 'code' => '$cust_bill->cust_suspend_if_balance_over( %%%balanceover%%% );', - 'html' => " $money_char ". '', - 'weight' => 10, - }, - 'suspend-if-pkgpart' => { - 'name' => 'Suspend packages', - 'code' => '$cust_main->suspend_if_pkgpart(%%%if_pkgpart%%%);', - 'html' => sub { &select_pkgpart('if_pkgpart', @_) }, - 'weight' => 10, - }, - 'suspend-unless-pkgpart' => { - 'name' => 'Suspend packages except', - 'code' => '$cust_main->suspend_unless_pkgpart(%%%unless_pkgpart%%%);', - 'html' => sub { &select_pkgpart('unless_pkgpart', @_) }, - 'weight' => 10, - }, - 'cancel' => { - 'name' => 'Cancel', - 'code' => '$cust_main->cancel();', - 'weight' => 10, - }, - - 'addpost' => { - 'name' => 'Add postal invoicing', - 'code' => '$cust_main->invoicing_list_addpost(); "";', - 'weight' => 20, - }, - - 'comp' => { - 'name' => 'Pay invoice with a complimentary "payment"', - 'code' => '$cust_bill->comp();', - 'weight' => 30, - }, - - 'realtime-card' => { - 'name' => 'Run card with a Business::OnlinePayment realtime gateway', - 'code' => '$cust_bill->realtime_card();', - 'weight' => 30, - }, - - 'realtime-check' => { - 'name' => 'Run check with a Business::OnlinePayment realtime gateway', - 'code' => '$cust_bill->realtime_ach();', - 'weight' => 30, - }, - - 'realtime-lec' => { - 'name' => 'Run phone bill ("LEC") billing with a Business::OnlinePayment realtime gateway', - 'code' => '$cust_bill->realtime_lec();', - 'weight' => 30, - }, - - 'batch-card' => { - 'name' => 'Add card to the pending credit card batch', - 'code' => '$cust_bill->batch_card();', - 'weight' => 40, - }, - - 'send' => { - 'name' => 'Send invoice (email/print)', - 'code' => '$cust_bill->send();', - 'weight' => 50, - }, - - 'send_alternate' => { - 'name' => 'Send invoice (email/print) with alternate template', - 'code' => '$cust_bill->send(\'%%%templatename%%%\');', - 'html' => - '', - 'weight' => 50, - }, - - 'send_if_newest' => { - 'name' => 'Send invoice (email/print) with alternate template, if it is still the newest invoice (useful for late notices - set to 31 days or later)', - 'code' => '$cust_bill->send_if_newest(\'%%%if_newest_templatename%%%\');', - 'html' => - '', - 'weight' => 50, - }, - - 'send_agent' => { - 'name' => 'Send invoice (email/print) ', - 'code' => '$cust_bill->send(\'%%%agent_templatename%%%\', [ %%%agentnum%%% ], \'%%%agent_invoice_from%%%\');', - 'html' => sub { - ' - - - - - - - - - - - - -
        only for agent(s) '. &select_agentnum(@_). '
        with template - -
        email From: - -
        '; - }, - 'weight' => 50, - }, - - 'send_csv_ftp' => { - 'name' => 'Upload CSV invoice data to an FTP server', - 'code' => '$cust_bill->send_csv( protocol => \'ftp\', - server => \'%%%ftpserver%%%\', - username => \'%%%ftpusername%%%\', - password => \'%%%ftppassword%%%\', - dir => \'%%%ftpdir%%%\', - \'format\' => \'%%%ftpformat%%%\', - );', - 'html' => - ''. - ''. - ''. - ''. - ''. - ''. - ''. - ''. - ''. - '
        Format ("default" or "billco"): '. - ''. - ''. - '
        FTP server: '. - '
        FTP username: '. - ''. - '
        FTP password: '. - ''. - '
        FTP directory: '. - '
        ', - 'weight' => 50, - }, - - 'spool_csv' => { - 'name' => 'Spool CSV invoice data', - 'code' => '$cust_bill->spool_csv( - \'format\' => \'%%%spoolformat%%%\', - \'dest\' => \'%%%spooldest%%%\', - \'agent_spools\' => \'%%%spoolagent_spools%%%\', - );', - 'html' => sub { - my $plandata = shift; - - my $html = - ''. - ''. - ''. - ''. - ''. - ''. - ''. - '
        Format: '. - ''. - '
        For destination: '. - ''. - '
        Individual per-agent spools? {'spoolagent_spools'} ? 'CHECKED' : '' ). - '>'. - '
        '; - - $html; - }, - 'weight' => 50, - }, - - 'bill' => { - 'name' => 'Generate invoices (normally only used with a Late Fee event)', - 'code' => '$cust_main->bill();', - 'weight' => 60, - }, - - 'apply' => { - 'name' => 'Apply unapplied payments and credits', - 'code' => '$cust_main->apply_payments; $cust_main->apply_credits; "";', - 'weight' => 70, - }, - - 'collect' => { - 'name' => 'Collect on invoices (normally only used with a Late Fee and Generate Invoice events)', - 'code' => '$cust_main->collect();', - 'weight' => 80, - }, - -; - -foreach my $event ( keys %events ) { - my %plandata = map { /^(\w+) (.*)$/; ($1, $2); } - split(/\n/, $part_bill_event->plandata); - my $html = $events{$event}{html}; - if ( ref($html) eq 'CODE' ) { - $html = &{$html}(\%plandata); - } - while ( $html =~ /%%%(\w+)%%%/ ) { - my $field = $1; - $html =~ s/%%%$field%%%/$plandata{$field}/; - } - - print ntable( "#cccccc", 2). - qq!plan; - print qq!VALUE="!. $event. ":". $events{$event}{weight}. ":". - encode_entities($events{$event}{code}). - qq!">$events{$event}{name}!; - print ''. $html. '' if $html; - print qq!!; - print ''; -} - -#print ''; - -print < - -END - -print qq!!; -%> - - - - - diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi deleted file mode 100644 index b3d42bd96..000000000 --- a/httemplate/edit/part_export.cgi +++ /dev/null @@ -1,128 +0,0 @@ - -<% - -#if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) { -# $cgi->param('clone', $1); -#} else { -# $cgi->param('clone', ''); -#} - -my($query) = $cgi->keywords; -my $action = ''; -my $part_export = ''; -if ( $cgi->param('error') ) { - $part_export = new FS::part_export ( { - map { $_, scalar($cgi->param($_)) } fields('part_export') - } ); -} elsif ( $query =~ /^(\d+)$/ ) { - $part_export = qsearchs('part_export', { 'exportnum' => $1 } ); -} else { - $part_export = new FS::part_export; -} -$action ||= $part_export->exportnum ? 'Edit' : 'Add'; - -#my $exports = FS::part_export::export_info($svcdb); -my $exports = FS::part_export::export_info(); - -my %layers = map { $_ => "$_ - ". $exports->{$_}{desc} } keys %$exports; -$layers{''}=''; - -my $widget = new HTML::Widgets::SelectLayers( - 'selected_layer' => $part_export->exporttype, - 'options' => \%layers, - 'form_name' => 'dummy', - 'form_action' => 'process/part_export.cgi', - 'form_text' => [qw( exportnum machine )], -# 'form_checkbox' => [qw()], - 'html_between' => "\n", - 'layer_callback' => sub { - my $layer = shift; - my $html = qq!!. - ntable("#cccccc",2); - - $html .= 'Description'. - $exports->{$layer}{notes}. '' - if $layer; - - foreach my $option ( keys %{$exports->{$layer}{options}} ) { - my $optinfo = $exports->{$layer}{options}{$option}; - die "Retreived non-ref export info option from $layer export: $optinfo" - unless ref($optinfo); - my $label = $optinfo->{label}; - my $type = defined($optinfo->{type}) ? $optinfo->{type} : 'text'; - my $value = $cgi->param($option) - || ( $part_export->exportnum && $part_export->option($option) ) - || ( (exists $optinfo->{default} && !$part_export->exportnum) - ? $optinfo->{default} - : '' - ); - $html .= qq!$label!; - if ( $type eq 'select' ) { - $html .= qq!'; - } elsif ( $type eq 'textarea' ) { - $html .= qq!'; - } elsif ( $type eq 'text' ) { - $html .= qq!'; - } elsif ( $type eq 'checkbox' ) { - $html .= qq!{$layer}{options}} ). '">'; - - $html .= ''; - - $html .= ''; - - $html; - }, -); - -%> -<%= header("$action Export", menubar( - 'Main Menu' => popurl(2), -), ' onLoad="visualize()"') -%> - -<% if ( $cgi->param('error') ) { %> - Error: <%= $cgi->param('error') %> -

        -<% } %> - -
        - - -<%= ntable("#cccccc",2) %> - - Export host - - - - - - Export - <%= $widget->html %> - - - diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi deleted file mode 100755 index 60365f628..000000000 --- a/httemplate/edit/part_pkg.cgi +++ /dev/null @@ -1,335 +0,0 @@ -<% - -if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) { - $cgi->param('clone', $1); -} else { - $cgi->param('clone', ''); -} -if ( $cgi->param('pkgnum') && $cgi->param('pkgnum') =~ /^(\d+)$/ ) { - $cgi->param('pkgnum', $1); -} else { - $cgi->param('pkgnum', ''); -} - -my ($query) = $cgi->keywords; - -my $part_pkg = ''; -if ( $cgi->param('error') ) { - $part_pkg = new FS::part_pkg ( { - map { $_, scalar($cgi->param($_)) } fields('part_pkg') - } ); -} - -my $action = ''; -my $clone_part_pkg = ''; -my $pkgpart = ''; -if ( $cgi->param('clone') ) { - $pkgpart = $cgi->param('clone'); - $action = 'Custom Pricing'; - $clone_part_pkg= qsearchs('part_pkg', { 'pkgpart' => $cgi->param('clone') } ); - $part_pkg ||= $clone_part_pkg->clone; - $part_pkg->disabled('Y'); #isn't sticky on errors -} elsif ( $query && $query =~ /^(\d+)$/ ) { - $part_pkg ||= qsearchs('part_pkg',{'pkgpart'=>$1}); - $pkgpart = $part_pkg->pkgpart; -} else { - unless ( $part_pkg ) { - $part_pkg = new FS::part_pkg {}; - $part_pkg->plan('flat'); - } -} -unless ( $part_pkg->plan ) { #backwards-compat - $part_pkg->plan('flat'); - $part_pkg->plandata("setup_fee=". $part_pkg->setup. "\n". - "recur_fee=". $part_pkg->recur. "\n"); -} -$action ||= $part_pkg->pkgpart ? 'Edit' : 'Add'; -my $hashref = $part_pkg->hashref; - -%> - -<%= header("$action Package Definition", menubar( - 'Main Menu' => popurl(2), - 'View all packages' => popurl(2). 'browse/part_pkg.cgi', -)) %> - -<% #), ' onLoad="visualize()"'); %> - -<% if ( $cgi->param('error') ) { %> - Error: <%= $cgi->param('error') %> -<% } %> - - - -<%= itable('',8,1) %> - -Package information - -<%= ntable("#cccccc",2) %> - - Package Definition # - - <%= $hashref->{pkgpart} ? $hashref->{pkgpart} : "(NEW)" %> - - - - Package (customer-visible) - - - - - - Comment (customer-hidden) - - - - - - Promotional code - - - - - - Disable new orders - - {disabled} eq 'Y' ? ' CHECKED' : '' %> - - - - - - - -Tax information -<%= ntable("#cccccc", 2) %> - - Setup fee tax exempt - - {setuptax} eq 'Y' ? ' CHECKED' : '' %>> - - - - Recurring fee tax exempt - - {recurtax} eq 'Y' ? ' CHECKED' : '' %>> - - - -<% my $conf = new FS::Conf; %> -<% if ( $conf->exists('enable_taxclasses') ) { %> - - - Tax class - - <%= include('/elements/select-taxclass.html', $hashref->{taxclass} ) %> - - - -<% } else { %> - - <%= include('/elements/select-taxclass.html', $hashref->{taxclass} ) %> - -<% } %> - - - - - -<% - -my $thead = "\n\n". ntable('#cccccc', 2). - 'Quan.'; -$thead .= 'Primary' - if dbdef->table('pkg_svc')->column('primary_svc'); -$thead .= 'Service'; - -%> - -<%= itable('', 4, 1) %> -

        Services included -<%= $thead %> - -<% - -my $where = "WHERE disabled IS NULL OR disabled = ''"; -if ( $pkgpart ) { - $where .= " OR 0 < ( SELECT quantity FROM pkg_svc - WHERE pkg_svc.svcpart = part_svc.svcpart - AND pkgpart = $pkgpart - )"; -} -my @part_svc = qsearch('part_svc', {}, '', $where); -my $q_part_pkg = $clone_part_pkg || $part_pkg; -my %pkg_svc = map { $_->svcpart => $_ } $q_part_pkg->pkg_svc; - -my @fixups = (); -my $count = 0; -my $columns = 3; -foreach my $part_svc ( @part_svc ) { - my $svcpart = $part_svc->svcpart; - my $pkg_svc = $pkg_svc{$svcpart} - || new FS::pkg_svc ( { - 'pkgpart' => $pkgpart, - 'svcpart' => $svcpart, - 'quantity' => 0, - 'primary_svc' => '', - } ); - - push @fixups, "pkg_svc$svcpart"; - -%> - - - - quantity || 0 %>"> - - - - primary_svc =~ /^Y/i ? ' CHECKED' : '' %>> - - - - <%= $part_svc->svc %> <%= $part_svc->disabled =~ /^Y/i ? ' (DISABLED' : '' %> - - - - <% $count++; - foreach ( 1 .. $columns-1 ) { - if ( $count == int( $_ * scalar(@part_svc) / $columns ) ) { - %> - <%= $thead %> - - <% } - } - %> - -<% } %> - - - -<% foreach my $f ( qw( clone pkgnum ) ) { %> - -<% } %> - - -<% - -# prolly should be in database -tie my %plans, 'Tie::IxHash', %{ FS::part_pkg::plan_info() }; - -my %plandata = map { /^(\w+)=(.*)$/; ( $1 => $2 ); } - split("\n", ($clone_part_pkg||$part_pkg)->plandata ); -#warn join("\n", map { "$_: $plandata{$_}" } keys %plandata ). "\n"; - -tie my %options, 'Tie::IxHash', map { $_=>$plans{$_}->{'name'} } keys %plans; - -my @form_select = (); -if ( $conf->exists('enable_taxclasses') ) { - push @form_select, 'taxclass'; -} else { - push @fixups, 'taxclass'; #hidden -} - -my @form_radio = (); -if ( dbdef->table('pkg_svc')->column('primary_svc') ) { - push @form_radio, 'pkg_svc_primary'; -} - -tie my %freq, 'Tie::IxHash', %FS::part_pkg::freq; -if ( $part_pkg->dbdef_table->column('freq')->type =~ /(int)/i ) { - delete $freq{$_} foreach grep { ! /^\d+$/ } keys %freq; -} - -my $widget = new HTML::Widgets::SelectLayers( - 'selected_layer' => $part_pkg->plan, - 'options' => \%options, - 'form_name' => 'dummy', - 'form_action' => 'process/part_pkg.cgi', - 'form_text' => [ qw(pkg comment promo_code clone pkgnum pkgpart), - @fixups - ], - 'form_checkbox' => [ qw(setuptax recurtax disabled) ], - 'form_radio' => \@form_radio, - 'form_select' => \@form_select, - 'layer_callback' => sub { - my $layer = shift; - my $html = qq!!. - ntable("#cccccc",2); - $html .= ' - - Recurring fee frequency - '; - - my $href = $plans{$layer}->{'fields'}; - foreach my $field ( exists($plans{$layer}->{'fieldorder'}) - ? @{$plans{$layer}->{'fieldorder'}} - : keys %{ $href } - ) { - - $html .= ''. $href->{$field}{'name'}. ''; - - if ( ! exists($href->{$field}{'type'}) ) { - $html .= qq!!; - } elsif ( $href->{$field}{'type'} eq 'checkbox' ) { - $html .= qq!'; - } elsif ( $href->{$field}{'type'} =~ /^select/ ) { - $html .= '{$field}{'type'} eq 'select_multiple'; - $html .= qq! NAME="$field" onChange="fchanged(this)">!; - foreach my $record ( - qsearch( $href->{$field}{'select_table'}, - $href->{$field}{'select_hash'} ) - ) { - my $value = $record->getfield($href->{$field}{'select_key'}); - $html .= qq!