Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 480c6709

Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt

  • ID 480c67096c7aab3ccfe6b55e8d981975c7f08578
  • Vorgänger ff575015
  • Nachfolger 7d03f241

Beim Erstellen eines Lieferantenauftrages aus einem Kundenauftrag wird überprüft, ob eine Lieferadresse ausgewählt oder eingegeben war. Wenn ja, so wird der Benutzer gefragt, ob er diese Lieferadresse beibehalten will, damit der Lieferant direkt an den Kunden liefern kann.

Unterschiede anzeigen:

SL/Common.pm
348 348
  return 1;
349 349
}
350 350

  
351
sub get_shipto_by_id {
352
  $main::lxdebug->enter_sub();
353

  
354
  my ($self, $myconfig, $form, $shipto_id, $prefix) = @_;
355

  
356
  $prefix ||= "";
357

  
358
  my $dbh = $form->dbconnect($myconfig);
359

  
360
  my $query = qq|SELECT * FROM shipto WHERE shipto_id = ?|;
361
  my $ref   = selectfirst_hashref_query($form, $dbh, $query, $shipto_id);
362

  
363
  map { $form->{"${prefix}${_}"} = $ref->{$_} } keys %{ $ref } if $ref;
364

  
365
  $dbh->disconnect();
366

  
367
  $main::lxdebug->leave_sub();
368
}
369

  
351 370
1;
bin/mozilla/oe.pl
2496 2496
  $lxdebug->leave_sub();
