View | Details | Raw Unified | Return to bug 16514
Collapse All | Expand All

(-)a/admin/edi_accounts.pl (-13 / +14 lines)
Lines 1-6 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
# Copyright 2011,2014 Mark Gavillet & PTFS Europe Ltd
3
# Copyright 2011,2014 Mark Gavillet & PTFS Europe Ltd
4
# Copyright 2016 PTFS Europe Ltd
4
#
5
#
5
# This file is part of Koha.
6
# This file is part of Koha.
6
#
7
#
Lines 71-92 else { Link Here
71
        # validate & display
72
        # validate & display
72
        my $id     = $input->param('id');
73
        my $id     = $input->param('id');
73
        my $fields = {
74
        my $fields = {
74
            description        => $input->param('description'),
75
            description        => scalar $input->param('description'),
75
            host               => $input->param('host'),
76
            host               => scalar $input->param('host'),
76
            username           => $input->param('username'),
77
            username           => scalar $input->param('username'),
77
            password           => $input->param('password'),
78
            password           => scalar $input->param('password'),
78
            vendor_id          => $input->param('vendor_id'),
79
            vendor_id          => scalar $input->param('vendor_id'),
79
            upload_directory   => $input->param('upload_directory'),
80
            upload_directory   => scalar $input->param('upload_directory'),
80
            download_directory => $input->param('download_directory'),
81
            download_directory => scalar $input->param('download_directory'),
81
            san                => $input->param('san'),
82
            san                => scalar $input->param('san'),
82
            transport          => $input->param('transport'),
83
            transport          => scalar $input->param('transport'),
83
            quotes_enabled     => defined $input->param('quotes_enabled'),
84
            quotes_enabled     => defined $input->param('quotes_enabled'),
84
            invoices_enabled   => defined $input->param('invoices_enabled'),
85
            invoices_enabled   => defined $input->param('invoices_enabled'),
85
            orders_enabled     => defined $input->param('orders_enabled'),
86
            orders_enabled     => defined $input->param('orders_enabled'),
86
            responses_enabled  => defined $input->param('responses_enabled'),
87
            responses_enabled  => defined $input->param('responses_enabled'),
87
            auto_orders        => defined $input->param('auto_orders'),
88
            auto_orders        => defined $input->param('auto_orders'),
88
            id_code_qualifier  => $input->param('id_code_qualifier'),
89
            id_code_qualifier  => scalar $input->param('id_code_qualifier'),
89
            plugin             => $input->param('plugin'),
90
            plugin             => scalar $input->param('plugin'),
90
        };
91
        };
91
92
92
        if ($id) {
93
        if ($id) {
Lines 101-109 else { Link Here
101
        }
102
        }
102
    }
103
    }
103
    elsif ( $op eq 'delete_confirmed' ) {
104
    elsif ( $op eq 'delete_confirmed' ) {
104
105
        my $id = $input->param('id');
105
        $schema->resultset('VendorEdiAccount')
106
        $schema->resultset('VendorEdiAccount')
106
          ->search( { id => $input->param('id'), } )->delete_all;
107
          ->search( { id => $id, } )->delete_all;
107
    }
108
    }
108
109
109
    # we do a default dispaly after deletes and saves
110
    # we do a default dispaly after deletes and saves
(-)a/admin/edi_ean_accounts.pl (-10 / +11 lines)
Lines 1-6 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
# Copyright 2012, 2014 Mark Gavillet & PTFS Europe Ltd
3
# Copyright 2012, 2014 Mark Gavillet & PTFS Europe Ltd
4
# Copyright 2016 PTFS Europe Ltd
4
#
5
#
5
# This file is part of Koha.
6
# This file is part of Koha.
6
#
7
#
Lines 113-122 sub addsubmit { Link Here
113
114
114
    my $new_ean = $schema->resultset('EdifactEan')->new(
115
    my $new_ean = $schema->resultset('EdifactEan')->new(
115
        {
116
        {
116
            branchcode        => $input->param('branchcode'),
117
            branchcode        => scalar $input->param('branchcode'),
117
            description       => $input->param('description'),
118
            description       => scalar $input->param('description'),
118
            ean               => $input->param('ean'),
119
            ean               => scalar $input->param('ean'),
119
            id_code_qualifier => $input->param('id_code_qualifier'),
120
            id_code_qualifier => scalar $input->param('id_code_qualifier'),
120
        }
121
        }
121
    );
122
    );
122
    $new_ean->insert();
123
    $new_ean->insert();
Lines 124-135 sub addsubmit { Link Here
124
}
125
}
125
126
126
sub editsubmit {
127
sub editsubmit {
127
    $schema->resultset('EdifactEan')->find( $input->param('id') )->update(
128
    my $id = $input->param('id');
129
    $schema->resultset('EdifactEan')->find( $id )->update(
128
        {
130
        {
129
            branchcode        => $input->param('branchcode'),
131
            branchcode        => scalar $input->param('branchcode'),
130
            description       => $input->param('description'),
132
            description       => scalar $input->param('description'),
131
            ean               => $input->param('ean'),
133
            ean               => scalar $input->param('ean'),
132
            id_code_qualifier => $input->param('id_code_qualifier'),
134
            id_code_qualifier => scalar $input->param('id_code_qualifier'),
133
        }
135
        }
134
    );
136
    );
135
    return;
137
    return;
136
- 

Return to bug 16514