dbname dbuser dbpasswd email fax name numberformat in_numberformat password
printer role sid signature stylesheet tel templates vclimit angebote bestellungen rechnungen
anfragen lieferantenbestellungen einkaufsrechnungen taxnumber co_ustid duns menustyle
- template_format copies show_form_details);
+ template_format default_media default_printer_id copies show_form_details);
$main::lxdebug->leave_sub();
if (!$myconfig{"template_format"}) {
$myconfig{"template_format"} = "pdf";
}
- $template_format = "";
+ my $template_format = "";
foreach $item (@formats) {
$template_format .=
"<option value=\"$item->{value}\"" .
">" . H($item->{"name"}) . "</option>";
}
+ if (!$myconfig{"default_media"}) {
+ $myconfig{"default_media"} = "screen";
+ }
+ my %selected = ($myconfig{"default_media"} => "selected");
+ my $default_media = qq|
+ <option value="screen" $selected{'screen'}>| . $locale->text("Screen") . qq|</option>
+ <option value="printer" $selected{'printer'}>| . $locale->text("Printer") . qq|</option>
+ <option value="queue" $selected{'queue'}>| . $locale->text("Queue") . qq|</option>
+|;
+
+ %selected = ();
+ $selected{$myconfig{"default_printer_id"}} = "selected"
+ if ($myconfig{"default_printer_id"});
+ my $default_printer = qq|<option></option>|;
+ AM->printer(\%myconfig, $form);
+ foreach my $printer (@{$form->{"ALL"}}) {
+ $default_printer .= qq|<option value="| . Q($printer->{"id"}) .
+ qq|" $selected{$printer->{'id'}}>| .
+ H($printer->{"printer_description"}) . qq|</option>|;
+ }
+
%countrycodes = User->country_codes;
$countrycodes = '';
foreach $key (sort { $countrycodes{$a} cmp $countrycodes{$b} }
<th align=right>| . $locale->text('Default template format') . qq|</th>
<td><select name="template_format">$template_format</select></td>
</tr>
+ <tr>
+ <th align=right>| . $locale->text('Default output medium') . qq|</th>
+ <td><select name="default_media">$default_media</select></td>
+ </tr>
+ <tr>
+ <th align=right>| . $locale->text('Default printer') . qq|</th>
+ <td><select name="default_printer_id">$default_printer</select></td>
+ </tr>
<tr>
<th align=right>| . $locale->text('Number of copies') . qq|</th>
<td><input name="copies" size="10" value="| .
$myconfig{"copies"} ? $myconfig{"copies"} :
3;
+ $form->{"media"} =
+ $form->{"media"} ? $form->{"media"} :
+ $myconfig{"default_media"} ? $myconfig{"default_media"} :
+ "screen";
+
+ $lxdebug->message(0, "fm $form->{media}");
+
+ $form->{"printer_id"} =
+ defined($form->{"printer_id"}) ? $form->{"printer_id"} :
+ $myconfig{"default_printer_id"} ? $myconfig{"default_printer_id"} :
+ "";
+
$form->{PD}{ $form->{formname} } = "selected";
$form->{DF}{ $form->{format} } = "selected";
$form->{OP}{ $form->{media} } = "selected";
if ($form->{type} eq "credit_note") {
$form->{type} = "credit_note";
$form->{formname} = "credit_note";
- $form->{media} = "screen";
} else {
$form->{type} = "invoice";
$form->{formname} = "invoice";
- $form->{media} = "screen";
}
if ($form->{id}) {
sub prepare_order {
$lxdebug->enter_sub();
- $form->{media} = "screen";
$form->{formname} = $form->{type} unless $form->{formname};
my $i = 0;
'December' => 'Dezember',
'Decimalplaces' => 'Dezimalstellen',
'Decrease' => 'Verringern',
+ 'Default output medium' => 'Standardausgabekanal',
+ 'Default printer' => 'Standarddrucker',
'Default template format' => 'Standardvorlagenformat',
'Delete' => 'Löschen',
'Delete Account' => 'Konto löschen',
'Dataset upgrade' => 'Datenbankaktualisierung',
'Date Format' => 'Datumsformat',
'Debit' => 'Soll',
+ 'Default output medium' => 'Standardausgabekanal',
+ 'Default printer' => 'Standarddrucker',
'Default template format' => 'Standardvorlagenformat',
'Delete' => 'Löschen',
'Delete Account' => 'Konto löschen',
'Profit Center' => 'Erfolgsbereich',
'Project Number' => 'Projektnummer',
'Project description' => 'Projektbeschreibung',
+ 'Queue' => 'Warteschlange',
'Rate' => 'Rate',
'Receipt' => 'Zahlungseingang',
'Receivables' => 'Forderungen',
'SIC saved!' => 'SIC gespeichert',
'Salesman' => 'Vertreter',
'Save' => 'Speichern',
+ 'Screen' => 'Bildschirm',
'Select a Customer' => 'Endkunde auswählen',
'Select a part' => 'Artikel auswählen',
'Select a project' => 'Projekt auswählen',