X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FMetaSetup%2FCustomer.pm;h=0bb7cd96b96ea3825c25dd488213826deaba9d81;hb=82053b457be3de2ee5285dc13633222f4d30802c;hp=00bdb258f4089fd02a342fc5ca3e716c80dc0320;hpb=eb58f1087cd0cab8ba186b5dad150d98ca3ecd2b;p=kivitendo-erp.git diff --git a/SL/DB/MetaSetup/Customer.pm b/SL/DB/MetaSetup/Customer.pm index 00bdb258f..0bb7cd96b 100644 --- a/SL/DB/MetaSetup/Customer.pm +++ b/SL/DB/MetaSetup/Customer.pm @@ -10,55 +10,78 @@ __PACKAGE__->meta->setup( table => 'customer', columns => [ - id => { type => 'integer', not_null => 1, sequence => 'id' }, - name => { type => 'text', not_null => 1 }, - department_1 => { type => 'varchar', length => 75 }, - department_2 => { type => 'varchar', length => 75 }, - street => { type => 'varchar', length => 75 }, - zipcode => { type => 'varchar', length => 10 }, - city => { type => 'varchar', length => 75 }, - country => { type => 'varchar', length => 75 }, - contact => { type => 'text' }, - phone => { type => 'varchar', length => 30 }, - fax => { type => 'varchar', length => 30 }, - homepage => { type => 'text' }, - email => { type => 'text' }, - notes => { type => 'text' }, - discount => { type => 'float', precision => 4 }, - taxincluded => { type => 'boolean' }, - creditlimit => { type => 'numeric', default => '0', precision => 5, scale => 15 }, - terms => { type => 'integer', default => '0' }, - customernumber => { type => 'text' }, - cc => { type => 'text' }, - bcc => { type => 'text' }, - business_id => { type => 'integer' }, - taxnumber => { type => 'text' }, - account_number => { type => 'text' }, - bank_code => { type => 'text' }, - bank => { type => 'text' }, - language => { type => 'varchar', length => 5 }, - datevexport => { type => 'integer' }, - itime => { type => 'timestamp', default => 'now()' }, - mtime => { type => 'timestamp' }, - obsolete => { type => 'boolean', default => 'false' }, - username => { type => 'varchar', length => 50 }, - user_password => { type => 'text' }, - salesman_id => { type => 'integer' }, - c_vendor_id => { type => 'text' }, - klass => { type => 'integer', default => '0' }, - language_id => { type => 'integer' }, - payment_id => { type => 'integer' }, - taxzone_id => { type => 'integer', default => '0', not_null => 1 }, - greeting => { type => 'text' }, - ustid => { type => 'text' }, - iban => { type => 'varchar', length => 100 }, - bic => { type => 'varchar', length => 100 }, - direct_debit => { type => 'boolean', default => 'false' }, + id => { type => 'integer', not_null => 1, sequence => 'id' }, + name => { type => 'text', not_null => 1 }, + department_1 => { type => 'varchar', length => 75 }, + department_2 => { type => 'varchar', length => 75 }, + street => { type => 'varchar', length => 75 }, + zipcode => { type => 'varchar', length => 10 }, + city => { type => 'varchar', length => 75 }, + country => { type => 'varchar', length => 75 }, + contact => { type => 'text' }, + phone => { type => 'text' }, + fax => { type => 'varchar', length => 30 }, + homepage => { type => 'text' }, + email => { type => 'text' }, + notes => { type => 'text' }, + discount => { type => 'float', precision => 4 }, + taxincluded => { type => 'boolean' }, + creditlimit => { type => 'numeric', default => '0', precision => 5, scale => 15 }, + terms => { type => 'integer', default => '0' }, + customernumber => { type => 'text' }, + cc => { type => 'text' }, + bcc => { type => 'text' }, + business_id => { type => 'integer' }, + taxnumber => { type => 'text' }, + account_number => { type => 'text' }, + bank_code => { type => 'text' }, + bank => { type => 'text' }, + language => { type => 'varchar', length => 5 }, + itime => { type => 'timestamp', default => 'now()' }, + mtime => { type => 'timestamp' }, + obsolete => { type => 'boolean', default => 'false' }, + username => { type => 'varchar', length => 50 }, + user_password => { type => 'text' }, + salesman_id => { type => 'integer' }, + c_vendor_id => { type => 'text' }, + klass => { type => 'integer', default => '0' }, + language_id => { type => 'integer' }, + payment_id => { type => 'integer' }, + taxzone_id => { type => 'integer', default => '0', not_null => 1 }, + greeting => { type => 'text' }, + ustid => { type => 'text' }, + iban => { type => 'varchar', length => 100 }, + bic => { type => 'varchar', length => 100 }, + direct_debit => { type => 'boolean', default => 'false' }, + taxincluded_checked => { type => 'boolean' }, + currency_id => { type => 'integer', not_null => 1 }, ], primary_key_columns => [ 'id' ], allow_inline_column_values => 1, + + foreign_keys => [ + business => { + class => 'SL::DB::Business', + key_columns => { business_id => 'id' }, + }, + + currency => { + class => 'SL::DB::Currency', + key_columns => { currency_id => 'id' }, + }, + + language_obj => { + class => 'SL::DB::Language', + key_columns => { language_id => 'id' }, + }, + + payment => { + class => 'SL::DB::PaymentTerm', + key_columns => { payment_id => 'id' }, + }, + ], ); 1;