PriceSource: Klassenauflösung fpr items von Gutschriften
[kivitendo-erp.git] / SL / DB / MetaSetup / PurchaseInvoice.pm
index d2d6004..b3cb029 100644 (file)
@@ -40,7 +40,7 @@ __PACKAGE__->meta->columns(
   storno                  => { type => 'boolean', default => 'false' },
   storno_id               => { type => 'integer' },
   taxincluded             => { type => 'boolean', default => 'false' },
-  taxzone_id              => { type => 'integer' },
+  taxzone_id              => { type => 'integer', not_null => 1 },
   transaction_description => { type => 'text' },
   transdate               => { type => 'date', default => 'now' },
   type                    => { type => 'text' },
@@ -97,6 +97,11 @@ __PACKAGE__->meta->foreign_keys(
     key_columns => { storno_id => 'id' },
   },
 
+  taxzone => {
+    class       => 'SL::DB::TaxZone',
+    key_columns => { taxzone_id => 'id' },
+  },
+
   vendor => {
     class       => 'SL::DB::Vendor',
     key_columns => { vendor_id => 'id' },