<input type="text" name="email" value="">
</td>
</tr>
- <tr>
- <th class="glm-required" align="right">Billing First Name</th>
- <td>
- <input type="text" name="billing_fname" value="">
- </td>
- </tr>
- <tr>
- <th class="glm-required" align="right">Billing Last Name</th>
- <td>
- <input type="text" name="billing_lname" value="">
- </td>
- </tr>
+ {if $settings.billing_contact_name_enabled}
+ <tr>
+ <th class="glm-required" align="right">Billing Contact Name</th>
+ <td>
+ <input type="text" name="billing_contact_name" value="">
+ </td>
+ </tr>
+ {else}
+ <tr>
+ <th class="glm-required" align="right">Billing First Name</th>
+ <td>
+ <input type="text" name="billing_fname" value="">
+ </td>
+ </tr>
+ <tr>
+ <th class="glm-required" align="right">Billing Last Name</th>
+ <td>
+ <input type="text" name="billing_lname" value="">
+ </td>
+ </tr>
+ {/if}
<tr>
<th class="glm-required" align="right">Billing Address 1</th>
<td>
<input type="text" name="billing_city" value="">
</td>
</tr>
+ {if $settings.billing_county_enabled}
+ <tr>
+ <th class="glm-required" align="right">Billing State</th>
+ <td>
+ <select name="billing_county">
+ <option value=""></option>
+ {foreach $billingAccount.fieldData.billing_county.list as $s}
+ <option value="{$s.value}">
+ {$s.name}
+ </option>
+ {/foreach}
+ </select>
+ </td>
+ </tr>
+ {else}
+ <input type="hidden" name="billing_county" value="{$account.fieldData.billing_county.value}">
+ {/if}
<tr>
<th class="glm-required" align="right">Billing State</th>
<td>
anniversary_date = $( 'input[name="anniversary_date"' ),
renewal_date = $( 'input[name="renewal_date"' ),
email = $( 'input[name="email"' ),
- billing_fname = $( 'input[name="billing_fname"' ),
- billing_lname = $( 'input[name="billing_lname"' ),
+ {if $settings.billing_contact_name_enabled}
+ billing_contact_name = $( 'input[name="billing_contact_name"' ),
+ {else}
+ billing_fname = $( 'input[name="billing_fname"' ),
+ billing_lname = $( 'input[name="billing_lname"' ),
+ {/if}
billing_addr1 = $( 'input[name="billing_addr1"' ),
billing_addr2 = $( 'input[name="billing_addr2"' ),
billing_city = $( 'input[name="billing_city"' ),
+ {if $settings.billing_county_enabled} billing_county = $( 'select[name="billing_county"' ), {else} billing_county = $( 'input[name="billing_county"' ), {/if}
billing_state = $( 'select[name="billing_state"' ),
billing_zip = $( 'input[name="billing_zip"' ),
billing_phone = $( 'input[name="billing_phone"' ),
customTips = $( '.validateCustomTips' ),
allAccountFields = $( [] ).add( ref_name ) .add( anniversary_date ) .add( renewal_date )
.add( email ) .add( billing_addr1 ) .add( billing_addr2 ) .add( billing_city )
- .add( billing_state ) .add( billing_zip ) .add( billing_fname ) .add( billing_lname )
+ .add( billing_state ) .add( billing_zip ) .add(billing_county)
+ {if $settings.billing_contact_name_enabled}.add( billing_contact_name ){else}.add( billing_fname ).add( billing_lname ){/if}
.add( billing_phone ) , // Array holding the form fields - add line_item form
allCustomFields = $([]).add( customFieldName ).add( customFieldAmount ).add( customFieldParent ),
invoiceTypeJSON = $.parseJSON( '{$invoiceTypeJSON}' ); // Json object with all of the invoices types
dataType: 'json'
}).done(function( msg ){
if ( msg.status === true ) {
- // console.log( 'account: ', msg.account );
+ console.log( 'account: ', msg.account );
// TODO: check these function as they don't seem to work!
// Reload the account select
updateBillingAccountList( msg.account );
{ source: availableAccountMembers }
);
// Here we change the value of the Billing Account field.
- $('#glm_member_accounts').val( selectedAccount.ref_dest.name );
+ $('#glm_member_accounts').val( selectedAccount.ref_name );
$('#glm_member_accounts_hidden').val( selectedAccount.id );
$('#invoice_due_date').val( selectedAccount.next_anniversary_date );
});