-
-die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Edit templates')
- || $FS::CurrentUser::CurrentUser->access_right('Edit global templates')
- || $FS::CurrentUser::CurrentUser->access_right('Configuration');
-
-# Create hints pane
-
-my %substitutions = (
- 'cust_main' => [
- '$display_custnum'=> 'Customer#',
- '$agentnum' => 'Agent#',
- '$agent_name' => 'Agent name',
- '$payby' => 'Payment method',
- '$paymask' => 'Card/account# (masked)',
- '$payname' => 'Name on card/bank name',
- '$paytype' => 'Account type',
- '$payip' => 'IP address used to submit payment info',
- '$num_ncancelled_pkgs' => '# of active packages',
- '$num_cancelled_pkgs' => '# of cancelled packages',
- '$num_pkgs' => '# of packages',
- '$classname' => 'Customer class',
- '$categoryname' => 'Customer category',
- '$balance' => 'Current balance',
- '$invoicing_list_emailonly' => 'Billing email address',
- '$cust_status' => 'Status',
- '$ucfirst_cust_status' => 'Status, capitalized',
- '$cust_statuscolor' => 'Status color code',
- '$company_name' => 'Our company name',
- ],
- 'contact' => [ # duplicate this for shipping
- '$name' => 'Company and contact name',
- '$name_short' => 'Company or contact name',
- '$company' => 'Company name',
- '$contact' => 'Contact name (last, first)',
- '$contact_firstlast'=> 'Contact name (first last)',
- '$first' => 'First name',
- '$last' => 'Last name',
- '$address1' => 'Address line 1',
- '$address2' => 'Address line 2',
- '$city' => 'City',
- '$county' => 'County',
- '$state' => 'State',
- '$zip' => 'Zip',
- '$country' => 'Country',
- '$daytime' => 'Day phone',
- '$night' => 'Night phone',
- '$fax' => 'Fax',
- ],
- 'cust_bill' => [
- '$invnum' => 'Invoice#',
- ],
- 'cust_pkg' => [
- '$pkgnum' => 'Package#',
- '$pkg_label' => 'Package label (short)',
- '$pkg_label_long' => 'Package label (long)',
- '$status' => 'Status',
- '$statuscolor' => 'Status color code',
- '$start_ymd' => 'Start date',
- '$setup_ymd' => 'Setup date',
- '$last_bill_ymd' => 'Last bill date',
- '$next_bill_ymd' => 'Next bill date',
- '$susp_ymd' => 'Suspended on date',
- '$cancel_ymd' => 'Canceled on date',
- '$adjourn_ymd' => 'Adjournment date',
- '$expire_ymd' => 'Expiration date',
- '$labels_short' => 'Service labels',
- '$location_label' => 'Service location',
- ],
- 'svc_acct' => [
- '$username' => 'Login name',
- '$password' => 'Password',
- ],
- 'cust_pay' => [
- '$paynum' => 'Payment#',
- '$paid' => 'Amount',
- '$payby' => 'Payment method',
- '$date' => 'Payment date',
- '$payinfo' => 'Card/account# (masked)',
- ],
-);
-my @c = @{ $substitutions{'contact'} };
-for (my $i=0; $i<scalar(@c); $i += 2) {
- $c[$i] =~ s/\$(.*)/\$ship_$1/;