Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c04bc3bf

Von Bernd Bleßmann vor etwa 1 Jahr hinzugefügt

  • ID c04bc3bfa0e625f56f9f62b789781e851212df12
  • Vorgänger 4a6557b7
  • Nachfolger 4425d550

Lieferantenauftragsbestätigung: Controller/Maske

Unterschiede anzeigen:

SL/Controller/Order.pm
246 246
  my $text = $self->type eq SALES_ORDER_INTAKE_TYPE()        ? $::locale->text('The order intake has been deleted')
247 247
           : $self->type eq SALES_ORDER_TYPE()               ? $::locale->text('The order confirmation has been deleted')
248 248
           : $self->type eq PURCHASE_ORDER_TYPE()            ? $::locale->text('The order has been deleted')
249
           : $self->type eq PURCHASE_ORDER_CONFIRMATION_TYPE() ? $::locale->text('The order confirmation has been deleted')
249 250
           : $self->type eq SALES_QUOTATION_TYPE()           ? $::locale->text('The quotation has been deleted')
250 251
           : $self->type eq REQUEST_QUOTATION_TYPE()         ? $::locale->text('The rfq has been deleted')
251 252
           : $self->type eq PURCHASE_QUOTATION_INTAKE_TYPE() ? $::locale->text('The quotation intake has been deleted')
......
2109 2110
                           id => \@converted_from_oe_ids,
2110 2111
                           or => [  record_type => SALES_QUOTATION_TYPE(),
2111 2112
                                    record_type => REQUEST_QUOTATION_TYPE(),
2112
                                   (record_type => PURCHASE_QUOTATION_INTAKE_TYPE()) x $self->order->is_type(PURCHASE_ORDER_TYPE())  ]
2113
                                   (record_type => PURCHASE_QUOTATION_INTAKE_TYPE()) x $self->order->is_type(PURCHASE_ORDER_TYPE()),
2114
                                   (record_type => PURCHASE_ORDER_TYPE())            x $self->order->is_type(PURCHASE_ORDER_CONFIRMATION_TYPE())  ]
2113 2115
                           ])
2114 2116
                       : undef;
2115 2117

  
......
2178 2180
    $item->active_discount_source($price_source->discount_from_source($item->active_discount_source));
2179 2181
  }
