MT#5879 Lost part of merge on master head.

ipeshinskaya/InvoiceTemplate5
Irina Peshinskaya 11 years ago committed by Victor Seva
parent b6361e6cf3
commit 4ed50bd105

@ -804,6 +804,19 @@ sub edit_balance :Chained('base') :PathPart('balance/edit') :Args(0) {
$c->stash(form => $form);
$c->stash(edit_flag => 1);
}
sub subscriber_ajax :Chained('base') :PathPart('subscriber/ajax') :Args(0) {
my ($self, $c) = @_;
my $res = $c->stash->{contract}->voip_subscribers->search({
'provisioning_voip_subscriber.is_pbx_group' => 0,
'me.status' => { '!=' => 'terminated' },
},{
join => 'provisioning_voip_subscriber',
});
NGCP::Panel::Utils::Datatables::process($c, $res, $c->stash->{subscriber_dt_columns});
$c->detach( $c->view("JSON") );
}
sub pbx_group_ajax :Chained('base') :PathPart('pbx/group/ajax') :Args(0) {
my ($self, $c) = @_;
my $res = $c->stash->{contract}->voip_subscribers->search({

@ -17,6 +17,14 @@ sub epoch_local {
epoch => $epoch,
);
}
sub from_string {
my $s = shift;
# just for convenience, if date is passed like xxxx-xx-xx xx:xx:xx,
# convert it to xxxx-xx-xxTxx:xx:xx
$s =~ s/^(\d{4}\-\d{2}\-\d{2})\s+(\d.+)$/$1T$2/;
my $ts = DateTime::Format::ISO8601->parse_datetime($s);
return $ts;
}
sub new_local {
my %params;

Loading…
Cancel
Save