From 1192822f9117bfe2067b60a3b5df9869daf4e07c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 20 Jun 2014 14:36:50 +0200 Subject: [PATCH] =?utf8?q?console:=20shortcuts=20f=C3=BCr=20die=20h=C3=A4u?= =?utf8?q?figsten=20Belegtypen,=20n=C3=BCtzlich=20beim=20debuggen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- scripts/console | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/scripts/console b/scripts/console index 97260d13e..4ceb9a0dd 100755 --- a/scripts/console +++ b/scripts/console @@ -159,6 +159,10 @@ Spezielle Kommandos: pp DATA - zeigt die Datenstruktur mit Data::Dumper an. quit - beendet die Konsole + part - shortcuts auf die jeweilige SL::DB::{...}::find_by + customer, vendor + order, invoice + EOL # load 'module' - läd das angegebene Modul, d.h. bin/mozilla/module.pl und SL/Module.pm. } @@ -207,6 +211,32 @@ sub sql { } } +sub part { + require SL::DB::Part; + SL::DB::Manager::Part->find_by(@_) +} + +sub order { + require SL::DB::Order; + SL::DB::Manager::Order->find_by(@_) +} + +sub invoice { + require SL::DB::Invoice; + SL::DB::Manager::Invoice->find_by(@_) +} + +sub customer { + require SL::DB::Customer; + SL::DB::Manager::Customer->find_by(@_) +} + +sub vendor { + require SL::DB::Vendor; + SL::DB::Manager::Vendor->find_by(@_) +} + + 1; __END__ -- 2.20.1