diff --git a/include/betriebsmittel.class.php b/include/betriebsmittel.class.php index c2f2dcdcf..ecb904bf0 100644 --- a/include/betriebsmittel.class.php +++ b/include/betriebsmittel.class.php @@ -62,6 +62,11 @@ class betriebsmittel extends basis_db public $inventuramum; // timestamp public $inventurvon; // string + public $anschaffungswert; + public $anschaffungsdatum; + public $hoehe; + public $breite; + public $tiefe; /** * Konstruktor @@ -122,6 +127,11 @@ class betriebsmittel extends basis_db $this->leasing_bis = $row->leasing_bis; $this->inventuramum = $row->inventuramum; $this->inventurvon = $row->inventurvon; + $this->anschaffungsdatum = $row->anschaffungsdatum; + $this->anschaffungswert = $row->anschaffungswert; + $this->hoehe = $row->hoehe; + $this->breite = $row->breite; + $this->tiefe = $row->tiefe; return true; } @@ -257,7 +267,8 @@ class betriebsmittel extends basis_db $qry='INSERT INTO wawi.tbl_betriebsmittel (beschreibung, betriebsmitteltyp, nummer , inventarnummer, reservieren, ort_kurzbz ,ext_id, insertamum, insertvon, updateamum, updatevon,oe_kurzbz,hersteller,seriennummer - ,bestellung_id,bestelldetail_id,afa,verwendung,anmerkung,leasing_bis, inventuramum, inventurvon) VALUES('. + ,bestellung_id,bestelldetail_id,afa,verwendung,anmerkung,leasing_bis, inventuramum, inventurvon, + anschaffungsdatum, anschaffungswert, hoehe, breite, tiefe) VALUES('. $this->addslashes($this->beschreibung).', '. $this->addslashes($this->betriebsmitteltyp).', '. $this->addslashes($this->nummer).', '. @@ -279,8 +290,12 @@ class betriebsmittel extends basis_db $this->addslashes($this->anmerkung) .', '. ($this->leasing_bis?$this->addslashes($this->leasing_bis):'null') .', '. $this->addslashes($this->inventuramum) .', '. - $this->addslashes($this->inventurvon) .');' ; - + $this->addslashes($this->inventurvon) .', '. + $this->addslashes($this->anschaffungsdatum).', '. + $this->addslashes($this->anschaffungswert).', '. + $this->addslashes($this->hoehe).', '. + $this->addslashes($this->breite).', '. + $this->addslashes($this->tiefe).');' ; } else { @@ -310,7 +325,12 @@ class betriebsmittel extends basis_db 'anmerkung='.$this->addslashes($this->anmerkung).', '. 'leasing_bis='.($this->leasing_bis?$this->addslashes($this->leasing_bis):'null').', '. 'inventuramum='.$this->addslashes($this->inventuramum).', '. - 'inventurvon='.$this->addslashes($this->inventurvon).' '. + 'inventurvon='.$this->addslashes($this->inventurvon).', '. + 'anschaffungsdatum='.$this->addslashes($this->anschaffungsdatum).', '. + 'anschaffungswert='.$this->addslashes($this->anschaffungswert).', '. + 'hoehe='.$this->addslashes($this->hoehe).', '. + 'breite='.$this->addslashes($this->breite).', '. + 'tiefe='.$this->addslashes($this->tiefe).' '. 'WHERE betriebsmittel_id='.$this->addslashes($this->betriebsmittel_id).';'; } diff --git a/include/betriebsmitteltyp.class.php b/include/betriebsmitteltyp.class.php index acb3147d7..005fe7df1 100644 --- a/include/betriebsmitteltyp.class.php +++ b/include/betriebsmitteltyp.class.php @@ -95,7 +95,7 @@ class betriebsmitteltyp extends basis_db { $this->result=array(); $this->errormsg = ''; - $qry = "SELECT * FROM wawi.tbl_betriebsmitteltyp ORDER BY betriebsmitteltyp"; + $qry = "SELECT * FROM wawi.tbl_betriebsmitteltyp ORDER BY beschreibung"; if($this->db_query($qry)) { diff --git a/system/FH-Complete.txp b/system/FH-Complete.txp index c35e9d544..0913511ba 100644 --- a/system/FH-Complete.txp +++ b/system/FH-Complete.txp @@ -40282,8 +40282,8 @@ 1229 89 0 - 779 - 239 + 860 + 278 0 1 1 @@ -40319,7 +40319,7 @@ 564 77 0 - 952 + 1013 590 0 1 @@ -40356,8 +40356,8 @@ 928 1230 0 - 783 - 941 + 877 + 1136 0 1 1 @@ -40398,7 +40398,7 @@ 2127 1227 0 - 986 + 1053 356 0 1 @@ -40439,7 +40439,7 @@ 20 1069 0 - 774 + 828 785 0 1 @@ -40476,7 +40476,7 @@ 2055 78 0 - 1020 + 1079 200 0 1 @@ -40513,7 +40513,7 @@ 1553 77 0 - 1041 + 1118 395 0 1 @@ -40579,7 +40579,7 @@ 48 76 0 - 547 + 602 288 0 1 @@ -40607,7 +40607,7 @@ 844 3131 0 - 915 + 965 824 0 1 @@ -40657,7 +40657,7 @@ 1409 2146 0 - 859 + 922 551 0 1 @@ -40699,8 +40699,8 @@ 9 3848 0 - 753 - 395 + 794 + 356 0 1 1 @@ -40774,7 +40774,7 @@ 234 1963 0 - 741 + 787 200 0 1 @@ -40812,7 +40812,7 @@ 431 3839 0 - 736 + 775 200 0 1 @@ -40850,7 +40850,7 @@ 813 4273 0 - 804 + 856 473 0 1 @@ -40888,7 +40888,7 @@ 490 1923 0 - 845 + 895 395 0 1 @@ -40926,7 +40926,7 @@ 1358 4250 0 - 889 + 942 707 0 1 @@ -40964,7 +40964,7 @@ 2564 3240 0 - 788 + 837 590 0 1 @@ -41001,7 +41001,7 @@ 18 2893 0 - 834 + 899 473 0 1 @@ -41039,7 +41039,7 @@ 2556 1196 0 - 960 + 1021 707 0 1 @@ -41076,7 +41076,7 @@ 2385 4217 0 - 919 + 966 668 0 1 @@ -41115,7 +41115,7 @@ 3110 4231 0 - 800 + 839 278 0 1 @@ -41152,7 +41152,7 @@ 2345 154 0 - 826 + 873 356 0 1 @@ -41190,7 +41190,7 @@ 2883 233 0 - 809 + 856 395 0 1 @@ -41228,7 +41228,7 @@ 2258 3249 0 - 923 + 968 200 0 1 @@ -41265,7 +41265,7 @@ 1715 3100 0 - 1003 + 1066 473 0 1 @@ -41305,7 +41305,7 @@ 566 2977 0 - 761 + 817 200 0 1 @@ -41343,7 +41343,7 @@ 1078 2186 0 - 741 + 785 200 0 1 @@ -41381,7 +41381,7 @@ 2107 4248 0 - 851 + 897 200 0 1 @@ -41418,7 +41418,7 @@ 3006 2257 0 - 872 + 914 200 0 1 @@ -41455,7 +41455,7 @@ 2572 2275 0 - 855 + 895 200 0 1 @@ -41493,7 +41493,7 @@ 2243 2284 0 - 830 + 877 200 0 1 @@ -41535,24 +41535,24 @@ {AC7E9335-6EDA-449D-AAED-066D0C76A911} - 880 - 1631 + 920 + 1596 - 868 - 1348 + 949 + 1368 - 899 - 1348 + 980 + 1368 1199 - 1398 + 1307 1230 - 1398 + 1307 @@ -41578,23 +41578,23 @@ {B39C63FA-F416-40B5-A65C-C3CFA65D7A85} - 1057 - 1087 + 1250 + 954 - 1230 - 1163 + 1522 + 928 - 1199 - 1163 + 1522 + 897 - 1060 + 1121 859 - 1029 + 1090 859 @@ -41621,24 +41621,24 @@ {AC7E9335-6EDA-449D-AAED-066D0C76A911} - 1007 - 1925 + 1047 + 2023 - 1720 + 1754 2127 - 1720 + 1754 2096 - 1622 - 1900 + 1668 + 2095 - 1622 - 1869 + 1668 + 2064 @@ -41664,23 +41664,23 @@ {AC7E9335-6EDA-449D-AAED-066D0C76A911} - 1289 + 1399 774 - 1456 + 1483 805 - 1456 + 1483 836 - 1622 + 1815 897 - 1622 + 1815 928 @@ -41707,23 +41707,23 @@ {59E89AFD-49F1-4495-990C-7D1E0CFAE754} - 1113 - 1684 + 1152 + 1709 1230 - 1634 + 1685 1199 - 1634 + 1685 - 1149 + 1226 1750 - 1118 + 1195 1750 @@ -41750,23 +41750,23 @@ {59E89AFD-49F1-4495-990C-7D1E0CFAE754} - 154 + 188 1950 - 588 + 618 2055 - 588 + 618 2024 - 598 + 636 1979 - 598 + 636 1948 @@ -41793,8 +41793,8 @@ {AC7E9335-6EDA-449D-AAED-066D0C76A911} - 2363 - 1243 + 2410 + 1292 3131 @@ -41805,12 +41805,12 @@ 1174 - 2044 - 1398 + 2138 + 1496 - 2013 - 1398 + 2107 + 1496 @@ -41836,23 +41836,23 @@ {20F41636-8E77-4350-B677-A3F3B4033D9D} - 2064 - 318 + 2108 + 317 - 2213 + 2280 2246 - 2244 + 2311 2246 - 2432 + 2453 1991 - 2432 + 2453 1960 @@ -41879,7 +41879,7 @@ {AEC00992-F1D6-40FD-A416-4E20794894AD} - 2219 + 2230 128 @@ -41891,11 +41891,11 @@ 179 - 2334 + 2356 203 - 2334 + 2356 234 @@ -41922,23 +41922,23 @@ {AEC00992-F1D6-40FD-A416-4E20794894AD} - 2872 + 2941 292 - 3360 + 3453 844 - 3360 + 3453 813 - 2735 + 2781 334 - 2704 + 2750 334 @@ -41965,23 +41965,23 @@ {2FC2ED24-E0E3-4F64-8362-24385DBDDE02} - 4015 - 378 + 4035 + 358 - 4224 - 404 + 4245 + 365 - 4224 - 435 + 4245 + 396 - 4207 + 4226 400 - 4207 + 4226 431 @@ -42008,24 +42008,24 @@ {2FC2ED24-E0E3-4F64-8362-24385DBDDE02} - 3662 - 634 + 4025 + 798 - 3817 - 844 + 4096 + 1009 - 3817 - 813 + 4127 + 1009 - 3808 - 531 + 4226 + 662 - 3839 - 531 + 4226 + 631 @@ -42051,8 +42051,8 @@ {4CBD4377-C7EA-48BE-B997-5A0FA6DD1269} - 3874 - 1039 + 3899 + 1101 4273 @@ -42063,12 +42063,12 @@ 971 - 4077 - 1050 + 4127 + 1174 - 4046 - 1050 + 4096 + 1174 @@ -42094,15 +42094,15 @@ {4CBD4377-C7EA-48BE-B997-5A0FA6DD1269} - 2953 + 2984 1533 - 3005 + 3068 1684 - 3036 + 3099 1684 @@ -42137,15 +42137,15 @@ {4CBD4377-C7EA-48BE-B997-5A0FA6DD1269} - 2847 + 2872 788 - 2768 + 2818 688 - 2799 + 2849 688 @@ -42180,8 +42180,8 @@ {4CBD4377-C7EA-48BE-B997-5A0FA6DD1269} - 4051 - 1132 + 4076 + 1173 4273 @@ -42192,12 +42192,12 @@ 1128 - 4077 - 1256 + 4127 + 1338 - 4046 - 1256 + 4096 + 1338 @@ -42223,16 +42223,16 @@ {4A5E8539-F34B-475F-9928-AC82793EEF59} - 4048 - 1586 + 4073 + 1606 - 4046 - 1462 + 4096 + 1503 - 4077 - 1462 + 4127 + 1503 4219 @@ -42266,23 +42266,23 @@ {4CBD4377-C7EA-48BE-B997-5A0FA6DD1269} - 3557 + 3584 2056 - 3634 + 3658 2564 - 3634 + 3658 2533 - 3680 + 3710 1699 - 3680 + 3710 1668 @@ -42309,23 +42309,23 @@ {4CBD4377-C7EA-48BE-B997-5A0FA6DD1269} - 3419 - 608 + 3533 + 607 - 3449 + 3492 491 - 3449 + 3492 522 - 3588 + 3774 813 - 3588 + 3774 844 @@ -42352,7 +42352,7 @@ {250FCCBF-4717-47E0-B8E7-A12BB03889F9} - 1795 + 1811 2090 @@ -42364,11 +42364,11 @@ 1776 - 1676 + 1706 2525 - 1676 + 1706 2556 @@ -42395,23 +42395,23 @@ {DB59DF18-64A7-4185-8765-7238517341C0} - 4093 - 1967 + 4121 + 1966 - 3863 + 3903 1668 - 3863 + 3903 1699 - 4523 + 4539 2354 - 4523 + 4539 2385 @@ -42438,23 +42438,23 @@ {239C6766-B0BC-4E1F-9833-C49206AF8D54} - 4554 + 4575 3022 - 4676 + 4700 3053 - 4676 + 4700 3084 - 4631 + 4650 3079 - 4631 + 4650 3110 @@ -42481,7 +42481,7 @@ {6419EE86-CB44-41FA-9E2B-1C2555508A93} - 1463 + 1487 2027 @@ -42493,11 +42493,11 @@ 1593 - 1011 + 1058 2582 - 980 + 1027 2582 @@ -42524,7 +42524,7 @@ {6419EE86-CB44-41FA-9E2B-1C2555508A93} - 1004 + 1027 2295 @@ -42536,11 +42536,11 @@ 2246 - 1011 + 1058 2464 - 980 + 1027 2464 @@ -42567,7 +42567,7 @@ {5FEF0B42-3911-4B97-A654-2AD1A67125FC} - 1986 + 2010 2182 @@ -42579,11 +42579,11 @@ 1338 - 1073 + 1120 3146 - 1042 + 1089 3146 @@ -42610,7 +42610,7 @@ {5FEF0B42-3911-4B97-A654-2AD1A67125FC} - 1035 + 1058 2629 @@ -42622,11 +42622,11 @@ 2364 - 1073 + 1120 3015 - 1042 + 1089 3015 @@ -42653,23 +42653,23 @@ {D8AD2B3F-B9E4-412E-992F-3B4D116FDEE1} - 3274 - 1632 + 3290 + 1631 - 3314 + 3324 1668 - 3314 + 3324 1699 - 3434 + 3455 1684 - 3434 + 3455 1715 @@ -42696,23 +42696,23 @@ {D8AD2B3F-B9E4-412E-992F-3B4D116FDEE1} - 3556 + 3583 2163 - 3710 + 3733 2258 - 3710 + 3733 2227 - 3602 + 3633 2219 - 3602 + 3633 2188 @@ -42739,23 +42739,23 @@ {D8AD2B3F-B9E4-412E-992F-3B4D116FDEE1} - 3370 + 3402 1043 - 3171 + 3193 491 - 3171 + 3193 522 - 3769 + 3811 1684 - 3769 + 3811 1715 @@ -42782,15 +42782,15 @@ {D8AD2B3F-B9E4-412E-992F-3B4D116FDEE1} - 2556 + 2590 2098 - 2213 + 2280 2364 - 2244 + 2311 2364 @@ -42868,7 +42868,7 @@ {B4891794-493A-4F6A-9EA2-76CEE5D5773B} - 3894 + 3922 1070 @@ -42880,11 +42880,11 @@ 1594 - 3769 + 3825 666 - 3738 + 3794 666 @@ -42911,23 +42911,23 @@ {5AEA4D3B-818E-4916-AD78-C310205D8563} - 2351 + 2374 922 - 2346 + 2370 885 - 2346 + 2370 916 - 2556 + 2578 1047 - 2556 + 2578 1078 @@ -42954,23 +42954,23 @@ {5AEA4D3B-818E-4916-AD78-C310205D8563} - 2466 + 2493 1284 - 2576 + 2607 1409 - 2576 + 2607 1378 - 2556 + 2578 1309 - 2556 + 2578 1278 @@ -42997,23 +42997,23 @@ {DB59DF18-64A7-4185-8765-7238517341C0} - 4652 + 4678 2286 - 4674 + 4696 2307 - 4674 + 4696 2338 - 4830 + 4861 2354 - 4830 + 4861 2385 @@ -43040,23 +43040,23 @@ {F05FB345-CEFF-4712-8B69-BDC2C97D93A7} - 2611 + 2642 2206 - 2719 + 2761 1960 - 2719 + 2761 1991 - 2702 + 2722 2541 - 2702 + 2722 2572 @@ -43083,23 +43083,23 @@ {F05FB345-CEFF-4712-8B69-BDC2C97D93A7} - 2597 + 2618 2829 - 2693 + 2714 3006 - 2693 + 2714 2975 - 2702 + 2722 2803 - 2702 + 2722 2772 @@ -43126,23 +43126,23 @@ {4CBD4377-C7EA-48BE-B997-5A0FA6DD1269} - 3221 + 3254 1961 - 3114 + 3161 2343 - 3145 + 3192 2343 - 3497 + 3517 1699 - 3497 + 3517 1668 @@ -45751,7 +45751,7 @@ Technikum Wien 2.0 2009-04-17T11:15:21.000+02:00 - 2011-09-20T15:41:28.107+02:00 + 2011-10-04T17:17:53.064+02:00 FH-Complete 2.0 <?xml-stylesheet type="text/xsl" href="FHCompleteTDM3PG83.xsl"?> @@ -89364,6 +89364,211 @@ art=tbl_benutzerrolle.art & tbl_rolleberechtigung.art 0 + + {0FE1A5FD-CCB6-4E0B-B40E-D069CE472E2B} + anschaffungswert + 0 + {030DFF85-B2C3-4623-82FA-A0548DFE81FF} + 0 + 0 + 0 + 0 + 1 + + + + + 12 + 2 + 0 + + 0 + 0 + anschaffungswert + 0 + + + + + + + + + + {E62BD1D3-18CA-4571-9A16-606FF04DC894} + + + + + + + + 0 + + + {129B813E-340A-4021-A8ED-05841963B61D} + anschaffungsdatum + 0 + {D8763446-7402-4603-8C24-C51E8F3A9204} + 0 + 0 + 0 + 0 + 1 + + + + + + + 0 + + 0 + 0 + anschaffungsdatum + 0 + + + + + + + + + + {5EBD99F4-5263-4410-9892-11DB7C2DF84B} + + + + + + + + 0 + + + {E035ADED-77B3-4533-9255-95CCC255549A} + hoehe + 0 + {09146810-23C4-430E-B886-FA2D09297C89} + 0 + 0 + 0 + 0 + 1 + + + + + 6 + 2 + 0 + + 0 + 0 + hoehe + 0 + + + + + + + + + + {E62BD1D3-18CA-4571-9A16-606FF04DC894} + + + + + + + + 0 + + + {BBB408A1-6C2D-4475-8176-7DEEC5984465} + breite + 0 + {CD8395AC-4AEA-4B7D-B265-1005C9DF1966} + 0 + 0 + 0 + 0 + 1 + + + + + 6 + 2 + 0 + + 0 + 0 + breite + 0 + + + + + + + + + + {E62BD1D3-18CA-4571-9A16-606FF04DC894} + + + + + + + + 0 + + + {119107F9-797D-4F3A-BB09-605F9BD9E6CD} + tiefe + 0 + {A269FA6F-638B-4F48-8044-2FE89A0C6356} + 0 + 0 + 0 + 0 + 1 + + + + + 6 + 2 + 0 + + 0 + 0 + tiefe + 0 + + + + + + + + + + {E62BD1D3-18CA-4571-9A16-606FF04DC894} + + + + + + + + 0 + @@ -90339,6 +90544,47 @@ art=tbl_benutzerrolle.art & tbl_rolleberechtigung.art 0 + + {8DCA1A0E-E76E-48E5-85E9-539BFB3C773E} + mastershapename + 0 + {6DF9A13D-3791-47E6-B3AE-1B8A27A52222} + 0 + 0 + 0 + 0 + 1 + + + + + 256 + + 0 + + 0 + 0 + mastershapename + 0 + + + + + + + + + + {ECB8F02F-B683-4252-8508-ED9D064C9AF3} + + + + + + + + 0 + @@ -98385,7 +98631,7 @@ ALTER TABLE tbl_mitarbeiter ALTER COLUMN personalnummer DROP NOT NULL; - 5 + 8 0 diff --git a/system/checksystem.php b/system/checksystem.php index 5643f8e11..9045227ac 100644 --- a/system/checksystem.php +++ b/system/checksystem.php @@ -2771,7 +2771,7 @@ if(!$result = @$db->db_query("SELECT budget FROM fue.tbl_projekt LIMIT 1;")) fue.tbl_projekttask: Spalte erledigt hinzugefuegt!
'; } -//fue.tbl_projekt neue Spalte budget +//public.tbl_prestudent neue Spalte ausstellungsstaat if(!$result = @$db->db_query("SELECT ausstellungsstaat FROM public.tbl_prestudent")) { $qry = "ALTER TABLE public.tbl_prestudent ADD COLUMN ausstellungsstaat varchar(3); @@ -2783,6 +2783,43 @@ if(!$result = @$db->db_query("SELECT ausstellungsstaat FROM public.tbl_prestuden else echo 'public.tbl_prestudent: Spalte ausstellungsstaat hinzugefuegt!
'; } + +//wawi.tbl_betriebsmittel neue Spalte anschaffungswert und anschaffungsdatum +if(!$result = @$db->db_query("SELECT anschaffungswert FROM wawi.tbl_betriebsmittel")) +{ + $qry = "ALTER TABLE wawi.tbl_betriebsmittel ADD COLUMN anschaffungswert numeric(12,2); + ALTER TABLE wawi.tbl_betriebsmittel ADD COLUMN anschaffungsdatum date; + ALTER TABLE wawi.tbl_betriebsmittel ADD COLUMN tiefe numeric(6,2); + ALTER TABLE wawi.tbl_betriebsmittel ADD COLUMN hoehe numeric(6,2); + ALTER TABLE wawi.tbl_betriebsmittel ADD COLUMN breite numeric(6,2); + ALTER TABLE wawi.tbl_betriebsmitteltyp ADD COLUMN mastershapename varchar(256); + + UPDATE wawi.tbl_betriebsmittel SET anschaffungswert = (SELECT (preisprove/100*(100+mwst)) FROM wawi.tbl_bestelldetail WHERE bestelldetail_id=tbl_betriebsmittel.bestelldetail_id); + UPDATE wawi.tbl_betriebsmittel SET anschaffungsdatum = (SELECT datum FROM wawi.tbl_bestellung_bestellstatus WHERE bestellung_id=tbl_betriebsmittel.bestellung_id AND bestellstatus_kurzbz='Lieferung'); + "; + + if(!$db->db_query($qry)) + echo 'wawi.tbl_betriebsmittel: '.$db->db_last_error().'
'; + else + echo 'wawi.tbl_betriebsmittel: Spalte anschaffungswert und anschaffungsdatum hinzugefuegt!
'; +} + +//tbl_ort.planbezeichnung von 5 auf 8 Zeichen verlaengern +if($result = @$db->db_query("SELECT character_maximum_length as len FROM information_schema.columns WHERE column_name='planbezeichnung' AND table_name='tbl_ort' AND table_schema='public';")) +{ + if($row = $db->db_fetch_object($result)) + { + if($row->len=='5') + { + $qry = "ALTER TABLE public.tbl_ort ALTER COLUMN planbezeichnung TYPE varchar(8);"; + + if(!$db->db_query($qry)) + echo 'public.tbl_ort: '.$db->db_last_error().'
'; + else + echo 'public.tbl_ort: Spalte planbezeichnung auf 8 Zeichen verlaengert!
'; + } + } +} echo '
'; $tabellen=array( @@ -2955,10 +2992,10 @@ $tabellen=array( "system.tbl_rolleberechtigung" => array("berechtigung_kurzbz","rolle_kurzbz","art"), "system.tbl_server" => array("server_kurzbz","beschreibung"), "wawi.tbl_betriebsmittelperson" => array("betriebsmittelperson_id","betriebsmittel_id","person_id", "anmerkung", "kaution", "ausgegebenam", "retouram","insertamum", "insertvon","updateamum", "updatevon","ext_id"), - "wawi.tbl_betriebsmittel" => array("betriebsmittel_id","betriebsmitteltyp","oe_kurzbz", "ort_kurzbz", "beschreibung", "nummer", "hersteller","seriennummer", "bestellung_id","bestelldetail_id", "afa","verwendung","anmerkung","reservieren","updateamum","updatevon","insertamum","insertvon","ext_id","inventarnummer","leasing_bis","inventuramum","inventurvon"), + "wawi.tbl_betriebsmittel" => array("betriebsmittel_id","betriebsmitteltyp","oe_kurzbz", "ort_kurzbz", "beschreibung", "nummer", "hersteller","seriennummer", "bestellung_id","bestelldetail_id", "afa","verwendung","anmerkung","reservieren","updateamum","updatevon","insertamum","insertvon","ext_id","inventarnummer","leasing_bis","inventuramum","inventurvon","anschaffungsdatum","anschaffungswert","hoehe","breite","tiefe"), "wawi.tbl_betriebsmittel_betriebsmittelstatus" => array("betriebsmittelbetriebsmittelstatus_id","betriebsmittel_id","betriebsmittelstatus_kurzbz", "datum", "updateamum", "updatevon", "insertamum", "insertvon","anmerkung"), "wawi.tbl_betriebsmittelstatus" => array("betriebsmittelstatus_kurzbz","beschreibung"), - "wawi.tbl_betriebsmitteltyp" => array("betriebsmitteltyp","beschreibung","anzahl","kaution","typ_code"), + "wawi.tbl_betriebsmitteltyp" => array("betriebsmitteltyp","beschreibung","anzahl","kaution","typ_code","mastershapename"), "wawi.tbl_budget" => array("geschaeftsjahr_kurzbz","kostenstelle_id","budget"), "wawi.tbl_zahlungstyp" => array("zahlungstyp_kurzbz","bezeichnung"), "wawi.tbl_konto" => array("konto_id","kontonr","beschreibung","kurzbz","aktiv","insertamum","insertvon","updateamum","updatevon"), diff --git a/vilesci/inventar/inventar.php b/vilesci/inventar/inventar.php index 4840d2afb..cc34a34a8 100644 --- a/vilesci/inventar/inventar.php +++ b/vilesci/inventar/inventar.php @@ -301,7 +301,7 @@ if (!$uid = get_uid()) // ------------------------------------------------------------------------------------------ // Organisation - Inventarverwalter $oes=new organisationseinheit(); - if (!$oOrganisationseinheit->loadArray($oBenutzerberechtigung->getOEkurzbz($berechtigung_kurzbz),'oe_kurzbz')) + if (!$oOrganisationseinheit->loadArray($oBenutzerberechtigung->getOEkurzbz($berechtigung_kurzbz),'organisationseinheittyp_kurzbz,bezeichnung')) $errormsg[]=$oOrganisationseinheit->errormsg; $extend_search=true; @@ -1029,7 +1029,9 @@ function output_inventarposition($debug=false,$resultBetriebsmittel=null,$result { $htmlstring.=' Verwendung :  - '.$info.' + '.$info.' + Leasing bis :  + '.$datum_obj->formatDatum($resBetriebsmittel->leasing_bis,'d.m.Y').' '; } @@ -1069,8 +1071,8 @@ function output_inventarposition($debug=false,$resultBetriebsmittel=null,$result $htmlstring.='AfA Ende :  '.$datum_obj->formatDatum($resBetriebsmittel->betriebsmittelstatus_datum_afa,'d.m.Y').' - Leasing bis :  - '.$datum_obj->formatDatum($resBetriebsmittel->leasing_bis,'d.m.Y').' + Anschaffungsdatum :  + '.$datum_obj->formatDatum($resBetriebsmittel->anschaffungsdatum,'d.m.Y').' '; $htmlstring.=' @@ -1083,6 +1085,9 @@ function output_inventarposition($debug=false,$resultBetriebsmittel=null,$result + + Anschaffungswert :  + '.$resBetriebsmittel->anschaffungswert.' '; $htmlstring.=' '; diff --git a/vilesci/inventar/inventar_autocomplete.php b/vilesci/inventar/inventar_autocomplete.php index 409ea2b8a..0bb7ceb8e 100644 --- a/vilesci/inventar/inventar_autocomplete.php +++ b/vilesci/inventar/inventar_autocomplete.php @@ -181,7 +181,7 @@ if (!$oRresult=$db->SQL($pArt,$pDistinct,$pFields,$pTable,$pWhere,$pOrder,$pLimit,$pSql)) exit(' |'.$db->errormsg."\n"); for ($i=0;$iinventarnummer).'|'. (is_null($oRresult[$i]->beschreibung) || empty($oRresult[$i]->beschreibung) || $oRresult[$i]->beschreibung=='NULL' || $oRresult[$i]->beschreibung=='null'?'':html_entity_decode($oRresult[$i]->beschreibung))."\n"; + echo html_entity_decode($oRresult[$i]->inventarnummer).'|'. (is_null($oRresult[$i]->beschreibung) || empty($oRresult[$i]->beschreibung) || $oRresult[$i]->beschreibung=='NULL' || $oRresult[$i]->beschreibung=='null'?'':html_entity_decode(mb_str_replace("\n","",$oRresult[$i]->beschreibung)))."\n"; break; // Ort - Inventarorte suche diff --git a/vilesci/inventar/inventar_pflege.php b/vilesci/inventar/inventar_pflege.php index 9f11d2326..92a66a333 100644 --- a/vilesci/inventar/inventar_pflege.php +++ b/vilesci/inventar/inventar_pflege.php @@ -44,6 +44,7 @@ require_once('../../include/wawi_bestelldetail.class.php'); require_once('../../include/wawi_bestellung.class.php'); require_once('../../include/wawi_kostenstelle.class.php'); + require_once('../../include/wawi_bestellstatus.class.php'); if (!$uid = get_uid()) die('Keine UID gefunden ! Zurück'); @@ -82,10 +83,16 @@ $betriebsmittelstatus_kurzbz=trim((isset($_REQUEST['betriebsmittelstatus_kurzbz']) ? $_REQUEST['betriebsmittelstatus_kurzbz']:$default_status_vorhanden)); $firma_id=trim(isset($_REQUEST['firma_id'])?$_REQUEST['firma_id']:''); $bestellnr=trim(isset($_REQUEST['bestellnr'])?$_REQUEST['bestellnr']:''); - + $afa=trim(isset($_REQUEST['afa']) ? $_REQUEST['afa']:3); $leasing_bis=trim(isset($_REQUEST['leasing_bis']) ? $_REQUEST['leasing_bis']:''); + $anschaffungswert=isset($_REQUEST['anschaffungswert']) ? $_REQUEST['anschaffungswert']:''; + $anschaffungsdatum=isset($_REQUEST['anschaffungsdatum']) ? $_REQUEST['anschaffungsdatum']:''; + $hoehe=isset($_REQUEST['hoehe'])?$_REQUEST['hoehe']:''; + $breite=isset($_REQUEST['breite'])?$_REQUEST['breite']:''; + $tiefe=isset($_REQUEST['tiefe'])?$_REQUEST['tiefe']:''; + $jahr_monat=trim(isset($_REQUEST['jahr_monat']) ? $_REQUEST['jahr_monat']:''); $inventur_jahr=trim(isset($_REQUEST['inventur_jahr']) ? $_REQUEST['inventur_jahr']:''); @@ -218,6 +225,11 @@ $verwendung = $oBetriebsmittel->verwendung; $anmerkung = $oBetriebsmittel->anmerkung; $leasing_bis = $oBetriebsmittel->leasing_bis; + $anschaffungsdatum = $oBetriebsmittel->anschaffungsdatum; + $anschaffungswert = $oBetriebsmittel->anschaffungswert; + $hoehe = $oBetriebsmittel->hoehe; + $breite = $oBetriebsmittel->breite; + $tiefe = $oBetriebsmittel->tiefe; $bestellung_id_old=$bestellung_id; $bestelldetail_id_old=$bestelldetail_id; @@ -281,6 +293,12 @@ if(!$bestelldetail->load($bestelldetail_id)) $errormsg[]=$bestelldetail->errormsg; $bestelldetail->result[] = $bestelldetail; + + if($anschaffungswert=='') + { + $anschaffungswert = ($bestelldetail->preisprove/100*(100+$bestelldetail->mwst)); + $anschaffungswert = number_format(str_replace(',','.',$anschaffungswert),2,'.',''); + } } else { @@ -300,7 +318,10 @@ $kostenstelle->load($bestellung->kostenstelle_id); $oe_kurzbz=$kostenstelle->oe_kurzbz; $anmerkung.=trim($bestellung->bemerkung); - + $bestellstatus = new wawi_bestellstatus(); + $bestellstatus->getStatiFromBestellung('Lieferung', $bestellung_id); + $anschaffungsdatum = $bestellstatus->datum; + foreach($bestelldetail->result as $row) { if (isset($row->beschreibung)) @@ -625,8 +646,36 @@ ?> +    + + + + +    + + + + +    + + + +    + + + +    + + + + @@ -696,6 +745,11 @@ $anmerkung_array=(isset($_REQUEST['anmerkung_array'])?$_REQUEST['anmerkung_array $verwendung_array=(isset($_REQUEST['verwendung_array'])?$_REQUEST['verwendung_array']:array()); $leasing_bis_array=(isset($_REQUEST['leasing_bis_array'])?$_REQUEST['leasing_bis_array']:array()); $afa_array=(isset($_REQUEST['afa_array'])?$_REQUEST['afa_array']:array()); +$anschaffungsdatum_array=(isset($_REQUEST['anschaffungsdatum_array'])?$_REQUEST['anschaffungsdatum_array']:array()); +$anschaffungswert_array=(isset($_REQUEST['anschaffungswert_array'])?$_REQUEST['anschaffungswert_array']:array()); +$hoehe_array=(isset($_REQUEST['hoehe_array'])?$_REQUEST['hoehe_array']:array()); +$breite_array=(isset($_REQUEST['breite_array'])?$_REQUEST['breite_array']:array()); +$tiefe_array=(isset($_REQUEST['tiefe_array'])?$_REQUEST['tiefe_array']:array()); for ($pos=0;$pos<$anzahl;$pos++) { @@ -720,6 +774,11 @@ for ($pos=0;$pos<$anzahl;$pos++) $verwendung_array[$pos]=trim(isset($verwendung_array[$pos]) && $work=='save' ?trim($verwendung_array[$pos]):$verwendung); $leasing_bis_array[$pos]=trim(isset($leasing_bis_array[$pos]) && $work=='save' ?trim($leasing_bis_array[$pos]):$leasing_bis); $afa_array[$pos]=trim(isset($afa_array[$pos]) && $work=='save' ?trim($afa_array[$pos]):$afa); + $anschaffungsdatum_array[$pos]=trim(isset($anschaffungsdatum_array[$pos]) && $work=='save' ?trim($anschaffungsdatum_array[$pos]):$anschaffungsdatum); + $anschaffungswert_array[$pos]=trim(isset($anschaffungswert_array[$pos]) && $work=='save' ?trim($anschaffungswert_array[$pos]):$anschaffungswert); + $hoehe_array[$pos]=isset($hoehe_array[$pos]) && $work=='save' ?trim($hoehe_array[$pos]):$hoehe; + $breite_array[$pos]=isset($breite_array[$pos]) && $work=='save' ?trim($breite_array[$pos]):$breite; + $tiefe_array[$pos]=isset($tiefe_array[$pos]) && $work=='save' ?trim($tiefe_array[$pos]):$tiefe; if ($work=='save') { @@ -761,6 +820,31 @@ for ($pos=0;$pos<$anzahl;$pos++) $oBetriebsmittel->anmerkung=$anmerkung_array[$pos]; $oBetriebsmittel->leasing_bis=$datum_obj->formatDatum($leasing_bis_array[$pos],'Y-m-d'); + //wenn kein Anschaffungsdatum eingetragen ist und eine Bestellung zugeordnet ist, + //wird das lieferdatum der Bestellung uebernommen + if($oBetriebsmittel->bestellung_id!='' && $anschaffungsdatum_array[$pos]=='') + { + $bestellung = new wawi_bestellstatus(); + $bestellung->getStatiFromBestellung('Lieferung', $oBetriebsmittel->bestellung_id); + $anschaffungsdatum_array[$pos]=$bestellung->datum; + } + + $oBetriebsmittel->anschaffungsdatum = $datum_obj->formatDatum($anschaffungsdatum_array[$pos],'Y-m-d'); + + //Wenn kein Anschaffungswert eingetragen ist, und eine BestelldetailID angegeben ist, + //wird der Anschaffungswert von der Bestellung uebernommen + if($oBetriebsmittel->bestelldetail_id!='' && $anschaffungswert_array[$pos]=='') + { + $bestellung = new wawi_bestelldetail(); + $bestellung->load($oBetriebsmittel->bestelldetail_id); + $anschaffungswert_array[$pos]=($bestellung->preisprove/100*(100+$bestellung->mwst)); + $anschaffungswert_array[$pos]=number_format(str_replace(',','.',$anschaffungswert_array[$pos]),2,'.',''); + } + $oBetriebsmittel->anschaffungswert = $anschaffungswert_array[$pos]; + $oBetriebsmittel->hoehe = number_format(str_replace(',','.',$hoehe_array[$pos]),2,'.',''); + $oBetriebsmittel->breite = number_format(str_replace(',','.',$breite_array[$pos]),2,'.',''); + $oBetriebsmittel->tiefe = number_format(str_replace(',','.',$tiefe_array[$pos]),2,'.',''); + if ($oBetriebsmittel->save()) { $errormsg[]='Inventar / Betriebsmittel '.($oBetriebsmittel->new?'gespeichert ':'geändert '); @@ -1178,6 +1262,34 @@ for ($pos=0;$pos<$anzahl;$pos++) ?> +    + + + + +    + + + + + +    + + + +    + + + +    + + + diff --git a/vilesci/inventar/inventarliste.php b/vilesci/inventar/inventarliste.php index bf2a8ee34..cbfbd8728 100644 --- a/vilesci/inventar/inventarliste.php +++ b/vilesci/inventar/inventarliste.php @@ -121,9 +121,11 @@ $maxlength[$spalte]=5; $worksheet->write($zeile,++$spalte,'Datum',$format_bold); $maxlength[$spalte]=5; $worksheet->write($zeile,++$spalte,'Leasing Bis',$format_bold); -$maxlength[$spalte]=7; -$worksheet->write($zeile,++$spalte,'Bruttobetrag',$format_bold); -$maxlength[$spalte]=12; +$maxlength[$spalte]=11; +$worksheet->write($zeile,++$spalte,'Anschaffungsdatum',$format_bold); +$maxlength[$spalte]=17; +$worksheet->write($zeile,++$spalte,'Anschaffungswert',$format_bold); +$maxlength[$spalte]=16; for ($pos=0;$posformatDatum($resultBetriebsmittel[$pos]->betriebsmittelstatus_datum,'d.m.Y'),$format_date); InsertCell($zeile,++$spalte,$datum_obj->formatDatum($resultBetriebsmittel[$pos]->leasing_bis,'d.m.Y'),$format_date); - //Wenn Verbindung zu einem Bestelldetail vorhanden ist, wird der Bruttobetrag des Details - //in der Liste angezeigt - if($resultBetriebsmittel[$pos]->bestelldetail_id!='') - { - $bestelldetail = new wawi_bestelldetail(); - $bestelldetail->load($resultBetriebsmittel[$pos]->bestelldetail_id); - InsertCell($zeile,++$spalte,$bestelldetail->preisprove/100*(100+$bestelldetail->mwst), $format_right); - } + InsertCell($zeile,++$spalte,$datum_obj->formatDatum($resultBetriebsmittel[$pos]->anschaffungsdatum,'d.m.Y'),$format_date); + InsertCell($zeile,++$spalte,$resultBetriebsmittel[$pos]->anschaffungswert); } $maxlength[1]=30; $maxlength[2]=30;