2180 2182

  
2181
  if (any { $self->type eq $_ } (SALES_ORDER_INTAKE_TYPE(), SALES_ORDER_TYPE(), PURCHASE_ORDER_TYPE())) {
2183
  if (any { $self->type eq $_ } (SALES_ORDER_INTAKE_TYPE(), SALES_ORDER_TYPE(), PURCHASE_ORDER_TYPE(), PURCHASE_ORDER_CONFIRMATION_TYPE())) {
2182 2184
    # Calculate shipped qtys here to prevent calling calculate for every item via the items method.
2183 2185
    # Do not use write_to_objects to prevent order->delivered to be set, because this should be
2184 2186
    # the value from db, which can be set manually or is set when linked delivery orders are saved.
......
2340 2342
          only_if   => $self->type_data->show_menu('save_and_purchase_order'),
2341 2343
          disabled  => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
2342 2344
        ],
2345
        action => [
2346
          t8('Save and Purchase Order Confirmation'),
2347
          call      => [ 'kivi.Order.purchase_check_for_direct_delivery', { to_type => PURCHASE_ORDER_CONFIRMATION_TYPE() } ],
2348
          checks    => [ @valid, @req_trans_cost_art, @req_cusordnumber ],
2349
          only_if   => $self->type_data->show_menu('save_and_purchase_order_confirmation'),
2350
          disabled  => !$may_edit_create ? t8('You do not have the permissions to access this function.') : undef,
2351
        ],
2343 2352
        action => [
2344 2353
          t8('Save and Sales Delivery Order'),
2345 2354
          call      => [ 'kivi.Order.save', {
js/kivi.Order.js
835 835
    var type = $('#type').val();
836 836

  
837 837
    var number_info = '';
838
    if ($('#type').val() == 'sales_order_intake' || $('#type').val() == 'sales_order' || $('#type').val() == 'purchase_order') {
838
    if ($('#type').val() == 'sales_order_intake' || $('#type').val() == 'sales_order' || $('#type').val() == 'purchase_order' || $('#type').val() == 'purchase_order_confirmation') {
839 839
      number_info = $('#order_ordnumber').val();
840 840
    } else if ($('#type').val() == 'sales_quotation' || $('#type').val() == 'request_quotation' || $('#type').val() == 'purchase_quotation_intake') {
841 841
      number_info = $('#order_quonumber').val();
......
844 844
    var name_info = '';
845 845
    if ($('#type').val() == 'sales_order_intake' || $('#type').val() == 'sales_order' || $('#type').val() == 'sales_quotation') {
846 846
      name_info = $('#order_customer_id_name').val();
847
    } else if ($('#type').val() == 'purchase_order' || $('#type').val() == 'request_quotation' || $('#type').val() == 'purchase_quotation_intake') {
847
    } else if ($('#type').val() == 'purchase_order' || $('#type').val() == 'purchase_order_confirmation' || $('#type').val() == 'request_quotation' || $('#type').val() == 'purchase_quotation_intake') {
848 848
      name_info = $('#order_vendor_id_name').val();
849 849
    }
850 850

  
templates/webpages/order/tabs/_price_sources_dialog.html
8 8
[% IF (FORM.type == "sales_order" || FORM.type == "sales_order_intake" || FORM.type == "sales_quotation") %]
9 9
  [% SET price_editable = AUTH.assert('sales_edit_prices', 1) %]
10 10
[% END %]
11
[% IF (FORM.type == "purchase_order" || FORM.type == "request_quotation" || FORM.type == "purchase_quotation_intake") %]
11
[% IF (FORM.type == "purchase_order" || FORM.type == "purchase_order_confirmation" || FORM.type == "request_quotation" || FORM.type == "purchase_quotation_intake") %]
12 12
  [% SET price_editable = AUTH.assert('purchase_edit_prices', 1) %]
13 13
[% END %]
14 14
[% SET exfactor = price_source.record.exchangerate ? 1 / price_source.record.exchangerate : 1 %]
templates/webpages/order/tabs/_row.html
64 64
      [%- L.hidden_tag("order.orderitems[].longdescription", ITEM.longdescription) %]
65 65
      [%- L.button_tag("kivi.Order.show_longdescription_dialog(this)", LxERP.t8("L")) %]
66 66
    </td>
67
    [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
67
    [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") -%]
68 68
    <td nowrap>
69 69
      [%- L.div_tag(LxERP.format_amount(ITEM.shipped_qty, 2, 0) _ ' ' _ ITEM.unit, name="shipped_qty", class="numeric") %]
70 70
    </td>
......
104 104
    [% IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "sales_quotation") %]
105 105
      [% SET RIGHT_TO_EDIT_PRICES = AUTH.assert('sales_edit_prices', 1) %]
106 106
    [% END %]
107
    [% IF (SELF.type == "purchase_order" || SELF.type == "request_quotation" || SELF.type == "purchase_quotation_intake") %]
107
    [% IF (SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation" || SELF.type == "request_quotation" || SELF.type == "purchase_quotation_intake") %]
108 108
      [% SET RIGHT_TO_EDIT_PRICES = AUTH.assert('purchase_edit_prices', 1) %]
109 109
    [% END %]
110 110
    <td>
templates/webpages/order/tabs/basic_data.html
176 176
          </tr>
177 177
          [% END %]
178 178

  
179
          [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
179
          [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") -%]
180 180
          <tr>
181 181
            <th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th>
182 182
            <td>
......
200 200
          <tr>
201 201
            <th width="70%" align="right" nowrap>[% quo_nr_txt | $T8 %]</th>
202 202
            <td>
203
              [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
203
              [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") -%]
204 204
                [% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11) %]
205 205
              [%- ELSIF INSTANCE_CONF.get_sales_purchase_record_numbers_changeable %]
206 206
                [% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11, onchange='kivi.Order.set_number_in_title(this)') %]
......
213 213
            </td>
214 214
          </tr>
215 215

  
216
          [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
216
          [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") -%]
217 217
          <tr>
218 218
            <th width="70%" align="right" nowrap>[% 'Customer Order Number' | $T8 %]</th>
219 219
            <td>[% L.input_tag('order.cusordnumber', SELF.order.cusordnumber, size = 11) %]</td>
220 220
          </tr>
221 221
          [%- END -%]
222 222

  
223
          [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
223
          [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") -%]
224 224
            [%- SET transdate_txt = 'Order Date' -%]
225 225
          [%- ELSIF (SELF.type == "sales_quotation" || SELF.type == "purchase_quotation_intake") -%]
226 226
            [%- SET transdate_txt = 'Quotation Date' -%]
......
237 237
            <td>[% L.date_tag('order.tax_point_as_date', SELF.order.tax_point_as_date, class="recalc") %]</td>
238 238
          </tr>
239 239

  
240
          [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
240
          [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") -%]
241 241
            [%- SET reqdate_txt = 'Reqdate'; SET reqdate_class = 'recalc' -%]
242 242
          [%- ELSIF SELF.type == "sales_quotation" -%]
243 243
            [%- SET reqdate_txt = 'Valid until'; SET reqdate_class = '' -%]
......
312 312
                [%- END -%]
313 313
                <th id="partclass_header_id"    class="listheading" nowrap width="2">[%- 'Type'  | $T8 %]</th>
314 314
                <th id="description_header_id"  class="listheading" nowrap           ><a href='#' onClick='javascript:kivi.Order.reorder_items("description")'>[%- 'Description' | $T8 %]</a></th>
315
                [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
315
                [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") -%]
316 316
                <th id="shipped_qty_header_id"  class="listheading" nowrap width="5" ><a href='#' onClick='javascript:kivi.Order.reorder_items("shipped_qty")'>[%- 'Delivered'   | $T8 %]</a></th>
317 317
                [%- END -%]
318 318
                <th id="qty_header_id"          class="listheading" nowrap width="5" ><a href='#' onClick='javascript:kivi.Order.reorder_items("qty")'>        [%- 'Qty'         | $T8 %]</a></th>

Auch abrufbar als: Unified diff