Revision 51503748
Von Bernd Bleßmann vor mehr als 1 Jahr hinzugefügt
SL/Controller/Part.pm | ||
---|---|---|
my $position = scalar @{ $self->customerprices } + 1;
|
||
|
||
my $cu = SL::DB::PartCustomerPrice->new(
|
||
customer_id => $customer->id,
|
||
customer_partnumber => '',
|
||
price => 0,
|
||
sortorder => $position,
|
||
customer_id => $customer->id,
|
||
customer_partnumber => '',
|
||
part_description => '',
|
||
part_longdescription => '',
|
||
price => 0,
|
||
sortorder => $position,
|
||
) or die "Can't create Customerprice object";
|
||
|
||
my $row_as_html = $self->p->render(
|
||
... | ... | |
id => $id,
|
||
customer_id => $customerprice->{customer_id},
|
||
customer_partnumber => $customerprice->{customer_partnumber} || '',
|
||
part_description => $customerprice->{part_description},
|
||
part_longdescription => $customerprice->{part_longdescription},
|
||
price => $::form->parse_amount(\%::myconfig, $customerprice->{price_as_number}),
|
||
sortorder => $position,
|
||
);
|
||
... | ... | |
next unless $customerprice->{customer_id};
|
||
$position++;
|
||
my $cu = SL::DB::PartCustomerPrice->new( # parts_id => $self->part->id, # will be assigned by row add_customerprices
|
||
id => $customerprice->{id},
|
||
customer_partnumber => $customerprice->{customer_partnumber},
|
||
customer_id => $customerprice->{customer_id} || '',
|
||
price => $::form->parse_amount(\%::myconfig, $customerprice->{price_as_number} || 0),
|
||
sortorder => $position,
|
||
id => $customerprice->{id},
|
||
customer_partnumber => $customerprice->{customer_partnumber},
|
||
customer_id => $customerprice->{customer_id} || '',
|
||
part_description => $customerprice->{part_description},
|
||
part_longdescription => $customerprice->{part_longdescription},
|
||
price => $::form->parse_amount(\%::myconfig, $customerprice->{price_as_number} || 0),
|
||
sortorder => $position,
|
||
) or die "Can't create cu";
|
||
# $cu->id($customerprice->{id}) if $customerprice->{id};
|
||
push(@customerprice_array, $cu);
|
templates/design40_webpages/part/_customerprice_row.html | ||
---|---|---|
<td><img src="image/updown.png" alt="[% LxERP.t8('reorder item') %]" class="dragdrop"></td>
|
||
<td>[% customerprice.customer.customernumber | html %]</td>
|
||
<td>[% customerprice.customer.name | html %]</td>
|
||
<td>[% L.input_tag('customerprices[].customer_partnumber', customerprice.customer_partnumber, class='wi-mediumsmall', size=10) %]</td>
|
||
<td>[% L.input_tag('customerprices[].price_as_number' , customerprice.price_as_number , class="wi-small reformat_number numeric", size=10) %]</td>
|
||
<td>[% L.hidden_tag('customerprices[].lastupdate' , customerprice.lastupdate.to_kivitendo) %][% customerprice.lastupdate.to_kivitendo | html %]</td>
|
||
<td>[% L.input_tag('customerprices[].customer_partnumber' , customerprice.customer_partnumber , class='wi-mediumsmall', size=10) %]</td>
|
||
<td>[% L.input_tag('customerprices[].part_description' , customerprice.part_description , class='wi-mediumsmall', size=10) %]</td>
|
||
<td>[% L.areainput_tag('customerprices[].part_longdescription', customerprice.part_longdescription, class='wi-mediumsmall', size=10) %]</td>
|
||
<td>[% L.input_tag('customerprices[].price_as_number' , customerprice.price_as_number , class="wi-small reformat_number numeric", size=10) %]</td>
|
||
<td>[% L.hidden_tag('customerprices[].lastupdate' , customerprice.lastupdate.to_kivitendo) %][% customerprice.lastupdate.to_kivitendo | html %]</td>
|
||
</tr>
|
templates/design40_webpages/part/_customerprices.html | ||
---|---|---|
<th>[% 'Customer Number' | $T8 %]</th>
|
||
<th>[% 'Customer' | $T8 %]</th>
|
||
<th>[% 'Customer Part Number' | $T8 %]</th>
|
||
<th>[% 'Part Description' | $T8 %]</th>
|
||
<th>[% 'Long Description' | $T8 %]</th>
|
||
<th>[% 'Customer Price' | $T8 %]</th>
|
||
<th>[% 'Updated' | $T8 %]</th>
|
||
</tr>
|
||
... | ... | |
<th>[% 'Search & Add Customer' | $T8 %]</th>
|
||
<td>[% P.customer_vendor.customer_picker('add_customerprice', '', class="add_customerprice_input wi-small tooltipstered tooltipster-html", action={commit_one='kivi.Part.add_customerprice_row'}, title=LxERP.t8("Search customer by name and add by selecting")) %]</td>
|
||
<td>[% L.button_tag('kivi.Part.add_customerprice_row()', LxERP.t8('Add')) %]</td>
|
||
<td colspan="2"></td>
|
||
<td colspan="4"></td>
|
||
</tr>
|
||
</tfoot>
|
||
</table>
|
templates/webpages/part/_customerprice_row.html | ||
---|---|---|
</td>
|
||
<td>[% customerprice.customer.customernumber | html %]</td>
|
||
<td>[% customerprice.customer.name | html %] </td>
|
||
<td>[% L.input_tag('customerprices[].customer_partnumber', customerprice.customer_partnumber, size=30 ) %]</td>
|
||
<td>[% L.input_tag('customerprices[].price_as_number' , customerprice.price_as_number , size=15 , class="reformat_number numeric") %]</td>
|
||
<td>[% L.hidden_tag('customerprices[].lastupdate' , customerprice.lastupdate.to_kivitendo) %][% customerprice.lastupdate.to_kivitendo | html %]</td>
|
||
<td>[% L.input_tag('customerprices[].customer_partnumber' , customerprice.customer_partnumber , size=30 ) %]</td>
|
||
<td>[% L.input_tag('customerprices[].part_description' , customerprice.part_description , size=30 ) %]</td>
|
||
<td>[% L.areainput_tag('customerprices[].part_longdescription', customerprice.part_longdescription, size=30 ) %]</td>
|
||
<td>[% L.input_tag('customerprices[].price_as_number' , customerprice.price_as_number , size=15 , class="reformat_number numeric") %]</td>
|
||
<td>[% L.hidden_tag('customerprices[].lastupdate' , customerprice.lastupdate.to_kivitendo) %][% customerprice.lastupdate.to_kivitendo | html %]</td>
|
||
</tr>
|
templates/webpages/part/_customerprices.html | ||
---|---|---|
<th class="listheading" style='width:12em'>[% 'Customer Number' | $T8 %]</th>
|
||
<th class="listheading">[% 'Customer' | $T8 %]</th>
|
||
<th class="listheading">[% 'Customer Part Number' | $T8 %]</th>
|
||
<th class="listheading">[% 'Part Description' | $T8 %]</th>
|
||
<th class="listheading">[% 'Long Description' | $T8 %]</th>
|
||
<th class="listheading">[% 'Customer Price' | $T8 %]</th>
|
||
<th class="listheading">[% 'Updated' | $T8 %]</th>
|
||
</tr>
|
Auch abrufbar als: Unified diff
Kundenspez. Preise um Beschreibung u. Langtext erweitern: in Maske