2497 2497
}
2498 2498

  
2499
sub check_for_direct_delivery_yes {
2500
  $lxdebug->enter_sub();
2501

  
2502
  $form->{direct_delivery_checked} = 1;
2503
  delete @{$form}{grep /^shipto/, keys %{ $form }};
2504
  map { s/^CFDD_//; $form->{$_} = $form->{"CFDD_${_}"} } grep /^CFDD_/, keys %{ $form };
2505
  $form->{shipto} = 1;
2506
  purchase_order();
2507
  $lxdebug->leave_sub();
2508
}
2509

  
2510
sub check_for_direct_delivery_no {
2511
  $lxdebug->enter_sub();
2512

  
2513
  $form->{direct_delivery_checked} = 1;
2514
  delete @{$form}{grep /^shipto/, keys %{ $form }};
2515
  purchase_order();
2516

  
2517
  $lxdebug->leave_sub();
2518
}
2519

  
2520
sub check_for_direct_delivery {
2521
  $lxdebug->enter_sub();
2522

  
2523
  if ($form->{direct_delivery_checked}
2524
      || (!$form->{shiptoname} && !$form->{shiptostreet} && !$form->{shipto_id})) {
2525
    $lxdebug->leave_sub();
2526
    return;
2527
  }
2528

  
2529
  if ($form->{shipto_id}) {
2530
    Common->get_shipto_by_id(\%myconfig, $form, $form->{shipto_id}, "CFDD_");
2531

  
2532
  } else {
2533
    map { $form->{"CFDD_${_}"} = $form->{$_ } } grep /^shipto/, keys %{ $form };
2534
  }
2535

  
2536
  delete $form->{action};
2537
  $form->{VARIABLES} = [ map { { "key" => $_, "value" => $form->{$_} } } grep { ref $_ eq "" } keys %{ $form } ];
2538

  
2539
  $form->header();
2540
  print $form->parse_html_template("oe/check_for_direct_delivery");
2541

  
2542
  $lxdebug->leave_sub();
2543

  
2544
  exit 0;
2545
}
2546

  
2499 2547
sub purchase_order {
2500 2548
  $lxdebug->enter_sub();
2501 2549

  
2550
  if ($form->{type} eq 'sales_order') {
2551
    check_for_direct_delivery();
2552
  }
2553

  
2502 2554
  if (   $form->{type} eq 'sales_quotation'
2503 2555
      || $form->{type} eq 'request_quotation') {
2504 2556
    OE->close_order(\%myconfig, \%$form);
......
2602 2654
  $lxdebug->leave_sub();
2603 2655
}
2604 2656

  
2657
sub yes {
2658
  call_sub($form->{yes_nextsub});
2659
}
2660

  
2661
sub no {
2662
  call_sub($form->{no_nextsub});
2663
}
locale/de/all
239 239
  'Cannot save preferences!'    => 'Benutzereinstellungen k?nnen nicht gespeichert werden!',
240 240
  'Cannot save quotation!'      => 'Angebot kann nicht gespeichert werden!',
241 241
  'Cannot storno storno invoice!' => 'Kann eine Stornorechnung nicht stornieren',
242
  'Carry over shipping address' => 'Lieferadresse übernehmen',
242 243
  'Cash'                        => 'Zahlungsverkehr',
243 244
  'Cc'                          => 'Cc',
244 245
  'Change Admin Password'       => 'Administratorpasswort ?ndern',
......
374 375
  'Display'                     => 'Anzeigen',
375 376
  'Display file'                => 'Datei anzeigen',
376 377
  'Do you want to <b>limit</b> your search?' => 'Wollen Sie Ihre Suche <b>spezialisieren</b>?',
378
  'Do you want to carry this shipping address over to the new purchase order so that the vendor can deliver the goods directly to your customer?' => 'Wollen Sie diese Lieferadresse in den neuen Lieferantenauftrag &uuml;bernehmen, damit der H&auml;ndler die Waren direkt an Ihren Kunden liefern kann?',
377 379
  'Done'                        => 'Fertig',
378 380
  'Download the backup'         => 'Die Sicherungsdatei herunterladen',
379 381
  'Draft saved.'                => 'Entwurf gespeichert.',
......
1205 1207
  'You cannot continue before all required modules are installed.' => 'Sie k&ouml;nnen nicht fortfahren, bevor alle ben&ouml;tigten Pakete installiert sind.',
1206 1208
  'You cannot continue until all unknown units have been mapped to known ones.' => 'Sie k&ouml;nnen nicht fortfahren, bis alle unbekannten Einheiten in neue Einheiten umgewandelt wurden.',
1207 1209
  'You did not enter a name!'   => 'Sie haben keinen Namen eingegeben!',
1210
  'You have entered or selected the following shipping address for this customer:' => 'Sie haben die folgende Lieferadresse eingegeben oder ausgew&auml;hlt:',
1208 1211
  'You have to chose a dimension unit and a service unit which will then be assigned to those entries.' => 'Sie m&uuml;ssen eine Ma&szlig;- und eine Dienstleistungseinheit ausw&auml;hlen, die diesen Waren und Dienstleistungen, denen noch keine Einheit zugeordnet ist, zugeordnet wird.',
1209 1212
  'You have to chose which unit to save for each of them.' => 'Sie m&uuml;ssen f&uuml;r jeden Artikel die neue Einheit ausw&auml;hlen.',
1210 1213
  'You have to create new Buchungsgruppen for all the combinations of inventory, income and expense accounts that have been used already.' => 'Sie m&uuml;ssen neue Buchungsgruppen f&uuml;r alle Kombinationen aus Inventar-, Erl&ouml;s- und Aufwandskonto, die bereits benutzt wurden.',
locale/de/oe
284 284
  'build_std_url'               => 'build_std_url',
285 285
  'calculate_qty'               => 'calculate_qty',
286 286
  'call_sub'                    => 'call_sub',
287
  'check_for_direct_delivery'   => 'check_for_direct_delivery',
288
  'check_for_direct_delivery_no' => 'check_for_direct_delivery_no',
289
  'check_for_direct_delivery_yes' => 'check_for_direct_delivery_yes',
287 290
  'check_form'                  => 'check_form',
288 291
  'check_name'                  => 'check_name',
289 292
  'check_project'               => 'check_project',
......
308 311
  'name_selected'               => 'name_selected',
309 312
  'new_item'                    => 'new_item',
310 313
  'new_license'                 => 'new_license',
314
  'no'                          => 'no',
311 315
  'order'                       => 'order',
312 316
  'order_links'                 => 'order_links',
313 317
  'orders'                      => 'orders',
......
360 364
  'l?schen'                     => 'delete',
361 365
  'email'                       => 'e_mail',
362 366
  'rechnung'                    => 'invoice',
367
  'nein'                        => 'no',
363 368
  'auftrag'                     => 'order',
364 369
  'drucken'                     => 'print',
365 370
  'lieferantenauftrag'          => 'purchase_order',
templates/webpages/oe/check_for_direct_delivery_de.html
1
<body>
2

  
3
 <div class="listtop" width="100%">Lieferadresse &uuml;bernehmen</div>
4

  
5
 <p>Sie haben die folgende Lieferadresse eingegeben oder ausgew&auml;hlt:</p>
6

  
7
 <p>
8
  <table>
9
   <tr>
10
    <th align="right" valign="top">Name:</th>
11
    <td valign="top"><TMPL_VAR CFDD_shiptoname ESCAPE=HTML></td>
12
   </tr>
13

  
14
   <tr>
15
    <th align="right" valign="top">Abteilung:</th>
16
    <td valign="top"><TMPL_VAR CFDD_shiptodepartment_1 ESCAPE=HTML></td>
17
   </tr>
18

  
19
   <tr>
20
    <th align="right" valign="top">&nbsp;</th>
21
    <td valign="top"><TMPL_VAR CFDD_shiptodepartment_2 ESCAPE=HTML></td>
22
   </tr>
23

  
24
   <tr>
25
    <th align="right" valign="top">Stra?e:</th>
26
    <td valign="top"><TMPL_VAR CFDD_shiptostreet ESCAPE=HTML></td>
27
   </tr>
28

  
29
   <tr>
30
    <th align="right" valign="top">PLZ:</th>
31
    <td valign="top"><TMPL_VAR CFDD_shiptozipcode ESCAPE=HTML></td>
32
   </tr>
33

  
34
   <tr>
35
    <th align="right" valign="top">Stadt:</th>
36
    <td valign="top"><TMPL_VAR CFDD_shiptocity ESCAPE=HTML></td>
37
   </tr>
38

  
39
   <tr>
40
    <th align="right" valign="top">Land:</th>
41
    <td valign="top"><TMPL_VAR CFDD_shiptocountry ESCAPE=HTML></td>
42
   </tr>
43

  
44
   <tr>
45
    <th align="right" valign="top">Kontakt:</th>
46
    <td valign="top"><TMPL_VAR CFDD_shiptocontact ESCAPE=HTML></td>
47
   </tr>
48

  
49
   <tr>
50
    <th align="right" valign="top">Telefon:</th>
51
    <td valign="top"><TMPL_VAR CFDD_shiptophone ESCAPE=HTML></td>
52
   </tr>
53

  
54
   <tr>
55
    <th align="right" valign="top">Fax:</th>
56
    <td valign="top"><TMPL_VAR CFDD_shiptofax ESCAPE=HTML></td>
57
   </tr>
58

  
59
   <tr>
60
    <th align="right" valign="top">eMail:</th>
61
    <td valign="top"><TMPL_VAR CFDD_shiptoemail ESCAPE=HTML></td>
62
   </tr>
63
  </table>
64
 </p>
65

  
66
  Wollen Sie diese Lieferadresse in den neuen Lieferantenauftrag &uuml;bernehmen, damit der H&auml;ndler die Waren direkt an Ihren Kunden liefern kann?
67
 </p>
68

  
69
 <form method="post" action="oe.pl">
70

  
71
  <p>
72
   <input type="submit" name="action" value="Ja">&nbsp;
73
   <input type="submit" name="action" value="Nein">
74
  </p>
75

  
76
  <input type="hidden" name="yes_nextsub" value="check_for_direct_delivery_yes">
77
  <input type="hidden" name="no_nextsub" value="check_for_direct_delivery_no">
78

  
79
  <TMPL_LOOP VARIABLES>
80
   <input type="hidden" name="<TMPL_VAR key ESCAPE=HTML>" value="<TMPL_VAR value ESCAPE=HTML>"></TMPL_LOOP>
81

  
82
 </form>
83

  
84
</body>
85
</html>
templates/webpages/oe/check_for_direct_delivery_master.html
1
<body>
2

  
3
 <div class="listtop" width="100%"><translate>Carry over shipping address</translate></div>
4

  
5
 <p><translate>You have entered or selected the following shipping address for this customer:</translate></p>
6

  
7
 <p>
8
  <table>
9
   <tr>
10
    <th align="right" valign="top"><translate>Name</translate>:</th>
11
    <td valign="top"><TMPL_VAR CFDD_shiptoname ESCAPE=HTML></td>
12
   </tr>
13

  
14
   <tr>
15
    <th align="right" valign="top"><translate>Department</translate>:</th>
16
    <td valign="top"><TMPL_VAR CFDD_shiptodepartment_1 ESCAPE=HTML></td>
17
   </tr>
18

  
19
   <tr>
20
    <th align="right" valign="top">&nbsp;</th>
21
    <td valign="top"><TMPL_VAR CFDD_shiptodepartment_2 ESCAPE=HTML></td>
22
   </tr>
23

  
24
   <tr>
25
    <th align="right" valign="top"><translate>Street</translate>:</th>
26
    <td valign="top"><TMPL_VAR CFDD_shiptostreet ESCAPE=HTML></td>
27
   </tr>
28

  
29
   <tr>
30
    <th align="right" valign="top"><translate>Zipcode</translate>:</th>
31
    <td valign="top"><TMPL_VAR CFDD_shiptozipcode ESCAPE=HTML></td>
32
   </tr>
33

  
34
   <tr>
35
    <th align="right" valign="top"><translate>City</translate>:</th>
36
    <td valign="top"><TMPL_VAR CFDD_shiptocity ESCAPE=HTML></td>
37
   </tr>
38

  
39
   <tr>
40
    <th align="right" valign="top"><translate>Country</translate>:</th>
41
    <td valign="top"><TMPL_VAR CFDD_shiptocountry ESCAPE=HTML></td>
42
   </tr>
43

  
44
   <tr>
45
    <th align="right" valign="top"><translate>Contact</translate>:</th>
46
    <td valign="top"><TMPL_VAR CFDD_shiptocontact ESCAPE=HTML></td>
47
   </tr>
48

  
49
   <tr>
50
    <th align="right" valign="top"><translate>Phone</translate>:</th>
51
    <td valign="top"><TMPL_VAR CFDD_shiptophone ESCAPE=HTML></td>
52
   </tr>
53

  
54
   <tr>
55
    <th align="right" valign="top"><translate>Fax</translate>:</th>
56
    <td valign="top"><TMPL_VAR CFDD_shiptofax ESCAPE=HTML></td>
57
   </tr>
58

  
59
   <tr>
60
    <th align="right" valign="top"><translate>E-mail</translate>:</th>
61
    <td valign="top"><TMPL_VAR CFDD_shiptoemail ESCAPE=HTML></td>
62
   </tr>
63
  </table>
64
 </p>
65

  
66
  <translate>Do you want to carry this shipping address over to the new purchase order so that the vendor can deliver the goods directly to your customer?</translate>
67
 </p>
68

  
69
 <form method="post" action="oe.pl">
70

  
71
  <p>
72
   <input type="submit" name="action" value="<translate>Yes</translate>">&nbsp;
73
   <input type="submit" name="action" value="<translate>No</translate>">
74
  </p>
75

  
76
  <input type="hidden" name="yes_nextsub" value="check_for_direct_delivery_yes">
77
  <input type="hidden" name="no_nextsub" value="check_for_direct_delivery_no">
78

  
79
  <TMPL_LOOP VARIABLES>
80
   <input type="hidden" name="<TMPL_VAR key ESCAPE=HTML>" value="<TMPL_VAR value ESCAPE=HTML>"></TMPL_LOOP>
81

  
82
 </form>
83

  
84
</body>
85
</html>

Auch abrufbar als: Unified diff