MT#8371 Remove duplicate joins contracts_rs with billing_mapping.

ipeshinskaya/InvoiceTemplate6
Irka 11 years ago
parent 6299743d63
commit e313eb7063

@ -45,8 +45,6 @@ sub contract_list :Chained('/') :PathPart('contract') :CaptureArgs(0) {
'product.class' => 'sippeering',
'product.class' => 'reseller',
],
}, {
'join' => {'billing_mappings' => 'product'},
});
$c->stash(contract_select_rs => $rs);
@ -252,8 +250,6 @@ sub peering_list :Chained('contract_list') :PathPart('peering') :CaptureArgs(0)
my $base_rs = $c->stash->{contract_select_rs};
$c->stash->{peering_rs} = $base_rs->search({
'product.class' => 'sippeering',
}, {
'join' => {'billing_mappings' => 'product'},
});
$c->stash(ajax_uri => $c->uri_for_action("/contract/peering_ajax"));
@ -351,8 +347,6 @@ sub reseller_list :Chained('contract_list') :PathPart('reseller') :CaptureArgs(0
my $base_rs = $c->stash->{contract_select_rs};
$c->stash->{reseller_rs} = $base_rs->search({
'product.class' => 'reseller',
}, {
'join' => {'billing_mappings' => 'product'},
});
$c->stash(ajax_uri => $c->uri_for_action("/contract/reseller_ajax"));

@ -339,10 +339,7 @@ sub ajax_contract :Chained('list_reseller') :PathPart('ajax_contract') :Args(0)
'me.status' => { '!=' => 'terminated' },
'me.id' => { 'not in' => \@used_contracts },
'product.class' => 'reseller',
},{
join => { 'billing_mappings' => 'product'},
}
);
});
NGCP::Panel::Utils::Datatables::process($c, $free_contracts, $c->stash->{contract_dt_columns});
$c->detach( $c->view("JSON") );
}

@ -177,7 +177,6 @@ sub get_customer {
'product.class' => 'pbxaccount',
],
},{
join => {'billing_mappings' => 'product' },
'+select' => [ 'billing_mappings.id', 'product.class' ],
'+as' => [ 'bmid', 'product_class' ],
});

Loading…
Cancel
Save