|
Lines 103-115
$template->param(
Link Here
|
| 103 |
output_html_with_http_headers( $input, $cookie, $template->output ); |
103 |
output_html_with_http_headers( $input, $cookie, $template->output ); |
| 104 |
|
104 |
|
| 105 |
sub delsubmit { |
105 |
sub delsubmit { |
| 106 |
my $ean = $schema->resultset('EdifactEan')->find( |
106 |
my $id = $input->param('id'); |
| 107 |
{ |
107 |
my $e = $schema->resultset('EdifactEan')->find( $id ); |
| 108 |
branchcode => $input->param('branchcode'), |
108 |
$e->delete if $e; |
| 109 |
ean => $input->param('ean') |
|
|
| 110 |
} |
| 111 |
); |
| 112 |
$ean->delete; |
| 113 |
return; |
109 |
return; |
| 114 |
} |
110 |
} |
| 115 |
|
111 |
|
|
Lines 128-134
sub addsubmit {
Link Here
|
| 128 |
} |
124 |
} |
| 129 |
|
125 |
|
| 130 |
sub editsubmit { |
126 |
sub editsubmit { |
| 131 |
warn "DESC: " . $input->param('description'); |
|
|
| 132 |
$schema->resultset('EdifactEan')->search( |
127 |
$schema->resultset('EdifactEan')->search( |
| 133 |
{ |
128 |
{ |
| 134 |
branchcode => $input->param('oldbranchcode'), |
129 |
branchcode => $input->param('oldbranchcode'), |
|
Lines 146-161
sub editsubmit {
Link Here
|
| 146 |
} |
141 |
} |
| 147 |
|
142 |
|
| 148 |
sub show_ean { |
143 |
sub show_ean { |
| 149 |
my $branchcode = $input->param('branchcode'); |
144 |
my $id = $input->param('id'); |
| 150 |
my $ean = $input->param('ean'); |
145 |
my $e = $schema->resultset('EdifactEan')->find( $id ); |
| 151 |
if ( $branchcode && $ean ) { |
146 |
$template->param( ean => $e ); |
| 152 |
my $e = $schema->resultset('EdifactEan')->find( |
|
|
| 153 |
{ |
| 154 |
ean => $ean, |
| 155 |
branchcode => $branchcode, |
| 156 |
} |
| 157 |
); |
| 158 |
$template->param( ean => $e ); |
| 159 |
} |
| 160 |
return; |
147 |
return; |
| 161 |
} |
148 |
} |