package IIc0dddbcc5525420e139003092ae80eb6::packedtable; use strict; use II3562149e53818b6637b38680e87ba918::packedtable; use IIb39071a48a82a07eeb9256f406abebc5; sub get { my ($view, $f) = @_; my ($ptFormConfig) = split ',', Zen::PerlHandler->getStatList; my $cfg = Zen::Config->get($1)->{$2} if $ptFormConfig =~ /^(.+?)::(\w+)$/; unless (defined $cfg) { my $f_cfg = $2 if $ptFormConfig =~ /^(.+?)::(\w+)$/; if ($f_cfg eq 'packedtable_product_specprice') { $cfg->{db_fields} = 'price,specusers,descr'; $cfg->{title} = 'Special Prices for Special User Groups'; $cfg->{add_text} = 'add one more price'; } elsif ($f_cfg eq 'packedtable_product_discplan') { $cfg->{db_fields}='num,disc'; $cfg->{title}='Discount plan'; $cfg->{add_text}='add one more discount level'; } elsif ($f_cfg eq 'packedtable_product_commission_aff') { $cfg->{db_fields}='value,mode,irr'; $cfg->{title}='Affiliate commissions'; $cfg->{add_text}='add one more tier'; } elsif ($f_cfg eq 'packedtable_product_commission_charity') { $cfg->{db_fields}='value,mode,user_id,irr'; $cfg->{title}='Charity commissions'; $cfg->{add_text}='add one more commission'; } else { die "config not found for $ptFormConfig"; } } die "db_fields not found in config [$ptFormConfig]" unless $cfg->{db_fields}; my @fields = split ',', $cfg->{db_fields}; II3562149e53818b6637b38680e87ba918::packedtable::obj->extrTable($view->getDecorated->{$f}, \@fields); } 1; 