Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a751b16c

Von Moritz Bunkus vor fast 18 Jahren hinzugefügt

  • ID a751b16cead5e56b62e18ee616e04323919f5fe1
  • Vorgänger 6715bd15
  • Nachfolger 4671a79f

Speichern von Verkäufern bei Kundenstammdaten.

Unterschiede anzeigen:

SL/Form.pm
1578 1578
  $main::lxdebug->leave_sub();
1579 1579
}
1580 1580

  
1581
sub _get_employees {
1582
  $main::lxdebug->enter_sub();
1583

  
1584
  my ($self, $dbh, $key) = @_;
1585

  
1586
  $key = "all_employees" unless ($key);
1587
  $self->{$key} =
1588
    selectall_hashref_query($self, $dbh, qq|SELECT * FROM employee|);
1589

  
1590
  $main::lxdebug->leave_sub();
1591
}
1592

  
1581 1593
sub get_lists {
1582 1594
  $main::lxdebug->enter_sub();
1583 1595

  
......
1616 1628
    $self->_get_taxcharts($dbh, $params{"taxcharts"});
1617 1629
  }
1618 1630

  
1631
  if ($params{"employees"}) {
1632
    $self->_get_employees($dbh, $params{"employees"});
1633
  }
1634

  
1619 1635
  $dbh->disconnect();
1620 1636

  
1621 1637
  $main::lxdebug->leave_sub();
bin/mozilla/ct.pl
42 42
use CGI;
43 43
use Data::Dumper;
44 44

  
45
require "bin/mozilla/common.pl";
46

  
45 47
1;
46 48

  
47 49
# end of main
......
583 585
sub form_header {
584 586
  $lxdebug->enter_sub();
585 587

  
588
  $form->get_lists("employees" => "ALL_SALESMEN");
589

  
586 590
  $form->{taxincluded} = ($form->{taxincluded}) ? "checked" : "";
587 591
  $form->{creditlimit} =
588 592
    $form->format_amount(\%myconfig, $form->{creditlimit}, 0);
......
638 642
  }
639 643

  
640 644
  $taxzone = qq|
641
	      <tr>
642 645
		<th align=right>| . $locale->text('Steuersatz') . qq|</th>
643 646
		<td><select name=taxzone_id>$form->{selecttaxzone}</select></td>
644 647
		<input type=hidden name=selecttaxzone value="$form->{selecttaxzone}">
645
	      </tr>|;
648
|;
646 649

  
647 650
  $get_contact_url =
648 651
    "$form->{script}?login=$form->{login}&path=$form->{path}&password=$form->{password}&action=get_contact";
......
772 775
           <td><input name=c_vendor_id size=10 tabindex=18 maxlength=35 value="$form->{c_vendor_id}"></td>
773 776
|;
774 777
  }
775
  $business_salesman = "";
776
  $business          = "<th></th><td></td>";
