für Aufträge und Lieferscheine.
#check_on_dunning = 0
#check_on_sepa_import = 0
+ map { $self->{$_} = SL::DB::Default->get->$_ } qw(sales_order_show_delete purchase_order_show_delete sales_delivery_order_show_delete purchase_delivery_order_show_delete);
+
$self->render('client_config/form', title => $::locale->text('Client Configuration'));
}
map { SL::DB::Default->get->update_attributes($_ => $::form->{$_}); } qw(datev_check_on_sales_invoice datev_check_on_purchase_invoice datev_check_on_ar_transaction datev_check_on_ap_transaction datev_check_on_gl_transaction);
+ map { SL::DB::Default->get->update_attributes($_ => $::form->{$_}); } qw(sales_order_show_delete purchase_order_show_delete sales_delivery_order_show_delete purchase_delivery_order_show_delete);
+
flash_later('info', $::locale->text('Client Configuration saved!'));
$self->redirect_to(action => 'edit');
table => 'defaults',
columns => [
- inventory_accno_id => { type => 'integer' },
- income_accno_id => { type => 'integer' },
- expense_accno_id => { type => 'integer' },
- fxgain_accno_id => { type => 'integer' },
- fxloss_accno_id => { type => 'integer' },
- invnumber => { type => 'text' },
- sonumber => { type => 'text' },
- weightunit => { type => 'varchar', length => 5 },
- businessnumber => { type => 'text' },
- version => { type => 'varchar', length => 8 },
- curr => { type => 'text' },
- closedto => { type => 'date' },
- revtrans => { type => 'boolean', default => 'false' },
- ponumber => { type => 'text' },
- sqnumber => { type => 'text' },
- rfqnumber => { type => 'text' },
- customernumber => { type => 'text' },
- vendornumber => { type => 'text' },
- audittrail => { type => 'boolean', default => 'false' },
- articlenumber => { type => 'text' },
- servicenumber => { type => 'text' },
- coa => { type => 'text' },
- itime => { type => 'timestamp', default => 'now()' },
- mtime => { type => 'timestamp' },
- rmanumber => { type => 'text' },
- cnnumber => { type => 'text' },
- dunning_ar_amount_fee => { type => 'integer' },
- dunning_ar_amount_interest => { type => 'integer' },
- dunning_ar => { type => 'integer' },
- pdonumber => { type => 'text' },
- sdonumber => { type => 'text' },
- ar_paid_accno_id => { type => 'integer' },
- id => { type => 'serial', not_null => 1 },
- accounting_method => { type => 'text' },
- inventory_system => { type => 'text' },
- profit_determination => { type => 'text' },
- language_id => { type => 'integer' },
- payments_changeable => { type => 'integer', default => '0', not_null => 1 },
- show_bestbefore => { type => 'boolean', default => 'false' },
- datev_check_on_sales_invoice => { type => 'boolean', default => 'true' },
- datev_check_on_purchase_invoice => { type => 'boolean', default => 'true' },
- datev_check_on_ar_transaction => { type => 'boolean', default => 'true' },
- datev_check_on_ap_transaction => { type => 'boolean', default => 'true' },
- datev_check_on_gl_transaction => { type => 'boolean', default => 'true' },
- is_changeable => { type => 'integer', default => 2, not_null => 1 },
- ir_changeable => { type => 'integer', default => 2, not_null => 1 },
- ar_changeable => { type => 'integer', default => 2, not_null => 1 },
- ap_changeable => { type => 'integer', default => 2, not_null => 1 },
- gl_changeable => { type => 'integer', default => 2, not_null => 1 },
- is_show_mark_as_paid => { type => 'boolean', default => 'true' },
- ir_show_mark_as_paid => { type => 'boolean', default => 'true' },
- ar_show_mark_as_paid => { type => 'boolean', default => 'true' },
- ap_show_mark_as_paid => { type => 'boolean', default => 'true' },
+ inventory_accno_id => { type => 'integer' },
+ income_accno_id => { type => 'integer' },
+ expense_accno_id => { type => 'integer' },
+ fxgain_accno_id => { type => 'integer' },
+ fxloss_accno_id => { type => 'integer' },
+ invnumber => { type => 'text' },
+ sonumber => { type => 'text' },
+ weightunit => { type => 'varchar', length => 5 },
+ businessnumber => { type => 'text' },
+ version => { type => 'varchar', length => 8 },
+ curr => { type => 'text' },
+ closedto => { type => 'date' },
+ revtrans => { type => 'boolean', default => 'false' },
+ ponumber => { type => 'text' },
+ sqnumber => { type => 'text' },
+ rfqnumber => { type => 'text' },
+ customernumber => { type => 'text' },
+ vendornumber => { type => 'text' },
+ audittrail => { type => 'boolean', default => 'false' },
+ articlenumber => { type => 'text' },
+ servicenumber => { type => 'text' },
+ coa => { type => 'text' },
+ itime => { type => 'timestamp', default => 'now()' },
+ mtime => { type => 'timestamp' },
+ rmanumber => { type => 'text' },
+ cnnumber => { type => 'text' },
+ accounting_method => { type => 'text' },
+ inventory_system => { type => 'text' },
+ profit_determination => { type => 'text' },
+ dunning_ar_amount_fee => { type => 'integer' },
+ dunning_ar_amount_interest => { type => 'integer' },
+ dunning_ar => { type => 'integer' },
+ pdonumber => { type => 'text' },
+ sdonumber => { type => 'text' },
+ ar_paid_accno_id => { type => 'integer' },
+ id => { type => 'serial', not_null => 1 },
+ language_id => { type => 'integer' },
+ payments_changeable => { type => 'integer', default => '0', not_null => 1 },
+ show_bestbefore => { type => 'boolean', default => 'false' },
+ datev_check_on_sales_invoice => { type => 'boolean', default => 'true' },
+ datev_check_on_purchase_invoice => { type => 'boolean', default => 'true' },
+ datev_check_on_ar_transaction => { type => 'boolean', default => 'true' },
+ datev_check_on_ap_transaction => { type => 'boolean', default => 'true' },
+ datev_check_on_gl_transaction => { type => 'boolean', default => 'true' },
+ is_changeable => { type => 'integer', default => 2, not_null => 1 },
+ ir_changeable => { type => 'integer', default => 2, not_null => 1 },
+ ar_changeable => { type => 'integer', default => 2, not_null => 1 },
+ ap_changeable => { type => 'integer', default => 2, not_null => 1 },
+ gl_changeable => { type => 'integer', default => 2, not_null => 1 },
+ is_show_mark_as_paid => { type => 'boolean', default => 'true' },
+ ir_show_mark_as_paid => { type => 'boolean', default => 'true' },
+ ar_show_mark_as_paid => { type => 'boolean', default => 'true' },
+ ap_show_mark_as_paid => { type => 'boolean', default => 'true' },
+ sales_order_show_delete => { type => 'boolean', default => 'true' },
+ purchase_order_show_delete => { type => 'boolean', default => 'true' },
+ sales_delivery_order_show_delete => { type => 'boolean', default => 'true' },
+ purchase_delivery_order_show_delete => { type => 'boolean', default => 'true' },
],
primary_key_columns => [ 'id' ],
return $self->{data}->{ap_show_mark_as_paid};
}
+sub get_sales_order_show_delete {
+ my ($self) = @_;
+ return $self->{data}->{sales_order_show_delete};
+}
+
+sub get_purchase_order_show_delete {
+ my ($self) = @_;
+ return $self->{data}->{purchase_order_show_delete};
+}
+
+sub get_sales_delivery_order_show_delete {
+ my ($self) = @_;
+ return $self->{data}->{sales_delivery_order_show_delete};
+}
+
+sub get_purchase_delivery_order_show_delete {
+ my ($self) = @_;
+ return $self->{data}->{purchase_delivery_order_show_delete};
+}
+
1;
__END__
Returns the default behavior for showing the mark as paid button for the
corresponding record type (true or false).
+=item C<get_sales_order_show_delete>
+
+=item C<get_purchase_order_show_delete>
+
+=item C<get_sales_delivery_order_show_delete>
+
+=item C<get_purchase_delivery_order_show_delete>
+
+Returns the default behavior for showing the delete button for the
+corresponding record type (true or false).
+
=back
=head1 BUGS
'Order Number missing!' => 'Auftragsnummer fehlt!',
'Order deleted!' => 'Auftrag gelöscht!',
'Ordered' => 'Vom Kunde bestellt',
+ 'Orders / Delivery Orders deleteable' => 'Aufträge / Lieferscheine löschbar',
'Orientation' => 'Seitenformat',
'Orphaned' => 'Nie benutzt',
'Other users\' follow-ups' => 'Wiedervorlagen anderer Benutzer',
'Projects' => 'Projekte',
'Projecttransactions' => 'Projektbuchungen',
'Prozentual/Absolut' => 'Prozentual/Absolut',
+ 'Purchase Delivery Orders deleteable' => 'Einkaufslieferscheine löschbar',
'Purchase Invoice' => 'Einkaufsrechnung',
'Purchase Order' => 'Lieferantenauftrag',
'Purchase Orders' => 'Lieferantenaufträge',
+ 'Purchase Orders deleteable' => 'Lieferantenaufträge löschbar',
'Purchase Price' => 'Einkaufspreis',
'Purchase Prices' => 'Einkaufspreise',
'Purchase delivery order' => 'Lieferschein (Einkauf)',
'Saldo neu' => 'Saldo neu',
'Saldo per' => 'Saldo per',
'Sale Prices' => 'Verkaufspreise',
+ 'Sales Delivery Orders deleteable' => 'Verkaufslieferscheine löschbar',
'Sales Invoice' => 'Rechnung',
'Sales Invoices' => 'Kundenrechnung',
'Sales Order' => 'Kundenauftrag',
'Sales Orders' => 'Aufträge',
+ 'Sales Orders deleteable' => 'Kundenaufträge löschbar',
'Sales Price information' => 'Verkaufspreisinformation',
'Sales Report' => 'Verkaufsbericht',
'Sales and purchase invoices with inventory transactions with taxkeys' => 'Einkaufs- und Verkaufsrechnungen mit Warenbestandsbuchungen mit Steuerschlüsseln',
'Show TODO list' => 'Aufgabenliste anzeigen',
'Show by default' => 'Standardmäßig anzeigen',
'Show custom variable search inputs' => 'Suchoptionen für Benutzerdefinierte Variablen verstecken',
+ 'Show delete button in purchase delivery orders?' => 'Soll der "Löschen"-Knopf bei Einkaufslieferscheinen angezeigt werden?',
+ 'Show delete button in purchase orders?' => 'Soll der "Löschen"-Knopf bei Lieferantenaufträgen angezeigt werden?',
+ 'Show delete button in sales delivery orders?' => 'Soll der "Löschen"-Knopf bei Verkaufslieferscheinen angezeigt werden?',
+ 'Show delete button in sales orders?' => 'Soll der "Löschen"-Knopf bei Kundenaufträgen angezeigt werden?',
'Show details' => 'Detailsanzeige',
'Show fields used for the best before date?' => 'Felder zur Eingabe des Mindesthaltbarkeitsdatums anzeigen?',
'Show follow ups...' => 'Zeige Wiedervorlagen...',
'Order Number missing!' => 'Auftragsnummer fehlt!',
'Order deleted!' => 'Auftrag gelöscht!',
'Ordered' => 'Vom Kunde bestellt',
+ 'Orders / Delivery Orders deleteable' => 'Aufträge / Lieferscheine löschbar',
'Orientation' => 'Seitenformat',
'Orphaned' => 'Nie benutzt',
'Other users\' follow-ups' => 'Wiedervorlagen anderer Benutzer',
'Projects' => 'Projekte',
'Projecttransactions' => 'Projektbuchungen',
'Prozentual/Absolut' => 'Prozentual/Absolut',
+ 'Purchase Delivery Orders deleteable' => 'Einkaufslieferscheine löschbar',
'Purchase Invoice' => 'Einkaufsrechnung',
'Purchase Order' => 'Lieferantenauftrag',
'Purchase Orders' => 'Einkaufsbestellungen',
+ 'Purchase Orders deleteable' => 'Lieferantenaufträge löschbar',
'Purchase Price' => 'Einkaufspreis',
'Purchase Prices' => 'Einkaufspreise',
'Purchase delivery order' => 'Lieferschein (Einkauf)',
'Saldo neu' => 'Saldo neu',
'Saldo per' => 'Saldo per',
'Sale Prices' => 'Verkaufspreise',
+ 'Sales Delivery Orders deleteable' => 'Verkaufslieferscheine löschbar',
'Sales Invoice' => 'Rechnung',
'Sales Invoices' => 'Ausgangsrechnungen',
'Sales Order' => 'Kundenauftrag',
'Sales Orders' => 'Aufträge',
+ 'Sales Orders deleteable' => 'Kundenaufträge löschbar',
'Sales Price information' => '',
'Sales Report' => 'Verkaufsbericht',
'Sales and purchase invoices with inventory transactions with taxkeys' => 'Einkaufs- und Verkaufsrechnungen mit Warenbestandsbuchungen mit Steuerschlüsseln',
'Show TODO list' => 'Meine Aufgaben',
'Show by default' => 'Standardmäßig anzeigen',
'Show custom variable search inputs' => 'Suche in erweiterten Datenfeldern',
+ 'Show delete button in purchase delivery orders?' => 'Soll der "Löschen"-Knopf bei Einkaufslieferscheinen angezeigt werden?',
+ 'Show delete button in purchase orders?' => 'Soll der "Löschen"-Knopf bei Lieferantenaufträgen angezeigt werden?',
+ 'Show delete button in sales delivery orders?' => 'Soll der "Löschen"-Knopf bei Verkaufslieferscheinen angezeigt werden?',
+ 'Show delete button in sales orders?' => 'Soll der "Löschen"-Knopf bei Kundenaufträgen angezeigt werden?',
'Show details' => 'Detailsanzeige',
'Show fields used for the best before date?' => 'Felder zur Eingabe des Mindesthaltbarkeitsdatums anzeigen?',
'Show follow ups...' => 'Zeige Wiedervorlagen...',
'Order Number missing!' => '',
'Order deleted!' => '',
'Ordered' => '',
+ 'Orders / Delivery Orders deleteable' => '',
'Orientation' => '',
'Orphaned' => '',
'Other users\' follow-ups' => '',
'Projects' => '',
'Projecttransactions' => '',
'Prozentual/Absolut' => '',
+ 'Purchase Delivery Orders deleteable' => '',
'Purchase Invoice' => '',
'Purchase Order' => '',
'Purchase Orders' => '',
+ 'Purchase Orders deleteable' => '',
'Purchase Price' => '',
'Purchase Prices' => '',
'Purchase delivery order' => '',
'Saldo neu' => '',
'Saldo per' => '',
'Sale Prices' => '',
+ 'Sales Delivery Orders deleteable' => '',
'Sales Invoice' => '',
'Sales Invoices' => '',
'Sales Order' => '',
'Sales Orders' => '',
+ 'Sales Orders deleteable' => '',
'Sales Price information' => '',
'Sales Report' => '',
'Sales and purchase invoices with inventory transactions with taxkeys' => '',
'Show TODO list' => '',
'Show by default' => '',
'Show custom variable search inputs' => '',
+ 'Show delete button in purchase delivery orders?' => '',
+ 'Show delete button in purchase orders?' => '',
+ 'Show delete button in sales delivery orders?' => '',
+ 'Show delete button in sales orders?' => '',
'Show details' => '',
'Show fields used for the best before date?' => '',
'Show follow ups...' => '',
--- /dev/null
+-- @tag: defaults_show_delete_on_orders
+-- @description: Einstellung, ob der "Löschen"-Knopf bei Aufträgen und Lieferscheinen angezeigt wird.
+-- @depends: release_2_7_0
+-- @charset: utf-8
+
+ALTER TABLE defaults ADD COLUMN sales_order_show_delete boolean DEFAULT TRUE;
+ALTER TABLE defaults ADD COLUMN purchase_order_show_delete boolean DEFAULT TRUE;
+ALTER TABLE defaults ADD COLUMN sales_delivery_order_show_delete boolean DEFAULT TRUE;
+ALTER TABLE defaults ADD COLUMN purchase_delivery_order_show_delete boolean DEFAULT TRUE;
<tr> </tr>
<tr> </tr>
+ <tr class='listheading'>
+ <th colspan="3">[% 'Orders / Delivery Orders deleteable' | $T8 %]</th>
+ </tr>
+ <tr>
+ <td align="right">[% 'Sales Orders deleteable' | $T8 %]</td>
+ <td>[% L.yes_no_tag('sales_order_show_delete', SELF.sales_order_show_delete) %]</td>
+ <td>[% 'Show delete button in sales orders?' | $T8 %]</td>
+ </tr>
+ <tr>
+ <td align="right">[% 'Purchase Orders deleteable' | $T8 %]</td>
+ <td>[% L.yes_no_tag('purchase_order_show_delete', SELF.purchase_order_show_delete) %]</td>
+ <td>[% 'Show delete button in purchase orders?' | $T8 %]</td>
+ </tr>
+ <tr>
+ <td align="right">[% 'Sales Delivery Orders deleteable' | $T8 %]</td>
+ <td>[% L.yes_no_tag('sales_delivery_order_show_delete', SELF.sales_delivery_order_show_delete) %]</td>
+ <td>[% 'Show delete button in sales delivery orders?' | $T8 %]</td>
+ </tr>
+ <tr>
+ <td align="right">[% 'Purchase Delivery Orders deleteable' | $T8 %]</td>
+ <td>[% L.yes_no_tag('purchase_delivery_order_show_delete', SELF.purchase_delivery_order_show_delete) %]</td>
+ <td>[% 'Show delete button in purchase delivery orders?' | $T8 %]</td>
+ </tr>
+
+ <tr> </tr>
+ <tr> </tr>
+
<tr class='listheading'>
<th colspan="3">[% 'Warehouse' | $T8 %]</th>
</tr>
[%- L.hidden_tag('action', 'ClientConfig/dispatch') %]
[%- L.submit_tag('action_save', LxERP.t8('Save')) %]
+<br><br>
+
</form>
<p>
[% 'Workflow Delivery Order' | $T8 %]<br>
<input class="submit" type="submit" name="action_save_as_new" value="[% 'Save as new' | $T8 %]">
- [% UNLESS delivered %]
- <input class="submit" type="submit" name="action_delete" value="[% 'Delete' | $T8 %]">
+ [% UNLESS delivered || (vc == 'customer' && !INSTANCE_CONF.get_sales_delivery_order_show_delete) || (vc == 'vendor' && !INSTANCE_CONF.get_purchase_delivery_order_show_delete) %]
+ <input class="submit" type="submit" name="action_delete" value="[% 'Delete' | $T8 %]">
[% END %]
<input class="submit" type="submit" name="action_invoice" value="[% 'Invoice' | $T8 %]">
</p>
<br>[% label_workflow %]<br>
<input class="submit" type="submit" name="action_save_as_new" value="[% 'Save as new' | $T8 %]">
- <input class="submit" type="submit" name="action_delete" value="[% 'Delete' | $T8 %]">
+
+ [%- UNLESS (is_sales_ord && !INSTANCE_CONF.get_sales_order_show_delete) || (is_pur_ord && !INSTANCE_CONF.get_purchase_order_show_delete) %]
+ <input class="submit" type="submit" name="action_delete" value="[% 'Delete' | $T8 %]">
+ [%- END %]
[%- IF is_sales_quo %]
<input class="submit" type="submit" name="action_sales_order" value="[% 'Sales Order' | $T8 %]">