diff --git a/erpnext_germany/data/business_trip_region.csv b/erpnext_germany/data/business_trip_region.csv index 9bab51f..4b39e53 100644 --- a/erpnext_germany/data/business_trip_region.csv +++ b/erpnext_germany/data/business_trip_region.csv @@ -1,225 +1,225 @@ -title,whole_day,arrival_or_departure,accommodation -Afghanistan,30,20,95 -Ägypten,50,33,112 -Äthiopien,39,26,130 -Äquatorialguinea,42,28,166 -Albanien,27,18,112 -Algerien,47,32,120 -Andorra,41,28,91 -Angola,52,35,299 -Argentinien,35,24,113 -Armenien,24,16,59 -Aserbaidschan,44,29,88 -Australien: Canberra,74,49,186 -Australien: Sydney,57,38,173 -Australien,57,38,173 -Bahrain,48,32,153 -Bangladesch,50,33,165 -Barbados,54,36,206 -Belgien,59,40,141 -Benin,52,35,115 -Bolivien,46,31,108 -Bosnien und Herzegowina,23,16,75 -Botsuana,46,31,176 -Brasilien: Brasilia,51,34,88 -Brasilien: Rio de Janeiro,69,46,140 -Brasilien: Sao Paulo,46,31,151 -Brasilien,46,31,88 -Brunei,52,35,106 -Bulgarien,22,15,115 -Burkina Faso,38,25,174 -Burundi,36,24,138 -Chile,44,29,154 -China: Chengdu,41,28,131 -China: Hongkong,71,48,169 -China: Kanton,36,24,150 -China: Peking,30,20,185 -China: Shanghai,58,39,217 -China,48,32,112 -Costa Rica,47,32,93 -Côte d’Ivoire,59,40,166 -Dänemark,75,50,183 -Deutschland,28,14,0 -Dominikanische Republik,50,33,167 -Dschibuti,77,52,255 -Ecuador,27,18,103 -El Salvador,65,44,161 -Eritrea,50,33,91 -Estland,29,20,85 -Fidschi,32,21,183 -Finnland,54,36,171 -"Frankreich: Paris sowie die Departments 77, 78, 91 bis 95",58,39,159 -Frankreich,53,36,105 -Gabun,52,35,183 -Gambia,40,27,161 -Georgien,45,30,87 -Ghana,46,31,148 -Griechenland: Athen,40,27,139 -Griechenland,36,24,150 -Guatemala,34,23,90 -Guinea,59,40,140 -Guinea-Bissau,32,21,113 -Haiti,58,39,130 -Honduras,57,38,198 -Indien: Chennai,32,21,85 -Indien: Kalkutta,35,24,145 -Indien: Mumbai,50,33,146 -Indien: Neu Delhi,38,25,185 -Indien,32,21,85 -Indonesien,36,24,134 -Iran,33,22,196 -Irland,58,39,129 -Island,62,41,187 -Israel,66,44,190 -Italien: Mailand,42,28,191 -Italien: Rom,48,32,150 -Italien,42,28,150 -Jamaika,39,26,171 -Japan: Tokio,50,33,285 -Japan,52,35,190 -Jemen,24,16,95 -Jordanien,57,38,134 -Kambodscha,38,25,94 -Kamerun,56,37,275 -Kanada: Ottawa,62,41,214 -Kanada: Toronto,54,36,392 -Kanada: Vancouver,63,42,304 -Kanada,54,36,214 -Kap Verde,38,25,90 -Kasachstan,45,30,111 -Katar,56,37,149 -Kenia,51,34,219 -Kirgisistan,27,18,74 -Kolumbien,46,31,115 -"Kongo, Republik",62,41,215 -"Kongo, Demokratische Republik",70,47,190 -"Korea, Demokratische Volksrepublik",28,19,92 -"Korea, Republik",48,32,108 -Kosovo,24,16,71 -Kroatien,35,24,107 -Kuba,51,34,170 -Kuwait,56,37,241 -Laos,35,24,71 -Lesotho,28,19,104 -Lettland,35,24,76 -Libanon,69,46,146 -Libyen,63,42,135 -Liechtenstein,56,37,190 -Litauen,26,17,109 -Luxemburg,63,42,139 -Madagaskar,33,22,116 -Malawi,41,28,109 -Malaysia,36,24,86 -Malediven,52,35,170 -Mali,38,25,120 -Malta,46,31,114 -Marokko,41,28,87 -Marshall Inseln,63,42,102 -Mauretanien,35,24,86 -Mauritius,44,29,172 -Mexiko,48,32,177 -"Moldau, Republik",26,17,73 -Monaco,52,35,187 -Mongolei,23,16,92 -Montenegro,32,21,85 -Mosambik,51,34,208 -Myanmar,35,24,155 -Namibia,30,20,112 -Nepal,36,24,126 -Neuseeland,58,39,148 -Nicaragua,46,31,105 -Niederlande,47,32,122 -Niger,42,28,131 -Nigeria,46,31,182 -Nordmazedonien,27,18,89 -Norwegen,75,50,139 -Österreich,50,33,117 -Oman,64,43,141 -Pakistan: Islamabad,23,16,238 -Pakistan,34,23,122 -Palau,51,34,179 -Panama,41,28,82 -Papua-Neuguinea,59,40,159 -Paraguay,39,26,124 -Peru,34,23,143 -Philippinen,41,28,140 -Polen: Breslau,33,22,117 -Polen: Danzig,30,20,84 -Polen: Krakau,27,18,86 -Polen: Warschau,29,20,109 -Polen,29,20,60 -Portugal,32,21,111 -Ruanda,44,29,117 -Rumänien: Bukarest,32,21,92 -Rumänien,27,18,89 -Russische Föderation: Jekaterinburg,28,19,84 -Russische Föderation: Moskau,30,20,110 -Russische Föderation: St. Petersburg,26,17,114 -Russische Föderation,24,16,58 -Sambia,38,25,105 -Samoa,39,26,105 -San Marino,34,23,79 -São Tomé – Príncipe,47,32,80 -Saudi-Arabien: Djidda,57,38,181 -Saudi-Arabien: Riad,56,37,186 -Saudi-Arabien,56,37,181 -Schweden,66,44,140 -Schweiz: Genf,66,44,186 -Schweiz,64,43,180 -Senegal,42,28,190 -Serbien,27,18,97 -Sierra Leone,57,38,145 -Simbabwe,45,30,140 -Singapur,54,36,197 -Slowakische Republik,33,22,121 -Slowenien,38,25,126 -Spanien: Barcelona,34,23,144 -Spanien: Kanarische Inseln,36,24,103 -Spanien: Madrid,42,28,131 -Spanien: Palma de Mallorca,44,29,142 -Spanien,34,23,103 -Sri Lanka,36,24,112 -Sudan,33,22,195 -Südafrika: Kapstadt,33,22,130 -Südafrika: Johannesburg,36,24,129 -Südafrika,29,20,109 -Südsudan,51,34,159 -Syrien,38,25,140 -Tadschikistan,27,18,118 -Taiwan,46,31,143 -Tansania,44,29,97 -Thailand,38,25,110 -Togo,39,26,118 -Tonga,39,26,94 -Trinidad und Tobago,66,44,203 -Tschad,42,28,155 -Tschechische Republik,32,21,77 -Türkei: Istanbul,26,17,120 -Türkei: Izmir,29,20,55 -Türkei,17,12,95 -Tunesien,40,27,144 -Turkmenistan,33,22,108 -Uganda,41,28,143 -Ukraine,26,17,98 -Ungarn,32,21,85 -Uruguay,48,32,90 -Usbekistan,34,23,104 -Vatikanstaat,48,32,150 -Venezuela,45,30,127 -Vereinigte Arabische Emirate,65,44,156 -Vereinigte Staaten von Amerika: Atlanta,77,52,182 -Vereinigte Staaten von Amerika: Boston,63,42,333 -Vereinigte Staaten von Amerika: Chicago,65,44,233 -Vereinigte Staaten von Amerika: Houston,62,41,204 -Vereinigte Staaten von Amerika: Los Angeles,64,43,262 -Vereinigte Staaten von Amerika: Miami,65,44,256 -Vereinigte Staaten von Amerika: New York City,66,44,308 -Vereinigte Staaten von Amerika: San Francisco,59,40,327 -"Vereinigte Staaten von Amerika: Washington, D. C.",66,44,203 -Vereinigte Staaten von Amerika,59,40,182 -Vereinigtes Königreich von Großbritannien und Nordirland: London,66,44,163 -Vereinigtes Königreich von Großbritannien und Nordirland,52,35,99 -Vietnam,41,28,86 -Weißrussland,20,13,98 -Zentralafrikanische Republik,53,36,210 -Zypern,42,28,125 \ No newline at end of file +title,whole_day,arrival_or_departure,accommodation,valid_from +Afghanistan,30,20,95,2024-01-01 +Ägypten,50,33,112,2024-01-01 +Äthiopien,39,26,130,2024-01-01 +Äquatorialguinea,42,28,166,2024-01-01 +Albanien,27,18,112,2024-01-01 +Algerien,47,32,120,2024-01-01 +Andorra,41,28,91,2024-01-01 +Angola,52,35,299,2024-01-01 +Argentinien,35,24,113,2024-01-01 +Armenien,24,16,59,2024-01-01 +Aserbaidschan,44,29,88,2024-01-01 +Australien: Canberra,74,49,186,2024-01-01 +Australien: Sydney,57,38,173,2024-01-01 +Australien,57,38,173,2024-01-01 +Bahrain,48,32,153,2024-01-01 +Bangladesch,50,33,165,2024-01-01 +Barbados,54,36,206,2024-01-01 +Belgien,59,40,141,2024-01-01 +Benin,52,35,115,2024-01-01 +Bolivien,46,31,108,2024-01-01 +Bosnien und Herzegowina,23,16,75,2024-01-01 +Botsuana,46,31,176,2024-01-01 +Brasilien: Brasilia,51,34,88,2024-01-01 +Brasilien: Rio de Janeiro,69,46,140,2024-01-01 +Brasilien: Sao Paulo,46,31,151,2024-01-01 +Brasilien,46,31,88,2024-01-01 +Brunei,52,35,106,2024-01-01 +Bulgarien,22,15,115,2024-01-01 +Burkina Faso,38,25,174,2024-01-01 +Burundi,36,24,138,2024-01-01 +Chile,44,29,154,2024-01-01 +China: Chengdu,41,28,131,2024-01-01 +China: Hongkong,71,48,169,2024-01-01 +China: Kanton,36,24,150,2024-01-01 +China: Peking,30,20,185,2024-01-01 +China: Shanghai,58,39,217,2024-01-01 +China,48,32,112,2024-01-01 +Costa Rica,47,32,93,2024-01-01 +Côte d’Ivoire,59,40,166,2024-01-01 +Dänemark,75,50,183,2024-01-01 +Deutschland,28,14,0,2024-01-01 +Dominikanische Republik,50,33,167,2024-01-01 +Dschibuti,77,52,255,2024-01-01 +Ecuador,27,18,103,2024-01-01 +El Salvador,65,44,161,2024-01-01 +Eritrea,50,33,91,2024-01-01 +Estland,29,20,85,2024-01-01 +Fidschi,32,21,183,2024-01-01 +Finnland,54,36,171,2024-01-01 +"Frankreich: Paris sowie die Departments 77, 78, 91 bis 95",58,39,159,2024-01-01 +Frankreich,53,36,105,2024-01-01 +Gabun,52,35,183,2024-01-01 +Gambia,40,27,161,2024-01-01 +Georgien,45,30,87,2024-01-01 +Ghana,46,31,148,2024-01-01 +Griechenland: Athen,40,27,139,2024-01-01 +Griechenland,36,24,150,2024-01-01 +Guatemala,34,23,90,2024-01-01 +Guinea,59,40,140,2024-01-01 +Guinea-Bissau,32,21,113,2024-01-01 +Haiti,58,39,130,2024-01-01 +Honduras,57,38,198,2024-01-01 +Indien: Chennai,32,21,85,2024-01-01 +Indien: Kalkutta,35,24,145,2024-01-01 +Indien: Mumbai,50,33,146,2024-01-01 +Indien: Neu Delhi,38,25,185,2024-01-01 +Indien,32,21,85,2024-01-01 +Indonesien,36,24,134,2024-01-01 +Iran,33,22,196,2024-01-01 +Irland,58,39,129,2024-01-01 +Island,62,41,187,2024-01-01 +Israel,66,44,190,2024-01-01 +Italien: Mailand,42,28,191,2024-01-01 +Italien: Rom,48,32,150,2024-01-01 +Italien,42,28,150,2024-01-01 +Jamaika,39,26,171,2024-01-01 +Japan: Tokio,50,33,285,2024-01-01 +Japan,52,35,190,2024-01-01 +Jemen,24,16,95,2024-01-01 +Jordanien,57,38,134,2024-01-01 +Kambodscha,38,25,94,2024-01-01 +Kamerun,56,37,275,2024-01-01 +Kanada: Ottawa,62,41,214,2024-01-01 +Kanada: Toronto,54,36,392,2024-01-01 +Kanada: Vancouver,63,42,304,2024-01-01 +Kanada,54,36,214,2024-01-01 +Kap Verde,38,25,90,2024-01-01 +Kasachstan,45,30,111,2024-01-01 +Katar,56,37,149,2024-01-01 +Kenia,51,34,219,2024-01-01 +Kirgisistan,27,18,74,2024-01-01 +Kolumbien,46,31,115,2024-01-01 +"Kongo, Republik",62,41,215,2024-01-01 +"Kongo, Demokratische Republik",70,47,190,2024-01-01 +"Korea, Demokratische Volksrepublik",28,19,92,2024-01-01 +"Korea, Republik",48,32,108,2024-01-01 +Kosovo,24,16,71,2024-01-01 +Kroatien,35,24,107,2024-01-01 +Kuba,51,34,170,2024-01-01 +Kuwait,56,37,241,2024-01-01 +Laos,35,24,71,2024-01-01 +Lesotho,28,19,104,2024-01-01 +Lettland,35,24,76,2024-01-01 +Libanon,69,46,146,2024-01-01 +Libyen,63,42,135,2024-01-01 +Liechtenstein,56,37,190,2024-01-01 +Litauen,26,17,109,2024-01-01 +Luxemburg,63,42,139,2024-01-01 +Madagaskar,33,22,116,2024-01-01 +Malawi,41,28,109,2024-01-01 +Malaysia,36,24,86,2024-01-01 +Malediven,52,35,170,2024-01-01 +Mali,38,25,120,2024-01-01 +Malta,46,31,114,2024-01-01 +Marokko,41,28,87,2024-01-01 +Marshall Inseln,63,42,102,2024-01-01 +Mauretanien,35,24,86,2024-01-01 +Mauritius,44,29,172,2024-01-01 +Mexiko,48,32,177,2024-01-01 +"Moldau, Republik",26,17,73,2024-01-01 +Monaco,52,35,187,2024-01-01 +Mongolei,23,16,92,2024-01-01 +Montenegro,32,21,85,2024-01-01 +Mosambik,51,34,208,2024-01-01 +Myanmar,35,24,155,2024-01-01 +Namibia,30,20,112,2024-01-01 +Nepal,36,24,126,2024-01-01 +Neuseeland,58,39,148,2024-01-01 +Nicaragua,46,31,105,2024-01-01 +Niederlande,47,32,122,2024-01-01 +Niger,42,28,131,2024-01-01 +Nigeria,46,31,182,2024-01-01 +Nordmazedonien,27,18,89,2024-01-01 +Norwegen,75,50,139,2024-01-01 +Österreich,50,33,117,2024-01-01 +Oman,64,43,141,2024-01-01 +Pakistan: Islamabad,23,16,238,2024-01-01 +Pakistan,34,23,122,2024-01-01 +Palau,51,34,179,2024-01-01 +Panama,41,28,82,2024-01-01 +Papua-Neuguinea,59,40,159,2024-01-01 +Paraguay,39,26,124,2024-01-01 +Peru,34,23,143,2024-01-01 +Philippinen,41,28,140,2024-01-01 +Polen: Breslau,33,22,117,2024-01-01 +Polen: Danzig,30,20,84,2024-01-01 +Polen: Krakau,27,18,86,2024-01-01 +Polen: Warschau,29,20,109,2024-01-01 +Polen,29,20,60,2024-01-01 +Portugal,32,21,111,2024-01-01 +Ruanda,44,29,117,2024-01-01 +Rumänien: Bukarest,32,21,92,2024-01-01 +Rumänien,27,18,89,2024-01-01 +Russische Föderation: Jekaterinburg,28,19,84,2024-01-01 +Russische Föderation: Moskau,30,20,110,2024-01-01 +Russische Föderation: St. Petersburg,26,17,114,2024-01-01 +Russische Föderation,24,16,58,2024-01-01 +Sambia,38,25,105,2024-01-01 +Samoa,39,26,105,2024-01-01 +San Marino,34,23,79,2024-01-01 +São Tomé – Príncipe,47,32,80,2024-01-01 +Saudi-Arabien: Djidda,57,38,181,2024-01-01 +Saudi-Arabien: Riad,56,37,186,2024-01-01 +Saudi-Arabien,56,37,181,2024-01-01 +Schweden,66,44,140,2024-01-01 +Schweiz: Genf,66,44,186,2024-01-01 +Schweiz,64,43,180,2024-01-01 +Senegal,42,28,190,2024-01-01 +Serbien,27,18,97,2024-01-01 +Sierra Leone,57,38,145,2024-01-01 +Simbabwe,45,30,140,2024-01-01 +Singapur,54,36,197,2024-01-01 +Slowakische Republik,33,22,121,2024-01-01 +Slowenien,38,25,126,2024-01-01 +Spanien: Barcelona,34,23,144,2024-01-01 +Spanien: Kanarische Inseln,36,24,103,2024-01-01 +Spanien: Madrid,42,28,131,2024-01-01 +Spanien: Palma de Mallorca,44,29,142,2024-01-01 +Spanien,34,23,103,2024-01-01 +Sri Lanka,36,24,112,2024-01-01 +Sudan,33,22,195,2024-01-01 +Südafrika: Kapstadt,33,22,130,2024-01-01 +Südafrika: Johannesburg,36,24,129,2024-01-01 +Südafrika,29,20,109,2024-01-01 +Südsudan,51,34,159,2024-01-01 +Syrien,38,25,140,2024-01-01 +Tadschikistan,27,18,118,2024-01-01 +Taiwan,46,31,143,2024-01-01 +Tansania,44,29,97,2024-01-01 +Thailand,38,25,110,2024-01-01 +Togo,39,26,118,2024-01-01 +Tonga,39,26,94,2024-01-01 +Trinidad und Tobago,66,44,203,2024-01-01 +Tschad,42,28,155,2024-01-01 +Tschechische Republik,32,21,77,2024-01-01 +Türkei: Istanbul,26,17,120,2024-01-01 +Türkei: Izmir,29,20,55,2024-01-01 +Türkei,17,12,95,2024-01-01 +Tunesien,40,27,144,2024-01-01 +Turkmenistan,33,22,108,2024-01-01 +Uganda,41,28,143,2024-01-01 +Ukraine,26,17,98,2024-01-01 +Ungarn,32,21,85,2024-01-01 +Uruguay,48,32,90,2024-01-01 +Usbekistan,34,23,104,2024-01-01 +Vatikanstaat,48,32,150,2024-01-01 +Venezuela,45,30,127,2024-01-01 +Vereinigte Arabische Emirate,65,44,156,2024-01-01 +Vereinigte Staaten von Amerika: Atlanta,77,52,182,2024-01-01 +Vereinigte Staaten von Amerika: Boston,63,42,333,2024-01-01 +Vereinigte Staaten von Amerika: Chicago,65,44,233,2024-01-01 +Vereinigte Staaten von Amerika: Houston,62,41,204,2024-01-01 +Vereinigte Staaten von Amerika: Los Angeles,64,43,262,2024-01-01 +Vereinigte Staaten von Amerika: Miami,65,44,256,2024-01-01 +Vereinigte Staaten von Amerika: New York City,66,44,308,2024-01-01 +Vereinigte Staaten von Amerika: San Francisco,59,40,327,2024-01-01 +"Vereinigte Staaten von Amerika: Washington, D. C.",66,44,203,2024-01-01 +Vereinigte Staaten von Amerika,59,40,182,2024-01-01 +Vereinigtes Königreich von Großbritannien und Nordirland: London,66,44,163,2024-01-01 +Vereinigtes Königreich von Großbritannien und Nordirland,52,35,99,2024-01-01 +Vietnam,41,28,86,2024-01-01 +Weißrussland,20,13,98,2024-01-01 +Zentralafrikanische Republik,53,36,210,2024-01-01 +Zypern,42,28,125,2024-01-01 \ No newline at end of file diff --git a/erpnext_germany/erpnext_germany/doctype/business_trip/business_trip.js b/erpnext_germany/erpnext_germany/doctype/business_trip/business_trip.js index d0fce43..1ba3265 100644 --- a/erpnext_germany/erpnext_germany/doctype/business_trip/business_trip.js +++ b/erpnext_germany/erpnext_germany/doctype/business_trip/business_trip.js @@ -4,6 +4,13 @@ frappe.ui.form.on("Business Trip", { setup(frm) { frm.set_query("employee", erpnext.queries.employee); + frm.set_query("region", (doc) => { + return { + filters: { + valid_from: ["<=", doc.from_date], + } + }; + }); }, from_date: function (frm) { diff --git a/erpnext_germany/erpnext_germany/doctype/business_trip_region/business_trip_region.json b/erpnext_germany/erpnext_germany/doctype/business_trip_region/business_trip_region.json index 920ad06..e00cef8 100644 --- a/erpnext_germany/erpnext_germany/doctype/business_trip_region/business_trip_region.json +++ b/erpnext_germany/erpnext_germany/doctype/business_trip_region/business_trip_region.json @@ -1,7 +1,6 @@ { "actions": [], - "allow_rename": 1, - "autoname": "field:title", + "autoname": "hash", "creation": "2022-11-01 20:24:28.877901", "doctype": "DocType", "editable_grid": 1, @@ -10,14 +9,16 @@ "title", "whole_day", "arrival_or_departure", - "accommodation" + "accommodation", + "column_break_ajul", + "valid_from", + "disabled" ], "fields": [ { "fieldname": "title", "fieldtype": "Data", - "label": "Title", - "unique": 1 + "label": "Title" }, { "description": "For an absence of at least 24 hours per calendar day", @@ -36,6 +37,22 @@ "fieldname": "accommodation", "fieldtype": "Currency", "label": "Accommodation" + }, + { + "fieldname": "valid_from", + "fieldtype": "Date", + "in_list_view": 1, + "label": "Valid From" + }, + { + "fieldname": "column_break_ajul", + "fieldtype": "Column Break" + }, + { + "default": "0", + "fieldname": "disabled", + "fieldtype": "Check", + "label": "Disabled" } ], "index_web_pages_for_search": 1, @@ -45,11 +62,11 @@ "link_fieldname": "region" } ], - "modified": "2024-10-11 18:56:49.254117", + "modified": "2024-10-24 22:35:47.597779", "modified_by": "Administrator", "module": "ERPNext Germany", "name": "Business Trip Region", - "naming_rule": "By fieldname", + "naming_rule": "Random", "owner": "Administrator", "permissions": [ { @@ -75,8 +92,10 @@ "write": 1 } ], + "search_fields": "valid_from", + "show_title_field_in_link": 1, "sort_field": "modified", "sort_order": "DESC", "states": [], "title_field": "title" -} +} \ No newline at end of file diff --git a/erpnext_germany/erpnext_germany/doctype/business_trip_region/business_trip_region_list.js b/erpnext_germany/erpnext_germany/doctype/business_trip_region/business_trip_region_list.js new file mode 100644 index 0000000..df16a96 --- /dev/null +++ b/erpnext_germany/erpnext_germany/doctype/business_trip_region/business_trip_region_list.js @@ -0,0 +1,3 @@ +frappe.listview_settings["Business Trip Region"] = { + hide_name_column: true, +};