777
  if ($vertreter) {
778
    $business_salesman = qq|
779
	<tr>
780
          <td colspan=3>
781
            <table>
782
	     <th align=right>| . $locale->text('Type of Business') . qq|</th>
783
	     <td><select name=business tabindex=1>$form->{selectbusiness}</select></td>
784
	     <th align=right>| . $locale->text('Salesman') . qq|</th>
785
	     <td><input name=salesman tabindex=2 value="$form->{salesman}"></td>
786
             <input type=hidden name=salesman_id value="$form->{salesman_id}">
787
             <input type=hidden name=oldsalesman value="$form->{oldsalesman}">
788
            </table>
789
          </td>
790
       <tr>|;
791
    $business = qq|
792
	     <th align=right>| . $locale->text('Username') . qq|</th>
793
	     <td><input name=username maxlength=50 tabindex=22 value="$form->{username}"></td>
794
 	     <th align=right>| . $locale->text('Password') . qq|</th>
795
	     <td><input name=user_password maxlength=12 tabindex=23 value="$form->{user_password}"></td>|;
796
  } else {
797
    $business = qq|
778

  
779
  $business = qq|
798 780
 	  <th align=right>| . $locale->text('Type of Business') . qq|</th>
799 781
	  <td><select name=business tabindex=22>$form->{selectbusiness}</select></td>
800 782
      |;
783

  
784
  $salesman = "";
785

  
786
  if ($form->{db} eq "customer") {
787
    my (@salesman_values, %salesman_labels);
788
    push(@salesman_values, undef);
789
    foreach my $item (@{ $form->{ALL_SALESMEN} }) {
790
      push(@salesman_values, $item->{id});
791
      $salesman_labels{$item->{id}} = $item->{name} ne "" ? $item->{name} : $item->{login};
792
    }
793

  
794
    $salesman =
795
      qq| <th align="right">| . $locale->text('Salesman') . qq|</th>
796
          <td>| .
797
      NTI($cgi->popup_menu('-name' => 'salesman_id', '-default' => $form->{salesman_id},
798
                           '-values' => \@salesman_values, '-labels' => \%salesman_labels))
799
      . qq|</td>|;
801 800
  }
802 801

  
803 802
## LINET: Create a drop-down box with all prior titles and greetings.
......
895 894

  
896 895
      <table width=100%>
897 896
	<tr height="5"></tr>
898
        $business_salesman
899 897
	<tr>
900 898
	  <th align=right nowrap>| . $locale->text($label . ' Number') . qq|</th>
901 899
	  <td><input name="$form->{db}number" size=35 maxlength=35 value="$form->{"$form->{db}number"}"></td>
......
992 990
          <td align=right>| . $locale->text('Obsolete') . qq|</td>
993 991
          <td><input name=obsolete class=checkbox type=checkbox value=1 $form->{obsolete}></td>
994 992
	</tr>
995
        $taxzone
993
        <tr>
994
          $taxzone
995
          $salesman
996
        </tr>
996 997
      </table>
997 998
  <table>
998 999
  <tr>
......
1199 1200
    ($form->{db} eq 'customer')
1200 1201
    ? $locale->text('Save and AR Transaction')
1201 1202
    : $locale->text('Save and AP Transaction');
1202
  if ($vertreter) {
1203
    $update_button =
1204
      qq|<input class=submit type=submit name=action accesskey="u" value="|
1205
      . $locale->text("Update") . qq|">|;
1206
  } else {
1207
    $update_button = "";
1208
  }
1209 1203

  
1210 1204
##<input class=submit type=submit name=action value="|.$locale->text("Save and Quotation").qq|">
1211 1205
##<input class=submit type=submit name=action value="|.$locale->text("Save and RFQ").qq|">
......
1228 1222

  
1229 1223

  
1230 1224
<br>
1231
$update_button
1232 1225
<input class=submit type=submit name=action accesskey="s" value="|
1233 1226
    . $locale->text("Save") . qq|">
1234 1227
<input class=submit type=submit name=action accesskey="s" value="|
......
1283 1276
#  # /saving the history
1284 1277
  
1285 1278
  $form->isblank("name", $locale->text("Name missing!"));
1286
  if ($vertreter && $form->{db} eq "customer") {
1287
    $form->isblank("salesman_id", $locale->text("Salesman missing!"));
1288
  }
1289 1279
  &{"CT::save_$form->{db}"}("", \%myconfig, \%$form);
1290 1280

  
1291 1281
  $form->{callback} = $form->escape($form->{callback}, 1);
......
1397 1387
  $imsg .= " saved!";
1398 1388

  
1399 1389
  $form->isblank("name", $locale->text("Name missing!"));
1400
  if ($vertreter && $form->{db} eq "customer") {
1401
    $form->isblank("salesman_id", $locale->text("Salesman missing!"));
1402
  }
1403 1390
  $rc = &{"CT::save_$form->{db}"}("", \%myconfig, \%$form);
1404 1391
  if ($rc == 3) {
1405 1392
    $form->error($locale->text('customernumber not unique!'));
......
1425 1412
  $imsg .= " saved!";
1426 1413

  
1427 1414
  $form->isblank("name", $locale->text("Name missing!"));
1428
  if ($vertreter && $form->{db} eq "customer") {
1429
    $form->isblank("salesman_id", $locale->text("Salesman missing!"));
1430
  }
1431 1415

  
1432 1416
  my $res = &{"CT::save_$form->{db}"}("", \%myconfig, \%$form);
1433 1417

  
locale/de/all
897 897
  'Sales Invoices'              => 'Kundenrechnung',
898 898
  'Sales Order'                 => 'Kundenauftrag',
899 899
  'Sales Orders'                => 'Auftr?ge',
900
  'Salesman'                    => 'Vertreter',
901
  'Salesman missing!'           => 'Vertreter fehlt!',
900
  'Salesman'                    => 'Verk?ufer/in',
902 901
  'Salesperson'                 => 'Verk?ufer',
903 902
  'Sat. Fax'                    => 'Sat. Fax',
904 903
  'Sat. Phone'                  => 'Sat. Tel.',
......
1152 1151
  'User Config'                 => 'Benutzereinstellungen',
1153 1152
  'User deleted!'               => 'Benutzer gel?scht!',
1154 1153
  'User saved!'                 => 'Benutzer gespeichert!',
1155
  'Username'                    => 'Benutzername',
1156 1154
  'Ust-IDNr'                    => 'USt-IdNr.',
1157 1155
  'Valid until'                 => 'g?ltig bis',
1158 1156
  'Value'                       => 'Wert',
locale/de/am
222 222
  'SAVED'                       => 'Gespeichert',
223 223
  'SAVED FOR DUNNING'           => 'Gespeichert',
224 224
  'SCREENED'                    => 'Angezeigt',
225
  'Salesman'                    => 'Vertreter',
225
  'Salesman'                    => 'Verk?ufer/in',
226 226
  'Save'                        => 'Speichern',
227 227
  'Screen'                      => 'Bildschirm',
228 228
  'Select a Customer'           => 'Endkunde ausw?hlen',
locale/de/ct
1 1
$self->{texts} = {
2 2
  ' Number'                     => ' Nummer',
3
  'ADDED'                       => 'Hinzugef?gt',
3 4
  'Abteilung'                   => 'Abteilung',
4 5
  'Account Number'              => 'Kontonummer',
5 6
  'Add'                         => 'Erfassen',
......
27 28
  'Customer not on file or locked!' => 'Dieser Kunde existiert nicht oder ist gesperrt.',
28 29
  'Customer saved!'             => 'Kunde gespeichert!',
29 30
  'Customers'                   => 'Kunden',
31
  'DELETED'                     => 'Gel?scht',
32
  'DUNNING STARTED'             => 'DUNNING STARTED',
30 33
  'Delete'                      => 'L?schen',
31 34
  'Department'                  => 'Abteilung',
32 35
  'Description'                 => 'Beschreibung',
33 36
  'Discount'                    => 'Rabatt',
34 37
  'E-mail'                      => 'eMail',
38
  'ELSE'                        => 'Zusatz',
35 39
  'Edit Customer'               => 'Kunde editieren',
36 40
  'Edit Vendor'                 => 'Lieferant editieren',
41
  'Enter longdescription'       => 'Langtext eingeben',
37 42
  'Fax'                         => 'Fax',
38 43
  'From'                        => 'Von',
39 44
  'GIFI'                        => 'GIFI',
40 45
  'Given Name'                  => 'Vorname',
41 46
  'Greeting'                    => 'Anrede',
47
  'History'                     => 'Historie',
42 48
  'Homepage'                    => 'Homepage',
43 49
  'ID'                          => 'Buchungsnummer',
44 50
  'Include in Report'           => 'In Bericht aufnehmen',
......
49 55
  'Kundennummer'                => 'Kundennummer',
50 56
  'Language'                    => 'Sprache',
51 57
  'Lieferungen'                 => 'Lieferungen',
58
  'MAILED'                      => 'Gesendet',
52 59
  'Mobile1'                     => 'Mobile 1',
53 60
  'Mobile2'                     => 'Mobile 2',
54 61
  'Name'                        => 'Name',
55 62
  'Name missing!'               => 'Name fehlt!',
63
  'No Customer was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Endkunde gefunden',
64
  'No Vendor was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein H?ndler gefunden',
65
  'No employee was found matching the search parameters.' => 'Es wurde kein Angestellter gefunden, auf den die Suchparameter zutreffen.',
66
  'No part was found matching the search parameters.' => 'Es wurde kein Artikel gefunden, auf den die Suchparameter zutreffen.',
67
  'No project was found matching the search parameters.' => 'Es wurde kein Projekt gefunden, auf das die Suchparameter zutreffen.',
56 68
  'Notes'                       => 'Bemerkungen',
57 69
  'Number'                      => 'Nummer',
58 70
  'Obsolete'                    => 'Ung?ltig',
59 71
  'Order'                       => 'Auftrag',
60 72
  'Orders'                      => 'Auftr?ge',
61 73
  'Orphaned'                    => 'Nie benutzt',
62
  'Password'                    => 'Passwort',
74
  'PAYMENT POSTED'              => 'Rechung gebucht',
75
  'POSTED'                      => 'Gebucht',
76
  'POSTED AS NEW'               => 'Als neu gebucht',
77
  'PRINTED'                     => 'Gedruckt',
78
  'Part Number'                 => 'Artikelnummer',
79
  'Part description'            => 'Artikelbeschreibung',
63 80
  'Payment Terms'               => 'Zahlungskonditionen',
64 81
  'Phone'                       => 'Telefon',
65 82
  'Phone1'                      => 'Telefon 1 ',
66 83
  'Phone2'                      => 'Telefon 2',
84
  'Please enter values'         => 'Bitte Werte eingeben',
67 85
  'Preisklasse'                 => 'Preisgruppe',
68 86
  'Private E-mail'              => 'Private eMail',
69 87
  'Private Phone'               => 'Privates Tel.',
70 88
  'Project'                     => 'Projekt',
89
  'Project Number'              => 'Projektnummer',
90
  'Project description'         => 'Projektbeschreibung',
71 91
  'Qty'                         => 'Menge',
72 92
  'Quotation'                   => 'Angebot',
73 93
  'Quotations'                  => 'Angebote',
94
  'SAVED'                       => 'Gespeichert',
95
  'SAVED FOR DUNNING'           => 'Gespeichert',
96
  'SCREENED'                    => 'Angezeigt',
74 97
  'SIC'                         => 'SIC',
75
  'Salesman'                    => 'Vertreter',
76
  'Salesman missing!'           => 'Vertreter fehlt!',
98
  'Salesman'                    => 'Verk?ufer/in',
77 99
  'Sat. Fax'                    => 'Sat. Fax',
78 100
  'Sat. Phone'                  => 'Sat. Tel.',
79 101
  'Save'                        => 'Speichern',
......
84 106
  'Save and Order'              => 'Speichern und Auftrag erfassen',
85 107
  'Save and Quotation'          => 'Speichern und Angebot',
86 108
  'Save and RFQ'                => 'Speichern und Lieferantenanfrage',
109
  'Select a Customer'           => 'Endkunde ausw?hlen',
110
  'Select a part'               => 'Artikel ausw&auml;hlen',
111
  'Select a project'            => 'Projekt ausw&auml;hlen',
112
  'Select an employee'          => 'Angestellten ausw&auml;hlen',
87 113
  'Select from one of the names below' => 'W?hlen Sie einen der untenstehenden Namen',
88 114
  'Shipping Address'            => 'Lieferadresse',
89 115
  'Steuersatz'                  => 'Steuersatz',
......
99 125
  'Type of Business'            => 'Kunden-/Lieferantentyp',
100 126
  'USt-IdNr.'                   => 'USt-IdNr.',
101 127
  'Unit'                        => 'Einheit',
102
  'Update'                      => 'Erneuern',
103
  'Username'                    => 'Benutzername',
128
  'Value'                       => 'Wert',
129
  'Variable'                    => 'Variable',
104 130
  'Vendor Number'               => 'Lieferantennummer',
105 131
  'Vendor deleted!'             => 'Lieferant gel?scht!',
106 132
  'Vendor not on file or locked!' => 'Dieser Lieferant existiert nicht oder ist gesperrt.',
107 133
  'Vendor saved!'               => 'Lieferant gespeichert!',
108 134
  'Vendors'                     => 'Lieferanten',
109 135
  'Zipcode'                     => 'PLZ',
136
  'bin_list'                    => 'Lagerliste',
110 137
  'customernumber not unique!'  => 'Die Kundennummer ist schon vergeben',
111 138
  'history'                     => 'Historie',
139
  'invoice'                     => 'Rechnung',
140
  'packing_list'                => 'Versandliste',
141
  'pick_list'                   => 'Entnahmeliste',
142
  'proforma'                    => 'Proforma',
143
  'purchase_order'              => 'Auftrag',
144
  'request_quotation'           => 'Angebotsanforderung',
112 145
  's'                           => 's',
146
  'sales_order'                 => 'Kundenauftrag',
147
  'sales_quotation'             => 'Verkaufsangebot',
113 148
};
114 149

  
115 150
$self->{subs} = {
151
  'E'                           => 'E',
152
  'H'                           => 'H',
153
  'NTI'                         => 'NTI',
154
  'Q'                           => 'Q',
116 155
  'add'                         => 'add',
117 156
  'add_transaction'             => 'add_transaction',
157
  'build_std_url'               => 'build_std_url',
158
  'calculate_qty'               => 'calculate_qty',
118 159
  'check_salesman'              => 'check_salesman',
119 160
  'continue'                    => 'continue',
120 161
  'delete'                      => 'delete',
162
  'delivery_customer_selection' => 'delivery_customer_selection',
121 163
  'display'                     => 'display',
122 164
  'edit'                        => 'edit',
165
  'employee_selection_internal' => 'employee_selection_internal',
123 166
  'form_footer'                 => 'form_footer',
124 167
  'form_header'                 => 'form_header',
168
  'format_dates'                => 'format_dates',
125 169
  'get_contact'                 => 'get_contact',
126 170
  'get_delivery'                => 'get_delivery',
127 171
  'get_shipto'                  => 'get_shipto',
128 172
  'list_names'                  => 'list_names',
173
  'part_selection_internal'     => 'part_selection_internal',
174
  'project_selection_internal'  => 'project_selection_internal',
175
  'reformat_numbers'            => 'reformat_numbers',
176
  'restore_form'                => 'restore_form',
129 177
  'salesman_selected'           => 'salesman_selected',
130 178
  'save'                        => 'save',
131 179
  'save_and_ap_transaction'     => 'save_and_ap_transaction',
......
135 183
  'save_and_order'              => 'save_and_order',
136 184
  'save_and_quotation'          => 'save_and_quotation',
137 185
  'save_and_rfq'                => 'save_and_rfq',
186
  'save_form'                   => 'save_form',
138 187
  'search'                      => 'search',
139 188
  'search_delivery'             => 'search_delivery',
189
  'select_employee'             => 'select_employee',
190
  'select_employee_internal'    => 'select_employee_internal',
191
  'select_part'                 => 'select_part',
192
  'select_part_internal'        => 'select_part_internal',
140 193
  'select_salesman'             => 'select_salesman',
194
  'set_longdescription'         => 'set_longdescription',
195
  'show_history'                => 'show_history',
141 196
  'update'                      => 'update',
197
  'vendor_selection'            => 'vendor_selection',
142 198
  'erfassen'                    => 'add',
143 199
  'weiter'                      => 'continue',
144 200
  'l?schen'                     => 'delete',
......
150 206
  'speichern_und_auftrag_erfassen' => 'save_and_order',
151 207
  'speichern_und_angebot'       => 'save_and_quotation',
152 208
  'speichern_und_lieferantenanfrage' => 'save_and_rfq',
153
  'erneuern'                    => 'update',
154 209
};
155 210

  
156 211
1;
locale/de/is
278 278
  'display_row'                 => 'display_row',
279 279
  'dont_load_draft'             => 'dont_load_draft',
280 280
  'draft_action_dispatcher'     => 'draft_action_dispatcher',
281
  'e_mail'                      => 'e_mail',
281 282
  'edit'                        => 'edit',
282 283
  'edit_e_mail'                 => 'edit_e_mail',
283 284
  'employee_selection_internal' => 'employee_selection_internal',

Auch abrufbar als: Unified diff