package NGCP::Panel::Form::Contract::Customer; use HTML::FormHandler::Moose; use Storable qw(); extends 'NGCP::Panel::Form::Contract::Base'; has_field 'contact' => ( type => '+NGCP::Panel::Field::ContactWithReseller', label => 'Contact', validate_when_empty => 1, element_attr => { rel => ['tooltip'], title => ['The contact id this contract belongs to.'] }, ); has_field 'billing_profile_definition' => ( type => 'Select', label => 'Set billing profiles', options => [ { value => 'id', label => 'single (actual billing mapping)' }, { value => 'profiles', label => 'schedule (billing mapping intervals)' }, { value => 'package', label => 'package (initial profiles of a profile package)' }, ], element_attr => { rel => ['tooltip'], title => ['Choose to set a billing profile package or set billing profiles directly.'], javascript => ' onchange="switchBillingProfileDefinition(this);" ', }, ); has_block 'all_mappings' => ( #type => '+NGCP::Panel::Block::Contract::ProfileNetworkMappings', type => '+NGCP::Panel::Block::Contract::ProfileMappingsTimeline', ); has_field 'billing_profiles' => ( type => 'Repeatable', label => 'Billing Profiles', setup_for_js => 1, do_wrapper => 1, do_label => 1, tags => { controls_div => 1, before_element => '%all_mappings', }, wrapper_class => [qw/hfh-rep-block/], element_attr => { rel => ['tooltip'], title => ['The billing profile / billing network interval schedule used to charge this contract.'] }, deflate_value_method => \&_deflate_billing_mappings, inflate_default_method => \&_inflate_billing_mappings, ); has_field 'billing_profiles.row' => ( type => '+NGCP::Panel::Field::ProfileNetwork', label => 'Billing Profile/Network', do_label => 0, tags => { before_element => '