diff --git a/.idea/deployment.xml b/.idea/deployment.xml new file mode 100644 index 000000000..f91ac7636 --- /dev/null +++ b/.idea/deployment.xml @@ -0,0 +1,15 @@ + + + + + \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml index 0f1ae6772..90f6c5e86 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -105,6 +105,7 @@ + diff --git a/.idea/webServers.xml b/.idea/webServers.xml new file mode 100644 index 000000000..1d968e8ea --- /dev/null +++ b/.idea/webServers.xml @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c1761a95f..240bdeab1 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -9,87 +9,92 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -97,14 +102,13 @@ - + - @@ -671,18 +675,13 @@ - - - - - @@ -715,9 +714,6 @@ - - - @@ -1351,30 +1347,18 @@ - - - - - - - - - - - - diff --git a/core/vendor/ensepar/tcpdf/README.TXT b/core/vendor/ensepar/tcpdf/README.TXT index 585e2ed8e..b65e2b82b 100644 --- a/core/vendor/ensepar/tcpdf/README.TXT +++ b/core/vendor/ensepar/tcpdf/README.TXT @@ -1,34 +1,34 @@ -TCPDF - README -============================================================ - -IF YOU'D LIKE TO SUPPORT TCPDF, PLEASE CONSIDER MAKING A -DONATION: -http://sourceforge.net/donate/index.php?group_id=128076 - ------------------------------------------------------------- - -Name: TCPDF -Version: 5.0.002 -Release date: 2010-05-06 -Author: Nicola Asuni - -Copyright (c) 2001-2010: - Nicola Asuni - Tecnick.com s.r.l. - Via Della Pace, 11 - 09044 Quartucciu (CA) - ITALY - www.tecnick.com - -URLs: - http://www.tcpdf.org - http://www.sourceforge.net/projects/tcpdf - -Description: - TCPDF is a PHP class for generating PDF files on-the-fly without requiring external extensions. - TCPDF has been originally derived from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org). - -Main Features: +TCPDF - README +============================================================ + +IF YOU'D LIKE TO SUPPORT TCPDF, PLEASE CONSIDER MAKING A +DONATION: +http://sourceforge.net/donate/index.php?group_id=128076 + +------------------------------------------------------------ + +Name: TCPDF +Version: 5.0.002 +Release date: 2010-05-06 +Author: Nicola Asuni + +Copyright (c) 2001-2010: + Nicola Asuni + Tecnick.com s.r.l. + Via Della Pace, 11 + 09044 Quartucciu (CA) + ITALY + www.tecnick.com + +URLs: + http://www.tcpdf.org + http://www.sourceforge.net/projects/tcpdf + +Description: + TCPDF is a PHP class for generating PDF files on-the-fly without requiring external extensions. + TCPDF has been originally derived from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org). + +Main Features: // * no external libraries are required for the basic functions; // * all ISO page formats, custom page formats, custom margins and units of measure; // * UTF-8 Unicode and Right-To-Left languages; @@ -50,35 +50,35 @@ Main Features: // * automatic page numbering and page groups; // * move and delete pages; // * page compression (requires php-zlib extension); - - -Installation (full instructions on http://www.tcpdf.org): - 1. copy the folder on your Web server - 2. set your installation path and other parameters on the config/tcpdf_config.php - 3. call the examples/example_001.php page with your browser to see an example - -Source Code Documentation: - doc/index.html - -For Additional Documentation: - http://www.tcpdf.org - -License - Copyright (C) 2002-2010 Nicola Asuni - Tecnick.com S.r.l. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 2.1 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . - - See LICENSE.TXT file for more information. - -============================================================ + + +Installation (full instructions on http://www.tcpdf.org): + 1. copy the folder on your Web server + 2. set your installation path and other parameters on the config/tcpdf_config.php + 3. call the examples/example_001.php page with your browser to see an example + +Source Code Documentation: + doc/index.html + +For Additional Documentation: + http://www.tcpdf.org + +License + Copyright (C) 2002-2010 Nicola Asuni - Tecnick.com S.r.l. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . + + See LICENSE.TXT file for more information. + +============================================================ diff --git a/core/vendor/ensepar/tcpdf/cache/utf8test.txt b/core/vendor/ensepar/tcpdf/cache/utf8test.txt index e5cd09248..27cddb1e0 100644 --- a/core/vendor/ensepar/tcpdf/cache/utf8test.txt +++ b/core/vendor/ensepar/tcpdf/cache/utf8test.txt @@ -1,120 +1,120 @@ -Sentences that contain all letters commonly used in a language --------------------------------------------------------------- - -Markus Kuhn -- 2001-09-02 - -This file is UTF-8 encoded. - - -Danish (da) ---------- - - Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen - Wolther spillede på xylofon. - (= Quiz contestants were eating strawbery with cream while Wolther - the circus clown played on xylophone.) - -German (de) ------------ - - Falsches Üben von Xylophonmusik quält jeden größeren Zwerg - (= Wrongful practicing of xylophone music tortures every larger dwarf) - - Zwölf Boxkämpfer jagten Eva quer über den Sylter Deich - (= Twelve boxing fighters hunted Eva across the dike of Sylt) - - Heizölrückstoßabdämpfung - (= fuel oil recoil absorber) - (jqvwxy missing, but all non-ASCII letters in one word) - -English (en) ------------- - - The quick brown fox jumps over the lazy dog - -Spanish (es) ------------- - - El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y - frío, añoraba a su querido cachorro. - (Contains every letter and every accent, but not every combination - of vowel + acute.) - -French (fr) ------------ - - Portez ce vieux whisky au juge blond qui fume sur son île intérieure, à - côté de l'alcôve ovoïde, où les bûches se consument dans l'âtre, ce - qui lui permet de penser à la cænogenèse de l'être dont il est question - dans la cause ambiguë entendue à Moÿ, dans un capharnaüm qui, - pense-t-il, diminue çà et là la qualité de son œuvre. - - l'île exiguë - Où l'obèse jury mûr - Fête l'haï volapük, - Âne ex aéquo au whist, - Ôtez ce vœu déçu. - - Le cœur déçu mais l'âme plutôt naïve, Louÿs rêva de crapaüter en - canoë au delà des îles, près du mälström où brûlent les novæ. - -Irish Gaelic (ga) ------------------ - - D'fhuascail Íosa, Úrmhac na hÓighe Beannaithe, pór Éava agus Ádhaimh - -Hungarian (hu) --------------- - - Árvíztűrő tükörfúrógép - (= flood-proof mirror-drilling machine, only all non-ASCII letters) - -Icelandic (is) --------------- - - Kæmi ný öxi hér ykist þjófum nú bæði víl og ádrepa - - Sævör grét áðan því úlpan var ónýt - (some ASCII letters missing) - -Greek (el) -------------- - - Γαζέες καὶ μυρτιὲς δὲν θὰ βρῶ πιὰ στὸ χρυσαφὶ ξέφωτο - (= No more shall I see acacias or myrtles in the golden clearing) - - Ξεσκεπάζω τὴν ψυχοφθόρα βδελυγμία - (= I uncover the soul-destroying abhorrence) - -Hebrew (iw) ------------ - - ? דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה - -Polish (pl) ------------ - - Pchnąć w tę łódź jeża lub ośm skrzyń fig - (= To push a hedgehog or eight bins of figs in this boat) - -Russian (ru) ------------- - - В чащах юга жил бы цитрус? Да, но фальшивый экземпляр! - (= Would a citrus live in the bushes of south? Yes, but only a fake one!) - -Thai (th) ---------- - - [--------------------------|------------------------] - ๏ เป็นมนุษย์สุดประเสริฐเลิศคุณค่า กว่าบรรดาฝูงสัตว์เดรัจฉาน - จงฝ่าฟันพัฒนาวิชาการ อย่าล้างผลาญฤๅเข่นฆ่าบีฑาใคร - ไม่ถือโทษโกรธแช่งซัดฮึดฮัดด่า หัดอภัยเหมือนกีฬาอัชฌาสัย - ปฏิบัติประพฤติกฎกำหนดใจ พูดจาให้จ๊ะๆ จ๋าๆ น่าฟังเอย ฯ - - [The copyright for the Thai example is owned by The Computer - Association of Thailand under the Royal Patronage of His Majesty the - King.] - -Please let me know if you find others! Special thanks to the people -from all over the world who contributed these sentences. +Sentences that contain all letters commonly used in a language +-------------------------------------------------------------- + +Markus Kuhn -- 2001-09-02 + +This file is UTF-8 encoded. + + +Danish (da) +--------- + + Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen + Wolther spillede på xylofon. + (= Quiz contestants were eating strawbery with cream while Wolther + the circus clown played on xylophone.) + +German (de) +----------- + + Falsches Üben von Xylophonmusik quält jeden größeren Zwerg + (= Wrongful practicing of xylophone music tortures every larger dwarf) + + Zwölf Boxkämpfer jagten Eva quer über den Sylter Deich + (= Twelve boxing fighters hunted Eva across the dike of Sylt) + + Heizölrückstoßabdämpfung + (= fuel oil recoil absorber) + (jqvwxy missing, but all non-ASCII letters in one word) + +English (en) +------------ + + The quick brown fox jumps over the lazy dog + +Spanish (es) +------------ + + El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y + frío, añoraba a su querido cachorro. + (Contains every letter and every accent, but not every combination + of vowel + acute.) + +French (fr) +----------- + + Portez ce vieux whisky au juge blond qui fume sur son île intérieure, à + côté de l'alcôve ovoïde, où les bûches se consument dans l'âtre, ce + qui lui permet de penser à la cænogenèse de l'être dont il est question + dans la cause ambiguë entendue à Moÿ, dans un capharnaüm qui, + pense-t-il, diminue çà et là la qualité de son œuvre. + + l'île exiguë + Où l'obèse jury mûr + Fête l'haï volapük, + Âne ex aéquo au whist, + Ôtez ce vœu déçu. + + Le cœur déçu mais l'âme plutôt naïve, Louÿs rêva de crapaüter en + canoë au delà des îles, près du mälström où brûlent les novæ. + +Irish Gaelic (ga) +----------------- + + D'fhuascail Íosa, Úrmhac na hÓighe Beannaithe, pór Éava agus Ádhaimh + +Hungarian (hu) +-------------- + + Árvíztűrő tükörfúrógép + (= flood-proof mirror-drilling machine, only all non-ASCII letters) + +Icelandic (is) +-------------- + + Kæmi ný öxi hér ykist þjófum nú bæði víl og ádrepa + + Sævör grét áðan því úlpan var ónýt + (some ASCII letters missing) + +Greek (el) +------------- + + Γαζέες καὶ μυρτιὲς δὲν θὰ βρῶ πιὰ στὸ χρυσαφὶ ξέφωτο + (= No more shall I see acacias or myrtles in the golden clearing) + + Ξεσκεπάζω τὴν ψυχοφθόρα βδελυγμία + (= I uncover the soul-destroying abhorrence) + +Hebrew (iw) +----------- + + ? דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה + +Polish (pl) +----------- + + Pchnąć w tę łódź jeża lub ośm skrzyń fig + (= To push a hedgehog or eight bins of figs in this boat) + +Russian (ru) +------------ + + В чащах юга жил бы цитрус? Да, но фальшивый экземпляр! + (= Would a citrus live in the bushes of south? Yes, but only a fake one!) + +Thai (th) +--------- + + [--------------------------|------------------------] + ๏ เป็นมนุษย์สุดประเสริฐเลิศคุณค่า กว่าบรรดาฝูงสัตว์เดรัจฉาน + จงฝ่าฟันพัฒนาวิชาการ อย่าล้างผลาญฤๅเข่นฆ่าบีฑาใคร + ไม่ถือโทษโกรธแช่งซัดฮึดฮัดด่า หัดอภัยเหมือนกีฬาอัชฌาสัย + ปฏิบัติประพฤติกฎกำหนดใจ พูดจาให้จ๊ะๆ จ๋าๆ น่าฟังเอย ฯ + + [The copyright for the Thai example is owned by The Computer + Association of Thailand under the Royal Patronage of His Majesty the + King.] + +Please let me know if you find others! Special thanks to the people +from all over the world who contributed these sentences. diff --git a/core/vendor/ensepar/tcpdf/doc/read_me.txt b/core/vendor/ensepar/tcpdf/doc/read_me.txt index e9fa63cab..6ab21794b 100644 --- a/core/vendor/ensepar/tcpdf/doc/read_me.txt +++ b/core/vendor/ensepar/tcpdf/doc/read_me.txt @@ -1,3 +1,3 @@ -You can read the documentation at : http://www.tecnick.com/pagefiles/tcpdf/doc/index.html - +You can read the documentation at : http://www.tecnick.com/pagefiles/tcpdf/doc/index.html + it has been removed because of the size of the package of HTML2PDF... \ No newline at end of file diff --git a/core/vendor/ensepar/tcpdf/examples/read_me.txt b/core/vendor/ensepar/tcpdf/examples/read_me.txt index 2a1a2005e..de07e6bd9 100644 --- a/core/vendor/ensepar/tcpdf/examples/read_me.txt +++ b/core/vendor/ensepar/tcpdf/examples/read_me.txt @@ -1,3 +1,3 @@ -You can read the documentation at : http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf_examples - +You can read the documentation at : http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf_examples + it has been removed because of the size of the package of HTML2PDF... \ No newline at end of file diff --git a/core/vendor/ensepar/tcpdf/fonts/almohanad.php b/core/vendor/ensepar/tcpdf/fonts/almohanad.php index cec1fb329..33930ec04 100644 --- a/core/vendor/ensepar/tcpdf/fonts/almohanad.php +++ b/core/vendor/ensepar/tcpdf/fonts/almohanad.php @@ -1,102 +1,102 @@ -1093,'Descent'=>-509,'CapHeight'=>1093,'Flags'=>32,'FontBBox'=>'[-278 -507 1124 1093]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600); -$up=-136; +1093,'Descent'=>-509,'CapHeight'=>1093,'Flags'=>32,'FontBBox'=>'[-278 -507 1124 1093]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600); +$up=-136; $ut=64; -$dw=600; -$cw=array( - 0=>0,32=>139,33=>185,34=>308,35=>278,36=>278,37=>556,38=>463,39=>154,40=>185,41=>185,42=>278,43=>317,44=>139,45=>185,46=>139, - 47=>154,48=>278,49=>278,50=>278,51=>278,52=>278,53=>278,54=>278,55=>278,56=>278,57=>278,58=>185,59=>185,60=>317,61=>317,62=>317, - 63=>278,64=>517,65=>401,66=>371,67=>401,68=>402,69=>371,70=>339,71=>432,72=>430,73=>214,74=>278,75=>424,76=>369,77=>524,78=>401, - 79=>432,80=>339,81=>432,82=>396,83=>309,84=>371,85=>401,86=>401,87=>556,88=>401,89=>401,90=>371,91=>185,92=>154,93=>185,94=>323, - 95=>278,96=>185,97=>278,98=>309,99=>247,100=>309,101=>247,102=>185,103=>278,104=>309,105=>154,106=>185,107=>309,108=>154,109=>463,110=>309, - 111=>278,112=>309,113=>309,114=>247,115=>216,116=>185,117=>309,118=>278,119=>401,120=>278,121=>278,122=>247,123=>219,124=>122,125=>219,126=>289, - 8364=>278,1027=>339,8218=>185,1107=>254,8222=>278,8230=>556,8224=>278,8225=>278,710=>185,8240=>556,352=>309,8249=>185,338=>556,1036=>432,381=>371,1039=>432, - 8216=>185,8217=>185,8220=>278,8221=>278,8226=>194,8211=>278,8212=>556,732=>185,8482=>556,353=>216,8250=>185,339=>401,1116=>297,382=>247,376=>401,161=>185, - 162=>278,163=>278,164=>278,165=>278,166=>122,167=>278,168=>185,169=>415,170=>167,171=>278,172=>317,174=>415,175=>185,176=>222,177=>317,178=>167, - 179=>167,180=>185,181=>309,182=>300,183=>139,184=>185,185=>167,186=>183,187=>278,188=>417,189=>417,190=>417,191=>278,192=>401,193=>401,194=>401, - 195=>401,196=>401,197=>401,198=>556,199=>401,200=>371,201=>371,202=>371,203=>371,204=>216,205=>216,206=>216,207=>216,208=>401,209=>401,210=>432, - 211=>432,212=>432,213=>432,214=>432,215=>317,216=>432,217=>401,218=>401,219=>401,220=>401,221=>401,222=>339,223=>309,224=>278,225=>278,226=>278, - 227=>278,228=>278,229=>278,230=>401,231=>247,232=>247,233=>247,234=>247,235=>247,236=>154,237=>154,238=>154,239=>154,240=>278,241=>309,242=>278, - 243=>278,244=>278,245=>278,246=>278,247=>317,248=>278,249=>309,250=>309,251=>309,252=>309,253=>278,254=>309,255=>278,256=>401,257=>278,258=>401, - 259=>278,260=>401,261=>278,262=>401,263=>247,264=>401,265=>247,266=>401,267=>247,268=>401,269=>247,270=>401,271=>309,272=>401,273=>309,274=>371, - 275=>247,276=>371,277=>247,278=>371,279=>247,280=>371,281=>247,282=>371,283=>247,284=>432,285=>278,286=>432,287=>278,288=>432,289=>278,290=>432, - 291=>278,292=>432,293=>309,294=>432,295=>309,296=>216,297=>154,298=>216,299=>154,300=>216,301=>154,302=>216,303=>154,304=>216,305=>154,306=>490, - 307=>270,308=>278,309=>185,310=>432,311=>309,312=>297,313=>371,314=>154,315=>371,316=>154,317=>371,318=>154,319=>371,320=>293,321=>371,322=>154, - 323=>401,324=>309,325=>401,326=>309,327=>401,328=>309,329=>391,330=>401,331=>309,332=>432,333=>278,334=>432,335=>278,336=>432,337=>278,340=>401, - 341=>247,342=>401,343=>247,344=>401,345=>247,346=>309,347=>216,348=>309,349=>216,350=>309,351=>216,354=>371,355=>185,356=>371,357=>185,358=>371, - 359=>185,360=>401,361=>309,362=>401,363=>309,364=>401,365=>309,366=>401,367=>309,368=>401,369=>309,370=>401,371=>309,372=>556,373=>401,374=>401, - 375=>278,377=>371,378=>247,379=>371,380=>247,383=>185,450=>317,477=>247,484=>432,485=>278,536=>309,537=>216,538=>371,539=>185,658=>282,711=>185, - 728=>185,729=>185,730=>185,731=>185,733=>185,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0, - 779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0, - 795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,809=>0,810=>0, - 811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0, - 827=>0,828=>0,829=>0,830=>0,831=>0,864=>0,865=>0,884=>111,885=>111,890=>0,894=>185,900=>100,901=>183,902=>401,903=>139,904=>451, - 905=>532,906=>316,908=>451,910=>501,911=>451,912=>183,913=>401,914=>371,915=>339,916=>422,917=>371,918=>371,919=>432,920=>432,921=>216,922=>432, - 923=>401,924=>524,925=>401,926=>361,927=>432,928=>451,929=>339,931=>361,932=>371,933=>401,934=>482,935=>401,936=>482,937=>451,938=>0,939=>401, - 940=>336,941=>244,942=>336,943=>183,944=>306,945=>336,946=>306,947=>306,948=>306,949=>244,950=>275,951=>336,952=>306,953=>183,954=>338,955=>275, - 956=>336,957=>275,958=>275,959=>306,960=>336,961=>306,962=>244,963=>306,964=>244,965=>306,966=>367,967=>275,968=>397,969=>397,970=>183,971=>306, - 972=>306,973=>306,974=>397,976=>306,977=>306,978=>401,979=>401,980=>401,981=>367,982=>336,986=>283,987=>237,988=>339,989=>261,1024=>371,1025=>371, - 1026=>371,1028=>401,1029=>309,1030=>216,1031=>216,1032=>278,1033=>573,1034=>573,1035=>449,1037=>432,1038=>401,1040=>401,1041=>371,1042=>371,1043=>328,1044=>432, - 1045=>371,1046=>615,1047=>313,1048=>429,1049=>429,1050=>424,1051=>432,1052=>524,1053=>432,1054=>432,1055=>430,1056=>339,1057=>401,1058=>371,1059=>401,1060=>444, - 1061=>401,1062=>429,1063=>432,1064=>618,1065=>618,1066=>482,1067=>539,1068=>350,1069=>401,1070=>619,1071=>408,1072=>278,1073=>278,1074=>279,1075=>246,1076=>309, - 1077=>247,1078=>417,1079=>227,1080=>319,1081=>319,1082=>297,1083=>302,1084=>376,1085=>309,1086=>278,1087=>309,1088=>309,1089=>247,1090=>274,1091=>278,1092=>458, - 1093=>278,1094=>309,1095=>309,1096=>454,1097=>454,1098=>340,1099=>423,1100=>284,1101=>247,1102=>439,1103=>284,1104=>247,1105=>247,1106=>309,1108=>247,1109=>216, - 1110=>154,1111=>154,1112=>185,1113=>440,1114=>437,1115=>309,1117=>309,1118=>278,1119=>309,1164=>339,1165=>284,1166=>339,1167=>309,1168=>339,1169=>254,1170=>339, - 1171=>254,1172=>339,1173=>254,1174=>615,1175=>417,1176=>322,1177=>216,1178=>432,1179=>297,1180=>432,1181=>297,1182=>432,1183=>297,1184=>537,1185=>352,1186=>432, - 1187=>309,1188=>563,1189=>408,1190=>432,1191=>461,1192=>401,1193=>247,1194=>401,1195=>247,1196=>371,1197=>274,1198=>401,1199=>278,1200=>401,1201=>278,1202=>401, - 1203=>278,1204=>581,1205=>432,1206=>432,1207=>309,1208=>432,1209=>309,1210=>432,1211=>309,1212=>367,1213=>247,1214=>367,1215=>247,1216=>216,1217=>615,1218=>417, - 1219=>432,1220=>297,1223=>432,1224=>309,1227=>432,1228=>309,1232=>401,1233=>278,1234=>401,1235=>278,1236=>556,1237=>401,1238=>371,1239=>247,1240=>367,1241=>247, - 1242=>367,1243=>247,1244=>615,1245=>417,1246=>313,1247=>227,1248=>322,1249=>216,1250=>432,1251=>309,1252=>432,1253=>309,1254=>432,1255=>278,1256=>432,1257=>278, - 1258=>432,1259=>278,1260=>401,1261=>247,1262=>401,1263=>278,1264=>401,1265=>278,1266=>401,1267=>278,1268=>432,1269=>309,1272=>548,1273=>423,1488=>280,1489=>280, - 1490=>174,1491=>280,1492=>280,1493=>158,1494=>158,1495=>280,1496=>280,1497=>158,1498=>287,1499=>280,1500=>280,1501=>280,1502=>280,1503=>156,1504=>158,1505=>280, - 1506=>280,1507=>292,1508=>280,1509=>273,1510=>280,1511=>305,1512=>285,1513=>299,1514=>280,1548=>195,1563=>246,1567=>340,1569=>392,1570=>306,1571=>247,1572=>447, - 1573=>247,1574=>602,1575=>192,1576=>635,1577=>369,1578=>635,1579=>635,1580=>548,1581=>1173,1582=>548,1583=>363,1584=>363,1585=>439,1586=>442,1587=>875,1588=>875, - 1589=>1061,1590=>1061,1591=>811,1592=>811,1593=>549,1594=>547,1600=>389,1601=>755,1602=>574,1603=>717,1604=>555,1605=>423,1606=>532,1607=>371,1608=>454,1609=>633, - 1610=>643,1611=>-19,1612=>-26,1613=>-20,1614=>-19,1615=>-18,1616=>-19,1617=>-19,1618=>-15,1632=>383,1633=>383,1634=>383,1635=>383,1636=>383,1637=>383,1638=>383, - 1639=>383,1640=>383,1641=>383,1642=>383,1645=>398,7936=>336,7937=>336,7938=>336,7939=>336,7940=>336,7941=>336,7942=>336,7943=>336,7944=>401,7945=>401,7946=>401, - 7947=>401,7948=>401,7949=>401,7950=>401,7951=>401,7952=>244,7953=>244,7954=>244,7955=>244,7956=>244,7957=>244,7960=>371,7961=>371,7962=>371,7963=>371,7964=>371, - 7965=>371,7968=>336,7969=>336,7970=>336,7971=>336,7972=>336,7973=>336,7974=>336,7975=>336,7976=>432,7977=>432,7978=>432,7979=>432,7980=>432,7981=>432,7982=>432, - 7983=>432,7984=>183,7985=>183,7986=>183,7987=>183,7988=>183,7989=>183,7990=>183,7991=>183,7992=>216,7993=>216,7994=>216,7995=>216,7996=>216,7997=>216,7998=>216, - 7999=>216,8000=>306,8001=>306,8002=>306,8003=>306,8004=>306,8005=>306,8008=>432,8009=>432,8010=>432,8011=>432,8012=>432,8013=>432,8016=>306,8017=>306,8018=>306, - 8019=>306,8020=>306,8021=>306,8022=>306,8023=>306,8025=>401,8027=>401,8029=>401,8031=>401,8032=>397,8033=>397,8034=>397,8035=>397,8036=>397,8037=>397,8038=>397, - 8039=>397,8040=>451,8041=>451,8042=>451,8043=>451,8044=>451,8045=>451,8046=>451,8047=>451,8048=>336,8049=>336,8050=>244,8051=>244,8052=>336,8053=>336,8054=>183, - 8055=>183,8056=>306,8057=>306,8058=>306,8059=>306,8060=>397,8061=>397,8064=>336,8065=>336,8066=>336,8067=>336,8068=>336,8069=>336,8070=>336,8071=>336,8072=>401, - 8073=>401,8074=>401,8075=>401,8076=>401,8077=>401,8078=>401,8079=>401,8080=>336,8081=>336,8082=>336,8083=>336,8084=>336,8085=>336,8086=>336,8087=>336,8088=>432, - 8089=>432,8090=>432,8091=>432,8092=>432,8093=>432,8094=>432,8095=>432,8096=>397,8097=>397,8098=>397,8099=>397,8100=>397,8101=>397,8102=>397,8103=>397,8104=>451, - 8105=>451,8106=>451,8107=>451,8108=>451,8109=>451,8110=>451,8111=>451,8112=>336,8113=>336,8114=>336,8115=>336,8116=>336,8118=>336,8119=>336,8120=>401,8121=>401, - 8122=>401,8123=>401,8124=>401,8125=>278,8126=>0,8127=>278,8128=>278,8129=>306,8130=>336,8131=>336,8132=>336,8134=>336,8135=>336,8136=>371,8137=>371,8138=>432, - 8139=>432,8140=>432,8141=>278,8142=>278,8143=>278,8144=>183,8145=>183,8146=>183,8147=>183,8150=>183,8151=>183,8152=>216,8153=>216,8154=>216,8155=>216,8157=>278, - 8158=>278,8159=>278,8160=>306,8161=>306,8162=>306,8163=>306,8164=>306,8165=>306,8166=>306,8167=>306,8168=>401,8169=>401,8170=>401,8171=>401,8172=>339,8173=>306, - 8174=>306,8175=>278,8178=>397,8179=>397,8180=>397,8182=>397,8183=>397,8184=>432,8185=>432,8186=>451,8187=>451,8188=>451,8189=>278,8190=>278,8208=>185,8209=>185, - 8219=>185,8223=>278,8227=>311,8241=>1011,8248=>261,8251=>404,8253=>386,8255=>529,8256=>529,8257=>188,8258=>517,8259=>185,8260=>93,8261=>184,8262=>184,8267=>300, - 8308=>167,8309=>556,8321=>167,8322=>167,8323=>167,8324=>167,8352=>394,8353=>401,8354=>435,8355=>339,8356=>278,8357=>463,8358=>401,8359=>389,8361=>556,8470=>530, - 8471=>415,8479=>401,8483=>401,8486=>451,8487=>451,8494=>306,8498=>339,8543=>417,8706=>274,8710=>340,8721=>396,8722=>317,8730=>305,8734=>418,8800=>317,8804=>317, - 8805=>317,9674=>274,12353=>556,12354=>556,12355=>556,12356=>556,12357=>556,12358=>556,12359=>556,12360=>556,12361=>556,12362=>556,12363=>556,12364=>556,12365=>556,12366=>556, - 12367=>556,12368=>556,12369=>556,12370=>556,12371=>556,12372=>556,12373=>556,12374=>556,12375=>556,12376=>556,12377=>556,12378=>556,12379=>556,12380=>556,12381=>556,12382=>556, - 12383=>556,12384=>556,12385=>556,12386=>556,12387=>556,12388=>556,12389=>556,12390=>556,12391=>556,12392=>556,12393=>556,12394=>556,12395=>556,12396=>556,12397=>556,12398=>556, - 12399=>556,12400=>556,12401=>556,12402=>556,12403=>556,12404=>556,12405=>556,12406=>556,12407=>556,12408=>556,12409=>556,12410=>556,12411=>556,12412=>556,12413=>556,12414=>556, - 12415=>556,12416=>556,12417=>556,12418=>556,12419=>556,12420=>556,12421=>556,12422=>556,12423=>556,12424=>556,12425=>556,12426=>556,12427=>556,12428=>556,12429=>556,12430=>556, - 12431=>556,12432=>556,12433=>556,12434=>556,12435=>556,12449=>556,12450=>556,12451=>556,12452=>556,12453=>556,12454=>556,12455=>556,12456=>556,12457=>556,12458=>556,12459=>556, - 12460=>556,12461=>556,12462=>556,12463=>556,12464=>556,12465=>556,12466=>556,12467=>556,12468=>556,12469=>556,12470=>556,12471=>556,12472=>556,12473=>556,12474=>556,12475=>556, - 12476=>556,12477=>556,12478=>556,12479=>556,12480=>556,12481=>556,12482=>556,12483=>556,12484=>556,12485=>556,12486=>556,12487=>556,12488=>556,12489=>556,12490=>556,12491=>556, - 12492=>556,12493=>556,12494=>556,12495=>556,12496=>556,12497=>556,12498=>556,12499=>556,12500=>556,12501=>556,12502=>556,12503=>556,12504=>556,12505=>556,12506=>556,12507=>556, - 12508=>556,12509=>556,12510=>556,12511=>556,12512=>556,12513=>556,12514=>556,12515=>556,12516=>556,12517=>556,12518=>556,12519=>556,12520=>556,12521=>556,12522=>556,12523=>556, - 12524=>556,12525=>556,12526=>556,12527=>556,12528=>556,12529=>556,12530=>556,12531=>556,12532=>556,12533=>556,12534=>556,63033=>278,63034=>278,63035=>278,63036=>278,63037=>278, - 63038=>278,63039=>278,63040=>278,63041=>278,63171=>185,63196=>278,64256=>309,64257=>309,64258=>309,64259=>463,64260=>463,64262=>402,64606=>0,64607=>0,64608=>0,64609=>0, - 64610=>0,64830=>467,64831=>467,65010=>814,65152=>392,65153=>306,65154=>281,65155=>247,65156=>250,65157=>447,65158=>412,65159=>247,65160=>222,65161=>602,65162=>535,65163=>360, - 65164=>329,65165=>192,65166=>220,65167=>635,65168=>644,65169=>338,65170=>321,65171=>369,65172=>419,65173=>635,65174=>644,65175=>345,65176=>336,65177=>635,65178=>644,65179=>393, - 65180=>345,65181=>548,65182=>553,65183=>637,65184=>652,65185=>548,65186=>546,65187=>637,65188=>656,65189=>548,65190=>544,65191=>637,65192=>656,65193=>363,65194=>439,65195=>363, - 65196=>439,65197=>440,65198=>471,65199=>439,65200=>474,65201=>875,65202=>871,65203=>608,65204=>588,65205=>875,65206=>871,65207=>609,65208=>587,65209=>1061,65210=>1033,65211=>794, - 65212=>758,65213=>1061,65214=>1033,65215=>794,65216=>761,65217=>811,65218=>793,65219=>659,65220=>647,65221=>811,65222=>793,65223=>659,65224=>642,65225=>549,65226=>481,65227=>512, - 65228=>409,65229=>547,65230=>476,65231=>512,65232=>409,65233=>755,65234=>748,65235=>416,65236=>442,65237=>574,65238=>550,65239=>416,65240=>442,65241=>717,65242=>687,65243=>883, - 65244=>409,65245=>555,65246=>511,65247=>338,65248=>297,65249=>423,65250=>478,65251=>489,65252=>476,65253=>532,65254=>548,65255=>336,65256=>326,65257=>371,65258=>391,65259=>524, - 65260=>412,65261=>454,65262=>412,65263=>633,65264=>566,65265=>643,65266=>560,65267=>357,65268=>333,65269=>623,65270=>617,65271=>603,65272=>621,65273=>576,65274=>617,65275=>576, - 65276=>625); -$enc=''; -$diff=''; -$file='almohanad.z'; -$ctg='almohanad.ctg.z'; -$originalsize=227760; -?> +$dw=600; +$cw=array( + 0=>0,32=>139,33=>185,34=>308,35=>278,36=>278,37=>556,38=>463,39=>154,40=>185,41=>185,42=>278,43=>317,44=>139,45=>185,46=>139, + 47=>154,48=>278,49=>278,50=>278,51=>278,52=>278,53=>278,54=>278,55=>278,56=>278,57=>278,58=>185,59=>185,60=>317,61=>317,62=>317, + 63=>278,64=>517,65=>401,66=>371,67=>401,68=>402,69=>371,70=>339,71=>432,72=>430,73=>214,74=>278,75=>424,76=>369,77=>524,78=>401, + 79=>432,80=>339,81=>432,82=>396,83=>309,84=>371,85=>401,86=>401,87=>556,88=>401,89=>401,90=>371,91=>185,92=>154,93=>185,94=>323, + 95=>278,96=>185,97=>278,98=>309,99=>247,100=>309,101=>247,102=>185,103=>278,104=>309,105=>154,106=>185,107=>309,108=>154,109=>463,110=>309, + 111=>278,112=>309,113=>309,114=>247,115=>216,116=>185,117=>309,118=>278,119=>401,120=>278,121=>278,122=>247,123=>219,124=>122,125=>219,126=>289, + 8364=>278,1027=>339,8218=>185,1107=>254,8222=>278,8230=>556,8224=>278,8225=>278,710=>185,8240=>556,352=>309,8249=>185,338=>556,1036=>432,381=>371,1039=>432, + 8216=>185,8217=>185,8220=>278,8221=>278,8226=>194,8211=>278,8212=>556,732=>185,8482=>556,353=>216,8250=>185,339=>401,1116=>297,382=>247,376=>401,161=>185, + 162=>278,163=>278,164=>278,165=>278,166=>122,167=>278,168=>185,169=>415,170=>167,171=>278,172=>317,174=>415,175=>185,176=>222,177=>317,178=>167, + 179=>167,180=>185,181=>309,182=>300,183=>139,184=>185,185=>167,186=>183,187=>278,188=>417,189=>417,190=>417,191=>278,192=>401,193=>401,194=>401, + 195=>401,196=>401,197=>401,198=>556,199=>401,200=>371,201=>371,202=>371,203=>371,204=>216,205=>216,206=>216,207=>216,208=>401,209=>401,210=>432, + 211=>432,212=>432,213=>432,214=>432,215=>317,216=>432,217=>401,218=>401,219=>401,220=>401,221=>401,222=>339,223=>309,224=>278,225=>278,226=>278, + 227=>278,228=>278,229=>278,230=>401,231=>247,232=>247,233=>247,234=>247,235=>247,236=>154,237=>154,238=>154,239=>154,240=>278,241=>309,242=>278, + 243=>278,244=>278,245=>278,246=>278,247=>317,248=>278,249=>309,250=>309,251=>309,252=>309,253=>278,254=>309,255=>278,256=>401,257=>278,258=>401, + 259=>278,260=>401,261=>278,262=>401,263=>247,264=>401,265=>247,266=>401,267=>247,268=>401,269=>247,270=>401,271=>309,272=>401,273=>309,274=>371, + 275=>247,276=>371,277=>247,278=>371,279=>247,280=>371,281=>247,282=>371,283=>247,284=>432,285=>278,286=>432,287=>278,288=>432,289=>278,290=>432, + 291=>278,292=>432,293=>309,294=>432,295=>309,296=>216,297=>154,298=>216,299=>154,300=>216,301=>154,302=>216,303=>154,304=>216,305=>154,306=>490, + 307=>270,308=>278,309=>185,310=>432,311=>309,312=>297,313=>371,314=>154,315=>371,316=>154,317=>371,318=>154,319=>371,320=>293,321=>371,322=>154, + 323=>401,324=>309,325=>401,326=>309,327=>401,328=>309,329=>391,330=>401,331=>309,332=>432,333=>278,334=>432,335=>278,336=>432,337=>278,340=>401, + 341=>247,342=>401,343=>247,344=>401,345=>247,346=>309,347=>216,348=>309,349=>216,350=>309,351=>216,354=>371,355=>185,356=>371,357=>185,358=>371, + 359=>185,360=>401,361=>309,362=>401,363=>309,364=>401,365=>309,366=>401,367=>309,368=>401,369=>309,370=>401,371=>309,372=>556,373=>401,374=>401, + 375=>278,377=>371,378=>247,379=>371,380=>247,383=>185,450=>317,477=>247,484=>432,485=>278,536=>309,537=>216,538=>371,539=>185,658=>282,711=>185, + 728=>185,729=>185,730=>185,731=>185,733=>185,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0,774=>0,775=>0,776=>0,777=>0,778=>0, + 779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0,790=>0,791=>0,792=>0,793=>0,794=>0, + 795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0,806=>0,807=>0,808=>0,809=>0,810=>0, + 811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0,822=>0,823=>0,824=>0,825=>0,826=>0, + 827=>0,828=>0,829=>0,830=>0,831=>0,864=>0,865=>0,884=>111,885=>111,890=>0,894=>185,900=>100,901=>183,902=>401,903=>139,904=>451, + 905=>532,906=>316,908=>451,910=>501,911=>451,912=>183,913=>401,914=>371,915=>339,916=>422,917=>371,918=>371,919=>432,920=>432,921=>216,922=>432, + 923=>401,924=>524,925=>401,926=>361,927=>432,928=>451,929=>339,931=>361,932=>371,933=>401,934=>482,935=>401,936=>482,937=>451,938=>0,939=>401, + 940=>336,941=>244,942=>336,943=>183,944=>306,945=>336,946=>306,947=>306,948=>306,949=>244,950=>275,951=>336,952=>306,953=>183,954=>338,955=>275, + 956=>336,957=>275,958=>275,959=>306,960=>336,961=>306,962=>244,963=>306,964=>244,965=>306,966=>367,967=>275,968=>397,969=>397,970=>183,971=>306, + 972=>306,973=>306,974=>397,976=>306,977=>306,978=>401,979=>401,980=>401,981=>367,982=>336,986=>283,987=>237,988=>339,989=>261,1024=>371,1025=>371, + 1026=>371,1028=>401,1029=>309,1030=>216,1031=>216,1032=>278,1033=>573,1034=>573,1035=>449,1037=>432,1038=>401,1040=>401,1041=>371,1042=>371,1043=>328,1044=>432, + 1045=>371,1046=>615,1047=>313,1048=>429,1049=>429,1050=>424,1051=>432,1052=>524,1053=>432,1054=>432,1055=>430,1056=>339,1057=>401,1058=>371,1059=>401,1060=>444, + 1061=>401,1062=>429,1063=>432,1064=>618,1065=>618,1066=>482,1067=>539,1068=>350,1069=>401,1070=>619,1071=>408,1072=>278,1073=>278,1074=>279,1075=>246,1076=>309, + 1077=>247,1078=>417,1079=>227,1080=>319,1081=>319,1082=>297,1083=>302,1084=>376,1085=>309,1086=>278,1087=>309,1088=>309,1089=>247,1090=>274,1091=>278,1092=>458, + 1093=>278,1094=>309,1095=>309,1096=>454,1097=>454,1098=>340,1099=>423,1100=>284,1101=>247,1102=>439,1103=>284,1104=>247,1105=>247,1106=>309,1108=>247,1109=>216, + 1110=>154,1111=>154,1112=>185,1113=>440,1114=>437,1115=>309,1117=>309,1118=>278,1119=>309,1164=>339,1165=>284,1166=>339,1167=>309,1168=>339,1169=>254,1170=>339, + 1171=>254,1172=>339,1173=>254,1174=>615,1175=>417,1176=>322,1177=>216,1178=>432,1179=>297,1180=>432,1181=>297,1182=>432,1183=>297,1184=>537,1185=>352,1186=>432, + 1187=>309,1188=>563,1189=>408,1190=>432,1191=>461,1192=>401,1193=>247,1194=>401,1195=>247,1196=>371,1197=>274,1198=>401,1199=>278,1200=>401,1201=>278,1202=>401, + 1203=>278,1204=>581,1205=>432,1206=>432,1207=>309,1208=>432,1209=>309,1210=>432,1211=>309,1212=>367,1213=>247,1214=>367,1215=>247,1216=>216,1217=>615,1218=>417, + 1219=>432,1220=>297,1223=>432,1224=>309,1227=>432,1228=>309,1232=>401,1233=>278,1234=>401,1235=>278,1236=>556,1237=>401,1238=>371,1239=>247,1240=>367,1241=>247, + 1242=>367,1243=>247,1244=>615,1245=>417,1246=>313,1247=>227,1248=>322,1249=>216,1250=>432,1251=>309,1252=>432,1253=>309,1254=>432,1255=>278,1256=>432,1257=>278, + 1258=>432,1259=>278,1260=>401,1261=>247,1262=>401,1263=>278,1264=>401,1265=>278,1266=>401,1267=>278,1268=>432,1269=>309,1272=>548,1273=>423,1488=>280,1489=>280, + 1490=>174,1491=>280,1492=>280,1493=>158,1494=>158,1495=>280,1496=>280,1497=>158,1498=>287,1499=>280,1500=>280,1501=>280,1502=>280,1503=>156,1504=>158,1505=>280, + 1506=>280,1507=>292,1508=>280,1509=>273,1510=>280,1511=>305,1512=>285,1513=>299,1514=>280,1548=>195,1563=>246,1567=>340,1569=>392,1570=>306,1571=>247,1572=>447, + 1573=>247,1574=>602,1575=>192,1576=>635,1577=>369,1578=>635,1579=>635,1580=>548,1581=>1173,1582=>548,1583=>363,1584=>363,1585=>439,1586=>442,1587=>875,1588=>875, + 1589=>1061,1590=>1061,1591=>811,1592=>811,1593=>549,1594=>547,1600=>389,1601=>755,1602=>574,1603=>717,1604=>555,1605=>423,1606=>532,1607=>371,1608=>454,1609=>633, + 1610=>643,1611=>-19,1612=>-26,1613=>-20,1614=>-19,1615=>-18,1616=>-19,1617=>-19,1618=>-15,1632=>383,1633=>383,1634=>383,1635=>383,1636=>383,1637=>383,1638=>383, + 1639=>383,1640=>383,1641=>383,1642=>383,1645=>398,7936=>336,7937=>336,7938=>336,7939=>336,7940=>336,7941=>336,7942=>336,7943=>336,7944=>401,7945=>401,7946=>401, + 7947=>401,7948=>401,7949=>401,7950=>401,7951=>401,7952=>244,7953=>244,7954=>244,7955=>244,7956=>244,7957=>244,7960=>371,7961=>371,7962=>371,7963=>371,7964=>371, + 7965=>371,7968=>336,7969=>336,7970=>336,7971=>336,7972=>336,7973=>336,7974=>336,7975=>336,7976=>432,7977=>432,7978=>432,7979=>432,7980=>432,7981=>432,7982=>432, + 7983=>432,7984=>183,7985=>183,7986=>183,7987=>183,7988=>183,7989=>183,7990=>183,7991=>183,7992=>216,7993=>216,7994=>216,7995=>216,7996=>216,7997=>216,7998=>216, + 7999=>216,8000=>306,8001=>306,8002=>306,8003=>306,8004=>306,8005=>306,8008=>432,8009=>432,8010=>432,8011=>432,8012=>432,8013=>432,8016=>306,8017=>306,8018=>306, + 8019=>306,8020=>306,8021=>306,8022=>306,8023=>306,8025=>401,8027=>401,8029=>401,8031=>401,8032=>397,8033=>397,8034=>397,8035=>397,8036=>397,8037=>397,8038=>397, + 8039=>397,8040=>451,8041=>451,8042=>451,8043=>451,8044=>451,8045=>451,8046=>451,8047=>451,8048=>336,8049=>336,8050=>244,8051=>244,8052=>336,8053=>336,8054=>183, + 8055=>183,8056=>306,8057=>306,8058=>306,8059=>306,8060=>397,8061=>397,8064=>336,8065=>336,8066=>336,8067=>336,8068=>336,8069=>336,8070=>336,8071=>336,8072=>401, + 8073=>401,8074=>401,8075=>401,8076=>401,8077=>401,8078=>401,8079=>401,8080=>336,8081=>336,8082=>336,8083=>336,8084=>336,8085=>336,8086=>336,8087=>336,8088=>432, + 8089=>432,8090=>432,8091=>432,8092=>432,8093=>432,8094=>432,8095=>432,8096=>397,8097=>397,8098=>397,8099=>397,8100=>397,8101=>397,8102=>397,8103=>397,8104=>451, + 8105=>451,8106=>451,8107=>451,8108=>451,8109=>451,8110=>451,8111=>451,8112=>336,8113=>336,8114=>336,8115=>336,8116=>336,8118=>336,8119=>336,8120=>401,8121=>401, + 8122=>401,8123=>401,8124=>401,8125=>278,8126=>0,8127=>278,8128=>278,8129=>306,8130=>336,8131=>336,8132=>336,8134=>336,8135=>336,8136=>371,8137=>371,8138=>432, + 8139=>432,8140=>432,8141=>278,8142=>278,8143=>278,8144=>183,8145=>183,8146=>183,8147=>183,8150=>183,8151=>183,8152=>216,8153=>216,8154=>216,8155=>216,8157=>278, + 8158=>278,8159=>278,8160=>306,8161=>306,8162=>306,8163=>306,8164=>306,8165=>306,8166=>306,8167=>306,8168=>401,8169=>401,8170=>401,8171=>401,8172=>339,8173=>306, + 8174=>306,8175=>278,8178=>397,8179=>397,8180=>397,8182=>397,8183=>397,8184=>432,8185=>432,8186=>451,8187=>451,8188=>451,8189=>278,8190=>278,8208=>185,8209=>185, + 8219=>185,8223=>278,8227=>311,8241=>1011,8248=>261,8251=>404,8253=>386,8255=>529,8256=>529,8257=>188,8258=>517,8259=>185,8260=>93,8261=>184,8262=>184,8267=>300, + 8308=>167,8309=>556,8321=>167,8322=>167,8323=>167,8324=>167,8352=>394,8353=>401,8354=>435,8355=>339,8356=>278,8357=>463,8358=>401,8359=>389,8361=>556,8470=>530, + 8471=>415,8479=>401,8483=>401,8486=>451,8487=>451,8494=>306,8498=>339,8543=>417,8706=>274,8710=>340,8721=>396,8722=>317,8730=>305,8734=>418,8800=>317,8804=>317, + 8805=>317,9674=>274,12353=>556,12354=>556,12355=>556,12356=>556,12357=>556,12358=>556,12359=>556,12360=>556,12361=>556,12362=>556,12363=>556,12364=>556,12365=>556,12366=>556, + 12367=>556,12368=>556,12369=>556,12370=>556,12371=>556,12372=>556,12373=>556,12374=>556,12375=>556,12376=>556,12377=>556,12378=>556,12379=>556,12380=>556,12381=>556,12382=>556, + 12383=>556,12384=>556,12385=>556,12386=>556,12387=>556,12388=>556,12389=>556,12390=>556,12391=>556,12392=>556,12393=>556,12394=>556,12395=>556,12396=>556,12397=>556,12398=>556, + 12399=>556,12400=>556,12401=>556,12402=>556,12403=>556,12404=>556,12405=>556,12406=>556,12407=>556,12408=>556,12409=>556,12410=>556,12411=>556,12412=>556,12413=>556,12414=>556, + 12415=>556,12416=>556,12417=>556,12418=>556,12419=>556,12420=>556,12421=>556,12422=>556,12423=>556,12424=>556,12425=>556,12426=>556,12427=>556,12428=>556,12429=>556,12430=>556, + 12431=>556,12432=>556,12433=>556,12434=>556,12435=>556,12449=>556,12450=>556,12451=>556,12452=>556,12453=>556,12454=>556,12455=>556,12456=>556,12457=>556,12458=>556,12459=>556, + 12460=>556,12461=>556,12462=>556,12463=>556,12464=>556,12465=>556,12466=>556,12467=>556,12468=>556,12469=>556,12470=>556,12471=>556,12472=>556,12473=>556,12474=>556,12475=>556, + 12476=>556,12477=>556,12478=>556,12479=>556,12480=>556,12481=>556,12482=>556,12483=>556,12484=>556,12485=>556,12486=>556,12487=>556,12488=>556,12489=>556,12490=>556,12491=>556, + 12492=>556,12493=>556,12494=>556,12495=>556,12496=>556,12497=>556,12498=>556,12499=>556,12500=>556,12501=>556,12502=>556,12503=>556,12504=>556,12505=>556,12506=>556,12507=>556, + 12508=>556,12509=>556,12510=>556,12511=>556,12512=>556,12513=>556,12514=>556,12515=>556,12516=>556,12517=>556,12518=>556,12519=>556,12520=>556,12521=>556,12522=>556,12523=>556, + 12524=>556,12525=>556,12526=>556,12527=>556,12528=>556,12529=>556,12530=>556,12531=>556,12532=>556,12533=>556,12534=>556,63033=>278,63034=>278,63035=>278,63036=>278,63037=>278, + 63038=>278,63039=>278,63040=>278,63041=>278,63171=>185,63196=>278,64256=>309,64257=>309,64258=>309,64259=>463,64260=>463,64262=>402,64606=>0,64607=>0,64608=>0,64609=>0, + 64610=>0,64830=>467,64831=>467,65010=>814,65152=>392,65153=>306,65154=>281,65155=>247,65156=>250,65157=>447,65158=>412,65159=>247,65160=>222,65161=>602,65162=>535,65163=>360, + 65164=>329,65165=>192,65166=>220,65167=>635,65168=>644,65169=>338,65170=>321,65171=>369,65172=>419,65173=>635,65174=>644,65175=>345,65176=>336,65177=>635,65178=>644,65179=>393, + 65180=>345,65181=>548,65182=>553,65183=>637,65184=>652,65185=>548,65186=>546,65187=>637,65188=>656,65189=>548,65190=>544,65191=>637,65192=>656,65193=>363,65194=>439,65195=>363, + 65196=>439,65197=>440,65198=>471,65199=>439,65200=>474,65201=>875,65202=>871,65203=>608,65204=>588,65205=>875,65206=>871,65207=>609,65208=>587,65209=>1061,65210=>1033,65211=>794, + 65212=>758,65213=>1061,65214=>1033,65215=>794,65216=>761,65217=>811,65218=>793,65219=>659,65220=>647,65221=>811,65222=>793,65223=>659,65224=>642,65225=>549,65226=>481,65227=>512, + 65228=>409,65229=>547,65230=>476,65231=>512,65232=>409,65233=>755,65234=>748,65235=>416,65236=>442,65237=>574,65238=>550,65239=>416,65240=>442,65241=>717,65242=>687,65243=>883, + 65244=>409,65245=>555,65246=>511,65247=>338,65248=>297,65249=>423,65250=>478,65251=>489,65252=>476,65253=>532,65254=>548,65255=>336,65256=>326,65257=>371,65258=>391,65259=>524, + 65260=>412,65261=>454,65262=>412,65263=>633,65264=>566,65265=>643,65266=>560,65267=>357,65268=>333,65269=>623,65270=>617,65271=>603,65272=>621,65273=>576,65274=>617,65275=>576, + 65276=>625); +$enc=''; +$diff=''; +$file='almohanad.z'; +$ctg='almohanad.ctg.z'; +$originalsize=227760; +?> diff --git a/core/vendor/ensepar/tcpdf/fonts/arialunicid0.php b/core/vendor/ensepar/tcpdf/fonts/arialunicid0.php index 2e32061e2..554d58b05 100644 --- a/core/vendor/ensepar/tcpdf/fonts/arialunicid0.php +++ b/core/vendor/ensepar/tcpdf/fonts/arialunicid0.php @@ -1,1747 +1,1747 @@ -1069,'Descent'=>-271,'CapHeight'=>1069,'Flags'=>32,'FontBBox'=>'[-1011 -330 2260 1078]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600); -$up=-100; +1069,'Descent'=>-271,'CapHeight'=>1069,'Flags'=>32,'FontBBox'=>'[-1011 -330 2260 1078]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>600); +$up=-100; $ut=50; -$dw=1000; -$cw=array( - 32=>278,33=>278,34=>355,35=>556,36=>556,37=>889,38=>667,39=>191,40=>333,41=>333,42=>389,43=>584,44=>278,45=>333,46=>278,47=>278, - 48=>556,49=>556,50=>556,51=>556,52=>556,53=>556,54=>556,55=>556,56=>556,57=>556,58=>278,59=>278,60=>584,61=>584,62=>584,63=>556, - 64=>1015,65=>667,66=>667,67=>722,68=>722,69=>667,70=>611,71=>778,72=>722,73=>278,74=>500,75=>667,76=>556,77=>833,78=>722,79=>778, - 80=>667,81=>778,82=>722,83=>667,84=>611,85=>722,86=>667,87=>944,88=>667,89=>667,90=>611,91=>278,92=>278,93=>278,94=>469,95=>500, - 96=>333,97=>556,98=>556,99=>500,100=>556,101=>556,102=>278,103=>556,104=>556,105=>222,106=>222,107=>500,108=>222,109=>833,110=>556,111=>556, - 112=>556,113=>556,114=>333,115=>500,116=>278,117=>556,118=>500,119=>722,120=>500,121=>500,122=>500,123=>334,124=>260,125=>334,126=>584,8364=>556, - 1027=>567,8218=>222,402=>278,8222=>333,8230=>1000,8224=>556,8225=>556,710=>333,8240=>1000,352=>667,8249=>333,338=>1000,1036=>584,381=>611,1039=>723,8216=>222, - 8217=>222,8220=>333,8221=>333,8226=>350,8211=>500,8212=>1000,732=>333,8482=>1000,353=>500,8250=>333,339=>944,1116=>437,382=>500,376=>667,160=>278,161=>333, - 162=>556,163=>556,164=>556,165=>556,166=>260,167=>556,168=>333,169=>737,170=>370,171=>556,172=>584,173=>333,174=>737,175=>500,176=>400,177=>584, - 178=>333,179=>333,180=>333,181=>556,182=>537,183=>278,184=>333,185=>333,186=>365,187=>556,188=>834,189=>834,190=>834,191=>611,192=>667,193=>667, - 194=>667,195=>667,196=>667,197=>667,198=>1000,199=>722,200=>667,201=>667,202=>667,203=>667,204=>278,205=>278,206=>278,207=>278,208=>722,209=>722, - 210=>778,211=>778,212=>778,213=>778,214=>778,215=>584,216=>778,217=>722,218=>722,219=>722,220=>722,221=>667,222=>667,223=>611,224=>556,225=>556, - 226=>556,227=>556,228=>556,229=>556,230=>889,231=>500,232=>556,233=>556,234=>556,235=>556,236=>278,237=>278,238=>278,239=>278,240=>556,241=>556, - 242=>556,243=>556,244=>556,245=>556,246=>556,247=>584,248=>611,249=>556,250=>556,251=>556,252=>556,253=>500,254=>556,255=>500,256=>667,257=>556, - 258=>667,259=>556,260=>667,261=>556,262=>722,263=>500,264=>722,265=>500,266=>722,267=>500,268=>722,269=>500,270=>722,271=>627,272=>722,273=>556, - 274=>667,275=>556,276=>667,277=>556,278=>667,279=>556,280=>667,281=>556,282=>667,283=>556,284=>778,285=>556,286=>778,287=>556,288=>778,289=>556, - 290=>778,291=>556,292=>722,293=>556,294=>722,295=>556,296=>278,297=>222,298=>278,299=>222,300=>278,301=>222,302=>278,303=>222,304=>278,305=>278, - 306=>751,307=>444,308=>500,309=>222,310=>667,311=>500,312=>437,313=>556,314=>222,315=>556,316=>222,317=>556,318=>222,319=>556,320=>318,321=>556, - 322=>222,323=>722,324=>556,325=>722,326=>556,327=>722,328=>556,329=>626,330=>723,331=>556,332=>778,333=>556,334=>778,335=>556,336=>778,337=>556, - 340=>722,341=>333,342=>722,343=>333,344=>722,345=>333,346=>667,347=>500,348=>667,349=>500,350=>667,351=>500,354=>611,355=>278,356=>611,357=>406, - 358=>611,359=>278,360=>722,361=>556,362=>722,363=>556,364=>722,365=>556,366=>722,367=>556,368=>722,369=>556,370=>722,371=>556,372=>944,373=>722, - 374=>667,375=>500,377=>611,378=>500,379=>611,380=>500,383=>222,384=>556,385=>740,386=>655,387=>556,388=>556,389=>556,390=>722,391=>766,392=>579, - 393=>722,394=>789,395=>655,396=>556,397=>557,398=>667,399=>729,400=>604,401=>611,403=>791,404=>649,405=>806,406=>245,407=>322,408=>667,409=>500, - 410=>322,411=>500,412=>833,413=>722,414=>556,415=>778,416=>776,417=>556,418=>1019,419=>782,420=>735,421=>556,422=>722,423=>667,424=>500,425=>602, - 426=>366,427=>278,428=>571,429=>278,430=>611,431=>776,432=>620,433=>748,434=>667,435=>752,436=>615,437=>611,438=>500,439=>628,440=>628,441=>526, - 442=>480,443=>556,444=>556,445=>526,446=>556,447=>556,448=>278,449=>464,450=>474,451=>278,452=>1333,453=>1222,454=>1056,455=>1030,456=>778,457=>444, - 458=>1222,459=>944,460=>778,461=>667,462=>556,463=>278,464=>278,465=>778,466=>556,467=>722,468=>556,469=>722,470=>556,471=>722,472=>556,473=>722, - 474=>556,475=>722,476=>556,477=>556,478=>667,479=>556,480=>667,481=>556,482=>1000,483=>889,484=>778,485=>556,486=>778,487=>556,488=>667,489=>500, - 490=>778,491=>556,492=>778,493=>556,494=>534,495=>534,496=>222,497=>1333,498=>1222,499=>1056,500=>778,501=>556,506=>667,507=>556,508=>1000,509=>889, - 510=>778,511=>611,512=>667,513=>556,514=>667,515=>556,516=>667,517=>556,518=>667,519=>556,520=>278,521=>278,522=>278,523=>278,524=>778,525=>556, - 526=>778,527=>556,528=>722,529=>333,530=>722,531=>333,532=>722,533=>556,534=>722,535=>556,592=>556,593=>556,594=>556,595=>556,596=>500,597=>500, - 598=>556,599=>556,600=>556,601=>556,602=>777,603=>485,604=>485,605=>686,606=>519,607=>260,608=>556,609=>556,610=>557,611=>500,612=>500,613=>556, - 614=>556,615=>556,616=>242,617=>282,618=>356,619=>356,620=>425,621=>222,622=>635,623=>833,624=>833,625=>833,626=>556,627=>556,628=>558,629=>556, - 630=>715,631=>674,632=>558,633=>333,634=>333,635=>333,636=>333,637=>333,638=>312,639=>312,640=>530,641=>530,642=>500,643=>216,644=>276,645=>216, - 646=>222,647=>278,648=>278,649=>596,650=>558,651=>556,652=>500,653=>722,654=>500,655=>500,656=>500,657=>564,658=>530,659=>530,660=>464,661=>464, - 662=>464,663=>500,664=>614,665=>526,666=>519,667=>557,668=>558,669=>222,670=>500,671=>416,672=>556,673=>464,674=>464,675=>966,676=>966,677=>1030, - 678=>689,679=>484,680=>718,688=>326,689=>326,690=>153,691=>201,692=>201,693=>201,694=>304,695=>389,696=>278,697=>222,698=>372,699=>222,700=>222, - 701=>222,702=>222,703=>222,704=>250,705=>250,706=>320,707=>320,708=>320,709=>320,711=>333,712=>192,713=>333,714=>333,715=>333,716=>192,717=>333, - 718=>333,719=>333,720=>300,721=>300,722=>222,723=>222,724=>340,725=>340,726=>280,727=>362,728=>333,729=>333,730=>333,731=>333,733=>333,734=>333, - 736=>278,737=>153,738=>270,739=>274,740=>325,741=>360,742=>360,743=>360,744=>360,745=>360,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0, - 774=>0,775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0, - 790=>0,791=>0,792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0, - 806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0, - 822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,832=>0,833=>0,834=>0,835=>0,836=>0,837=>0, - 864=>0,865=>0,884=>308,885=>308,890=>278,894=>278,900=>278,901=>278,902=>667,903=>278,904=>704,905=>759,906=>315,908=>778,910=>746,911=>758, - 912=>222,913=>667,914=>667,915=>550,916=>682,917=>667,918=>611,919=>722,920=>778,921=>278,922=>667,923=>667,924=>833,925=>722,926=>650,927=>778, - 928=>722,929=>667,931=>602,932=>611,933=>667,934=>808,935=>667,936=>804,937=>758,938=>278,939=>667,940=>576,941=>434,942=>556,943=>222,944=>551, - 945=>576,946=>563,947=>500,948=>557,949=>434,950=>440,951=>556,952=>556,953=>222,954=>498,955=>500,956=>553,957=>500,958=>432,959=>556,960=>678, - 961=>571,962=>472,963=>619,964=>382,965=>551,966=>649,967=>522,968=>729,969=>766,970=>222,971=>551,972=>556,973=>551,974=>766,976=>563,977=>616, - 978=>631,979=>726,980=>631,981=>644,982=>781,986=>722,988=>578,990=>570,992=>692,994=>880,995=>833,996=>684,997=>558,998=>680,999=>529,1000=>557, - 1001=>505,1002=>623,1003=>603,1004=>610,1005=>611,1006=>568,1007=>434,1008=>600,1009=>571,1010=>500,1011=>222,1025=>667,1026=>865,1028=>717,1029=>667,1030=>278, - 1031=>278,1032=>500,1033=>1105,1034=>1009,1035=>867,1038=>635,1040=>667,1041=>655,1042=>667,1043=>567,1044=>677,1045=>667,1046=>923,1047=>604,1048=>722,1049=>722, - 1050=>584,1051=>705,1052=>833,1053=>722,1054=>778,1055=>723,1056=>667,1057=>722,1058=>611,1059=>635,1060=>760,1061=>667,1062=>740,1063=>684,1064=>920,1065=>939, - 1066=>793,1067=>883,1068=>655,1069=>717,1070=>1006,1071=>722,1072=>556,1073=>573,1074=>531,1075=>383,1076=>583,1077=>556,1078=>669,1079=>458,1080=>559,1081=>559, - 1082=>437,1083=>571,1084=>683,1085=>552,1086=>556,1087=>542,1088=>556,1089=>500,1090=>458,1091=>500,1092=>823,1093=>500,1094=>562,1095=>533,1096=>802,1097=>823, - 1098=>620,1099=>717,1100=>523,1101=>510,1102=>744,1103=>542,1105=>556,1106=>556,1107=>383,1108=>510,1109=>500,1110=>222,1111=>278,1112=>222,1113=>873,1114=>811, - 1115=>556,1118=>500,1119=>542,1120=>976,1121=>766,1122=>656,1123=>521,1124=>950,1125=>694,1126=>667,1127=>597,1128=>952,1129=>817,1130=>654,1131=>600,1132=>932, - 1133=>817,1134=>604,1135=>458,1136=>804,1137=>729,1138=>778,1139=>556,1140=>667,1141=>500,1142=>667,1143=>500,1144=>1279,1145=>1060,1146=>778,1147=>556,1148=>976, - 1149=>766,1150=>976,1151=>766,1152=>722,1153=>514,1154=>686,1155=>334,1156=>382,1157=>334,1158=>334,1168=>435,1169=>339,1170=>567,1171=>383,1172=>656,1173=>556, - 1174=>923,1175=>669,1176=>604,1177=>458,1178=>584,1179=>437,1180=>584,1181=>437,1182=>584,1183=>437,1184=>764,1185=>537,1186=>741,1187=>573,1188=>900,1189=>670, - 1190=>736,1191=>560,1192=>778,1193=>560,1194=>722,1195=>500,1196=>611,1197=>458,1198=>667,1199=>500,1200=>667,1201=>500,1202=>667,1203=>500,1204=>916,1205=>661, - 1206=>684,1207=>533,1208=>684,1209=>533,1210=>684,1211=>556,1212=>829,1213=>667,1214=>829,1215=>667,1216=>278,1217=>923,1218=>669,1219=>584,1220=>437,1223=>735, - 1224=>570,1227=>684,1228=>533,1232=>667,1233=>556,1234=>667,1235=>556,1236=>1000,1237=>889,1238=>667,1239=>556,1240=>729,1241=>556,1242=>729,1243=>556,1244=>923, - 1245=>669,1246=>604,1247=>458,1248=>604,1249=>492,1250=>722,1251=>559,1252=>722,1253=>559,1254=>778,1255=>556,1256=>778,1257=>556,1258=>778,1259=>556,1262=>635, - 1263=>500,1264=>635,1265=>500,1266=>635,1267=>500,1268=>684,1269=>533,1272=>883,1273=>717,1329=>635,1330=>531,1331=>583,1332=>583,1333=>531,1334=>531,1335=>427, - 1336=>531,1337=>750,1338=>635,1339=>531,1340=>375,1341=>583,1342=>698,1343=>531,1344=>427,1345=>531,1346=>583,1347=>531,1348=>635,1349=>698,1350=>635,1351=>635, - 1352=>531,1353=>531,1354=>698,1355=>531,1356=>635,1357=>531,1358=>698,1359=>583,1360=>479,1361=>583,1362=>531,1363=>698,1364=>698,1365=>635,1366=>750,1369=>271, - 1370=>271,1371=>150,1372=>300,1373=>271,1374=>271,1375=>420,1377=>583,1378=>427,1379=>427,1380=>427,1381=>427,1382=>427,1383=>427,1384=>427,1385=>459,1386=>427, - 1387=>427,1388=>323,1389=>531,1390=>427,1391=>427,1392=>427,1393=>427,1394=>427,1395=>427,1396=>427,1397=>271,1398=>427,1399=>375,1400=>427,1401=>375,1402=>583, - 1403=>427,1404=>427,1405=>427,1406=>427,1407=>583,1408=>427,1409=>427,1410=>323,1411=>583,1412=>375,1413=>375,1414=>583,1415=>527,1417=>271,1425=>360,1426=>360, - 1427=>360,1428=>360,1429=>360,1430=>360,1431=>360,1432=>360,1433=>360,1434=>360,1435=>360,1436=>360,1437=>360,1438=>360,1439=>360,1440=>360,1441=>360,1443=>360, - 1444=>360,1445=>360,1446=>360,1447=>360,1448=>360,1449=>360,1450=>360,1451=>360,1452=>360,1453=>360,1454=>360,1455=>360,1456=>360,1457=>360,1458=>360,1459=>360, - 1460=>360,1461=>360,1462=>360,1463=>360,1464=>360,1465=>360,1467=>360,1468=>360,1469=>360,1470=>366,1471=>360,1472=>225,1473=>360,1474=>360,1475=>238,1476=>360, - 1488=>577,1489=>563,1490=>411,1491=>512,1492=>594,1493=>316,1494=>326,1495=>594,1496=>594,1497=>316,1498=>507,1499=>527,1500=>484,1501=>594,1502=>594,1503=>316, - 1504=>338,1505=>604,1506=>550,1507=>567,1508=>569,1509=>505,1510=>514,1511=>583,1512=>507,1513=>700,1514=>633,1520=>590,1521=>590,1522=>590,1523=>216,1524=>412, - 1548=>278,1563=>278,1567=>556,1569=>529,1570=>243,1571=>243,1572=>470,1573=>243,1574=>731,1575=>243,1576=>771,1577=>514,1578=>771,1579=>771,1580=>544,1581=>544, - 1582=>544,1583=>430,1584=>430,1585=>421,1586=>421,1587=>1194,1588=>1194,1589=>1291,1590=>1291,1591=>843,1592=>843,1593=>594,1594=>594,1600=>279,1601=>957,1602=>800, - 1603=>757,1604=>662,1605=>589,1606=>692,1607=>514,1608=>470,1609=>731,1610=>731,1611=>0,1612=>0,1613=>0,1614=>0,1615=>0,1616=>0,1617=>0,1618=>0, - 1632=>480,1633=>480,1634=>480,1635=>480,1636=>480,1637=>480,1638=>480,1639=>480,1640=>480,1641=>480,1642=>547,1643=>278,1644=>278,1645=>438,1648=>0,1649=>243, - 1650=>243,1651=>243,1652=>0,1653=>380,1654=>470,1655=>548,1656=>772,1657=>771,1658=>771,1659=>771,1660=>771,1661=>771,1662=>771,1663=>771,1664=>771,1665=>544, - 1666=>544,1667=>544,1668=>544,1669=>544,1670=>544,1671=>544,1672=>430,1673=>430,1674=>430,1675=>430,1676=>430,1677=>430,1678=>430,1679=>430,1680=>430,1681=>421, - 1682=>421,1683=>421,1684=>421,1685=>421,1686=>419,1687=>421,1688=>421,1689=>421,1690=>1194,1691=>1194,1692=>1194,1693=>1291,1694=>1291,1695=>843,1696=>594,1697=>957, - 1698=>957,1699=>957,1700=>957,1701=>957,1702=>957,1703=>800,1704=>800,1705=>828,1706=>1058,1707=>828,1708=>757,1709=>757,1710=>757,1711=>828,1712=>828,1713=>828, - 1714=>828,1715=>828,1716=>828,1717=>662,1718=>662,1719=>662,1722=>692,1723=>692,1724=>692,1725=>692,1726=>706,1728=>514,1729=>509,1730=>509,1731=>509,1732=>470, - 1733=>470,1734=>470,1735=>470,1736=>470,1737=>470,1738=>470,1739=>470,1740=>731,1741=>841,1742=>731,1744=>731,1745=>731,1746=>550,1747=>550,1748=>279,1749=>514, - 1750=>726,1751=>558,1752=>321,1753=>318,1754=>342,1755=>373,1756=>716,1757=>688,1758=>852,1759=>288,1760=>288,1761=>388,1762=>350,1763=>716,1764=>146,1765=>282, - 1766=>339,1767=>339,1768=>415,1769=>514,1770=>220,1771=>220,1772=>220,1773=>350,1776=>480,1777=>480,1778=>480,1779=>480,1780=>480,1781=>480,1782=>480,1783=>480, - 1784=>480,1785=>480,2305=>0,2306=>0,2307=>294,2309=>693,2310=>910,2311=>533,2312=>533,2313=>590,2314=>713,2315=>920,2316=>677,2317=>611,2318=>611,2319=>611, - 2320=>611,2321=>910,2322=>910,2323=>910,2324=>910,2325=>667,2326=>732,2327=>593,2328=>639,2329=>624,2330=>688,2331=>713,2332=>688,2333=>712,2334=>697,2335=>502, - 2336=>533,2337=>583,2338=>523,2339=>693,2340=>585,2341=>638,2342=>533,2343=>640,2344=>585,2345=>585,2346=>565,2347=>699,2348=>592,2349=>689,2350=>633,2351=>600, - 2352=>486,2353=>486,2354=>680,2355=>730,2356=>730,2357=>592,2358=>684,2359=>608,2360=>646,2361=>546,2364=>0,2365=>373,2366=>319,2367=>319,2368=>319,2369=>0, - 2370=>0,2371=>0,2372=>0,2373=>0,2374=>0,2375=>0,2376=>0,2377=>319,2378=>319,2379=>319,2380=>319,2381=>0,2384=>884,2385=>0,2386=>0,2387=>0, - 2388=>0,2392=>667,2393=>732,2394=>593,2395=>688,2396=>583,2397=>523,2398=>699,2399=>600,2400=>920,2401=>677,2402=>0,2403=>0,2404=>331,2405=>513,2406=>639, - 2407=>639,2408=>639,2409=>639,2410=>639,2411=>639,2412=>639,2413=>639,2414=>639,2415=>639,2416=>362,2433=>0,2434=>430,2435=>430,2437=>786,2438=>1030,2439=>582, - 2440=>603,2441=>648,2442=>757,2443=>758,2444=>630,2447=>685,2448=>746,2451=>711,2452=>776,2453=>779,2454=>655,2455=>606,2456=>645,2457=>661,2458=>554,2459=>585, - 2460=>729,2461=>752,2462=>893,2463=>567,2464=>625,2465=>648,2466=>567,2467=>598,2468=>680,2469=>645,2470=>609,2471=>596,2472=>595,2474=>635,2475=>780,2476=>593, - 2477=>677,2478=>621,2479=>601,2480=>593,2482=>640,2486=>598,2487=>596,2488=>637,2489=>582,2492=>0,2494=>245,2495=>245,2496=>245,2497=>0,2498=>0,2499=>0, - 2500=>0,2503=>309,2504=>309,2507=>932,2508=>932,2509=>0,2519=>245,2524=>648,2525=>553,2527=>596,2528=>758,2529=>630,2530=>0,2531=>335,2534=>610,2535=>559, - 2536=>595,2537=>711,2538=>610,2539=>661,2540=>661,2541=>559,2542=>661,2543=>600,2544=>593,2545=>593,2546=>601,2547=>567,2548=>601,2549=>699,2550=>661,2551=>267, - 2552=>610,2553=>424,2554=>548,2562=>0,2565=>691,2566=>936,2567=>803,2568=>803,2569=>678,2570=>678,2575=>557,2576=>691,2579=>678,2580=>691,2581=>602,2582=>567, - 2583=>641,2584=>688,2585=>565,2586=>592,2587=>603,2588=>591,2589=>541,2590=>558,2591=>543,2592=>581,2593=>596,2594=>640,2595=>640,2596=>591,2597=>564,2598=>640, - 2599=>564,2600=>581,2602=>564,2603=>551,2604=>560,2605=>549,2606=>558,2607=>652,2608=>540,2610=>677,2611=>677,2613=>601,2614=>558,2616=>558,2617=>549,2620=>0, - 2622=>246,2623=>246,2624=>246,2625=>0,2626=>0,2631=>0,2632=>0,2635=>0,2636=>0,2637=>0,2649=>567,2650=>690,2651=>591,2652=>591,2654=>581,2662=>591, - 2663=>591,2664=>591,2665=>591,2666=>591,2667=>591,2668=>591,2669=>591,2670=>591,2671=>591,2672=>0,2673=>0,2674=>557,2675=>678,2676=>894,2689=>0,2690=>0, - 2691=>300,2693=>781,2694=>1044,2695=>589,2696=>589,2697=>560,2698=>758,2699=>806,2701=>781,2703=>781,2704=>781,2705=>1044,2707=>1044,2708=>1044,2709=>413,2710=>773, - 2711=>606,2712=>558,2713=>483,2714=>600,2715=>691,2716=>811,2717=>647,2718=>651,2719=>453,2720=>450,2721=>425,2722=>478,2723=>694,2724=>534,2725=>553,2726=>446, - 2727=>541,2728=>582,2730=>572,2731=>437,2732=>663,2733=>756,2734=>594,2735=>493,2736=>392,2738=>613,2739=>656,2741=>538,2742=>611,2743=>507,2744=>663,2745=>587, - 2748=>0,2749=>478,2750=>273,2751=>273,2752=>273,2753=>0,2754=>0,2755=>0,2756=>0,2757=>0,2759=>0,2760=>0,2761=>273,2763=>273,2764=>273,2765=>0, - 2768=>843,2784=>893,2790=>625,2791=>625,2792=>625,2793=>625,2794=>625,2795=>625,2796=>625,2797=>625,2798=>625,2799=>625,2817=>0,2818=>306,2819=>391,2821=>590, - 2822=>808,2823=>658,2824=>658,2825=>633,2826=>654,2827=>636,2828=>540,2831=>560,2832=>938,2835=>600,2836=>973,2837=>603,2838=>620,2839=>620,2840=>605,2841=>712, - 2842=>579,2843=>579,2844=>593,2845=>564,2846=>581,2847=>604,2848=>578,2849=>579,2850=>579,2851=>607,2852=>579,2853=>587,2854=>579,2855=>602,2856=>579,2858=>605, - 2859=>728,2860=>579,2861=>643,2862=>605,2863=>628,2864=>619,2866=>653,2867=>593,2870=>620,2871=>605,2872=>605,2873=>579,2876=>0,2877=>333,2878=>218,2879=>0, - 2880=>294,2881=>0,2882=>0,2883=>0,2887=>479,2888=>479,2891=>1026,2892=>1026,2893=>0,2902=>0,2903=>218,2908=>579,2909=>579,2911=>599,2912=>636,2913=>540, - 2918=>578,2919=>480,2920=>480,2921=>622,2922=>506,2923=>605,2924=>529,2925=>548,2926=>512,2927=>528,2928=>561,2946=>0,2947=>742,2949=>1002,2950=>1118,2951=>994, - 2952=>660,2953=>1012,2954=>1231,2958=>726,2959=>731,2960=>870,2962=>763,2963=>763,2964=>1636,2965=>667,2969=>830,2970=>584,2972=>876,2974=>986,2975=>802,2979=>1295, - 2980=>656,2984=>630,2985=>1012,2986=>694,2990=>727,2991=>790,2992=>545,2993=>718,2994=>821,2995=>871,2996=>724,2997=>873,2999=>1087,3000=>1098,3001=>1274,3006=>547, - 3007=>172,3008=>93,3009=>519,3010=>814,3014=>748,3015=>681,3016=>956,3018=>1666,3019=>1666,3020=>1994,3021=>0,3031=>871,3047=>667,3048=>1012,3049=>751,3050=>740, - 3051=>924,3052=>884,3053=>726,3054=>1002,3055=>825,3056=>717,3057=>719,3058=>774,3073=>365,3074=>601,3075=>346,3077=>720,3078=>786,3079=>567,3080=>1159,3081=>690, - 3082=>1047,3083=>1299,3084=>913,3086=>625,3087=>625,3088=>712,3090=>655,3091=>655,3092=>862,3093=>515,3094=>680,3095=>526,3096=>943,3097=>655,3098=>684,3099=>684, - 3100=>670,3101=>1205,3102=>732,3103=>888,3104=>597,3105=>709,3106=>709,3107=>809,3108=>715,3109=>702,3110=>702,3111=>702,3112=>607,3114=>623,3115=>623,3116=>681, - 3117=>681,3118=>932,3119=>1203,3120=>597,3121=>893,3122=>631,3123=>608,3125=>620,3126=>541,3127=>667,3128=>640,3129=>911,3134=>644,3135=>298,3136=>298,3137=>361, - 3138=>682,3139=>342,3140=>704,3142=>624,3143=>624,3144=>900,3146=>849,3147=>849,3148=>976,3149=>669,3157=>298,3158=>119,3168=>1620,3169=>1281,3174=>840,3175=>840, - 3176=>840,3177=>840,3178=>840,3179=>840,3180=>840,3181=>840,3182=>840,3183=>840,3202=>440,3203=>251,3205=>654,3206=>654,3207=>631,3208=>891,3209=>957,3210=>1293, - 3211=>1044,3212=>744,3214=>650,3215=>650,3216=>659,3218=>667,3219=>667,3220=>667,3221=>462,3222=>749,3223=>543,3224=>779,3225=>674,3226=>682,3227=>660,3228=>667, - 3229=>1171,3230=>926,3231=>671,3232=>557,3233=>669,3234=>669,3235=>728,3236=>544,3237=>672,3238=>672,3239=>672,3240=>560,3242=>668,3243=>668,3244=>681,3245=>687, - 3246=>972,3247=>1101,3248=>556,3249=>677,3250=>661,3251=>545,3253=>666,3254=>553,3255=>670,3256=>549,3257=>716,3262=>425,3263=>341,3264=>680,3265=>354,3266=>714, - 3267=>386,3268=>638,3270=>307,3271=>670,3272=>462,3274=>908,3275=>1251,3276=>434,3277=>336,3285=>344,3286=>404,3294=>673,3296=>1695,3297=>978,3302=>549,3303=>549, - 3304=>549,3305=>549,3306=>549,3307=>549,3308=>549,3309=>549,3310=>549,3311=>549,3330=>368,3331=>305,3333=>1201,3334=>1351,3335=>905,3336=>1459,3337=>635,3338=>1198, - 3339=>861,3340=>957,3342=>1211,3343=>1202,3344=>1839,3346=>642,3347=>1114,3348=>1195,3349=>861,3350=>982,3351=>874,3352=>1354,3353=>957,3354=>1016,3355=>1266,3356=>712, - 3357=>1454,3358=>1215,3359=>563,3360=>565,3361=>1192,3362=>1244,3363=>1268,3364=>878,3365=>966,3366=>545,3367=>879,3368=>879,3370=>1031,3371=>1175,3372=>1334,3373=>546, - 3374=>643,3375=>949,3376=>642,3377=>555,3378=>945,3379=>631,3380=>553,3381=>959,3382=>936,3383=>1122,3384=>1190,3385=>1112,3390=>475,3391=>418,3392=>442,3393=>340, - 3394=>340,3395=>473,3398=>640,3399=>530,3400=>1279,3402=>1368,3403=>1258,3404=>1447,3405=>0,3415=>553,3424=>861,3425=>1100,3430=>1095,3431=>929,3432=>854,3433=>1181, - 3434=>658,3435=>972,3436=>1210,3437=>650,3438=>959,3439=>896,3585=>595,3586=>648,3587=>665,3588=>608,3589=>608,3590=>665,3591=>471,3592=>556,3593=>652,3594=>664, - 3595=>681,3596=>816,3597=>849,3598=>620,3599=>620,3600=>541,3601=>785,3602=>826,3603=>887,3604=>598,3605=>605,3606=>595,3607=>650,3608=>541,3609=>652,3610=>608, - 3611=>608,3612=>630,3613=>630,3614=>695,3615=>695,3616=>620,3617=>581,3618=>588,3619=>501,3620=>595,3621=>569,3622=>620,3623=>519,3624=>592,3625=>659,3626=>574, - 3627=>654,3628=>695,3629=>566,3630=>574,3631=>517,3632=>452,3633=>0,3634=>496,3635=>496,3636=>0,3637=>0,3638=>0,3639=>0,3640=>0,3641=>0,3642=>0, - 3647=>687,3648=>302,3649=>571,3650=>478,3651=>515,3652=>515,3653=>496,3654=>506,3655=>0,3656=>0,3657=>0,3658=>0,3659=>0,3660=>0,3661=>0,3662=>0, - 3663=>555,3664=>598,3665=>640,3666=>688,3667=>690,3668=>657,3669=>657,3670=>635,3671=>839,3672=>693,3673=>769,3674=>673,3675=>994,3713=>775,3714=>707,3716=>724, - 3719=>524,3720=>690,3722=>678,3725=>711,3732=>719,3733=>834,3734=>776,3735=>916,3737=>744,3738=>740,3739=>740,3740=>834,3741=>834,3742=>854,3743=>854,3745=>775, - 3746=>724,3747=>697,3749=>700,3751=>700,3754=>708,3755=>916,3757=>700,3758=>697,3759=>658,3760=>432,3761=>534,3762=>476,3763=>476,3764=>778,3765=>778,3766=>778, - 3767=>778,3768=>778,3769=>778,3771=>778,3772=>778,3773=>670,3776=>420,3777=>806,3778=>430,3779=>446,3780=>346,3782=>571,3784=>778,3785=>778,3786=>778,3787=>778, - 3788=>778,3789=>778,3792=>721,3793=>719,3794=>601,3795=>711,3796=>686,3797=>686,3798=>834,3799=>756,3800=>724,3801=>906,3804=>1272,3805=>1272,3840=>600,3841=>600, - 3842=>600,3843=>600,3844=>600,3845=>600,3846=>600,3847=>600,3848=>600,3849=>600,3850=>600,3851=>600,3852=>600,3853=>600,3854=>600,3855=>600,3856=>600,3857=>600, - 3858=>600,3859=>600,3860=>600,3861=>600,3862=>600,3863=>600,3864=>600,3865=>600,3866=>600,3867=>600,3868=>600,3869=>600,3870=>600,3871=>600,3872=>600,3873=>600, - 3874=>600,3875=>600,3876=>600,3877=>600,3878=>600,3879=>600,3880=>600,3881=>600,3882=>600,3883=>600,3884=>600,3885=>600,3886=>600,3887=>600,3888=>600,3889=>600, - 3890=>600,3891=>600,3892=>600,3893=>600,3894=>600,3895=>600,3896=>600,3897=>600,3898=>600,3899=>600,3900=>600,3901=>600,3902=>600,3903=>600,3904=>600,3905=>600, - 3906=>600,3907=>600,3908=>600,3909=>600,3910=>600,3911=>600,3913=>600,3914=>600,3915=>600,3916=>600,3917=>600,3918=>600,3919=>600,3920=>600,3921=>600,3922=>600, - 3923=>600,3924=>600,3925=>600,3926=>600,3927=>600,3928=>600,3929=>600,3930=>600,3931=>600,3932=>600,3933=>600,3934=>600,3935=>600,3936=>600,3937=>600,3938=>600, - 3939=>600,3940=>600,3941=>600,3942=>600,3943=>600,3944=>600,3945=>600,3953=>600,3954=>600,3955=>600,3956=>600,3957=>600,3958=>600,3959=>600,3960=>600,3961=>600, - 3962=>600,3963=>600,3964=>600,3965=>600,3966=>600,3967=>600,3968=>600,3969=>600,3970=>600,3971=>600,3972=>600,3973=>600,3974=>600,3975=>600,3976=>600,3977=>600, - 3978=>600,3979=>600,3984=>600,3985=>600,3986=>600,3987=>600,3988=>600,3989=>600,3991=>600,3993=>600,3994=>600,3995=>600,3996=>600,3997=>600,3998=>600,3999=>600, - 4000=>600,4001=>600,4002=>600,4003=>600,4004=>600,4005=>600,4006=>600,4007=>600,4008=>600,4009=>600,4010=>600,4011=>600,4012=>600,4013=>600,4017=>600,4018=>600, - 4019=>600,4020=>600,4021=>600,4022=>600,4023=>600,4025=>600,4256=>662,4257=>677,4258=>708,4259=>696,4260=>609,4261=>790,4262=>664,4263=>785,4264=>560,4265=>634, - 4266=>782,4267=>701,4268=>629,4269=>682,4270=>705,4271=>692,4272=>734,4273=>615,4274=>592,4275=>680,4276=>679,4277=>705,4278=>643,4279=>623,4280=>623,4281=>629, - 4282=>633,4283=>770,4284=>592,4285=>662,4286=>629,4287=>672,4288=>735,4289=>576,4290=>606,4291=>605,4292=>676,4293=>792,4304=>435,4305=>556,4306=>565,4307=>872, - 4308=>506,4309=>544,4310=>723,4311=>868,4312=>530,4313=>532,4314=>955,4315=>552,4316=>565,4317=>712,4318=>547,4319=>574,4320=>685,4321=>554,4322=>806,4323=>810, - 4324=>777,4325=>502,4326=>686,4327=>512,4328=>552,4329=>496,4330=>568,4331=>552,4332=>592,4333=>565,4334=>552,4335=>741,4336=>549,4337=>659,4338=>559,4339=>524, - 4340=>482,4341=>565,4342=>822,4347=>506,4352=>1000,4353=>1000,4354=>1000,4355=>1000,4356=>1000,4357=>1000,4358=>1000,4359=>1000,4360=>1000,4361=>1000,4362=>1000,4363=>1000, - 4364=>1000,4365=>1000,4366=>1000,4367=>1000,4368=>1000,4369=>1000,4370=>1000,4371=>1000,4372=>1000,4373=>1000,4374=>1000,4375=>1000,4376=>1000,4377=>1000,4378=>1000,4379=>1000, - 4380=>1000,4381=>1000,4382=>1000,4383=>1000,4384=>1000,4385=>1000,4386=>1000,4387=>1000,4388=>1000,4389=>1000,4390=>1000,4391=>1000,4392=>1000,4393=>1000,4394=>1000,4395=>1000, - 4396=>1000,4397=>1000,4398=>1000,4399=>1000,4400=>1000,4401=>1000,4402=>1000,4403=>1000,4404=>1000,4405=>1000,4406=>1000,4407=>1000,4408=>1000,4409=>1000,4410=>1000,4411=>1000, - 4412=>1000,4413=>1000,4414=>1000,4415=>1000,4416=>1000,4417=>1000,4418=>1000,4419=>1000,4420=>1000,4421=>1000,4422=>1000,4423=>1000,4424=>1000,4425=>1000,4426=>1000,4427=>1000, - 4428=>1000,4429=>1000,4430=>1000,4431=>1000,4432=>1000,4433=>1000,4434=>1000,4435=>1000,4436=>1000,4437=>1000,4438=>1000,4439=>1000,4440=>1000,4441=>1000,4447=>1000,4448=>1000, - 4449=>1000,4450=>1000,4451=>1000,4452=>1000,4453=>1000,4454=>1000,4455=>1000,4456=>1000,4457=>1000,4458=>1000,4459=>1000,4460=>1000,4461=>1000,4462=>1000,4463=>1000,4464=>1000, - 4465=>1000,4466=>1000,4467=>1000,4468=>1000,4469=>1000,4470=>1000,4471=>1000,4472=>1000,4473=>1000,4474=>1000,4475=>1000,4476=>1000,4477=>1000,4478=>1000,4479=>1000,4480=>1000, - 4481=>1000,4482=>1000,4483=>1000,4484=>1000,4485=>1000,4486=>1000,4487=>1000,4488=>1000,4489=>1000,4490=>1000,4491=>1000,4492=>1000,4493=>1000,4494=>1000,4495=>1000,4496=>1000, - 4497=>1000,4498=>1000,4499=>1000,4500=>1000,4501=>1000,4502=>1000,4503=>1000,4504=>1000,4505=>1000,4506=>1000,4507=>1000,4508=>1000,4509=>1000,4510=>1000,4511=>1000,4512=>1000, - 4513=>1000,4514=>1000,4520=>1000,4521=>1000,4522=>1000,4523=>1000,4524=>1000,4525=>1000,4526=>1000,4527=>1000,4528=>1000,4529=>1000,4530=>1000,4531=>1000,4532=>1000,4533=>1000, - 4534=>1000,4535=>1000,4536=>1000,4537=>1000,4538=>1000,4539=>1000,4540=>1000,4541=>1000,4542=>1000,4543=>1000,4544=>1000,4545=>1000,4546=>1000,4547=>1000,4548=>1000,4549=>1000, - 4550=>1000,4551=>1000,4552=>1000,4553=>1000,4554=>1000,4555=>1000,4556=>1000,4557=>1000,4558=>1000,4559=>1000,4560=>1000,4561=>1000,4562=>1000,4563=>1000,4564=>1000,4565=>1000, - 4566=>1000,4567=>1000,4568=>1000,4569=>1000,4570=>1000,4571=>1000,4572=>1000,4573=>1000,4574=>1000,4575=>1000,4576=>1000,4577=>1000,4578=>1000,4579=>1000,4580=>1000,4581=>1000, - 4582=>1000,4583=>1000,4584=>1000,4585=>1000,4586=>1000,4587=>1000,4588=>1000,4589=>1000,4590=>1000,4591=>1000,4592=>1000,4593=>1000,4594=>1000,4595=>1000,4596=>1000,4597=>1000, - 4598=>1000,4599=>1000,4600=>1000,4601=>1000,7680=>667,7681=>556,7682=>667,7683=>556,7684=>667,7685=>556,7686=>667,7687=>556,7688=>722,7689=>500,7690=>722,7691=>556, - 7692=>722,7693=>556,7694=>722,7695=>556,7696=>722,7697=>556,7698=>722,7699=>556,7700=>667,7701=>556,7702=>667,7703=>556,7704=>667,7705=>556,7706=>667,7707=>556, - 7708=>667,7709=>556,7710=>611,7711=>278,7712=>778,7713=>556,7714=>722,7715=>556,7716=>722,7717=>556,7718=>722,7719=>556,7720=>722,7721=>556,7722=>722,7723=>556, - 7724=>278,7725=>222,7726=>278,7727=>278,7728=>667,7729=>500,7730=>667,7731=>500,7732=>667,7733=>500,7734=>556,7735=>222,7736=>556,7737=>222,7738=>556,7739=>222, - 7740=>556,7741=>222,7742=>833,7743=>833,7744=>833,7745=>833,7746=>833,7747=>833,7748=>722,7749=>556,7750=>722,7751=>556,7752=>722,7753=>556,7754=>722,7755=>556, - 7756=>778,7757=>556,7758=>778,7759=>556,7760=>778,7761=>556,7762=>778,7763=>556,7764=>667,7765=>556,7766=>667,7767=>556,7768=>722,7769=>333,7770=>722,7771=>333, - 7772=>722,7773=>333,7774=>722,7775=>333,7776=>667,7777=>500,7778=>667,7779=>500,7780=>667,7781=>500,7782=>667,7783=>500,7784=>667,7785=>500,7786=>611,7787=>278, - 7788=>611,7789=>278,7790=>611,7791=>278,7792=>611,7793=>278,7794=>722,7795=>556,7796=>722,7797=>556,7798=>722,7799=>556,7800=>722,7801=>556,7802=>722,7803=>556, - 7804=>667,7805=>500,7806=>667,7807=>500,7808=>944,7809=>722,7810=>944,7811=>722,7812=>944,7813=>722,7814=>944,7815=>722,7816=>944,7817=>722,7818=>667,7819=>500, - 7820=>667,7821=>500,7822=>667,7823=>500,7824=>611,7825=>500,7826=>611,7827=>500,7828=>611,7829=>500,7830=>556,7831=>278,7832=>722,7833=>500,7834=>556,7835=>278, - 7840=>667,7841=>556,7842=>667,7843=>556,7844=>667,7845=>556,7846=>667,7847=>556,7848=>667,7849=>556,7850=>667,7851=>556,7852=>667,7853=>556,7854=>667,7855=>556, - 7856=>667,7857=>556,7858=>667,7859=>556,7860=>667,7861=>556,7862=>667,7863=>556,7864=>667,7865=>556,7866=>667,7867=>556,7868=>667,7869=>556,7870=>667,7871=>556, - 7872=>667,7873=>556,7874=>667,7875=>556,7876=>667,7877=>556,7878=>667,7879=>556,7880=>278,7881=>278,7882=>278,7883=>222,7884=>778,7885=>556,7886=>778,7887=>556, - 7888=>778,7889=>556,7890=>778,7891=>556,7892=>778,7893=>556,7894=>778,7895=>556,7896=>778,7897=>556,7898=>776,7899=>556,7900=>776,7901=>556,7902=>776,7903=>556, - 7904=>776,7905=>556,7906=>776,7907=>556,7908=>722,7909=>556,7910=>722,7911=>556,7912=>776,7913=>620,7914=>776,7915=>620,7916=>776,7917=>620,7918=>776,7919=>620, - 7920=>776,7921=>620,7922=>667,7923=>500,7924=>667,7925=>500,7926=>667,7927=>500,7928=>667,7929=>500,7936=>576,7937=>576,7938=>576,7939=>576,7940=>576,7941=>576, - 7942=>576,7943=>576,7944=>667,7945=>667,7946=>680,7947=>680,7948=>680,7949=>680,7950=>718,7951=>718,7952=>434,7953=>434,7954=>434,7955=>434,7956=>434,7957=>434, - 7960=>692,7961=>692,7962=>823,7963=>823,7964=>823,7965=>823,7968=>556,7969=>556,7970=>556,7971=>556,7972=>556,7973=>556,7974=>556,7975=>556,7976=>747,7977=>747, - 7978=>878,7979=>878,7980=>878,7981=>878,7982=>923,7983=>923,7984=>222,7985=>222,7986=>222,7987=>222,7988=>222,7989=>222,7990=>222,7991=>222,7992=>303,7993=>303, - 7994=>434,7995=>434,7996=>434,7997=>434,7998=>479,7999=>479,8000=>556,8001=>556,8002=>556,8003=>556,8004=>556,8005=>556,8008=>778,8009=>778,8010=>894,8011=>894, - 8012=>894,8013=>894,8016=>551,8017=>551,8018=>551,8019=>551,8020=>551,8021=>551,8022=>551,8023=>551,8025=>777,8027=>893,8029=>885,8031=>940,8032=>766,8033=>766, - 8034=>766,8035=>766,8036=>766,8037=>766,8038=>766,8039=>766,8040=>758,8041=>758,8042=>874,8043=>874,8044=>868,8045=>867,8046=>911,8047=>911,8048=>576,8049=>576, - 8050=>434,8051=>434,8052=>556,8053=>556,8054=>222,8055=>222,8056=>556,8057=>556,8058=>551,8059=>551,8060=>766,8061=>766,8064=>576,8065=>576,8066=>576,8067=>576, - 8068=>576,8069=>576,8070=>576,8071=>576,8072=>667,8073=>667,8074=>680,8075=>680,8076=>680,8077=>680,8078=>718,8079=>718,8080=>556,8081=>556,8082=>556,8083=>556, - 8084=>556,8085=>556,8086=>556,8087=>556,8088=>747,8089=>747,8090=>878,8091=>878,8092=>878,8093=>878,8094=>923,8095=>923,8096=>766,8097=>766,8098=>766,8099=>766, - 8100=>766,8101=>766,8102=>766,8103=>766,8104=>758,8105=>758,8106=>874,8107=>874,8108=>868,8109=>867,8110=>911,8111=>911,8112=>576,8113=>576,8114=>576,8115=>576, - 8116=>576,8118=>576,8119=>576,8120=>667,8121=>667,8122=>667,8123=>667,8124=>667,8125=>278,8126=>278,8127=>278,8128=>278,8129=>278,8130=>556,8131=>556,8132=>556, - 8134=>556,8135=>556,8136=>693,8137=>704,8138=>748,8139=>759,8140=>722,8141=>278,8142=>278,8143=>278,8144=>222,8145=>222,8146=>222,8147=>222,8150=>222,8151=>222, - 8152=>278,8153=>278,8154=>304,8155=>304,8157=>278,8158=>278,8159=>278,8160=>551,8161=>551,8162=>551,8163=>551,8164=>571,8165=>571,8166=>551,8167=>551,8168=>667, - 8169=>667,8170=>742,8171=>746,8172=>693,8173=>278,8174=>278,8175=>278,8178=>766,8179=>766,8180=>766,8182=>766,8183=>766,8184=>778,8185=>778,8186=>758,8187=>758, - 8188=>758,8189=>278,8190=>278,8192=>500,8193=>1000,8194=>500,8195=>1000,8196=>333,8197=>250,8198=>167,8199=>556,8200=>278,8201=>100,8202=>50,8203=>0,8204=>0, - 8205=>0,8208=>333,8209=>333,8210=>556,8213=>564,8214=>428,8215=>500,8219=>222,8223=>333,8227=>350,8228=>278,8229=>556,8231=>278,8232=>0,8233=>0,8241=>1330, - 8242=>222,8243=>372,8244=>522,8245=>206,8246=>356,8247=>506,8248=>312,8251=>1000,8252=>471,8253=>556,8254=>500,8255=>945,8256=>945,8257=>312,8258=>820,8259=>333, - 8260=>167,8261=>278,8262=>278,8304=>333,8308=>333,8309=>333,8310=>333,8311=>333,8312=>333,8313=>333,8314=>333,8315=>333,8316=>333,8317=>210,8318=>210,8319=>333, - 8320=>333,8321=>333,8322=>333,8323=>333,8324=>333,8325=>333,8326=>333,8327=>333,8328=>333,8329=>333,8330=>333,8331=>333,8332=>333,8333=>210,8334=>210,8352=>556, - 8353=>556,8354=>556,8355=>556,8356=>556,8357=>833,8358=>556,8359=>556,8360=>1024,8361=>940,8362=>784,8363=>556,8400=>600,8401=>600,8402=>600,8403=>600,8404=>700, - 8405=>700,8406=>600,8407=>600,8408=>600,8409=>600,8410=>600,8411=>600,8412=>600,8413=>900,8414=>900,8415=>900,8416=>900,8417=>700,8448=>889,8449=>889,8450=>667, - 8451=>1022,8452=>611,8453=>889,8454=>889,8455=>501,8456=>667,8457=>921,8458=>510,8459=>906,8460=>988,8461=>722,8462=>500,8463=>500,8464=>688,8465=>553,8466=>708, - 8467=>291,8468=>778,8469=>722,8470=>1073,8471=>737,8472=>740,8473=>556,8474=>722,8475=>927,8476=>795,8477=>667,8478=>667,8479=>667,8480=>1000,8481=>1174,8483=>722, - 8484=>611,8485=>542,8486=>768,8487=>768,8488=>698,8489=>321,8490=>667,8491=>667,8492=>927,8493=>646,8494=>556,8495=>385,8496=>615,8497=>688,8498=>611,8499=>1115, - 8500=>406,8501=>688,8502=>688,8503=>344,8504=>688,8531=>834,8532=>834,8533=>834,8534=>834,8535=>834,8536=>834,8537=>834,8538=>834,8539=>834,8540=>834,8541=>834, - 8542=>834,8543=>834,8544=>278,8545=>555,8546=>832,8547=>933,8548=>667,8549=>934,8550=>1031,8551=>1268,8552=>944,8553=>667,8554=>944,8555=>1035,8556=>556,8557=>722, - 8558=>722,8559=>833,8560=>222,8561=>444,8562=>666,8563=>700,8564=>500,8565=>700,8566=>922,8567=>1144,8568=>712,8569=>500,8570=>712,8571=>934,8572=>222,8573=>500, - 8574=>556,8575=>833,8576=>983,8577=>722,8578=>983,8592=>713,8593=>713,8594=>713,8595=>713,8596=>713,8597=>713,8598=>713,8599=>713,8600=>713,8601=>713,8602=>713, - 8603=>713,8604=>713,8605=>713,8606=>713,8607=>713,8608=>713,8609=>713,8610=>713,8611=>713,8612=>713,8613=>713,8614=>713,8615=>713,8616=>713,8617=>713,8618=>713, - 8619=>713,8620=>713,8621=>813,8622=>813,8623=>713,8624=>713,8625=>713,8626=>713,8627=>713,8628=>713,8629=>713,8630=>713,8631=>713,8632=>713,8633=>713,8634=>800, - 8635=>800,8636=>713,8637=>713,8638=>713,8639=>713,8640=>713,8641=>713,8642=>713,8643=>713,8644=>713,8645=>713,8646=>713,8647=>713,8648=>713,8649=>713,8650=>713, - 8651=>713,8652=>713,8653=>713,8654=>950,8655=>713,8656=>713,8657=>713,8658=>713,8659=>713,8660=>863,8661=>713,8662=>713,8663=>713,8664=>713,8665=>713,8666=>713, - 8667=>713,8668=>813,8669=>813,8670=>713,8671=>713,8672=>713,8673=>713,8674=>713,8675=>713,8676=>713,8677=>713,8678=>713,8679=>713,8680=>713,8681=>713,8682=>713, - 8704=>600,8705=>600,8706=>494,8707=>600,8708=>600,8709=>800,8710=>612,8711=>612,8712=>549,8713=>549,8714=>549,8715=>549,8716=>549,8717=>549,8718=>549,8719=>823, - 8720=>823,8721=>713,8722=>584,8723=>584,8724=>584,8725=>167,8726=>278,8727=>389,8728=>400,8729=>400,8730=>600,8731=>600,8732=>600,8733=>549,8734=>549,8735=>584, - 8736=>584,8737=>584,8738=>584,8739=>260,8740=>444,8741=>418,8742=>602,8743=>561,8744=>561,8745=>561,8746=>561,8747=>506,8748=>806,8749=>1106,8750=>506,8751=>806, - 8752=>1106,8753=>506,8754=>506,8755=>506,8756=>561,8757=>561,8758=>422,8759=>561,8760=>584,8761=>584,8762=>584,8763=>584,8764=>584,8765=>584,8766=>584,8767=>584, - 8768=>422,8769=>584,8770=>584,8771=>584,8772=>584,8773=>584,8774=>584,8775=>584,8776=>584,8777=>584,8778=>584,8779=>584,8780=>584,8781=>584,8782=>584,8783=>584, - 8784=>584,8785=>584,8786=>584,8787=>584,8788=>737,8789=>737,8790=>584,8791=>584,8792=>584,8793=>584,8794=>584,8795=>584,8796=>584,8797=>584,8798=>584,8799=>584, - 8800=>584,8801=>584,8802=>584,8803=>584,8804=>584,8805=>584,8806=>584,8807=>584,8808=>584,8809=>584,8810=>969,8811=>969,8812=>584,8813=>584,8814=>584,8815=>584, - 8816=>584,8817=>584,8818=>584,8819=>584,8820=>584,8821=>584,8822=>584,8823=>584,8824=>584,8825=>584,8826=>584,8827=>584,8828=>584,8829=>584,8830=>584,8831=>584, - 8832=>584,8833=>584,8834=>678,8835=>678,8836=>678,8837=>678,8838=>678,8839=>678,8840=>678,8841=>678,8842=>678,8843=>678,8844=>561,8845=>561,8846=>561,8847=>678, - 8848=>678,8849=>673,8850=>673,8851=>561,8852=>561,8853=>800,8854=>800,8855=>800,8856=>800,8857=>800,8858=>800,8859=>800,8860=>800,8861=>800,8862=>800,8863=>800, - 8864=>800,8865=>800,8866=>549,8867=>549,8868=>549,8869=>549,8870=>399,8871=>399,8872=>549,8873=>549,8874=>549,8875=>672,8876=>549,8877=>549,8878=>549,8879=>672, - 8880=>549,8881=>549,8882=>549,8883=>549,8884=>549,8885=>549,8886=>713,8887=>713,8888=>713,8889=>549,8890=>549,8891=>584,8892=>584,8893=>584,8894=>584,8895=>584, - 8896=>561,8897=>561,8898=>561,8899=>561,8900=>549,8901=>250,8902=>549,8903=>649,8904=>630,8905=>630,8906=>630,8907=>630,8908=>630,8909=>584,8910=>561,8911=>561, - 8912=>668,8913=>668,8914=>668,8915=>668,8916=>561,8917=>602,8918=>584,8919=>584,8920=>1354,8921=>1354,8922=>584,8923=>584,8924=>584,8925=>584,8926=>584,8927=>584, - 8928=>584,8929=>584,8930=>673,8931=>673,8932=>673,8933=>673,8934=>584,8935=>584,8936=>584,8937=>584,8938=>584,8939=>584,8940=>584,8941=>584,8942=>278,8943=>1000, - 8944=>1000,8945=>1000,8960=>549,8962=>549,8963=>549,8964=>549,8965=>549,8966=>549,8967=>549,8968=>449,8969=>449,8970=>449,8971=>449,8972=>549,8973=>549,8974=>549, - 8975=>549,8976=>549,8977=>549,8978=>800,8979=>800,8980=>549,8981=>549,8982=>549,8983=>650,8984=>780,8985=>549,8986=>549,8987=>549,8988=>549,8989=>549,8990=>549, - 8991=>549,8992=>506,8993=>506,8994=>713,8995=>713,8996=>1000,8997=>1000,8998=>1000,8999=>1000,9000=>1000,9001=>329,9002=>329,9003=>1000,9004=>549,9005=>549,9006=>549, - 9007=>549,9008=>549,9009=>549,9010=>549,9011=>549,9012=>549,9013=>549,9014=>600,9015=>600,9016=>600,9017=>600,9018=>600,9019=>600,9020=>600,9021=>600,9022=>600, - 9023=>600,9024=>600,9025=>600,9026=>600,9027=>600,9028=>600,9029=>600,9030=>600,9031=>600,9032=>600,9033=>600,9034=>600,9035=>600,9036=>600,9037=>600,9038=>600, - 9039=>600,9040=>600,9041=>600,9042=>600,9043=>600,9044=>600,9045=>600,9046=>600,9047=>600,9048=>600,9049=>600,9050=>600,9051=>600,9052=>600,9053=>600,9054=>600, - 9055=>600,9056=>600,9057=>600,9058=>600,9059=>600,9060=>600,9061=>600,9062=>600,9063=>600,9064=>600,9065=>600,9066=>600,9067=>600,9068=>600,9069=>600,9070=>600, - 9071=>600,9072=>600,9073=>600,9074=>600,9075=>600,9076=>600,9077=>600,9078=>600,9079=>600,9080=>600,9081=>600,9082=>600,9109=>600,9216=>600,9217=>600,9218=>600, - 9219=>600,9220=>600,9221=>600,9222=>600,9223=>600,9224=>600,9225=>600,9226=>600,9227=>600,9228=>600,9229=>600,9230=>600,9231=>600,9232=>600,9233=>600,9234=>600, - 9235=>600,9236=>600,9237=>600,9238=>600,9239=>600,9240=>600,9241=>600,9242=>600,9243=>600,9244=>600,9245=>600,9246=>600,9247=>600,9248=>600,9249=>600,9250=>600, - 9251=>600,9252=>600,9280=>604,9281=>604,9282=>604,9283=>604,9284=>604,9285=>604,9286=>750,9287=>750,9288=>750,9289=>750,9290=>604,9312=>1000,9313=>1000,9314=>1000, - 9315=>1000,9316=>1000,9317=>1000,9318=>1000,9319=>1000,9320=>1000,9321=>1000,9322=>1000,9323=>1000,9324=>1000,9325=>1000,9326=>1000,9327=>1000,9328=>1000,9329=>1000,9330=>1000, - 9331=>1000,9332=>1000,9333=>1000,9334=>1000,9335=>1000,9336=>1000,9337=>1000,9338=>1000,9339=>1000,9340=>1000,9341=>1000,9342=>1000,9343=>1000,9344=>1000,9345=>1000,9346=>1000, - 9347=>1000,9348=>1000,9349=>1000,9350=>1000,9351=>1000,9352=>1000,9353=>1000,9354=>1000,9355=>1000,9356=>1000,9357=>1000,9358=>1000,9359=>1000,9360=>1000,9361=>1000,9362=>1000, - 9363=>1000,9364=>1000,9365=>1000,9366=>1000,9367=>1000,9368=>1000,9369=>1000,9370=>1000,9371=>1000,9372=>1000,9373=>1000,9374=>1000,9375=>1000,9376=>1000,9377=>1000,9378=>1000, - 9379=>1000,9380=>1000,9381=>1000,9382=>1000,9383=>1000,9384=>1000,9385=>1000,9386=>1000,9387=>1000,9388=>1000,9389=>1000,9390=>1000,9391=>1000,9392=>1000,9393=>1000,9394=>1000, - 9395=>1000,9396=>1000,9397=>1000,9398=>1000,9399=>1000,9400=>1000,9401=>1000,9402=>1000,9403=>1000,9404=>1000,9405=>1000,9406=>1000,9407=>1000,9408=>1000,9409=>1000,9410=>1000, - 9411=>1000,9412=>1000,9413=>1000,9414=>1000,9415=>1000,9416=>1000,9417=>1000,9418=>1000,9419=>1000,9420=>1000,9421=>1000,9422=>1000,9423=>1000,9424=>1000,9425=>1000,9426=>1000, - 9427=>1000,9428=>1000,9429=>1000,9430=>1000,9431=>1000,9432=>1000,9433=>1000,9434=>1000,9435=>1000,9436=>1000,9437=>1000,9438=>1000,9439=>1000,9440=>1000,9441=>1000,9442=>1000, - 9443=>1000,9444=>1000,9445=>1000,9446=>1000,9447=>1000,9448=>1000,9449=>1000,9450=>1000,9472=>600,9473=>600,9474=>600,9475=>600,9476=>600,9477=>600,9478=>600,9479=>600, - 9480=>600,9481=>600,9482=>600,9483=>600,9484=>600,9485=>600,9486=>600,9487=>600,9488=>600,9489=>600,9490=>600,9491=>600,9492=>600,9493=>600,9494=>600,9495=>600, - 9496=>600,9497=>600,9498=>600,9499=>600,9500=>600,9501=>600,9502=>600,9503=>600,9504=>600,9505=>600,9506=>600,9507=>600,9508=>600,9509=>600,9510=>600,9511=>600, - 9512=>600,9513=>600,9514=>600,9515=>600,9516=>600,9517=>600,9518=>600,9519=>600,9520=>600,9521=>600,9522=>600,9523=>600,9524=>600,9525=>600,9526=>600,9527=>600, - 9528=>600,9529=>600,9530=>600,9531=>600,9532=>600,9533=>600,9534=>600,9535=>600,9536=>600,9537=>600,9538=>600,9539=>600,9540=>600,9541=>600,9542=>600,9543=>600, - 9544=>600,9545=>600,9546=>600,9547=>600,9548=>600,9549=>600,9550=>600,9551=>600,9552=>600,9553=>600,9554=>600,9555=>600,9556=>600,9557=>600,9558=>600,9559=>600, - 9560=>600,9561=>600,9562=>600,9563=>600,9564=>600,9565=>600,9566=>600,9567=>600,9568=>600,9569=>600,9570=>600,9571=>600,9572=>600,9573=>600,9574=>600,9575=>600, - 9576=>600,9577=>600,9578=>600,9579=>600,9580=>600,9581=>600,9582=>600,9583=>600,9584=>600,9585=>600,9586=>600,9587=>600,9588=>600,9589=>600,9590=>600,9591=>600, - 9592=>600,9593=>600,9594=>600,9595=>600,9596=>600,9597=>600,9598=>600,9599=>600,9600=>600,9601=>600,9602=>600,9603=>600,9604=>600,9605=>600,9606=>600,9607=>600, - 9608=>600,9609=>600,9610=>600,9611=>600,9612=>600,9613=>600,9614=>600,9615=>600,9616=>600,9617=>600,9618=>600,9619=>600,9620=>600,9621=>600,9632=>600,9633=>600, - 9634=>600,9635=>600,9636=>600,9637=>600,9638=>600,9639=>600,9640=>600,9641=>600,9642=>600,9643=>600,9644=>600,9645=>600,9646=>600,9647=>600,9648=>600,9649=>600, - 9650=>600,9651=>600,9652=>600,9653=>600,9654=>600,9655=>600,9656=>600,9657=>600,9658=>600,9659=>600,9660=>600,9661=>600,9662=>600,9663=>600,9664=>600,9665=>600, - 9666=>600,9667=>600,9668=>600,9669=>600,9670=>600,9671=>600,9672=>600,9673=>600,9674=>600,9675=>600,9676=>600,9677=>600,9678=>600,9679=>600,9680=>600,9681=>600, - 9682=>600,9683=>600,9684=>600,9685=>600,9686=>600,9687=>600,9688=>600,9689=>600,9690=>600,9691=>600,9692=>600,9693=>600,9694=>600,9695=>600,9696=>600,9697=>600, - 9698=>600,9699=>600,9700=>600,9701=>600,9702=>600,9703=>600,9704=>600,9705=>600,9706=>600,9707=>600,9708=>600,9709=>600,9710=>600,9711=>600,9728=>750,9729=>1000, - 9730=>750,9731=>750,9732=>1000,9733=>816,9734=>823,9735=>500,9736=>500,9737=>800,9738=>800,9739=>800,9740=>800,9741=>800,9742=>719,9743=>719,9744=>734,9745=>734, - 9746=>734,9747=>762,9754=>960,9755=>960,9756=>939,9757=>939,9758=>939,9759=>939,9760=>750,9761=>600,9762=>750,9763=>750,9764=>580,9765=>460,9766=>444,9767=>650, - 9768=>444,9769=>768,9770=>800,9771=>850,9772=>675,9773=>800,9774=>750,9775=>750,9776=>900,9777=>900,9778=>900,9779=>900,9780=>900,9781=>900,9782=>900,9783=>900, - 9784=>750,9785=>750,9786=>750,9787=>750,9788=>750,9789=>750,9790=>750,9791=>740,9792=>740,9793=>740,9794=>740,9795=>653,9796=>490,9797=>632,9798=>780,9799=>560, - 9800=>838,9801=>780,9802=>734,9803=>887,9804=>780,9805=>1080,9806=>896,9807=>1080,9808=>804,9809=>868,9810=>922,9811=>696,9812=>1000,9813=>1000,9814=>1000,9815=>1000, - 9816=>1000,9817=>1000,9818=>1000,9819=>1000,9820=>1000,9821=>1000,9822=>1000,9823=>1000,9824=>722,9825=>734,9826=>674,9827=>804,9828=>722,9829=>734,9830=>674,9831=>804, - 9832=>860,9833=>423,9834=>592,9835=>750,9836=>750,9837=>439,9838=>439,9839=>439,9985=>974,9986=>961,9987=>974,9988=>980,9990=>789,9991=>790,9992=>791,9993=>690, - 9996=>549,9997=>855,9998=>911,9999=>933,10000=>911,10001=>945,10002=>974,10003=>755,10004=>846,10005=>762,10006=>761,10007=>571,10008=>677,10009=>763,10010=>760,10011=>759, - 10012=>754,10013=>494,10014=>552,10015=>537,10016=>577,10017=>692,10018=>786,10019=>788,10020=>788,10021=>790,10022=>793,10023=>794,10025=>823,10026=>789,10027=>841,10028=>823, - 10029=>833,10030=>816,10031=>831,10032=>923,10033=>744,10034=>723,10035=>749,10036=>790,10037=>792,10038=>695,10039=>776,10040=>768,10041=>792,10042=>759,10043=>707,10044=>708, - 10045=>682,10046=>701,10047=>826,10048=>815,10049=>789,10050=>789,10051=>707,10052=>687,10053=>696,10054=>689,10055=>786,10056=>787,10057=>713,10058=>791,10059=>785,10061=>873, - 10063=>762,10064=>762,10065=>759,10066=>759,10070=>784,10072=>138,10073=>277,10074=>415,10075=>392,10076=>392,10077=>668,10078=>668,10081=>732,10082=>544,10083=>544,10084=>910, - 10085=>667,10086=>760,10087=>760,10102=>788,10103=>788,10104=>788,10105=>788,10106=>788,10107=>788,10108=>788,10109=>788,10110=>788,10111=>788,10112=>788,10113=>788,10114=>788, - 10115=>788,10116=>788,10117=>788,10118=>788,10119=>788,10120=>788,10121=>788,10122=>788,10123=>788,10124=>788,10125=>788,10126=>788,10127=>788,10128=>788,10129=>788,10130=>788, - 10131=>788,10132=>894,10136=>748,10137=>924,10138=>748,10139=>918,10140=>927,10141=>928,10142=>928,10143=>834,10144=>873,10145=>828,10146=>924,10147=>924,10148=>917,10149=>930, - 10150=>931,10151=>463,10152=>883,10153=>836,10154=>836,10155=>867,10156=>867,10157=>696,10158=>696,10159=>874,10161=>874,10162=>760,10163=>946,10164=>771,10165=>865,10166=>771, - 10167=>888,10168=>967,10169=>888,10170=>831,10171=>873,10172=>927,10173=>970,10174=>918,12288=>1000,12289=>1000,12290=>1000,12291=>1000,12292=>1000,12293=>1000,12294=>1000,12295=>1000, - 12296=>1000,12297=>1000,12298=>1000,12299=>1000,12300=>1000,12301=>1000,12302=>1000,12303=>1000,12304=>1000,12305=>1000,12306=>1000,12307=>1000,12308=>1000,12309=>1000,12310=>1000,12311=>1000, - 12312=>1000,12313=>1000,12314=>1000,12315=>1000,12316=>1000,12317=>1000,12318=>1000,12319=>1000,12320=>1000,12321=>1000,12322=>1000,12323=>1000,12324=>1000,12325=>1000,12326=>1000,12327=>1000, - 12328=>1000,12329=>1000,12330=>1000,12331=>1000,12332=>1000,12333=>1000,12334=>1000,12335=>1000,12336=>1000,12337=>1000,12338=>1000,12339=>1000,12340=>1000,12341=>1000,12342=>1000,12343=>1000, - 12351=>1000,12353=>1000,12354=>1000,12355=>1000,12356=>1000,12357=>1000,12358=>1000,12359=>1000,12360=>1000,12361=>1000,12362=>1000,12363=>1000,12364=>1000,12365=>1000,12366=>1000,12367=>1000, - 12368=>1000,12369=>1000,12370=>1000,12371=>1000,12372=>1000,12373=>1000,12374=>1000,12375=>1000,12376=>1000,12377=>1000,12378=>1000,12379=>1000,12380=>1000,12381=>1000,12382=>1000,12383=>1000, - 12384=>1000,12385=>1000,12386=>1000,12387=>1000,12388=>1000,12389=>1000,12390=>1000,12391=>1000,12392=>1000,12393=>1000,12394=>1000,12395=>1000,12396=>1000,12397=>1000,12398=>1000,12399=>1000, - 12400=>1000,12401=>1000,12402=>1000,12403=>1000,12404=>1000,12405=>1000,12406=>1000,12407=>1000,12408=>1000,12409=>1000,12410=>1000,12411=>1000,12412=>1000,12413=>1000,12414=>1000,12415=>1000, - 12416=>1000,12417=>1000,12418=>1000,12419=>1000,12420=>1000,12421=>1000,12422=>1000,12423=>1000,12424=>1000,12425=>1000,12426=>1000,12427=>1000,12428=>1000,12429=>1000,12430=>1000,12431=>1000, - 12432=>1000,12433=>1000,12434=>1000,12435=>1000,12436=>1000,12441=>1000,12442=>1000,12443=>1000,12444=>1000,12445=>1000,12446=>1000,12449=>1000,12450=>1000,12451=>1000,12452=>1000,12453=>1000, - 12454=>1000,12455=>1000,12456=>1000,12457=>1000,12458=>1000,12459=>1000,12460=>1000,12461=>1000,12462=>1000,12463=>1000,12464=>1000,12465=>1000,12466=>1000,12467=>1000,12468=>1000,12469=>1000, - 12470=>1000,12471=>1000,12472=>1000,12473=>1000,12474=>1000,12475=>1000,12476=>1000,12477=>1000,12478=>1000,12479=>1000,12480=>1000,12481=>1000,12482=>1000,12483=>1000,12484=>1000,12485=>1000, - 12486=>1000,12487=>1000,12488=>1000,12489=>1000,12490=>1000,12491=>1000,12492=>1000,12493=>1000,12494=>1000,12495=>1000,12496=>1000,12497=>1000,12498=>1000,12499=>1000,12500=>1000,12501=>1000, - 12502=>1000,12503=>1000,12504=>1000,12505=>1000,12506=>1000,12507=>1000,12508=>1000,12509=>1000,12510=>1000,12511=>1000,12512=>1000,12513=>1000,12514=>1000,12515=>1000,12516=>1000,12517=>1000, - 12518=>1000,12519=>1000,12520=>1000,12521=>1000,12522=>1000,12523=>1000,12524=>1000,12525=>1000,12526=>1000,12527=>1000,12528=>1000,12529=>1000,12530=>1000,12531=>1000,12532=>1000,12533=>1000, - 12534=>1000,12535=>1000,12536=>1000,12537=>1000,12538=>1000,12539=>1000,12540=>1000,12541=>1000,12542=>1000,12549=>1000,12550=>1000,12551=>1000,12552=>1000,12553=>1000,12554=>1000,12555=>1000, - 12556=>1000,12557=>1000,12558=>1000,12559=>1000,12560=>1000,12561=>1000,12562=>1000,12563=>1000,12564=>1000,12565=>1000,12566=>1000,12567=>1000,12568=>1000,12569=>1000,12570=>1000,12571=>1000, - 12572=>1000,12573=>1000,12574=>1000,12575=>1000,12576=>1000,12577=>1000,12578=>1000,12579=>1000,12580=>1000,12581=>1000,12582=>1000,12583=>1000,12584=>1000,12585=>1000,12586=>1000,12587=>1000, - 12588=>1000,12593=>1000,12594=>1000,12595=>1000,12596=>1000,12597=>1000,12598=>1000,12599=>1000,12600=>1000,12601=>1000,12602=>1000,12603=>1000,12604=>1000,12605=>1000,12606=>1000,12607=>1000, - 12608=>1000,12609=>1000,12610=>1000,12611=>1000,12612=>1000,12613=>1000,12614=>1000,12615=>1000,12616=>1000,12617=>1000,12618=>1000,12619=>1000,12620=>1000,12621=>1000,12622=>1000,12623=>1000, - 12624=>1000,12625=>1000,12626=>1000,12627=>1000,12628=>1000,12629=>1000,12630=>1000,12631=>1000,12632=>1000,12633=>1000,12634=>1000,12635=>1000,12636=>1000,12637=>1000,12638=>1000,12639=>1000, - 12640=>1000,12641=>1000,12642=>1000,12643=>1000,12644=>1000,12645=>1000,12646=>1000,12647=>1000,12648=>1000,12649=>1000,12650=>1000,12651=>1000,12652=>1000,12653=>1000,12654=>1000,12655=>1000, - 12656=>1000,12657=>1000,12658=>1000,12659=>1000,12660=>1000,12661=>1000,12662=>1000,12663=>1000,12664=>1000,12665=>1000,12666=>1000,12667=>1000,12668=>1000,12669=>1000,12670=>1000,12671=>1000, - 12672=>1000,12673=>1000,12674=>1000,12675=>1000,12676=>1000,12677=>1000,12678=>1000,12679=>1000,12680=>1000,12681=>1000,12682=>1000,12683=>1000,12684=>1000,12685=>1000,12686=>1000,12688=>1000, - 12689=>1000,12690=>1000,12691=>1000,12692=>1000,12693=>1000,12694=>1000,12695=>1000,12696=>1000,12697=>1000,12698=>1000,12699=>1000,12700=>1000,12701=>1000,12702=>1000,12703=>1000,12800=>1000, - 12801=>1000,12802=>1000,12803=>1000,12804=>1000,12805=>1000,12806=>1000,12807=>1000,12808=>1000,12809=>1000,12810=>1000,12811=>1000,12812=>1000,12813=>1000,12814=>1000,12815=>1000,12816=>1000, - 12817=>1000,12818=>1000,12819=>1000,12820=>1000,12821=>1000,12822=>1000,12823=>1000,12824=>1000,12825=>1000,12826=>1000,12827=>1000,12828=>1000,12832=>1000,12833=>1000,12834=>1000,12835=>1000, - 12836=>1000,12837=>1000,12838=>1000,12839=>1000,12840=>1000,12841=>1000,12842=>1000,12843=>1000,12844=>1000,12845=>1000,12846=>1000,12847=>1000,12848=>1000,12849=>1000,12850=>1000,12851=>1000, - 12852=>1000,12853=>1000,12854=>1000,12855=>1000,12856=>1000,12857=>1000,12858=>1000,12859=>1000,12860=>1000,12861=>1000,12862=>1000,12863=>1000,12864=>1000,12865=>1000,12866=>1000,12867=>1000, - 12896=>1000,12897=>1000,12898=>1000,12899=>1000,12900=>1000,12901=>1000,12902=>1000,12903=>1000,12904=>1000,12905=>1000,12906=>1000,12907=>1000,12908=>1000,12909=>1000,12910=>1000,12911=>1000, - 12912=>1000,12913=>1000,12914=>1000,12915=>1000,12916=>1000,12917=>1000,12918=>1000,12919=>1000,12920=>1000,12921=>1000,12922=>1000,12923=>1000,12927=>1000,12928=>1000,12929=>1000,12930=>1000, - 12931=>1000,12932=>1000,12933=>1000,12934=>1000,12935=>1000,12936=>1000,12937=>1000,12938=>1000,12939=>1000,12940=>1000,12941=>1000,12942=>1000,12943=>1000,12944=>1000,12945=>1000,12946=>1000, - 12947=>1000,12948=>1000,12949=>1000,12950=>1000,12951=>1000,12952=>1000,12953=>1000,12954=>1000,12955=>1000,12956=>1000,12957=>1000,12958=>1000,12959=>1000,12960=>1000,12961=>1000,12962=>1000, - 12963=>1000,12964=>1000,12965=>1000,12966=>1000,12967=>1000,12968=>1000,12969=>1000,12970=>1000,12971=>1000,12972=>1000,12973=>1000,12974=>1000,12975=>1000,12976=>1000,12992=>1000,12993=>1000, - 12994=>1000,12995=>1000,12996=>1000,12997=>1000,12998=>1000,12999=>1000,13000=>1000,13001=>1000,13002=>1000,13003=>1000,13008=>1000,13009=>1000,13010=>1000,13011=>1000,13012=>1000,13013=>1000, - 13014=>1000,13015=>1000,13016=>1000,13017=>1000,13018=>1000,13019=>1000,13020=>1000,13021=>1000,13022=>1000,13023=>1000,13024=>1000,13025=>1000,13026=>1000,13027=>1000,13028=>1000,13029=>1000, - 13030=>1000,13031=>1000,13032=>1000,13033=>1000,13034=>1000,13035=>1000,13036=>1000,13037=>1000,13038=>1000,13039=>1000,13040=>1000,13041=>1000,13042=>1000,13043=>1000,13044=>1000,13045=>1000, - 13046=>1000,13047=>1000,13048=>1000,13049=>1000,13050=>1000,13051=>1000,13052=>1000,13053=>1000,13054=>1000,13056=>1000,13057=>1000,13058=>1000,13059=>1000,13060=>1000,13061=>1000,13062=>1000, - 13063=>1000,13064=>1000,13065=>1000,13066=>1000,13067=>1000,13068=>1000,13069=>1000,13070=>1000,13071=>1000,13072=>1000,13073=>1000,13074=>1000,13075=>1000,13076=>1000,13077=>1000,13078=>1000, - 13079=>1000,13080=>1000,13081=>1000,13082=>1000,13083=>1000,13084=>1000,13085=>1000,13086=>1000,13087=>1000,13088=>1000,13089=>1000,13090=>1000,13091=>1000,13092=>1000,13093=>1000,13094=>1000, - 13095=>1000,13096=>1000,13097=>1000,13098=>1000,13099=>1000,13100=>1000,13101=>1000,13102=>1000,13103=>1000,13104=>1000,13105=>1000,13106=>1000,13107=>1000,13108=>1000,13109=>1000,13110=>1000, - 13111=>1000,13112=>1000,13113=>1000,13114=>1000,13115=>1000,13116=>1000,13117=>1000,13118=>1000,13119=>1000,13120=>1000,13121=>1000,13122=>1000,13123=>1000,13124=>1000,13125=>1000,13126=>1000, - 13127=>1000,13128=>1000,13129=>1000,13130=>1000,13131=>1000,13132=>1000,13133=>1000,13134=>1000,13135=>1000,13136=>1000,13137=>1000,13138=>1000,13139=>1000,13140=>1000,13141=>1000,13142=>1000, - 13143=>1000,13144=>1000,13145=>1000,13146=>1000,13147=>1000,13148=>1000,13149=>1000,13150=>1000,13151=>1000,13152=>1000,13153=>1000,13154=>1000,13155=>1000,13156=>1000,13157=>1000,13158=>1000, - 13159=>1000,13160=>1000,13161=>1000,13162=>1000,13163=>1000,13164=>1000,13165=>1000,13166=>1000,13167=>1000,13168=>1000,13169=>1000,13170=>1000,13171=>1000,13172=>1000,13173=>1000,13174=>1000, - 13179=>1000,13180=>1000,13181=>1000,13182=>1000,13183=>1000,13184=>1000,13185=>1000,13186=>1000,13187=>1000,13188=>1000,13189=>1000,13190=>1000,13191=>1000,13192=>1000,13193=>1000,13194=>1000, - 13195=>1000,13196=>1000,13197=>1000,13198=>1000,13199=>1000,13200=>1000,13201=>1000,13202=>1000,13203=>1000,13204=>1000,13205=>1000,13206=>1000,13207=>1000,13208=>1000,13209=>1000,13210=>1000, - 13211=>1000,13212=>1000,13213=>1000,13214=>1000,13215=>1000,13216=>1000,13217=>1000,13218=>1000,13219=>1000,13220=>1000,13221=>1000,13222=>1000,13223=>1000,13224=>1000,13225=>1000,13226=>1000, - 13227=>1000,13228=>1000,13229=>1000,13230=>1000,13231=>1000,13232=>1000,13233=>1000,13234=>1000,13235=>1000,13236=>1000,13237=>1000,13238=>1000,13239=>1000,13240=>1000,13241=>1000,13242=>1000, - 13243=>1000,13244=>1000,13245=>1000,13246=>1000,13247=>1000,13248=>1000,13249=>1000,13250=>1000,13251=>1000,13252=>1000,13253=>1000,13254=>1000,13255=>1000,13256=>1000,13257=>1000,13258=>1000, - 13259=>1000,13260=>1000,13261=>1000,13262=>1000,13263=>1000,13264=>1000,13265=>1000,13266=>1000,13267=>1000,13268=>1000,13269=>1000,13270=>1000,13271=>1000,13272=>1000,13273=>1000,13274=>1000, - 13275=>1000,13276=>1000,13277=>1000,13280=>1000,13281=>1000,13282=>1000,13283=>1000,13284=>1000,13285=>1000,13286=>1000,13287=>1000,13288=>1000,13289=>1000,13290=>1000,13291=>1000,13292=>1000, - 13293=>1000,13294=>1000,13295=>1000,13296=>1000,13297=>1000,13298=>1000,13299=>1000,13300=>1000,13301=>1000,13302=>1000,13303=>1000,13304=>1000,13305=>1000,13306=>1000,13307=>1000,13308=>1000, - 13309=>1000,13310=>1000,59393=>316,59394=>507,59395=>507,59396=>484,59397=>484,59416=>0,59492=>480,59495=>480,59536=>458,59557=>466,59558=>480,59559=>903,61441=>500,61442=>500, - 63232=>541,63233=>0,63234=>0,63235=>0,63236=>0,63237=>0,63238=>0,63239=>0,63240=>0,63241=>0,63242=>0,63243=>0,63244=>0,63245=>0,63246=>0,63247=>849, - 63248=>0,63249=>0,63250=>0,63251=>0,63252=>0,63253=>0,63254=>0,63255=>0,63256=>0,63257=>0,63258=>0,63260=>333,63261=>287,63744=>1000,63745=>1000,63746=>1000, - 63747=>1000,63748=>1000,63749=>1000,63750=>1000,63751=>1000,63752=>1000,63753=>1000,63754=>1000,63755=>1000,63756=>1000,63757=>1000,63758=>1000,63759=>1000,63760=>1000,63761=>1000,63762=>1000, - 63763=>1000,63764=>1000,63765=>1000,63766=>1000,63767=>1000,63768=>1000,63769=>1000,63770=>1000,63771=>1000,63772=>1000,63773=>1000,63774=>1000,63775=>1000,63776=>1000,63777=>1000,63778=>1000, - 63779=>1000,63780=>1000,63781=>1000,63782=>1000,63783=>1000,63784=>1000,63785=>1000,63786=>1000,63787=>1000,63788=>1000,63789=>1000,63790=>1000,63791=>1000,63792=>1000,63793=>1000,63794=>1000, - 63795=>1000,63796=>1000,63797=>1000,63798=>1000,63799=>1000,63800=>1000,63801=>1000,63802=>1000,63803=>1000,63804=>1000,63805=>1000,63806=>1000,63807=>1000,63808=>1000,63809=>1000,63810=>1000, - 63811=>1000,63812=>1000,63813=>1000,63814=>1000,63815=>1000,63816=>1000,63817=>1000,63818=>1000,63819=>1000,63820=>1000,63821=>1000,63822=>1000,63823=>1000,63824=>1000,63825=>1000,63826=>1000, - 63827=>1000,63828=>1000,63829=>1000,63830=>1000,63831=>1000,63832=>1000,63833=>1000,63834=>1000,63835=>1000,63836=>1000,63837=>1000,63838=>1000,63839=>1000,63840=>1000,63841=>1000,63842=>1000, - 63843=>1000,63844=>1000,63845=>1000,63846=>1000,63847=>1000,63848=>1000,63849=>1000,63850=>1000,63851=>1000,63852=>1000,63853=>1000,63854=>1000,63855=>1000,63856=>1000,63857=>1000,63858=>1000, - 63859=>1000,63860=>1000,63861=>1000,63862=>1000,63863=>1000,63864=>1000,63865=>1000,63866=>1000,63867=>1000,63868=>1000,63869=>1000,63870=>1000,63871=>1000,63872=>1000,63873=>1000,63874=>1000, - 63875=>1000,63876=>1000,63877=>1000,63878=>1000,63879=>1000,63880=>1000,63881=>1000,63882=>1000,63883=>1000,63884=>1000,63885=>1000,63886=>1000,63887=>1000,63888=>1000,63889=>1000,63890=>1000, - 63891=>1000,63892=>1000,63893=>1000,63894=>1000,63895=>1000,63896=>1000,63897=>1000,63898=>1000,63899=>1000,63900=>1000,63901=>1000,63902=>1000,63903=>1000,63904=>1000,63905=>1000,63906=>1000, - 63907=>1000,63908=>1000,63909=>1000,63910=>1000,63911=>1000,63912=>1000,63913=>1000,63914=>1000,63915=>1000,63916=>1000,63917=>1000,63918=>1000,63919=>1000,63920=>1000,63921=>1000,63922=>1000, - 63923=>1000,63924=>1000,63925=>1000,63926=>1000,63927=>1000,63928=>1000,63929=>1000,63930=>1000,63931=>1000,63932=>1000,63933=>1000,63934=>1000,63935=>1000,63936=>1000,63937=>1000,63938=>1000, - 63939=>1000,63940=>1000,63941=>1000,63942=>1000,63943=>1000,63944=>1000,63945=>1000,63946=>1000,63947=>1000,63948=>1000,63949=>1000,63950=>1000,63951=>1000,63952=>1000,63953=>1000,63954=>1000, - 63955=>1000,63956=>1000,63957=>1000,63958=>1000,63959=>1000,63960=>1000,63961=>1000,63962=>1000,63963=>1000,63964=>1000,63965=>1000,63966=>1000,63967=>1000,63968=>1000,63969=>1000,63970=>1000, - 63971=>1000,63972=>1000,63973=>1000,63974=>1000,63975=>1000,63976=>1000,63977=>1000,63978=>1000,63979=>1000,63980=>1000,63981=>1000,63982=>1000,63983=>1000,63984=>1000,63985=>1000,63986=>1000, - 63987=>1000,63988=>1000,63989=>1000,63990=>1000,63991=>1000,63992=>1000,63993=>1000,63994=>1000,63995=>1000,63996=>1000,63997=>1000,63998=>1000,63999=>1000,64000=>1000,64001=>1000,64002=>1000, - 64003=>1000,64004=>1000,64005=>1000,64006=>1000,64007=>1000,64008=>1000,64009=>1000,64010=>1000,64011=>1000,64012=>1000,64013=>1000,64014=>1000,64015=>1000,64016=>1000,64017=>1000,64018=>1000, - 64019=>1000,64020=>1000,64021=>1000,64022=>1000,64023=>1000,64024=>1000,64025=>1000,64026=>1000,64027=>1000,64028=>1000,64029=>1000,64030=>1000,64031=>1000,64032=>1000,64033=>1000,64034=>1000, - 64035=>1000,64036=>1000,64037=>1000,64038=>1000,64039=>1000,64040=>1000,64041=>1000,64042=>1000,64043=>1000,64044=>1000,64045=>1000,64256=>537,64257=>500,64258=>500,64259=>778,64260=>750, - 64261=>532,64262=>758,64275=>784,64276=>784,64277=>784,64278=>784,64279=>893,64286=>333,64287=>590,64288=>550,64289=>709,64290=>649,64291=>730,64292=>656,64293=>605,64294=>730, - 64295=>633,64296=>794,64297=>584,64298=>700,64299=>700,64300=>700,64301=>700,64302=>577,64303=>577,64304=>577,64305=>563,64306=>411,64307=>512,64308=>594,64309=>316,64310=>326, - 64312=>594,64313=>316,64314=>507,64315=>527,64316=>484,64318=>594,64320=>338,64321=>604,64323=>567,64324=>569,64326=>514,64327=>583,64328=>507,64329=>700,64330=>633,64331=>316, - 64332=>563,64333=>527,64334=>569,64335=>577,64336=>243,64337=>273,64338=>771,64339=>788,64340=>276,64341=>243,64342=>771,64343=>788,64344=>276,64345=>243,64346=>771,64347=>788, - 64348=>276,64349=>243,64350=>771,64351=>788,64352=>276,64353=>243,64354=>771,64355=>788,64356=>276,64357=>243,64358=>771,64359=>788,64360=>276,64361=>243,64362=>957,64363=>903, - 64364=>466,64365=>480,64366=>957,64367=>903,64368=>466,64369=>480,64370=>544,64371=>658,64372=>646,64373=>637,64374=>544,64375=>658,64376=>646,64377=>637,64378=>544,64379=>658, - 64380=>646,64381=>637,64382=>544,64383=>658,64384=>646,64385=>637,64386=>430,64387=>458,64388=>430,64389=>458,64390=>430,64391=>458,64392=>430,64393=>458,64394=>421,64395=>436, - 64396=>421,64397=>436,64398=>828,64399=>942,64400=>432,64401=>549,64402=>828,64403=>942,64404=>432,64405=>549,64406=>828,64407=>942,64408=>432,64409=>549,64410=>828,64411=>942, - 64412=>432,64413=>549,64414=>692,64415=>723,64416=>692,64417=>723,64418=>276,64419=>243,64420=>514,64421=>477,64422=>514,64423=>509,64424=>273,64425=>427,64426=>706,64427=>706, - 64428=>686,64429=>686,64430=>550,64431=>461,64432=>550,64433=>461,64467=>757,64468=>733,64469=>432,64470=>549,64471=>470,64472=>466,64473=>470,64474=>466,64475=>470,64476=>466, - 64477=>470,64478=>470,64479=>466,64480=>470,64481=>466,64482=>470,64483=>466,64484=>781,64485=>933,64486=>276,64487=>243,64488=>276,64489=>243,64490=>547,64491=>517,64492=>783, - 64493=>753,64494=>740,64495=>710,64496=>740,64497=>710,64498=>740,64499=>710,64500=>740,64501=>710,64502=>1207,64503=>1177,64504=>517,64505=>1067,64506=>1037,64507=>517,64508=>731, - 64509=>793,64510=>276,64511=>243,64512=>932,64513=>932,64514=>914,64515=>1067,64516=>1077,64517=>935,64518=>935,64519=>935,64520=>917,64521=>1070,64522=>1080,64523=>932,64524=>932, - 64525=>932,64526=>914,64527=>1067,64528=>1077,64529=>932,64530=>914,64531=>1067,64532=>1077,64533=>1305,64534=>1287,64535=>1305,64536=>1287,64537=>1305,64538=>1305,64539=>1287,64540=>1429, - 64541=>1429,64542=>1429,64543=>1411,64544=>1476,64545=>1458,64546=>1476,64547=>1476,64548=>1476,64549=>1458,64550=>1392,64551=>1374,64552=>1374,64553=>1245,64554=>1227,64555=>1245,64556=>1227, - 64557=>1125,64558=>1125,64559=>1125,64560=>1107,64561=>1260,64562=>1270,64563=>1125,64564=>1107,64565=>1260,64566=>1270,64567=>706,64568=>1091,64569=>1091,64570=>1091,64571=>1106,64572=>1073, - 64573=>1226,64574=>1236,64575=>932,64576=>932,64577=>932,64578=>914,64579=>1067,64580=>1077,64581=>1140,64582=>1140,64583=>1140,64584=>1122,64585=>1275,64586=>1285,64587=>932,64588=>932, - 64589=>932,64590=>914,64591=>1067,64592=>1077,64593=>1345,64594=>1327,64595=>1480,64596=>1490,64597=>932,64598=>932,64599=>932,64600=>914,64601=>1067,64602=>1077,64603=>430,64604=>421, - 64605=>731,64606=>296,64607=>300,64608=>300,64609=>300,64610=>300,64611=>300,64612=>680,64613=>680,64614=>884,64615=>967,64616=>1037,64617=>1047,64618=>680,64619=>680,64620=>884, - 64621=>967,64622=>1037,64623=>1047,64624=>680,64625=>680,64626=>884,64627=>967,64628=>1037,64629=>1047,64630=>680,64631=>680,64632=>884,64633=>967,64634=>1037,64635=>1047,64636=>1274, - 64637=>1284,64638=>1274,64639=>1284,64640=>821,64641=>1221,64642=>1188,64643=>1341,64644=>1351,64645=>884,64646=>1037,64647=>1047,64648=>806,64649=>1173,64650=>680,64651=>680,64652=>884, - 64653=>967,64654=>1037,64655=>1047,64656=>793,64657=>680,64658=>680,64659=>884,64660=>967,64661=>1037,64662=>1047,64663=>911,64664=>911,64665=>911,64666=>806,64667=>679,64668=>911, - 64669=>911,64670=>911,64671=>806,64672=>679,64673=>911,64674=>911,64675=>911,64676=>806,64677=>679,64678=>806,64679=>1284,64680=>1179,64681=>1284,64682=>1179,64683=>1284,64684=>1179, - 64685=>1408,64686=>1408,64687=>1408,64688=>1303,64689=>1455,64690=>1455,64691=>1350,64692=>1455,64693=>1455,64694=>1455,64695=>1350,64696=>1371,64697=>1266,64698=>1224,64699=>1119,64700=>1224, - 64701=>1119,64702=>1104,64703=>1104,64704=>1104,64705=>999,64706=>1104,64707=>999,64708=>1070,64709=>1070,64710=>1070,64711=>676,64712=>965,64713=>911,64714=>911,64715=>911,64716=>806, - 64717=>679,64718=>1119,64719=>1119,64720=>1119,64721=>1014,64722=>911,64723=>911,64724=>911,64725=>806,64726=>679,64727=>1324,64728=>1219,64729=>686,64730=>911,64731=>911,64732=>911, - 64733=>806,64734=>679,64735=>776,64736=>649,64737=>776,64738=>649,64739=>776,64740=>649,64741=>776,64742=>649,64743=>1303,64744=>1176,64745=>1303,64746=>1176,64747=>793,64748=>1082, - 64749=>776,64750=>776,64751=>649,64752=>776,64753=>649,64754=>306,64755=>302,64756=>298,64757=>1527,64758=>1537,64759=>1380,64760=>1390,64761=>1380,64762=>1390,64763=>1564,64764=>1574, - 64765=>1564,64766=>1574,64767=>1440,64768=>1450,64769=>1440,64770=>1450,64771=>1440,64772=>1450,64773=>1611,64774=>1621,64775=>1611,64776=>1621,64777=>1429,64778=>1429,64779=>1429,64780=>1411, - 64781=>1207,64782=>1207,64783=>1254,64784=>1254,64785=>1527,64786=>1537,64787=>1348,64788=>1358,64789=>1348,64790=>1358,64791=>1564,64792=>1574,64793=>1564,64794=>1574,64795=>1431,64796=>1441, - 64797=>1431,64798=>1441,64799=>1431,64800=>1441,64801=>1611,64802=>1621,64803=>1611,64804=>1621,64805=>1429,64806=>1429,64807=>1429,64808=>1411,64809=>1207,64810=>1207,64811=>1254,64812=>1254, - 64813=>1408,64814=>1408,64815=>1408,64816=>1303,64817=>1176,64818=>1176,64819=>1266,64820=>1408,64821=>1408,64822=>1408,64823=>1408,64824=>1408,64825=>1408,64826=>1266,64827=>1266,64828=>273, - 64829=>243,64830=>600,64831=>600,64848=>1444,64849=>1541,64850=>1549,64851=>1444,64852=>1444,64853=>1444,64854=>1444,64855=>1444,64856=>1830,64857=>1817,64858=>1975,64859=>1964,64860=>2046, - 64861=>2046,64862=>2202,64863=>1962,64864=>1941,64865=>1941,64866=>1944,64867=>1836,64868=>2114,64869=>2093,64870=>1991,64871=>2049,64872=>1941,64873=>2212,64874=>1962,64875=>1941,64876=>1944, - 64877=>1836,64878=>2249,64879=>2096,64880=>1988,64881=>1925,64882=>1904,64883=>1799,64884=>2070,64885=>1833,64886=>1729,64887=>1652,64888=>1881,64889=>1729,64890=>1892,64891=>1881,64892=>1759, - 64893=>1637,64894=>1670,64895=>1654,64896=>1522,64897=>1686,64898=>1675,64899=>1549,64900=>1541,64901=>1522,64902=>1444,64903=>1436,64904=>1444,64905=>1757,64906=>1652,64907=>1975,64908=>1757, - 64909=>1652,64910=>1757,64911=>1652,64914=>1757,64915=>1857,64916=>1752,64917=>1444,64918=>1675,64919=>1522,64920=>1444,64921=>1675,64922=>1581,64923=>1570,64924=>1417,64925=>1362,64926=>1686, - 64927=>1686,64928=>1675,64929=>1686,64930=>1675,64931=>1581,64932=>1570,64933=>1975,64934=>2069,64935=>1964,64936=>2202,64937=>2259,64938=>2212,64939=>2259,64940=>1686,64941=>1581,64942=>1686, - 64943=>1686,64944=>1581,64945=>1870,64946=>1817,64947=>1686,64948=>1637,64949=>1444,64950=>1892,64951=>1886,64952=>1549,64953=>1975,64954=>1444,64955=>1723,64956=>1522,64957=>1541,64958=>2080, - 64959=>2080,64960=>1975,64961=>1817,64962=>1686,64963=>1499,64964=>1757,64965=>1883,64966=>2212,64967=>1686,65008=>1523,65009=>1172,65010=>1159,65011=>1356,65012=>2111,65013=>2258,65014=>2130, - 65015=>1552,65016=>2046,65017=>1856,65018=>1930,65019=>1070,65056=>450,65057=>450,65058=>450,65059=>450,65072=>1000,65073=>1000,65074=>1000,65075=>1000,65076=>1000,65077=>1000,65078=>1000, - 65079=>1000,65080=>1000,65081=>1000,65082=>1000,65083=>1000,65084=>1000,65085=>1000,65086=>1000,65087=>1000,65088=>1000,65089=>1000,65090=>1000,65091=>1000,65092=>1000,65097=>1000,65098=>1000, - 65099=>1000,65100=>1000,65101=>1000,65102=>1000,65103=>1000,65104=>167,65105=>250,65106=>167,65108=>167,65109=>167,65110=>334,65111=>167,65112=>600,65113=>200,65114=>200,65115=>200, - 65116=>200,65117=>200,65118=>200,65119=>334,65120=>400,65121=>233,65122=>350,65123=>200,65124=>350,65125=>350,65126=>350,65128=>167,65129=>334,65130=>533,65131=>609,65136=>300, - 65137=>298,65138=>296,65140=>298,65142=>300,65143=>298,65144=>300,65145=>302,65146=>298,65147=>296,65148=>306,65149=>306,65150=>154,65151=>154,65152=>529,65153=>243,65154=>273, - 65155=>243,65156=>273,65157=>470,65158=>466,65159=>243,65160=>273,65161=>731,65162=>793,65163=>276,65164=>243,65165=>243,65166=>273,65167=>771,65168=>788,65169=>276,65170=>243, - 65171=>514,65172=>477,65173=>771,65174=>788,65175=>276,65176=>243,65177=>771,65178=>788,65179=>276,65180=>243,65181=>544,65182=>658,65183=>646,65184=>637,65185=>544,65186=>658, - 65187=>646,65188=>637,65189=>544,65190=>658,65191=>646,65192=>637,65193=>430,65194=>458,65195=>430,65196=>458,65197=>421,65198=>436,65199=>421,65200=>436,65201=>1194,65202=>1194, - 65203=>770,65204=>770,65205=>1194,65206=>1194,65207=>770,65208=>770,65209=>1291,65210=>1291,65211=>817,65212=>817,65213=>1291,65214=>1291,65215=>817,65216=>817,65217=>843,65218=>843, - 65219=>733,65220=>733,65221=>843,65222=>843,65223=>733,65224=>733,65225=>594,65226=>556,65227=>586,65228=>554,65229=>594,65230=>556,65231=>586,65232=>554,65233=>957,65234=>903, - 65235=>466,65236=>480,65237=>800,65238=>823,65239=>466,65240=>480,65241=>757,65242=>733,65243=>432,65244=>549,65245=>662,65246=>673,65247=>273,65248=>243,65249=>589,65250=>640, - 65251=>481,65252=>532,65253=>692,65254=>723,65255=>276,65256=>243,65257=>514,65258=>477,65259=>686,65260=>405,65261=>470,65262=>466,65263=>731,65264=>793,65265=>731,65266=>803, - 65267=>276,65268=>243,65269=>551,65270=>603,65271=>551,65272=>603,65273=>551,65274=>603,65275=>551,65276=>603,65281=>1000,65282=>1000,65283=>1000,65284=>1000,65285=>1000,65286=>1000, - 65287=>1000,65288=>1000,65289=>1000,65290=>1000,65291=>1000,65292=>1000,65293=>1000,65294=>1000,65295=>1000,65296=>1000,65297=>1000,65298=>1000,65299=>1000,65300=>1000,65301=>1000,65302=>1000, - 65303=>1000,65304=>1000,65305=>1000,65306=>1000,65307=>1000,65308=>1000,65309=>1000,65310=>1000,65311=>1000,65312=>1000,65313=>1000,65314=>1000,65315=>1000,65316=>1000,65317=>1000,65318=>1000, - 65319=>1000,65320=>1000,65321=>1000,65322=>1000,65323=>1000,65324=>1000,65325=>1000,65326=>1000,65327=>1000,65328=>1000,65329=>1000,65330=>1000,65331=>1000,65332=>1000,65333=>1000,65334=>1000, - 65335=>1000,65336=>1000,65337=>1000,65338=>1000,65339=>1000,65340=>1000,65341=>1000,65342=>1000,65343=>1000,65344=>1000,65345=>1000,65346=>1000,65347=>1000,65348=>1000,65349=>1000,65350=>1000, - 65351=>1000,65352=>1000,65353=>1000,65354=>1000,65355=>1000,65356=>1000,65357=>1000,65358=>1000,65359=>1000,65360=>1000,65361=>1000,65362=>1000,65363=>1000,65364=>1000,65365=>1000,65366=>1000, - 65367=>1000,65368=>1000,65369=>1000,65370=>1000,65371=>1000,65372=>1000,65373=>1000,65374=>1000,65377=>500,65378=>500,65379=>500,65380=>500,65381=>500,65382=>500,65383=>500,65384=>500, - 65385=>500,65386=>500,65387=>500,65388=>500,65389=>500,65390=>500,65391=>500,65392=>500,65393=>500,65394=>500,65395=>500,65396=>500,65397=>500,65398=>500,65399=>500,65400=>500, - 65401=>500,65402=>500,65403=>500,65404=>500,65405=>500,65406=>500,65407=>500,65408=>500,65409=>500,65410=>500,65411=>500,65412=>500,65413=>500,65414=>500,65415=>500,65416=>500, - 65417=>500,65418=>500,65419=>500,65420=>500,65421=>500,65422=>500,65423=>500,65424=>500,65425=>500,65426=>500,65427=>500,65428=>500,65429=>500,65430=>500,65431=>500,65432=>500, - 65433=>500,65434=>500,65435=>500,65436=>500,65437=>500,65438=>500,65439=>500,65440=>500,65441=>500,65442=>500,65443=>500,65444=>500,65445=>500,65446=>500,65447=>500,65448=>500, - 65449=>500,65450=>500,65451=>500,65452=>500,65453=>500,65454=>500,65455=>500,65456=>500,65457=>500,65458=>500,65459=>500,65460=>500,65461=>500,65462=>500,65463=>500,65464=>500, - 65465=>500,65466=>500,65467=>500,65468=>500,65469=>500,65470=>500,65474=>500,65475=>500,65476=>500,65477=>500,65478=>500,65479=>500,65482=>500,65483=>500,65484=>500,65485=>500, - 65486=>500,65487=>500,65490=>500,65491=>500,65492=>500,65493=>500,65494=>500,65495=>500,65498=>500,65499=>500,65500=>500,65504=>1000,65505=>1000,65506=>1000,65507=>1000,65508=>1000, - 65509=>1000,65510=>1000,65512=>500,65513=>500,65514=>500,65515=>500,65516=>500,65517=>500,65518=>500,65532=>1000,65533=>1000,19968=>1000,19969=>1000,19970=>1000,19971=>1000,19972=>1000, - 19973=>1000,19974=>1000,19975=>1000,19976=>1000,19977=>1000,19978=>1000,19979=>1000,19980=>1000,19981=>1000,19982=>1000,19983=>1000,19984=>1000,19985=>1000,19986=>1000,19987=>1000,19988=>1000, - 19989=>1000,19990=>1000,19991=>1000,19992=>1000,19993=>1000,19994=>1000,19995=>1000,19996=>1000,19997=>1000,19998=>1000,19999=>1000,20000=>1000,20001=>1000,20002=>1000,20003=>1000,20004=>1000, - 20005=>1000,20006=>1000,20007=>1000,20008=>1000,20009=>1000,20010=>1000,20011=>1000,20012=>1000,20013=>1000,20014=>1000,20015=>1000,20016=>1000,20017=>1000,20018=>1000,20019=>1000,20020=>1000, - 20021=>1000,20022=>1000,20023=>1000,20024=>1000,20025=>1000,20026=>1000,20027=>1000,20028=>1000,20029=>1000,20030=>1000,20031=>1000,20032=>1000,20033=>1000,20034=>1000,20035=>1000,20036=>1000, - 20037=>1000,20038=>1000,20039=>1000,20040=>1000,20041=>1000,20042=>1000,20043=>1000,20044=>1000,20045=>1000,20046=>1000,20047=>1000,20048=>1000,20049=>1000,20050=>1000,20051=>1000,20052=>1000, - 20053=>1000,20054=>1000,20055=>1000,20056=>1000,20057=>1000,20058=>1000,20059=>1000,20060=>1000,20061=>1000,20062=>1000,20063=>1000,20064=>1000,20065=>1000,20066=>1000,20067=>1000,20068=>1000, - 20069=>1000,20070=>1000,20071=>1000,20072=>1000,20073=>1000,20074=>1000,20075=>1000,20076=>1000,20077=>1000,20078=>1000,20079=>1000,20080=>1000,20081=>1000,20082=>1000,20083=>1000,20084=>1000, - 20085=>1000,20086=>1000,20087=>1000,20088=>1000,20089=>1000,20090=>1000,20091=>1000,20092=>1000,20093=>1000,20094=>1000,20095=>1000,20096=>1000,20097=>1000,20098=>1000,20099=>1000,20100=>1000, - 20101=>1000,20102=>1000,20103=>1000,20104=>1000,20105=>1000,20106=>1000,20107=>1000,20108=>1000,20109=>1000,20110=>1000,20111=>1000,20112=>1000,20113=>1000,20114=>1000,20115=>1000,20116=>1000, - 20117=>1000,20118=>1000,20119=>1000,20120=>1000,20121=>1000,20122=>1000,20123=>1000,20124=>1000,20125=>1000,20126=>1000,20127=>1000,20128=>1000,20129=>1000,20130=>1000,20131=>1000,20132=>1000, - 20133=>1000,20134=>1000,20135=>1000,20136=>1000,20137=>1000,20138=>1000,20139=>1000,20140=>1000,20141=>1000,20142=>1000,20143=>1000,20144=>1000,20145=>1000,20146=>1000,20147=>1000,20148=>1000, - 20149=>1000,20150=>1000,20151=>1000,20152=>1000,20153=>1000,20154=>1000,20155=>1000,20156=>1000,20157=>1000,20158=>1000,20159=>1000,20160=>1000,20161=>1000,20162=>1000,20163=>1000,20164=>1000, - 20165=>1000,20166=>1000,20167=>1000,20168=>1000,20169=>1000,20170=>1000,20171=>1000,20172=>1000,20173=>1000,20174=>1000,20175=>1000,20176=>1000,20177=>1000,20178=>1000,20179=>1000,20180=>1000, - 20181=>1000,20182=>1000,20183=>1000,20184=>1000,20185=>1000,20186=>1000,20187=>1000,20188=>1000,20189=>1000,20190=>1000,20191=>1000,20192=>1000,20193=>1000,20194=>1000,20195=>1000,20196=>1000, - 20197=>1000,20198=>1000,20199=>1000,20200=>1000,20201=>1000,20202=>1000,20203=>1000,20204=>1000,20205=>1000,20206=>1000,20207=>1000,20208=>1000,20209=>1000,20210=>1000,20211=>1000,20212=>1000, - 20213=>1000,20214=>1000,20215=>1000,20216=>1000,20217=>1000,20218=>1000,20219=>1000,20220=>1000,20221=>1000,20222=>1000,20223=>1000,20224=>1000,20225=>1000,20226=>1000,20227=>1000,20228=>1000, - 20229=>1000,20230=>1000,20231=>1000,20232=>1000,20233=>1000,20234=>1000,20235=>1000,20236=>1000,20237=>1000,20238=>1000,20239=>1000,20240=>1000,20241=>1000,20242=>1000,20243=>1000,20244=>1000, - 20245=>1000,20246=>1000,20247=>1000,20248=>1000,20249=>1000,20250=>1000,20251=>1000,20252=>1000,20253=>1000,20254=>1000,20255=>1000,20256=>1000,20257=>1000,20258=>1000,20259=>1000,20260=>1000, - 20261=>1000,20262=>1000,20263=>1000,20264=>1000,20265=>1000,20266=>1000,20267=>1000,20268=>1000,20269=>1000,20270=>1000,20271=>1000,20272=>1000,20273=>1000,20274=>1000,20275=>1000,20276=>1000, - 20277=>1000,20278=>1000,20279=>1000,20280=>1000,20281=>1000,20282=>1000,20283=>1000,20284=>1000,20285=>1000,20286=>1000,20287=>1000,20288=>1000,20289=>1000,20290=>1000,20291=>1000,20292=>1000, - 20293=>1000,20294=>1000,20295=>1000,20296=>1000,20297=>1000,20298=>1000,20299=>1000,20300=>1000,20301=>1000,20302=>1000,20303=>1000,20304=>1000,20305=>1000,20306=>1000,20307=>1000,20308=>1000, - 20309=>1000,20310=>1000,20311=>1000,20312=>1000,20313=>1000,20314=>1000,20315=>1000,20316=>1000,20317=>1000,20318=>1000,20319=>1000,20320=>1000,20321=>1000,20322=>1000,20323=>1000,20324=>1000, - 20325=>1000,20326=>1000,20327=>1000,20328=>1000,20329=>1000,20330=>1000,20331=>1000,20332=>1000,20333=>1000,20334=>1000,20335=>1000,20336=>1000,20337=>1000,20338=>1000,20339=>1000,20340=>1000, - 20341=>1000,20342=>1000,20343=>1000,20344=>1000,20345=>1000,20346=>1000,20347=>1000,20348=>1000,20349=>1000,20350=>1000,20351=>1000,20352=>1000,20353=>1000,20354=>1000,20355=>1000,20356=>1000, - 20357=>1000,20358=>1000,20359=>1000,20360=>1000,20361=>1000,20362=>1000,20363=>1000,20364=>1000,20365=>1000,20366=>1000,20367=>1000,20368=>1000,20369=>1000,20370=>1000,20371=>1000,20372=>1000, - 20373=>1000,20374=>1000,20375=>1000,20376=>1000,20377=>1000,20378=>1000,20379=>1000,20380=>1000,20381=>1000,20382=>1000,20383=>1000,20384=>1000,20385=>1000,20386=>1000,20387=>1000,20388=>1000, - 20389=>1000,20390=>1000,20391=>1000,20392=>1000,20393=>1000,20394=>1000,20395=>1000,20396=>1000,20397=>1000,20398=>1000,20399=>1000,20400=>1000,20401=>1000,20402=>1000,20403=>1000,20404=>1000, - 20405=>1000,20406=>1000,20407=>1000,20408=>1000,20409=>1000,20410=>1000,20411=>1000,20412=>1000,20413=>1000,20414=>1000,20415=>1000,20416=>1000,20417=>1000,20418=>1000,20419=>1000,20420=>1000, - 20421=>1000,20422=>1000,20423=>1000,20424=>1000,20425=>1000,20426=>1000,20427=>1000,20428=>1000,20429=>1000,20430=>1000,20431=>1000,20432=>1000,20433=>1000,20434=>1000,20435=>1000,20436=>1000, - 20437=>1000,20438=>1000,20439=>1000,20440=>1000,20441=>1000,20442=>1000,20443=>1000,20444=>1000,20445=>1000,20446=>1000,20447=>1000,20448=>1000,20449=>1000,20450=>1000,20451=>1000,20452=>1000, - 20453=>1000,20454=>1000,20455=>1000,20456=>1000,20457=>1000,20458=>1000,20459=>1000,20460=>1000,20461=>1000,20462=>1000,20463=>1000,20464=>1000,20465=>1000,20466=>1000,20467=>1000,20468=>1000, - 20469=>1000,20470=>1000,20471=>1000,20472=>1000,20473=>1000,20474=>1000,20475=>1000,20476=>1000,20477=>1000,20478=>1000,20479=>1000,20480=>1000,20481=>1000,20482=>1000,20483=>1000,20484=>1000, - 20485=>1000,20486=>1000,20487=>1000,20488=>1000,20489=>1000,20490=>1000,20491=>1000,20492=>1000,20493=>1000,20494=>1000,20495=>1000,20496=>1000,20497=>1000,20498=>1000,20499=>1000,20500=>1000, - 20501=>1000,20502=>1000,20503=>1000,20504=>1000,20505=>1000,20506=>1000,20507=>1000,20508=>1000,20509=>1000,20510=>1000,20511=>1000,20512=>1000,20513=>1000,20514=>1000,20515=>1000,20516=>1000, - 20517=>1000,20518=>1000,20519=>1000,20520=>1000,20521=>1000,20522=>1000,20523=>1000,20524=>1000,20525=>1000,20526=>1000,20527=>1000,20528=>1000,20529=>1000,20530=>1000,20531=>1000,20532=>1000, - 20533=>1000,20534=>1000,20535=>1000,20536=>1000,20537=>1000,20538=>1000,20539=>1000,20540=>1000,20541=>1000,20542=>1000,20543=>1000,20544=>1000,20545=>1000,20546=>1000,20547=>1000,20548=>1000, - 20549=>1000,20550=>1000,20551=>1000,20552=>1000,20553=>1000,20554=>1000,20555=>1000,20556=>1000,20557=>1000,20558=>1000,20559=>1000,20560=>1000,20561=>1000,20562=>1000,20563=>1000,20564=>1000, - 20565=>1000,20566=>1000,20567=>1000,20568=>1000,20569=>1000,20570=>1000,20571=>1000,20572=>1000,20573=>1000,20574=>1000,20575=>1000,20576=>1000,20577=>1000,20578=>1000,20579=>1000,20580=>1000, - 20581=>1000,20582=>1000,20583=>1000,20584=>1000,20585=>1000,20586=>1000,20587=>1000,20588=>1000,20589=>1000,20590=>1000,20591=>1000,20592=>1000,20593=>1000,20594=>1000,20595=>1000,20596=>1000, - 20597=>1000,20598=>1000,20599=>1000,20600=>1000,20601=>1000,20602=>1000,20603=>1000,20604=>1000,20605=>1000,20606=>1000,20607=>1000,20608=>1000,20609=>1000,20610=>1000,20611=>1000,20612=>1000, - 20613=>1000,20614=>1000,20615=>1000,20616=>1000,20617=>1000,20618=>1000,20619=>1000,20620=>1000,20621=>1000,20622=>1000,20623=>1000,20624=>1000,20625=>1000,20626=>1000,20627=>1000,20628=>1000, - 20629=>1000,20630=>1000,20631=>1000,20632=>1000,20633=>1000,20634=>1000,20635=>1000,20636=>1000,20637=>1000,20638=>1000,20639=>1000,20640=>1000,20641=>1000,20642=>1000,20643=>1000,20644=>1000, - 20645=>1000,20646=>1000,20647=>1000,20648=>1000,20649=>1000,20650=>1000,20651=>1000,20652=>1000,20653=>1000,20654=>1000,20655=>1000,20656=>1000,20657=>1000,20658=>1000,20659=>1000,20660=>1000, - 20661=>1000,20662=>1000,20663=>1000,20664=>1000,20665=>1000,20666=>1000,20667=>1000,20668=>1000,20669=>1000,20670=>1000,20671=>1000,20672=>1000,20673=>1000,20674=>1000,20675=>1000,20676=>1000, - 20677=>1000,20678=>1000,20679=>1000,20680=>1000,20681=>1000,20682=>1000,20683=>1000,20684=>1000,20685=>1000,20686=>1000,20687=>1000,20688=>1000,20689=>1000,20690=>1000,20691=>1000,20692=>1000, - 20693=>1000,20694=>1000,20695=>1000,20696=>1000,20697=>1000,20698=>1000,20699=>1000,20700=>1000,20701=>1000,20702=>1000,20703=>1000,20704=>1000,20705=>1000,20706=>1000,20707=>1000,20708=>1000, - 20709=>1000,20710=>1000,20711=>1000,20712=>1000,20713=>1000,20714=>1000,20715=>1000,20716=>1000,20717=>1000,20718=>1000,20719=>1000,20720=>1000,20721=>1000,20722=>1000,20723=>1000,20724=>1000, - 20725=>1000,20726=>1000,20727=>1000,20728=>1000,20729=>1000,20730=>1000,20731=>1000,20732=>1000,20733=>1000,20734=>1000,20735=>1000,20736=>1000,20737=>1000,20738=>1000,20739=>1000,20740=>1000, - 20741=>1000,20742=>1000,20743=>1000,20744=>1000,20745=>1000,20746=>1000,20747=>1000,20748=>1000,20749=>1000,20750=>1000,20751=>1000,20752=>1000,20753=>1000,20754=>1000,20755=>1000,20756=>1000, - 20757=>1000,20758=>1000,20759=>1000,20760=>1000,20761=>1000,20762=>1000,20763=>1000,20764=>1000,20765=>1000,20766=>1000,20767=>1000,20768=>1000,20769=>1000,20770=>1000,20771=>1000,20772=>1000, - 20773=>1000,20774=>1000,20775=>1000,20776=>1000,20777=>1000,20778=>1000,20779=>1000,20780=>1000,20781=>1000,20782=>1000,20783=>1000,20784=>1000,20785=>1000,20786=>1000,20787=>1000,20788=>1000, - 20789=>1000,20790=>1000,20791=>1000,20792=>1000,20793=>1000,20794=>1000,20795=>1000,20796=>1000,20797=>1000,20798=>1000,20799=>1000,20800=>1000,20801=>1000,20802=>1000,20803=>1000,20804=>1000, - 20805=>1000,20806=>1000,20807=>1000,20808=>1000,20809=>1000,20810=>1000,20811=>1000,20812=>1000,20813=>1000,20814=>1000,20815=>1000,20816=>1000,20817=>1000,20818=>1000,20819=>1000,20820=>1000, - 20821=>1000,20822=>1000,20823=>1000,20824=>1000,20825=>1000,20826=>1000,20827=>1000,20828=>1000,20829=>1000,20830=>1000,20831=>1000,20832=>1000,20833=>1000,20834=>1000,20835=>1000,20836=>1000, - 20837=>1000,20838=>1000,20839=>1000,20840=>1000,20841=>1000,20842=>1000,20843=>1000,20844=>1000,20845=>1000,20846=>1000,20847=>1000,20848=>1000,20849=>1000,20850=>1000,20851=>1000,20852=>1000, - 20853=>1000,20854=>1000,20855=>1000,20856=>1000,20857=>1000,20858=>1000,20859=>1000,20860=>1000,20861=>1000,20862=>1000,20863=>1000,20864=>1000,20865=>1000,20866=>1000,20867=>1000,20868=>1000, - 20869=>1000,20870=>1000,20871=>1000,20872=>1000,20873=>1000,20874=>1000,20875=>1000,20876=>1000,20877=>1000,20878=>1000,20879=>1000,20880=>1000,20881=>1000,20882=>1000,20883=>1000,20884=>1000, - 20885=>1000,20886=>1000,20887=>1000,20888=>1000,20889=>1000,20890=>1000,20891=>1000,20892=>1000,20893=>1000,20894=>1000,20895=>1000,20896=>1000,20897=>1000,20898=>1000,20899=>1000,20900=>1000, - 20901=>1000,20902=>1000,20903=>1000,20904=>1000,20905=>1000,20906=>1000,20907=>1000,20908=>1000,20909=>1000,20910=>1000,20911=>1000,20912=>1000,20913=>1000,20914=>1000,20915=>1000,20916=>1000, - 20917=>1000,20918=>1000,20919=>1000,20920=>1000,20921=>1000,20922=>1000,20923=>1000,20924=>1000,20925=>1000,20926=>1000,20927=>1000,20928=>1000,20929=>1000,20930=>1000,20931=>1000,20932=>1000, - 20933=>1000,20934=>1000,20935=>1000,20936=>1000,20937=>1000,20938=>1000,20939=>1000,20940=>1000,20941=>1000,20942=>1000,20943=>1000,20944=>1000,20945=>1000,20946=>1000,20947=>1000,20948=>1000, - 20949=>1000,20950=>1000,20951=>1000,20952=>1000,20953=>1000,20954=>1000,20955=>1000,20956=>1000,20957=>1000,20958=>1000,20959=>1000,20960=>1000,20961=>1000,20962=>1000,20963=>1000,20964=>1000, - 20965=>1000,20966=>1000,20967=>1000,20968=>1000,20969=>1000,20970=>1000,20971=>1000,20972=>1000,20973=>1000,20974=>1000,20975=>1000,20976=>1000,20977=>1000,20978=>1000,20979=>1000,20980=>1000, - 20981=>1000,20982=>1000,20983=>1000,20984=>1000,20985=>1000,20986=>1000,20987=>1000,20988=>1000,20989=>1000,20990=>1000,20991=>1000,20992=>1000,20993=>1000,20994=>1000,20995=>1000,20996=>1000, - 20997=>1000,20998=>1000,20999=>1000,21000=>1000,21001=>1000,21002=>1000,21003=>1000,21004=>1000,21005=>1000,21006=>1000,21007=>1000,21008=>1000,21009=>1000,21010=>1000,21011=>1000,21012=>1000, - 21013=>1000,21014=>1000,21015=>1000,21016=>1000,21017=>1000,21018=>1000,21019=>1000,21020=>1000,21021=>1000,21022=>1000,21023=>1000,21024=>1000,21025=>1000,21026=>1000,21027=>1000,21028=>1000, - 21029=>1000,21030=>1000,21031=>1000,21032=>1000,21033=>1000,21034=>1000,21035=>1000,21036=>1000,21037=>1000,21038=>1000,21039=>1000,21040=>1000,21041=>1000,21042=>1000,21043=>1000,21044=>1000, - 21045=>1000,21046=>1000,21047=>1000,21048=>1000,21049=>1000,21050=>1000,21051=>1000,21052=>1000,21053=>1000,21054=>1000,21055=>1000,21056=>1000,21057=>1000,21058=>1000,21059=>1000,21060=>1000, - 21061=>1000,21062=>1000,21063=>1000,21064=>1000,21065=>1000,21066=>1000,21067=>1000,21068=>1000,21069=>1000,21070=>1000,21071=>1000,21072=>1000,21073=>1000,21074=>1000,21075=>1000,21076=>1000, - 21077=>1000,21078=>1000,21079=>1000,21080=>1000,21081=>1000,21082=>1000,21083=>1000,21084=>1000,21085=>1000,21086=>1000,21087=>1000,21088=>1000,21089=>1000,21090=>1000,21091=>1000,21092=>1000, - 21093=>1000,21094=>1000,21095=>1000,21096=>1000,21097=>1000,21098=>1000,21099=>1000,21100=>1000,21101=>1000,21102=>1000,21103=>1000,21104=>1000,21105=>1000,21106=>1000,21107=>1000,21108=>1000, - 21109=>1000,21110=>1000,21111=>1000,21112=>1000,21113=>1000,21114=>1000,21115=>1000,21116=>1000,21117=>1000,21118=>1000,21119=>1000,21120=>1000,21121=>1000,21122=>1000,21123=>1000,21124=>1000, - 21125=>1000,21126=>1000,21127=>1000,21128=>1000,21129=>1000,21130=>1000,21131=>1000,21132=>1000,21133=>1000,21134=>1000,21135=>1000,21136=>1000,21137=>1000,21138=>1000,21139=>1000,21140=>1000, - 21141=>1000,21142=>1000,21143=>1000,21144=>1000,21145=>1000,21146=>1000,21147=>1000,21148=>1000,21149=>1000,21150=>1000,21151=>1000,21152=>1000,21153=>1000,21154=>1000,21155=>1000,21156=>1000, - 21157=>1000,21158=>1000,21159=>1000,21160=>1000,21161=>1000,21162=>1000,21163=>1000,21164=>1000,21165=>1000,21166=>1000,21167=>1000,21168=>1000,21169=>1000,21170=>1000,21171=>1000,21172=>1000, - 21173=>1000,21174=>1000,21175=>1000,21176=>1000,21177=>1000,21178=>1000,21179=>1000,21180=>1000,21181=>1000,21182=>1000,21183=>1000,21184=>1000,21185=>1000,21186=>1000,21187=>1000,21188=>1000, - 21189=>1000,21190=>1000,21191=>1000,21192=>1000,21193=>1000,21194=>1000,21195=>1000,21196=>1000,21197=>1000,21198=>1000,21199=>1000,21200=>1000,21201=>1000,21202=>1000,21203=>1000,21204=>1000, - 21205=>1000,21206=>1000,21207=>1000,21208=>1000,21209=>1000,21210=>1000,21211=>1000,21212=>1000,21213=>1000,21214=>1000,21215=>1000,21216=>1000,21217=>1000,21218=>1000,21219=>1000,21220=>1000, - 21221=>1000,21222=>1000,21223=>1000,21224=>1000,21225=>1000,21226=>1000,21227=>1000,21228=>1000,21229=>1000,21230=>1000,21231=>1000,21232=>1000,21233=>1000,21234=>1000,21235=>1000,21236=>1000, - 21237=>1000,21238=>1000,21239=>1000,21240=>1000,21241=>1000,21242=>1000,21243=>1000,21244=>1000,21245=>1000,21246=>1000,21247=>1000,21248=>1000,21249=>1000,21250=>1000,21251=>1000,21252=>1000, - 21253=>1000,21254=>1000,21255=>1000,21256=>1000,21257=>1000,21258=>1000,21259=>1000,21260=>1000,21261=>1000,21262=>1000,21263=>1000,21264=>1000,21265=>1000,21266=>1000,21267=>1000,21268=>1000, - 21269=>1000,21270=>1000,21271=>1000,21272=>1000,21273=>1000,21274=>1000,21275=>1000,21276=>1000,21277=>1000,21278=>1000,21279=>1000,21280=>1000,21281=>1000,21282=>1000,21283=>1000,21284=>1000, - 21285=>1000,21286=>1000,21287=>1000,21288=>1000,21289=>1000,21290=>1000,21291=>1000,21292=>1000,21293=>994,21294=>1000,21295=>1000,21296=>1000,21297=>1000,21298=>1000,21299=>1000,21300=>1000, - 21301=>1000,21302=>1000,21303=>1000,21304=>1000,21305=>1000,21306=>1000,21307=>1000,21308=>1000,21309=>1000,21310=>1000,21311=>1000,21312=>1000,21313=>1000,21314=>1000,21315=>1000,21316=>1000, - 21317=>1000,21318=>1000,21319=>1000,21320=>1000,21321=>1000,21322=>1000,21323=>1000,21324=>1000,21325=>1000,21326=>1000,21327=>1000,21328=>1000,21329=>1000,21330=>1000,21331=>1000,21332=>1000, - 21333=>1000,21334=>1000,21335=>1000,21336=>1000,21337=>1000,21338=>1000,21339=>1000,21340=>1000,21341=>1000,21342=>1000,21343=>1000,21344=>1000,21345=>1000,21346=>1000,21347=>1000,21348=>1000, - 21349=>1000,21350=>1000,21351=>1000,21352=>1000,21353=>1000,21354=>1000,21355=>1000,21356=>1000,21357=>1000,21358=>1000,21359=>1000,21360=>1000,21361=>1000,21362=>1000,21363=>1000,21364=>1000, - 21365=>1000,21366=>1000,21367=>1000,21368=>1000,21369=>1000,21370=>1000,21371=>1000,21372=>1000,21373=>1000,21374=>1000,21375=>1000,21376=>1000,21377=>1000,21378=>1000,21379=>1000,21380=>1000, - 21381=>1000,21382=>1000,21383=>1000,21384=>1000,21385=>1000,21386=>1000,21387=>1000,21388=>1000,21389=>1000,21390=>1000,21391=>1000,21392=>1000,21393=>1000,21394=>1000,21395=>1000,21396=>1000, - 21397=>1000,21398=>1000,21399=>1000,21400=>1000,21401=>1000,21402=>1000,21403=>1000,21404=>1000,21405=>1000,21406=>1000,21407=>1000,21408=>1000,21409=>1000,21410=>1000,21411=>1000,21412=>1000, - 21413=>1000,21414=>1000,21415=>1000,21416=>1000,21417=>1000,21418=>1000,21419=>1000,21420=>1000,21421=>1000,21422=>1000,21423=>1000,21424=>1000,21425=>1000,21426=>1000,21427=>1000,21428=>1000, - 21429=>1000,21430=>1000,21431=>1000,21432=>1000,21433=>1000,21434=>1000,21435=>1000,21436=>1000,21437=>1000,21438=>1000,21439=>1000,21440=>1000,21441=>1000,21442=>1000,21443=>1000,21444=>1000, - 21445=>1000,21446=>1000,21447=>1000,21448=>1000,21449=>1000,21450=>1000,21451=>1000,21452=>1000,21453=>1000,21454=>1000,21455=>1000,21456=>1000,21457=>1000,21458=>1000,21459=>1000,21460=>1000, - 21461=>1000,21462=>1000,21463=>1000,21464=>1000,21465=>1000,21466=>1000,21467=>1000,21468=>1000,21469=>1000,21470=>1000,21471=>1000,21472=>1000,21473=>1000,21474=>1000,21475=>1000,21476=>1000, - 21477=>1000,21478=>1000,21479=>1000,21480=>1000,21481=>1000,21482=>1000,21483=>1000,21484=>1000,21485=>1000,21486=>1000,21487=>1000,21488=>1000,21489=>1000,21490=>1000,21491=>1000,21492=>1000, - 21493=>1000,21494=>1000,21495=>1000,21496=>1000,21497=>1000,21498=>1000,21499=>1000,21500=>1000,21501=>1000,21502=>1000,21503=>1000,21504=>1000,21505=>1000,21506=>1000,21507=>1000,21508=>1000, - 21509=>1000,21510=>1000,21511=>1000,21512=>1000,21513=>1000,21514=>1000,21515=>1000,21516=>1000,21517=>1000,21518=>1000,21519=>1000,21520=>1000,21521=>1000,21522=>1000,21523=>1000,21524=>1000, - 21525=>1000,21526=>1000,21527=>1000,21528=>1000,21529=>1000,21530=>1000,21531=>1000,21532=>1000,21533=>1000,21534=>1000,21535=>1000,21536=>1000,21537=>1000,21538=>1000,21539=>1000,21540=>1000, - 21541=>1000,21542=>1000,21543=>1000,21544=>1000,21545=>1000,21546=>1000,21547=>1000,21548=>1000,21549=>1000,21550=>1000,21551=>1000,21552=>1000,21553=>1000,21554=>1000,21555=>1000,21556=>1000, - 21557=>1000,21558=>1000,21559=>1000,21560=>1000,21561=>1000,21562=>1000,21563=>1000,21564=>1000,21565=>1000,21566=>1000,21567=>1000,21568=>1000,21569=>1000,21570=>1000,21571=>1000,21572=>1000, - 21573=>1000,21574=>1000,21575=>1000,21576=>1000,21577=>1000,21578=>1000,21579=>1000,21580=>1000,21581=>1000,21582=>1000,21583=>1000,21584=>1000,21585=>1000,21586=>1000,21587=>1000,21588=>1000, - 21589=>1000,21590=>1000,21591=>1000,21592=>1000,21593=>1000,21594=>1000,21595=>1000,21596=>1000,21597=>1000,21598=>1000,21599=>1000,21600=>1000,21601=>1000,21602=>1000,21603=>1000,21604=>1000, - 21605=>1000,21606=>1000,21607=>1000,21608=>1000,21609=>1000,21610=>1000,21611=>1000,21612=>1000,21613=>1000,21614=>1000,21615=>1000,21616=>1000,21617=>1000,21618=>1000,21619=>1000,21620=>1000, - 21621=>1000,21622=>1000,21623=>1000,21624=>1000,21625=>1000,21626=>1000,21627=>1000,21628=>1000,21629=>1000,21630=>1000,21631=>1000,21632=>1000,21633=>1000,21634=>1000,21635=>1000,21636=>1000, - 21637=>1000,21638=>1000,21639=>1000,21640=>1000,21641=>1000,21642=>1000,21643=>1000,21644=>1000,21645=>1000,21646=>1000,21647=>1000,21648=>1000,21649=>1000,21650=>1000,21651=>1000,21652=>1000, - 21653=>1000,21654=>1000,21655=>1000,21656=>1000,21657=>1000,21658=>1000,21659=>1000,21660=>1000,21661=>1000,21662=>1000,21663=>1000,21664=>1000,21665=>1000,21666=>1000,21667=>1000,21668=>1000, - 21669=>1000,21670=>1000,21671=>1000,21672=>1000,21673=>1000,21674=>1000,21675=>1000,21676=>1000,21677=>1000,21678=>1000,21679=>1000,21680=>1000,21681=>1000,21682=>1000,21683=>1000,21684=>1000, - 21685=>1000,21686=>1000,21687=>1000,21688=>1000,21689=>1000,21690=>1000,21691=>1000,21692=>1000,21693=>1000,21694=>1000,21695=>1000,21696=>1000,21697=>1000,21698=>1000,21699=>1000,21700=>1000, - 21701=>1000,21702=>1000,21703=>1000,21704=>1000,21705=>1000,21706=>1000,21707=>1000,21708=>1000,21709=>1000,21710=>1000,21711=>1000,21712=>1000,21713=>1000,21714=>1000,21715=>1000,21716=>1000, - 21717=>1000,21718=>1000,21719=>1000,21720=>1000,21721=>1000,21722=>1000,21723=>1000,21724=>1000,21725=>1000,21726=>1000,21727=>1000,21728=>1000,21729=>1000,21730=>1000,21731=>1000,21732=>1000, - 21733=>1000,21734=>1000,21735=>1000,21736=>1000,21737=>1000,21738=>1000,21739=>1000,21740=>1000,21741=>1000,21742=>1000,21743=>1000,21744=>1000,21745=>1000,21746=>1000,21747=>1000,21748=>1000, - 21749=>1000,21750=>1000,21751=>1000,21752=>1000,21753=>1000,21754=>1000,21755=>1000,21756=>1000,21757=>1000,21758=>1000,21759=>1000,21760=>1000,21761=>1000,21762=>1000,21763=>1000,21764=>1000, - 21765=>1000,21766=>1000,21767=>1000,21768=>1000,21769=>1000,21770=>1000,21771=>1000,21772=>1000,21773=>1000,21774=>1000,21775=>1000,21776=>1000,21777=>1000,21778=>1000,21779=>1000,21780=>1000, - 21781=>1000,21782=>1000,21783=>1000,21784=>1000,21785=>1000,21786=>1000,21787=>1000,21788=>1000,21789=>1000,21790=>1000,21791=>1000,21792=>1000,21793=>1000,21794=>1000,21795=>1000,21796=>1000, - 21797=>1000,21798=>1000,21799=>1000,21800=>1000,21801=>1000,21802=>1000,21803=>1000,21804=>1000,21805=>1000,21806=>1000,21807=>1000,21808=>1000,21809=>1000,21810=>1000,21811=>1000,21812=>1000, - 21813=>1000,21814=>1000,21815=>1000,21816=>1000,21817=>1000,21818=>1000,21819=>1000,21820=>1000,21821=>1000,21822=>1000,21823=>1000,21824=>1000,21825=>1000,21826=>1000,21827=>1000,21828=>1000, - 21829=>1000,21830=>1000,21831=>1000,21832=>1000,21833=>1000,21834=>1000,21835=>1000,21836=>1000,21837=>1000,21838=>1000,21839=>1000,21840=>1000,21841=>1000,21842=>1000,21843=>1000,21844=>1000, - 21845=>1000,21846=>1000,21847=>1000,21848=>1000,21849=>1000,21850=>1000,21851=>1000,21852=>1000,21853=>1000,21854=>1000,21855=>1000,21856=>1000,21857=>1000,21858=>1000,21859=>1000,21860=>1000, - 21861=>1000,21862=>1000,21863=>1000,21864=>1000,21865=>1000,21866=>1000,21867=>1000,21868=>1000,21869=>1000,21870=>1000,21871=>1000,21872=>1000,21873=>1000,21874=>1000,21875=>1000,21876=>1000, - 21877=>1000,21878=>1000,21879=>1000,21880=>1000,21881=>1000,21882=>1000,21883=>1000,21884=>1000,21885=>1000,21886=>1000,21887=>1000,21888=>1000,21889=>1000,21890=>1000,21891=>1000,21892=>1000, - 21893=>1000,21894=>1000,21895=>1000,21896=>1000,21897=>1000,21898=>1000,21899=>1000,21900=>1000,21901=>1000,21902=>1000,21903=>1000,21904=>1000,21905=>1000,21906=>1000,21907=>1000,21908=>1000, - 21909=>1000,21910=>1000,21911=>1000,21912=>1000,21913=>1000,21914=>1000,21915=>1000,21916=>1000,21917=>1000,21918=>1000,21919=>1000,21920=>1000,21921=>1000,21922=>1000,21923=>1000,21924=>1000, - 21925=>1000,21926=>1000,21927=>1000,21928=>1000,21929=>1000,21930=>1000,21931=>1000,21932=>1000,21933=>1000,21934=>1000,21935=>1000,21936=>1000,21937=>1000,21938=>1000,21939=>1000,21940=>1000, - 21941=>1000,21942=>1000,21943=>1000,21944=>1000,21945=>1000,21946=>1000,21947=>1000,21948=>1000,21949=>1000,21950=>1000,21951=>1000,21952=>1000,21953=>1000,21954=>1000,21955=>1000,21956=>1000, - 21957=>1000,21958=>1000,21959=>1000,21960=>1000,21961=>1000,21962=>1000,21963=>1000,21964=>1000,21965=>1000,21966=>1000,21967=>1000,21968=>1000,21969=>1000,21970=>1000,21971=>1000,21972=>1000, - 21973=>1000,21974=>1000,21975=>1000,21976=>1000,21977=>1000,21978=>1000,21979=>1000,21980=>1000,21981=>1000,21982=>1000,21983=>1000,21984=>1000,21985=>1000,21986=>1000,21987=>1000,21988=>1000, - 21989=>1000,21990=>1000,21991=>1000,21992=>1000,21993=>1000,21994=>1000,21995=>1000,21996=>1000,21997=>1000,21998=>1000,21999=>1000,22000=>1000,22001=>1000,22002=>1000,22003=>1000,22004=>1000, - 22005=>1000,22006=>1000,22007=>1000,22008=>1000,22009=>1000,22010=>1000,22011=>1000,22012=>1000,22013=>1000,22014=>1000,22015=>1000,22016=>1000,22017=>1000,22018=>1000,22019=>1000,22020=>1000, - 22021=>1000,22022=>1000,22023=>1000,22024=>1000,22025=>1000,22026=>1000,22027=>1000,22028=>1000,22029=>1000,22030=>1000,22031=>1000,22032=>1000,22033=>1000,22034=>1000,22035=>1000,22036=>1000, - 22037=>1000,22038=>1000,22039=>1000,22040=>1000,22041=>1000,22042=>1000,22043=>1000,22044=>1000,22045=>1000,22046=>1000,22047=>1000,22048=>1000,22049=>1000,22050=>1000,22051=>1000,22052=>1000, - 22053=>1000,22054=>1000,22055=>1000,22056=>1000,22057=>1000,22058=>1000,22059=>1000,22060=>1000,22061=>1000,22062=>1000,22063=>1000,22064=>1000,22065=>1000,22066=>1000,22067=>1000,22068=>1000, - 22069=>1000,22070=>1000,22071=>1000,22072=>1000,22073=>1000,22074=>1000,22075=>1000,22076=>1000,22077=>1000,22078=>1000,22079=>1000,22080=>1000,22081=>1000,22082=>1000,22083=>1000,22084=>1000, - 22085=>1000,22086=>1000,22087=>1000,22088=>1000,22089=>1000,22090=>1000,22091=>1000,22092=>1000,22093=>1000,22094=>1000,22095=>1000,22096=>1000,22097=>1000,22098=>1000,22099=>1000,22100=>1000, - 22101=>1000,22102=>1000,22103=>1000,22104=>1000,22105=>1000,22106=>1000,22107=>1000,22108=>1000,22109=>1000,22110=>1000,22111=>1000,22112=>1000,22113=>1000,22114=>1000,22115=>1000,22116=>1000, - 22117=>1000,22118=>1000,22119=>1000,22120=>1000,22121=>1000,22122=>1000,22123=>1000,22124=>1000,22125=>1000,22126=>1000,22127=>1000,22128=>1000,22129=>1000,22130=>1000,22131=>1000,22132=>1000, - 22133=>1000,22134=>1000,22135=>1000,22136=>1000,22137=>1000,22138=>1000,22139=>1000,22140=>1000,22141=>1000,22142=>1000,22143=>1000,22144=>1000,22145=>1000,22146=>1000,22147=>1000,22148=>1000, - 22149=>1000,22150=>1000,22151=>1000,22152=>1000,22153=>1000,22154=>1000,22155=>1000,22156=>1000,22157=>1000,22158=>1000,22159=>1000,22160=>1000,22161=>1000,22162=>1000,22163=>1000,22164=>1000, - 22165=>1000,22166=>1000,22167=>1000,22168=>1000,22169=>1000,22170=>1000,22171=>1000,22172=>1000,22173=>1000,22174=>1000,22175=>1000,22176=>1000,22177=>1000,22178=>1000,22179=>1000,22180=>1000, - 22181=>1000,22182=>1000,22183=>1000,22184=>1000,22185=>1000,22186=>1000,22187=>1000,22188=>1000,22189=>1000,22190=>1000,22191=>1000,22192=>1000,22193=>1000,22194=>1000,22195=>1000,22196=>1000, - 22197=>1000,22198=>1000,22199=>1000,22200=>1000,22201=>1000,22202=>1000,22203=>1000,22204=>1000,22205=>1000,22206=>1000,22207=>1000,22208=>1000,22209=>1000,22210=>1000,22211=>1000,22212=>1000, - 22213=>1000,22214=>1000,22215=>1000,22216=>1000,22217=>1000,22218=>1000,22219=>1000,22220=>1000,22221=>1000,22222=>1000,22223=>1000,22224=>1000,22225=>1000,22226=>1000,22227=>1000,22228=>1000, - 22229=>1000,22230=>1000,22231=>1000,22232=>1000,22233=>1000,22234=>1000,22235=>1000,22236=>1000,22237=>1000,22238=>1000,22239=>1000,22240=>1000,22241=>1000,22242=>1000,22243=>1000,22244=>1000, - 22245=>1000,22246=>1000,22247=>1000,22248=>1000,22249=>1000,22250=>1000,22251=>1000,22252=>1000,22253=>1000,22254=>1000,22255=>1000,22256=>1000,22257=>1000,22258=>1000,22259=>1000,22260=>1000, - 22261=>1000,22262=>1000,22263=>1000,22264=>1000,22265=>1000,22266=>1000,22267=>1000,22268=>1000,22269=>1000,22270=>1000,22271=>1000,22272=>1000,22273=>1000,22274=>1000,22275=>1000,22276=>1000, - 22277=>1000,22278=>1000,22279=>1000,22280=>1000,22281=>1000,22282=>1000,22283=>1000,22284=>1000,22285=>1000,22286=>1000,22287=>1000,22288=>1000,22289=>1000,22290=>1000,22291=>1000,22292=>1000, - 22293=>1000,22294=>1000,22295=>1000,22296=>1000,22297=>1000,22298=>1000,22299=>1000,22300=>1000,22301=>1000,22302=>1000,22303=>1000,22304=>1000,22305=>1000,22306=>1000,22307=>1000,22308=>1000, - 22309=>1000,22310=>1000,22311=>1000,22312=>1000,22313=>1000,22314=>1000,22315=>1000,22316=>1000,22317=>1000,22318=>1000,22319=>1000,22320=>1000,22321=>1000,22322=>1000,22323=>1000,22324=>1000, - 22325=>1000,22326=>1000,22327=>1000,22328=>1000,22329=>1000,22330=>1000,22331=>1000,22332=>1000,22333=>1000,22334=>1000,22335=>1000,22336=>1000,22337=>1000,22338=>1000,22339=>1000,22340=>1000, - 22341=>1000,22342=>1000,22343=>1000,22344=>1000,22345=>1000,22346=>1000,22347=>1000,22348=>1000,22349=>1000,22350=>1000,22351=>1000,22352=>1000,22353=>1000,22354=>1000,22355=>1000,22356=>1000, - 22357=>1000,22358=>1000,22359=>1000,22360=>1000,22361=>1000,22362=>1000,22363=>1000,22364=>1000,22365=>1000,22366=>1000,22367=>1000,22368=>1000,22369=>1000,22370=>1000,22371=>1000,22372=>1000, - 22373=>1000,22374=>1000,22375=>1000,22376=>1000,22377=>1000,22378=>1000,22379=>1000,22380=>1000,22381=>1000,22382=>1000,22383=>1000,22384=>1000,22385=>1000,22386=>1000,22387=>1000,22388=>1000, - 22389=>1000,22390=>1000,22391=>1000,22392=>1000,22393=>1000,22394=>1000,22395=>1000,22396=>1000,22397=>1000,22398=>1000,22399=>1000,22400=>1000,22401=>1000,22402=>1000,22403=>1000,22404=>1000, - 22405=>1000,22406=>1000,22407=>1000,22408=>1000,22409=>1000,22410=>1000,22411=>1000,22412=>1000,22413=>1000,22414=>1000,22415=>1000,22416=>1000,22417=>1000,22418=>1000,22419=>1000,22420=>1000, - 22421=>1000,22422=>1000,22423=>1000,22424=>1000,22425=>1000,22426=>1000,22427=>1000,22428=>1000,22429=>1000,22430=>1000,22431=>1000,22432=>1000,22433=>1000,22434=>1000,22435=>1000,22436=>1000, - 22437=>1000,22438=>1000,22439=>1000,22440=>1000,22441=>1000,22442=>1000,22443=>1000,22444=>1000,22445=>1000,22446=>1000,22447=>1000,22448=>1000,22449=>1000,22450=>1000,22451=>1000,22452=>1000, - 22453=>1000,22454=>1000,22455=>1000,22456=>1000,22457=>1000,22458=>1000,22459=>1000,22460=>1000,22461=>1000,22462=>1000,22463=>1000,22464=>1000,22465=>1000,22466=>1000,22467=>1000,22468=>1000, - 22469=>1000,22470=>1000,22471=>1000,22472=>1000,22473=>1000,22474=>1000,22475=>1000,22476=>1000,22477=>1000,22478=>1000,22479=>1000,22480=>1000,22481=>1000,22482=>1000,22483=>1000,22484=>1000, - 22485=>1000,22486=>1000,22487=>1000,22488=>1000,22489=>1000,22490=>1000,22491=>1000,22492=>1000,22493=>1000,22494=>1000,22495=>1000,22496=>1000,22497=>1000,22498=>1000,22499=>1000,22500=>1000, - 22501=>1000,22502=>1000,22503=>1000,22504=>1000,22505=>1000,22506=>1000,22507=>1000,22508=>1000,22509=>1000,22510=>1000,22511=>1000,22512=>1000,22513=>1000,22514=>1000,22515=>1000,22516=>1000, - 22517=>1000,22518=>1000,22519=>1000,22520=>1000,22521=>1000,22522=>1000,22523=>1000,22524=>1000,22525=>1000,22526=>1000,22527=>1000,22528=>1000,22529=>1000,22530=>1000,22531=>1000,22532=>1000, - 22533=>1000,22534=>1000,22535=>1000,22536=>1000,22537=>1000,22538=>1000,22539=>1000,22540=>1000,22541=>1000,22542=>1000,22543=>1000,22544=>1000,22545=>1000,22546=>1000,22547=>1000,22548=>1000, - 22549=>1000,22550=>1000,22551=>1000,22552=>1000,22553=>1000,22554=>1000,22555=>1000,22556=>1000,22557=>1000,22558=>1000,22559=>1000,22560=>1000,22561=>1000,22562=>1000,22563=>1000,22564=>1000, - 22565=>1000,22566=>1000,22567=>1000,22568=>1000,22569=>1000,22570=>1000,22571=>1000,22572=>1000,22573=>1000,22574=>1000,22575=>1000,22576=>1000,22577=>1000,22578=>1000,22579=>1000,22580=>1000, - 22581=>1000,22582=>1000,22583=>1000,22584=>1000,22585=>1000,22586=>1000,22587=>1000,22588=>1000,22589=>1000,22590=>1000,22591=>1000,22592=>1000,22593=>1000,22594=>1000,22595=>1000,22596=>1000, - 22597=>1000,22598=>1000,22599=>1000,22600=>1000,22601=>1000,22602=>1000,22603=>1000,22604=>1000,22605=>1000,22606=>1000,22607=>1000,22608=>1000,22609=>1000,22610=>1000,22611=>1000,22612=>1000, - 22613=>1000,22614=>1000,22615=>1000,22616=>1000,22617=>1000,22618=>1000,22619=>1000,22620=>1000,22621=>1000,22622=>1000,22623=>1000,22624=>1000,22625=>1000,22626=>1000,22627=>1000,22628=>1000, - 22629=>1000,22630=>1000,22631=>1000,22632=>1000,22633=>1000,22634=>1000,22635=>1000,22636=>1000,22637=>1000,22638=>1000,22639=>1000,22640=>1000,22641=>1000,22642=>1000,22643=>1000,22644=>1000, - 22645=>1000,22646=>1000,22647=>1000,22648=>1000,22649=>1000,22650=>1000,22651=>1000,22652=>1000,22653=>1000,22654=>1000,22655=>1000,22656=>1000,22657=>1000,22658=>1000,22659=>1000,22660=>1000, - 22661=>1000,22662=>1000,22663=>1000,22664=>1000,22665=>1000,22666=>1000,22667=>1000,22668=>1000,22669=>1000,22670=>1000,22671=>1000,22672=>1000,22673=>1000,22674=>1000,22675=>1000,22676=>1000, - 22677=>1000,22678=>1000,22679=>1000,22680=>1000,22681=>1000,22682=>1000,22683=>1000,22684=>1000,22685=>1000,22686=>1000,22687=>1000,22688=>1000,22689=>1000,22690=>1000,22691=>1000,22692=>1000, - 22693=>1000,22694=>1000,22695=>1000,22696=>1000,22697=>1000,22698=>1000,22699=>1000,22700=>1000,22701=>1000,22702=>1000,22703=>1000,22704=>1000,22705=>1000,22706=>1000,22707=>1000,22708=>1000, - 22709=>1000,22710=>1000,22711=>1000,22712=>1000,22713=>1000,22714=>1000,22715=>1000,22716=>1000,22717=>1000,22718=>1000,22719=>1000,22720=>1000,22721=>1000,22722=>1000,22723=>1000,22724=>1000, - 22725=>1000,22726=>1000,22727=>1000,22728=>1000,22729=>1000,22730=>1000,22731=>1000,22732=>1000,22733=>1000,22734=>1000,22735=>1000,22736=>1000,22737=>1000,22738=>1000,22739=>1000,22740=>1000, - 22741=>1000,22742=>1000,22743=>1000,22744=>1000,22745=>1000,22746=>1000,22747=>1000,22748=>1000,22749=>1000,22750=>1000,22751=>1000,22752=>1000,22753=>1000,22754=>1000,22755=>1000,22756=>1000, - 22757=>1000,22758=>1000,22759=>1000,22760=>1000,22761=>1000,22762=>1000,22763=>1000,22764=>1000,22765=>1000,22766=>1000,22767=>1000,22768=>1000,22769=>1000,22770=>1000,22771=>1000,22772=>1000, - 22773=>1000,22774=>1000,22775=>1000,22776=>1000,22777=>1000,22778=>1000,22779=>1000,22780=>1000,22781=>1000,22782=>1000,22783=>1000,22784=>1000,22785=>1000,22786=>1000,22787=>1000,22788=>1000, - 22789=>1000,22790=>1000,22791=>1000,22792=>1000,22793=>1000,22794=>1000,22795=>1000,22796=>1000,22797=>1000,22798=>1000,22799=>1000,22800=>1000,22801=>1000,22802=>1000,22803=>1000,22804=>1000, - 22805=>1000,22806=>1000,22807=>1000,22808=>1000,22809=>1000,22810=>1000,22811=>1000,22812=>1000,22813=>1000,22814=>1000,22815=>1000,22816=>1000,22817=>1000,22818=>1000,22819=>1000,22820=>1000, - 22821=>1000,22822=>1000,22823=>1000,22824=>1000,22825=>1000,22826=>1000,22827=>1000,22828=>1000,22829=>1000,22830=>1000,22831=>1000,22832=>1000,22833=>1000,22834=>1000,22835=>1000,22836=>1000, - 22837=>1000,22838=>1000,22839=>1000,22840=>1000,22841=>1000,22842=>1000,22843=>1000,22844=>1000,22845=>1000,22846=>1000,22847=>1000,22848=>1000,22849=>1000,22850=>1000,22851=>1000,22852=>1000, - 22853=>1000,22854=>1000,22855=>1000,22856=>1000,22857=>1000,22858=>1000,22859=>1000,22860=>1000,22861=>1000,22862=>1000,22863=>1000,22864=>1000,22865=>1000,22866=>1000,22867=>1000,22868=>1000, - 22869=>1000,22870=>1000,22871=>1000,22872=>1000,22873=>1000,22874=>1000,22875=>1000,22876=>1000,22877=>1000,22878=>1000,22879=>1000,22880=>1000,22881=>1000,22882=>1000,22883=>1000,22884=>1000, - 22885=>1000,22886=>1000,22887=>1000,22888=>1000,22889=>1000,22890=>1000,22891=>1000,22892=>1000,22893=>1000,22894=>1000,22895=>1000,22896=>1000,22897=>1000,22898=>1000,22899=>1000,22900=>1000, - 22901=>1000,22902=>1000,22903=>1000,22904=>1000,22905=>1000,22906=>1000,22907=>1000,22908=>1000,22909=>1000,22910=>1000,22911=>1000,22912=>1000,22913=>1000,22914=>1000,22915=>1000,22916=>1000, - 22917=>1000,22918=>1000,22919=>1000,22920=>1000,22921=>1000,22922=>1000,22923=>1000,22924=>1000,22925=>1000,22926=>1000,22927=>1000,22928=>1000,22929=>1000,22930=>1000,22931=>1000,22932=>1000, - 22933=>1000,22934=>1000,22935=>1000,22936=>1000,22937=>1000,22938=>1000,22939=>1000,22940=>1000,22941=>1000,22942=>1000,22943=>1000,22944=>1000,22945=>1000,22946=>1000,22947=>1000,22948=>1000, - 22949=>1000,22950=>1000,22951=>1000,22952=>1000,22953=>1000,22954=>1000,22955=>1000,22956=>1000,22957=>1000,22958=>1000,22959=>1000,22960=>1000,22961=>1000,22962=>1000,22963=>1000,22964=>1000, - 22965=>1000,22966=>1000,22967=>1000,22968=>1000,22969=>1000,22970=>1000,22971=>1000,22972=>1000,22973=>1000,22974=>1000,22975=>1000,22976=>1000,22977=>1000,22978=>1000,22979=>1000,22980=>1000, - 22981=>1000,22982=>1000,22983=>1000,22984=>1000,22985=>1000,22986=>1000,22987=>1000,22988=>1000,22989=>1000,22990=>1000,22991=>1000,22992=>1000,22993=>1000,22994=>1000,22995=>1000,22996=>1000, - 22997=>1000,22998=>1000,22999=>1000,23000=>1000,23001=>1000,23002=>1000,23003=>1000,23004=>1000,23005=>1000,23006=>1000,23007=>1000,23008=>1000,23009=>1000,23010=>1000,23011=>1000,23012=>1000, - 23013=>1000,23014=>1000,23015=>1000,23016=>1000,23017=>1000,23018=>1000,23019=>1000,23020=>1000,23021=>1000,23022=>1000,23023=>1000,23024=>1000,23025=>1000,23026=>1000,23027=>1000,23028=>1000, - 23029=>1000,23030=>1000,23031=>1000,23032=>1000,23033=>1000,23034=>1000,23035=>1000,23036=>1000,23037=>1000,23038=>1000,23039=>1000,23040=>1000,23041=>1000,23042=>1000,23043=>1000,23044=>1000, - 23045=>1000,23046=>1000,23047=>1000,23048=>1000,23049=>1000,23050=>1000,23051=>1000,23052=>1000,23053=>1000,23054=>1000,23055=>1000,23056=>1000,23057=>1000,23058=>1000,23059=>1000,23060=>1000, - 23061=>1000,23062=>1000,23063=>1000,23064=>1000,23065=>1000,23066=>1000,23067=>1000,23068=>1000,23069=>1000,23070=>1000,23071=>1000,23072=>1000,23073=>1000,23074=>1000,23075=>1000,23076=>1000, - 23077=>1000,23078=>1000,23079=>1000,23080=>1000,23081=>1000,23082=>1000,23083=>1000,23084=>1000,23085=>1000,23086=>1000,23087=>1000,23088=>1000,23089=>1000,23090=>1000,23091=>1000,23092=>1000, - 23093=>1000,23094=>1000,23095=>1000,23096=>1000,23097=>1000,23098=>1000,23099=>1000,23100=>1000,23101=>1000,23102=>1000,23103=>1000,23104=>1000,23105=>1000,23106=>1000,23107=>1000,23108=>1000, - 23109=>1000,23110=>1000,23111=>1000,23112=>1000,23113=>1000,23114=>1000,23115=>1000,23116=>1000,23117=>1000,23118=>1000,23119=>1000,23120=>1000,23121=>1000,23122=>1000,23123=>1000,23124=>1000, - 23125=>1000,23126=>1000,23127=>1000,23128=>1000,23129=>1000,23130=>1000,23131=>1000,23132=>1000,23133=>1000,23134=>1000,23135=>1000,23136=>1000,23137=>1000,23138=>1000,23139=>1000,23140=>1000, - 23141=>1000,23142=>1000,23143=>1000,23144=>1000,23145=>1000,23146=>1000,23147=>1000,23148=>1000,23149=>1000,23150=>1000,23151=>1000,23152=>1000,23153=>1000,23154=>1000,23155=>1000,23156=>1000, - 23157=>1000,23158=>1000,23159=>1000,23160=>1000,23161=>1000,23162=>1000,23163=>1000,23164=>1000,23165=>1000,23166=>1000,23167=>1000,23168=>1000,23169=>1000,23170=>1000,23171=>1000,23172=>1000, - 23173=>1000,23174=>1000,23175=>1000,23176=>1000,23177=>1000,23178=>1000,23179=>1000,23180=>1000,23181=>1000,23182=>1000,23183=>1000,23184=>1000,23185=>1000,23186=>1000,23187=>1000,23188=>1000, - 23189=>1000,23190=>1000,23191=>1000,23192=>1000,23193=>1000,23194=>1000,23195=>1000,23196=>1000,23197=>1000,23198=>1000,23199=>1000,23200=>1000,23201=>1000,23202=>1000,23203=>1000,23204=>1000, - 23205=>1000,23206=>1000,23207=>1000,23208=>1000,23209=>1000,23210=>1000,23211=>1000,23212=>1000,23213=>1000,23214=>1000,23215=>1000,23216=>1000,23217=>1000,23218=>1000,23219=>1000,23220=>1000, - 23221=>1000,23222=>1000,23223=>1000,23224=>1000,23225=>1000,23226=>1000,23227=>1000,23228=>1000,23229=>1000,23230=>1000,23231=>1000,23232=>1000,23233=>1000,23234=>1000,23235=>1000,23236=>1000, - 23237=>1000,23238=>1000,23239=>1000,23240=>1000,23241=>1000,23242=>1000,23243=>1000,23244=>1000,23245=>1000,23246=>1000,23247=>1000,23248=>1000,23249=>1000,23250=>1000,23251=>1000,23252=>1000, - 23253=>1000,23254=>1000,23255=>1000,23256=>1000,23257=>1000,23258=>1000,23259=>1000,23260=>1000,23261=>1000,23262=>1000,23263=>1000,23264=>1000,23265=>1000,23266=>1000,23267=>1000,23268=>1000, - 23269=>1000,23270=>1000,23271=>1000,23272=>1000,23273=>1000,23274=>1000,23275=>1000,23276=>1000,23277=>1000,23278=>1000,23279=>1000,23280=>1000,23281=>1000,23282=>1000,23283=>1000,23284=>1000, - 23285=>1000,23286=>1000,23287=>1000,23288=>1000,23289=>1000,23290=>1000,23291=>1000,23292=>1000,23293=>1000,23294=>1000,23295=>1000,23296=>1000,23297=>1000,23298=>1000,23299=>1000,23300=>1000, - 23301=>1000,23302=>1000,23303=>1000,23304=>1000,23305=>1000,23306=>1000,23307=>1000,23308=>1000,23309=>1000,23310=>1000,23311=>1000,23312=>1000,23313=>1000,23314=>1000,23315=>1000,23316=>1000, - 23317=>1000,23318=>1000,23319=>1000,23320=>1000,23321=>1000,23322=>1000,23323=>1000,23324=>1000,23325=>1000,23326=>1000,23327=>1000,23328=>1000,23329=>1000,23330=>1000,23331=>1000,23332=>1000, - 23333=>1000,23334=>1000,23335=>1000,23336=>1000,23337=>1000,23338=>1000,23339=>1000,23340=>1000,23341=>1000,23342=>1000,23343=>1000,23344=>1000,23345=>1000,23346=>1000,23347=>1000,23348=>1000, - 23349=>1000,23350=>1000,23351=>1000,23352=>1000,23353=>1000,23354=>1000,23355=>1000,23356=>1000,23357=>1000,23358=>1000,23359=>1000,23360=>1000,23361=>1000,23362=>1000,23363=>1000,23364=>1000, - 23365=>1000,23366=>1000,23367=>1000,23368=>1000,23369=>1000,23370=>1000,23371=>1000,23372=>1000,23373=>1000,23374=>1000,23375=>1000,23376=>1000,23377=>1000,23378=>1000,23379=>1000,23380=>1000, - 23381=>1000,23382=>1000,23383=>1000,23384=>1000,23385=>1000,23386=>1000,23387=>1000,23388=>1000,23389=>1000,23390=>1000,23391=>1000,23392=>1000,23393=>1000,23394=>1000,23395=>1000,23396=>1000, - 23397=>1000,23398=>1000,23399=>1000,23400=>1000,23401=>1000,23402=>1000,23403=>1000,23404=>1000,23405=>1000,23406=>1000,23407=>1000,23408=>1000,23409=>1000,23410=>1000,23411=>1000,23412=>1000, - 23413=>1000,23414=>1000,23415=>1000,23416=>1000,23417=>1000,23418=>1000,23419=>1000,23420=>1000,23421=>1000,23422=>1000,23423=>1000,23424=>1000,23425=>1000,23426=>1000,23427=>1000,23428=>1000, - 23429=>1000,23430=>1000,23431=>1000,23432=>1000,23433=>1000,23434=>1000,23435=>1000,23436=>1000,23437=>1000,23438=>1000,23439=>1000,23440=>1000,23441=>1000,23442=>1000,23443=>1000,23444=>1000, - 23445=>1000,23446=>1000,23447=>1000,23448=>1000,23449=>1000,23450=>1000,23451=>1000,23452=>1000,23453=>1000,23454=>1000,23455=>1000,23456=>1000,23457=>1000,23458=>1000,23459=>1000,23460=>1000, - 23461=>1000,23462=>1000,23463=>1000,23464=>1000,23465=>1000,23466=>1000,23467=>1000,23468=>1000,23469=>1000,23470=>1000,23471=>1000,23472=>1000,23473=>1000,23474=>1000,23475=>1000,23476=>1000, - 23477=>1000,23478=>1000,23479=>1000,23480=>1000,23481=>1000,23482=>1000,23483=>1000,23484=>1000,23485=>1000,23486=>1000,23487=>1000,23488=>1000,23489=>1000,23490=>1000,23491=>1000,23492=>1000, - 23493=>1000,23494=>1000,23495=>1000,23496=>1000,23497=>1000,23498=>1000,23499=>1000,23500=>1000,23501=>1000,23502=>1000,23503=>1000,23504=>1000,23505=>1000,23506=>1000,23507=>1000,23508=>1000, - 23509=>1000,23510=>1000,23511=>1000,23512=>1000,23513=>1000,23514=>1000,23515=>1000,23516=>1000,23517=>1000,23518=>1000,23519=>1000,23520=>1000,23521=>1000,23522=>1000,23523=>1000,23524=>1000, - 23525=>1000,23526=>1000,23527=>1000,23528=>1000,23529=>1000,23530=>1000,23531=>1000,23532=>1000,23533=>1000,23534=>1000,23535=>1000,23536=>1000,23537=>1000,23538=>1000,23539=>1000,23540=>1000, - 23541=>1000,23542=>1000,23543=>1000,23544=>1000,23545=>1000,23546=>1000,23547=>1000,23548=>1000,23549=>1000,23550=>1000,23551=>1000,23552=>1000,23553=>1000,23554=>1000,23555=>1000,23556=>1000, - 23557=>1000,23558=>1000,23559=>1000,23560=>1000,23561=>1000,23562=>1000,23563=>1000,23564=>1000,23565=>1000,23566=>1000,23567=>1000,23568=>1000,23569=>1000,23570=>1000,23571=>1000,23572=>1000, - 23573=>1000,23574=>1000,23575=>1000,23576=>1000,23577=>1000,23578=>1000,23579=>1000,23580=>1000,23581=>1000,23582=>1000,23583=>1000,23584=>1000,23585=>1000,23586=>1000,23587=>1000,23588=>1000, - 23589=>1000,23590=>1000,23591=>1000,23592=>1000,23593=>1000,23594=>1000,23595=>1000,23596=>1000,23597=>1000,23598=>1000,23599=>1000,23600=>1000,23601=>1000,23602=>1000,23603=>1000,23604=>1000, - 23605=>1000,23606=>1000,23607=>1000,23608=>1000,23609=>1000,23610=>1000,23611=>1000,23612=>1000,23613=>1000,23614=>1000,23615=>1000,23616=>1000,23617=>1000,23618=>1000,23619=>1000,23620=>1000, - 23621=>1000,23622=>1000,23623=>1000,23624=>1000,23625=>1000,23626=>1000,23627=>1000,23628=>1000,23629=>1000,23630=>1000,23631=>1000,23632=>1000,23633=>1000,23634=>1000,23635=>1000,23636=>1000, - 23637=>1000,23638=>1000,23639=>1000,23640=>1000,23641=>1000,23642=>1000,23643=>1000,23644=>1000,23645=>1000,23646=>1000,23647=>1000,23648=>1000,23649=>1000,23650=>1000,23651=>1000,23652=>1000, - 23653=>1000,23654=>1000,23655=>1000,23656=>1000,23657=>1000,23658=>1000,23659=>1000,23660=>1000,23661=>1000,23662=>1000,23663=>1000,23664=>1000,23665=>1000,23666=>1000,23667=>1000,23668=>1000, - 23669=>1000,23670=>1000,23671=>1000,23672=>1000,23673=>1000,23674=>1000,23675=>1000,23676=>1000,23677=>1000,23678=>1000,23679=>1000,23680=>1000,23681=>1000,23682=>1000,23683=>1000,23684=>1000, - 23685=>1000,23686=>1000,23687=>1000,23688=>1000,23689=>1000,23690=>1000,23691=>1000,23692=>1000,23693=>1000,23694=>1000,23695=>1000,23696=>1000,23697=>1000,23698=>1000,23699=>1000,23700=>1000, - 23701=>1000,23702=>1000,23703=>1000,23704=>1000,23705=>1000,23706=>1000,23707=>1000,23708=>1000,23709=>1000,23710=>1000,23711=>1000,23712=>1000,23713=>1000,23714=>1000,23715=>1000,23716=>1000, - 23717=>1000,23718=>1000,23719=>1000,23720=>1000,23721=>1000,23722=>1000,23723=>1000,23724=>1000,23725=>1000,23726=>1000,23727=>1000,23728=>1000,23729=>1000,23730=>1000,23731=>1000,23732=>1000, - 23733=>1000,23734=>1000,23735=>1000,23736=>1000,23737=>1000,23738=>1000,23739=>1000,23740=>1000,23741=>1000,23742=>1000,23743=>1000,23744=>1000,23745=>1000,23746=>1000,23747=>1000,23748=>1000, - 23749=>1000,23750=>1000,23751=>1000,23752=>1000,23753=>1000,23754=>1000,23755=>1000,23756=>1000,23757=>1000,23758=>1000,23759=>1000,23760=>1000,23761=>1000,23762=>1000,23763=>1000,23764=>1000, - 23765=>1000,23766=>1000,23767=>1000,23768=>1000,23769=>1000,23770=>1000,23771=>1000,23772=>1000,23773=>1000,23774=>1000,23775=>1000,23776=>1000,23777=>1000,23778=>1000,23779=>1000,23780=>1000, - 23781=>1000,23782=>1000,23783=>1000,23784=>1000,23785=>1000,23786=>1000,23787=>1000,23788=>1000,23789=>1000,23790=>1000,23791=>1000,23792=>1000,23793=>1000,23794=>1000,23795=>1000,23796=>1000, - 23797=>1000,23798=>1000,23799=>1000,23800=>1000,23801=>1000,23802=>1000,23803=>1000,23804=>1000,23805=>1000,23806=>1000,23807=>1000,23808=>1000,23809=>1000,23810=>1000,23811=>1000,23812=>1000, - 23813=>1000,23814=>1000,23815=>1000,23816=>1000,23817=>1000,23818=>1000,23819=>1000,23820=>1000,23821=>1000,23822=>1000,23823=>1000,23824=>1000,23825=>1000,23826=>1000,23827=>1000,23828=>1000, - 23829=>1000,23830=>1000,23831=>1000,23832=>1000,23833=>1000,23834=>1000,23835=>1000,23836=>1000,23837=>1000,23838=>1000,23839=>1000,23840=>1000,23841=>1000,23842=>1000,23843=>1000,23844=>1000, - 23845=>1000,23846=>1000,23847=>1000,23848=>1000,23849=>1000,23850=>1000,23851=>1000,23852=>1000,23853=>1000,23854=>1000,23855=>1000,23856=>1000,23857=>1000,23858=>1000,23859=>1000,23860=>1000, - 23861=>1000,23862=>1000,23863=>1000,23864=>1000,23865=>1000,23866=>1000,23867=>1000,23868=>1000,23869=>1000,23870=>1000,23871=>1000,23872=>1000,23873=>1000,23874=>1000,23875=>1000,23876=>1000, - 23877=>1000,23878=>1000,23879=>1000,23880=>1000,23881=>1000,23882=>1000,23883=>1000,23884=>1000,23885=>1000,23886=>1000,23887=>1000,23888=>1000,23889=>1000,23890=>1000,23891=>1000,23892=>1000, - 23893=>1000,23894=>1000,23895=>1000,23896=>1000,23897=>1000,23898=>1000,23899=>1000,23900=>1000,23901=>1000,23902=>1000,23903=>1000,23904=>1000,23905=>1000,23906=>1000,23907=>1000,23908=>1000, - 23909=>1000,23910=>1000,23911=>1000,23912=>1000,23913=>1000,23914=>1000,23915=>1000,23916=>1000,23917=>1000,23918=>1000,23919=>1000,23920=>1000,23921=>1000,23922=>1000,23923=>1000,23924=>1000, - 23925=>1000,23926=>1000,23927=>1000,23928=>1000,23929=>1000,23930=>1000,23931=>1000,23932=>1000,23933=>1000,23934=>1000,23935=>1000,23936=>1000,23937=>1000,23938=>1000,23939=>1000,23940=>1000, - 23941=>1000,23942=>1000,23943=>1000,23944=>1000,23945=>1000,23946=>1000,23947=>1000,23948=>1000,23949=>1000,23950=>1000,23951=>1000,23952=>1000,23953=>1000,23954=>1000,23955=>1000,23956=>1000, - 23957=>1000,23958=>1000,23959=>1000,23960=>1000,23961=>1000,23962=>1000,23963=>1000,23964=>1000,23965=>1000,23966=>1000,23967=>1000,23968=>1000,23969=>1000,23970=>1000,23971=>1000,23972=>1000, - 23973=>1000,23974=>1000,23975=>1000,23976=>1000,23977=>1000,23978=>1000,23979=>1000,23980=>1000,23981=>1000,23982=>1000,23983=>1000,23984=>1000,23985=>1000,23986=>1000,23987=>1000,23988=>1000, - 23989=>1000,23990=>1000,23991=>1000,23992=>1000,23993=>1000,23994=>1000,23995=>1000,23996=>1000,23997=>1000,23998=>1000,23999=>1000,24000=>1000,24001=>1000,24002=>1000,24003=>1000,24004=>1000, - 24005=>1000,24006=>1000,24007=>1000,24008=>1000,24009=>1000,24010=>1000,24011=>1000,24012=>1000,24013=>1000,24014=>1000,24015=>1000,24016=>1000,24017=>1000,24018=>1000,24019=>1000,24020=>1000, - 24021=>1000,24022=>1000,24023=>1000,24024=>1000,24025=>1000,24026=>1000,24027=>1000,24028=>1000,24029=>1000,24030=>1000,24031=>1000,24032=>1000,24033=>1000,24034=>1000,24035=>1000,24036=>1000, - 24037=>1000,24038=>1000,24039=>1000,24040=>1000,24041=>1000,24042=>1000,24043=>1000,24044=>1000,24045=>1000,24046=>1000,24047=>1000,24048=>1000,24049=>1000,24050=>1000,24051=>1000,24052=>1000, - 24053=>1000,24054=>1000,24055=>1000,24056=>1000,24057=>1000,24058=>1000,24059=>1000,24060=>1000,24061=>1000,24062=>1000,24063=>1000,24064=>1000,24065=>1000,24066=>1000,24067=>1000,24068=>1000, - 24069=>1000,24070=>1000,24071=>1000,24072=>1000,24073=>1000,24074=>1000,24075=>1000,24076=>1000,24077=>1000,24078=>1000,24079=>1000,24080=>1000,24081=>1000,24082=>1000,24083=>1000,24084=>1000, - 24085=>1000,24086=>1000,24087=>1000,24088=>1000,24089=>1000,24090=>1000,24091=>1000,24092=>1000,24093=>1000,24094=>1000,24095=>1000,24096=>1000,24097=>1000,24098=>1000,24099=>1000,24100=>1000, - 24101=>1000,24102=>1000,24103=>1000,24104=>1000,24105=>1000,24106=>1000,24107=>1000,24108=>1000,24109=>1000,24110=>1000,24111=>1000,24112=>1000,24113=>1000,24114=>1000,24115=>1000,24116=>1000, - 24117=>1000,24118=>1000,24119=>1000,24120=>1000,24121=>1000,24122=>1000,24123=>1000,24124=>1000,24125=>1000,24126=>1000,24127=>1000,24128=>1000,24129=>1000,24130=>1000,24131=>1000,24132=>1000, - 24133=>1000,24134=>1000,24135=>1000,24136=>1000,24137=>1000,24138=>1000,24139=>1000,24140=>1000,24141=>1000,24142=>1000,24143=>1000,24144=>1000,24145=>1000,24146=>1000,24147=>1000,24148=>1000, - 24149=>1000,24150=>1000,24151=>1000,24152=>1000,24153=>1000,24154=>1000,24155=>1000,24156=>1000,24157=>1000,24158=>1000,24159=>1000,24160=>1000,24161=>1000,24162=>1000,24163=>1000,24164=>1000, - 24165=>1000,24166=>1000,24167=>1000,24168=>1000,24169=>1000,24170=>1000,24171=>1000,24172=>1000,24173=>1000,24174=>1000,24175=>1000,24176=>1000,24177=>1000,24178=>1000,24179=>1000,24180=>1000, - 24181=>1000,24182=>1000,24183=>1000,24184=>1000,24185=>1000,24186=>1000,24187=>1000,24188=>1000,24189=>1000,24190=>1000,24191=>1000,24192=>1000,24193=>1000,24194=>1000,24195=>1000,24196=>1000, - 24197=>1000,24198=>1000,24199=>1000,24200=>1000,24201=>1000,24202=>1000,24203=>1000,24204=>1000,24205=>1000,24206=>1000,24207=>1000,24208=>1000,24209=>1000,24210=>1000,24211=>1000,24212=>1000, - 24213=>1000,24214=>1000,24215=>1000,24216=>1000,24217=>1000,24218=>1000,24219=>1000,24220=>1000,24221=>1000,24222=>1000,24223=>1000,24224=>1000,24225=>1000,24226=>1000,24227=>1000,24228=>1000, - 24229=>1000,24230=>1000,24231=>1000,24232=>1000,24233=>1000,24234=>1000,24235=>1000,24236=>1000,24237=>1000,24238=>1000,24239=>1000,24240=>1000,24241=>1000,24242=>1000,24243=>1000,24244=>1000, - 24245=>1000,24246=>1000,24247=>1000,24248=>1000,24249=>1000,24250=>1000,24251=>1000,24252=>1000,24253=>1000,24254=>1000,24255=>1000,24256=>1000,24257=>1000,24258=>1000,24259=>1000,24260=>1000, - 24261=>1000,24262=>1000,24263=>1000,24264=>1000,24265=>1000,24266=>1000,24267=>1000,24268=>1000,24269=>1000,24270=>1000,24271=>1000,24272=>1000,24273=>1000,24274=>1000,24275=>1000,24276=>1000, - 24277=>1000,24278=>1000,24279=>1000,24280=>1000,24281=>1000,24282=>1000,24283=>1000,24284=>1000,24285=>1000,24286=>1000,24287=>1000,24288=>1000,24289=>1000,24290=>1000,24291=>1000,24292=>1000, - 24293=>1000,24294=>1000,24295=>1000,24296=>1000,24297=>1000,24298=>1000,24299=>1000,24300=>1000,24301=>1000,24302=>1000,24303=>1000,24304=>1000,24305=>1000,24306=>1000,24307=>1000,24308=>1000, - 24309=>1000,24310=>1000,24311=>1000,24312=>1000,24313=>1000,24314=>1000,24315=>1000,24316=>1000,24317=>1000,24318=>1000,24319=>1000,24320=>1000,24321=>1000,24322=>1000,24323=>1000,24324=>1000, - 24325=>1000,24326=>1000,24327=>1000,24328=>1000,24329=>1000,24330=>1000,24331=>1000,24332=>1000,24333=>1000,24334=>1000,24335=>1000,24336=>1000,24337=>1000,24338=>1000,24339=>1000,24340=>1000, - 24341=>1000,24342=>1000,24343=>1000,24344=>1000,24345=>1000,24346=>1000,24347=>1000,24348=>1000,24349=>1000,24350=>1000,24351=>1000,24352=>1000,24353=>1000,24354=>1000,24355=>1000,24356=>1000, - 24357=>1000,24358=>1000,24359=>1000,24360=>1000,24361=>1000,24362=>1000,24363=>1000,24364=>1000,24365=>1000,24366=>1000,24367=>1000,24368=>1000,24369=>1000,24370=>1000,24371=>1000,24372=>1000, - 24373=>1000,24374=>1000,24375=>1000,24376=>1000,24377=>1000,24378=>1000,24379=>1000,24380=>1000,24381=>1000,24382=>1000,24383=>1000,24384=>1000,24385=>1000,24386=>1000,24387=>1000,24388=>1000, - 24389=>1000,24390=>1000,24391=>1000,24392=>1000,24393=>1000,24394=>1000,24395=>1000,24396=>1000,24397=>1000,24398=>1000,24399=>1000,24400=>1000,24401=>1000,24402=>1000,24403=>1000,24404=>1000, - 24405=>1000,24406=>1000,24407=>1000,24408=>1000,24409=>1000,24410=>1000,24411=>1000,24412=>1000,24413=>1000,24414=>1000,24415=>1000,24416=>1000,24417=>1000,24418=>1000,24419=>1000,24420=>1000, - 24421=>1000,24422=>1000,24423=>1000,24424=>1000,24425=>1000,24426=>1000,24427=>1000,24428=>1000,24429=>1000,24430=>1000,24431=>1000,24432=>1000,24433=>1000,24434=>1000,24435=>1000,24436=>1000, - 24437=>1000,24438=>1000,24439=>1000,24440=>1000,24441=>1000,24442=>1000,24443=>1000,24444=>1000,24445=>1000,24446=>1000,24447=>1000,24448=>1000,24449=>1000,24450=>1000,24451=>1000,24452=>1000, - 24453=>1000,24454=>1000,24455=>1000,24456=>1000,24457=>1000,24458=>1000,24459=>1000,24460=>1000,24461=>1000,24462=>1000,24463=>1000,24464=>1000,24465=>1000,24466=>1000,24467=>1000,24468=>1000, - 24469=>1000,24470=>1000,24471=>1000,24472=>1000,24473=>1000,24474=>1000,24475=>1000,24476=>1000,24477=>1000,24478=>1000,24479=>1000,24480=>1000,24481=>1000,24482=>1000,24483=>1000,24484=>1000, - 24485=>1000,24486=>1000,24487=>1000,24488=>1000,24489=>1000,24490=>1000,24491=>1000,24492=>1000,24493=>1000,24494=>1000,24495=>1000,24496=>1000,24497=>1000,24498=>1000,24499=>1000,24500=>1000, - 24501=>1000,24502=>1000,24503=>1000,24504=>1000,24505=>1000,24506=>1000,24507=>1000,24508=>1000,24509=>1000,24510=>1000,24511=>1000,24512=>1000,24513=>1000,24514=>1000,24515=>1000,24516=>1000, - 24517=>1000,24518=>1000,24519=>1000,24520=>1000,24521=>1000,24522=>1000,24523=>1000,24524=>1000,24525=>1000,24526=>1000,24527=>1000,24528=>1000,24529=>1000,24530=>1000,24531=>1000,24532=>1000, - 24533=>1000,24534=>1000,24535=>1000,24536=>1000,24537=>1000,24538=>1000,24539=>1000,24540=>1000,24541=>1000,24542=>1000,24543=>1000,24544=>1000,24545=>1000,24546=>1000,24547=>1000,24548=>1000, - 24549=>1000,24550=>1000,24551=>1000,24552=>1000,24553=>1000,24554=>1000,24555=>1000,24556=>1000,24557=>1000,24558=>1000,24559=>1000,24560=>1000,24561=>1000,24562=>1000,24563=>1000,24564=>1000, - 24565=>1000,24566=>1000,24567=>1000,24568=>1000,24569=>1000,24570=>1000,24571=>1000,24572=>1000,24573=>1000,24574=>1000,24575=>1000,24576=>1000,24577=>1000,24578=>1000,24579=>1000,24580=>1000, - 24581=>1000,24582=>1000,24583=>1000,24584=>1000,24585=>1000,24586=>1000,24587=>1000,24588=>1000,24589=>1000,24590=>1000,24591=>1000,24592=>1000,24593=>1000,24594=>1000,24595=>1000,24596=>1000, - 24597=>1000,24598=>1000,24599=>1000,24600=>1000,24601=>1000,24602=>1000,24603=>1000,24604=>1000,24605=>1000,24606=>1000,24607=>1000,24608=>1000,24609=>1000,24610=>1000,24611=>1000,24612=>1000, - 24613=>1000,24614=>1000,24615=>1000,24616=>1000,24617=>1000,24618=>1000,24619=>1000,24620=>1000,24621=>1000,24622=>1000,24623=>1000,24624=>1000,24625=>1000,24626=>1000,24627=>1000,24628=>1000, - 24629=>1000,24630=>1000,24631=>1000,24632=>1000,24633=>1000,24634=>1000,24635=>1000,24636=>1000,24637=>1000,24638=>1000,24639=>1000,24640=>1000,24641=>1000,24642=>1000,24643=>1000,24644=>1000, - 24645=>1000,24646=>1000,24647=>1000,24648=>1000,24649=>1000,24650=>1000,24651=>1000,24652=>1000,24653=>1000,24654=>1000,24655=>1000,24656=>1000,24657=>1000,24658=>1000,24659=>1000,24660=>1000, - 24661=>1000,24662=>1000,24663=>1000,24664=>1000,24665=>1000,24666=>1000,24667=>1000,24668=>1000,24669=>1000,24670=>1000,24671=>1000,24672=>1000,24673=>1000,24674=>1000,24675=>1000,24676=>1000, - 24677=>1000,24678=>1000,24679=>1000,24680=>1000,24681=>1000,24682=>1000,24683=>1000,24684=>1000,24685=>1000,24686=>1000,24687=>1000,24688=>1000,24689=>1000,24690=>1000,24691=>1000,24692=>1000, - 24693=>1000,24694=>1000,24695=>1000,24696=>1000,24697=>1000,24698=>1000,24699=>1000,24700=>1000,24701=>1000,24702=>1000,24703=>1000,24704=>1000,24705=>1000,24706=>1000,24707=>1000,24708=>1000, - 24709=>1000,24710=>1000,24711=>1000,24712=>1000,24713=>1000,24714=>1000,24715=>1000,24716=>1000,24717=>1000,24718=>1000,24719=>1000,24720=>1000,24721=>1000,24722=>1000,24723=>1000,24724=>1000, - 24725=>1000,24726=>1000,24727=>1000,24728=>1000,24729=>1000,24730=>1000,24731=>1000,24732=>1000,24733=>1000,24734=>1000,24735=>1000,24736=>1000,24737=>1000,24738=>1000,24739=>1000,24740=>1000, - 24741=>1000,24742=>1000,24743=>1000,24744=>1000,24745=>1000,24746=>1000,24747=>1000,24748=>1000,24749=>1000,24750=>1000,24751=>1000,24752=>1000,24753=>1000,24754=>1000,24755=>1000,24756=>1000, - 24757=>1000,24758=>1000,24759=>1000,24760=>1000,24761=>1000,24762=>1000,24763=>1000,24764=>1000,24765=>1000,24766=>1000,24767=>1000,24768=>1000,24769=>1000,24770=>1000,24771=>1000,24772=>1000, - 24773=>1000,24774=>1000,24775=>1000,24776=>1000,24777=>1000,24778=>1000,24779=>1000,24780=>1000,24781=>1000,24782=>1000,24783=>1000,24784=>1000,24785=>1000,24786=>1000,24787=>1000,24788=>1000, - 24789=>1000,24790=>1000,24791=>1000,24792=>1000,24793=>1000,24794=>1000,24795=>1000,24796=>1000,24797=>1000,24798=>1000,24799=>1000,24800=>1000,24801=>1000,24802=>1000,24803=>1000,24804=>1000, - 24805=>1000,24806=>1000,24807=>1000,24808=>1000,24809=>1000,24810=>1000,24811=>1000,24812=>1000,24813=>1000,24814=>1000,24815=>1000,24816=>1000,24817=>1000,24818=>1000,24819=>1000,24820=>1000, - 24821=>1000,24822=>1000,24823=>1000,24824=>1000,24825=>1000,24826=>1000,24827=>1000,24828=>1000,24829=>1000,24830=>1000,24831=>1000,24832=>1000,24833=>1000,24834=>1000,24835=>1000,24836=>1000, - 24837=>1000,24838=>1000,24839=>1000,24840=>1000,24841=>1000,24842=>1000,24843=>1000,24844=>1000,24845=>1000,24846=>1000,24847=>1000,24848=>1000,24849=>1000,24850=>1000,24851=>1000,24852=>1000, - 24853=>1000,24854=>1000,24855=>1000,24856=>1000,24857=>1000,24858=>1000,24859=>1000,24860=>1000,24861=>1000,24862=>1000,24863=>1000,24864=>1000,24865=>1000,24866=>1000,24867=>1000,24868=>1000, - 24869=>1000,24870=>1000,24871=>1000,24872=>1000,24873=>1000,24874=>1000,24875=>1000,24876=>1000,24877=>1000,24878=>1000,24879=>1000,24880=>1000,24881=>1000,24882=>1000,24883=>1000,24884=>1000, - 24885=>1000,24886=>1000,24887=>1000,24888=>1000,24889=>1000,24890=>1000,24891=>1000,24892=>1000,24893=>1000,24894=>1000,24895=>1000,24896=>1000,24897=>1000,24898=>1000,24899=>1000,24900=>1000, - 24901=>1000,24902=>1000,24903=>1000,24904=>1000,24905=>1000,24906=>1000,24907=>1000,24908=>1000,24909=>1000,24910=>1000,24911=>1000,24912=>1000,24913=>1000,24914=>1000,24915=>1000,24916=>1000, - 24917=>1000,24918=>1000,24919=>1000,24920=>1000,24921=>1000,24922=>1000,24923=>1000,24924=>1000,24925=>1000,24926=>1000,24927=>1000,24928=>1000,24929=>1000,24930=>1000,24931=>1000,24932=>1000, - 24933=>1000,24934=>1000,24935=>1000,24936=>1000,24937=>1000,24938=>1000,24939=>1000,24940=>1000,24941=>1000,24942=>1000,24943=>1000,24944=>1000,24945=>1000,24946=>1000,24947=>1000,24948=>1000, - 24949=>1000,24950=>1000,24951=>1000,24952=>1000,24953=>1000,24954=>1000,24955=>1000,24956=>1000,24957=>1000,24958=>1000,24959=>1000,24960=>1000,24961=>1001,24962=>1000,24963=>1000,24964=>1000, - 24965=>1000,24966=>1000,24967=>1000,24968=>1000,24969=>1000,24970=>1000,24971=>1000,24972=>1000,24973=>1000,24974=>1000,24975=>1000,24976=>1000,24977=>1000,24978=>1000,24979=>1000,24980=>1000, - 24981=>1000,24982=>1000,24983=>1000,24984=>1000,24985=>1000,24986=>1000,24987=>1000,24988=>1000,24989=>1000,24990=>1000,24991=>1000,24992=>1000,24993=>1000,24994=>1000,24995=>1000,24996=>1000, - 24997=>1000,24998=>1000,24999=>1000,25000=>1000,25001=>1000,25002=>1000,25003=>1000,25004=>1000,25005=>1000,25006=>1000,25007=>1000,25008=>1000,25009=>1000,25010=>1000,25011=>1000,25012=>1000, - 25013=>1000,25014=>1000,25015=>1000,25016=>1000,25017=>1000,25018=>1000,25019=>1000,25020=>1000,25021=>1000,25022=>1000,25023=>1000,25024=>1000,25025=>1000,25026=>1000,25027=>1000,25028=>1000, - 25029=>1000,25030=>1000,25031=>1000,25032=>1000,25033=>1000,25034=>1000,25035=>1000,25036=>1000,25037=>1000,25038=>1000,25039=>1000,25040=>1000,25041=>1000,25042=>1000,25043=>1000,25044=>1000, - 25045=>1000,25046=>1000,25047=>1000,25048=>1000,25049=>1000,25050=>1000,25051=>1000,25052=>1000,25053=>1000,25054=>1000,25055=>1000,25056=>1000,25057=>1000,25058=>1000,25059=>1000,25060=>1000, - 25061=>1000,25062=>1000,25063=>1000,25064=>1000,25065=>1000,25066=>1000,25067=>1000,25068=>1000,25069=>1000,25070=>1000,25071=>1000,25072=>1000,25073=>1000,25074=>1000,25075=>1000,25076=>1000, - 25077=>1000,25078=>1000,25079=>1000,25080=>1000,25081=>1000,25082=>1000,25083=>1000,25084=>1000,25085=>1000,25086=>1000,25087=>1000,25088=>1000,25089=>1000,25090=>1000,25091=>1000,25092=>1000, - 25093=>1000,25094=>1000,25095=>1000,25096=>1000,25097=>1000,25098=>1000,25099=>1000,25100=>1000,25101=>1000,25102=>1000,25103=>1000,25104=>1000,25105=>1000,25106=>1000,25107=>1000,25108=>1000, - 25109=>1000,25110=>1000,25111=>1000,25112=>1000,25113=>1000,25114=>1000,25115=>1000,25116=>1000,25117=>1000,25118=>1000,25119=>1000,25120=>1000,25121=>1000,25122=>1000,25123=>1000,25124=>1000, - 25125=>1000,25126=>1000,25127=>1000,25128=>1000,25129=>1000,25130=>1000,25131=>1000,25132=>1000,25133=>1000,25134=>1000,25135=>1000,25136=>1000,25137=>1000,25138=>1000,25139=>1000,25140=>1000, - 25141=>1000,25142=>1000,25143=>1000,25144=>1000,25145=>1000,25146=>1000,25147=>1000,25148=>1000,25149=>1000,25150=>1000,25151=>1000,25152=>1000,25153=>1000,25154=>1000,25155=>1000,25156=>1000, - 25157=>1000,25158=>1000,25159=>1000,25160=>1000,25161=>1000,25162=>1000,25163=>1000,25164=>1000,25165=>1000,25166=>1000,25167=>1000,25168=>1000,25169=>1000,25170=>1000,25171=>1000,25172=>1000, - 25173=>1000,25174=>1000,25175=>1000,25176=>1000,25177=>1000,25178=>1000,25179=>1000,25180=>1000,25181=>1000,25182=>1000,25183=>1000,25184=>1000,25185=>1000,25186=>1000,25187=>1000,25188=>1000, - 25189=>1000,25190=>1000,25191=>1000,25192=>1000,25193=>1000,25194=>1000,25195=>1000,25196=>1000,25197=>1000,25198=>1000,25199=>1000,25200=>1000,25201=>1000,25202=>1000,25203=>1000,25204=>1000, - 25205=>1000,25206=>1000,25207=>1000,25208=>1000,25209=>1000,25210=>1000,25211=>1000,25212=>1000,25213=>1000,25214=>1000,25215=>1000,25216=>1000,25217=>1000,25218=>1000,25219=>1000,25220=>1000, - 25221=>1000,25222=>1000,25223=>1000,25224=>1000,25225=>1000,25226=>1000,25227=>1000,25228=>1000,25229=>1000,25230=>1000,25231=>1000,25232=>1000,25233=>1000,25234=>1000,25235=>1000,25236=>1000, - 25237=>1000,25238=>1000,25239=>1000,25240=>1000,25241=>1000,25242=>1000,25243=>1000,25244=>1000,25245=>1000,25246=>1000,25247=>1000,25248=>1000,25249=>1000,25250=>1000,25251=>1000,25252=>1000, - 25253=>1000,25254=>1000,25255=>1000,25256=>1000,25257=>1000,25258=>1000,25259=>1000,25260=>1000,25261=>1000,25262=>1000,25263=>1000,25264=>1000,25265=>1000,25266=>1000,25267=>1000,25268=>1000, - 25269=>1000,25270=>1000,25271=>1000,25272=>1000,25273=>1000,25274=>1000,25275=>1000,25276=>1000,25277=>1000,25278=>1000,25279=>1000,25280=>1000,25281=>1000,25282=>1000,25283=>1000,25284=>1000, - 25285=>1000,25286=>1000,25287=>1000,25288=>1000,25289=>1000,25290=>1000,25291=>1000,25292=>1000,25293=>1000,25294=>1000,25295=>1000,25296=>1000,25297=>1000,25298=>1000,25299=>1000,25300=>1000, - 25301=>1000,25302=>1000,25303=>1000,25304=>1000,25305=>1000,25306=>1000,25307=>1000,25308=>1000,25309=>1000,25310=>1000,25311=>1000,25312=>1000,25313=>1000,25314=>1000,25315=>1000,25316=>1000, - 25317=>1000,25318=>1000,25319=>1000,25320=>1000,25321=>1000,25322=>1000,25323=>1000,25324=>1000,25325=>1000,25326=>1000,25327=>1000,25328=>1000,25329=>1000,25330=>1000,25331=>1000,25332=>1000, - 25333=>1000,25334=>1000,25335=>1000,25336=>1000,25337=>1000,25338=>1000,25339=>1000,25340=>1000,25341=>1000,25342=>1000,25343=>1000,25344=>1000,25345=>1000,25346=>1000,25347=>1000,25348=>1000, - 25349=>1000,25350=>1000,25351=>1000,25352=>1000,25353=>1000,25354=>1000,25355=>1000,25356=>1000,25357=>1000,25358=>1000,25359=>1000,25360=>1000,25361=>1000,25362=>1000,25363=>1000,25364=>1000, - 25365=>1000,25366=>1000,25367=>1000,25368=>1000,25369=>1000,25370=>1000,25371=>1000,25372=>1000,25373=>1000,25374=>1000,25375=>1000,25376=>1000,25377=>1000,25378=>1000,25379=>1000,25380=>1000, - 25381=>1000,25382=>1000,25383=>1000,25384=>1000,25385=>1000,25386=>1000,25387=>1000,25388=>1000,25389=>1000,25390=>1000,25391=>1000,25392=>1000,25393=>1000,25394=>1000,25395=>1000,25396=>1000, - 25397=>1000,25398=>1000,25399=>1000,25400=>1000,25401=>1000,25402=>1000,25403=>1000,25404=>1000,25405=>1000,25406=>1000,25407=>1000,25408=>1000,25409=>1000,25410=>1000,25411=>1000,25412=>1000, - 25413=>1000,25414=>1000,25415=>1000,25416=>1000,25417=>1000,25418=>1000,25419=>1000,25420=>1000,25421=>1000,25422=>1000,25423=>1000,25424=>1000,25425=>1000,25426=>1000,25427=>1000,25428=>1000, - 25429=>1000,25430=>1000,25431=>1000,25432=>1000,25433=>1000,25434=>1000,25435=>1000,25436=>1000,25437=>1000,25438=>1000,25439=>1000,25440=>1000,25441=>1000,25442=>1000,25443=>1000,25444=>1000, - 25445=>1000,25446=>1000,25447=>1000,25448=>1000,25449=>1000,25450=>1000,25451=>1000,25452=>1000,25453=>1000,25454=>1000,25455=>1000,25456=>1000,25457=>1000,25458=>1000,25459=>1000,25460=>1000, - 25461=>1000,25462=>1000,25463=>1000,25464=>1000,25465=>1000,25466=>1000,25467=>1000,25468=>1000,25469=>1000,25470=>1000,25471=>1000,25472=>1000,25473=>1000,25474=>1000,25475=>1000,25476=>1000, - 25477=>1000,25478=>1000,25479=>1000,25480=>1000,25481=>1000,25482=>1000,25483=>1000,25484=>1000,25485=>1000,25486=>1000,25487=>1000,25488=>1000,25489=>1000,25490=>1000,25491=>1000,25492=>1000, - 25493=>1000,25494=>1000,25495=>1000,25496=>1000,25497=>1000,25498=>1000,25499=>1000,25500=>1000,25501=>1000,25502=>1000,25503=>1000,25504=>1000,25505=>1000,25506=>1000,25507=>1000,25508=>1000, - 25509=>1000,25510=>1000,25511=>1000,25512=>1000,25513=>1000,25514=>1000,25515=>1000,25516=>1000,25517=>1000,25518=>1000,25519=>1000,25520=>1000,25521=>1000,25522=>1000,25523=>1000,25524=>1000, - 25525=>1000,25526=>1000,25527=>1000,25528=>1000,25529=>1000,25530=>1000,25531=>1000,25532=>1000,25533=>1000,25534=>1000,25535=>1000,25536=>1000,25537=>1000,25538=>1000,25539=>1000,25540=>1000, - 25541=>1000,25542=>1000,25543=>1000,25544=>1000,25545=>1000,25546=>1000,25547=>1000,25548=>1000,25549=>1000,25550=>1000,25551=>1000,25552=>1000,25553=>1000,25554=>1000,25555=>1000,25556=>1000, - 25557=>1000,25558=>1000,25559=>1000,25560=>1000,25561=>1000,25562=>1000,25563=>1000,25564=>1000,25565=>1000,25566=>1000,25567=>1000,25568=>1000,25569=>1000,25570=>1000,25571=>1000,25572=>1000, - 25573=>1000,25574=>1000,25575=>1000,25576=>1000,25577=>1000,25578=>1000,25579=>1000,25580=>1000,25581=>1000,25582=>1000,25583=>1000,25584=>1000,25585=>1000,25586=>1000,25587=>1000,25588=>1000, - 25589=>1000,25590=>1000,25591=>1000,25592=>1000,25593=>1000,25594=>1000,25595=>1000,25596=>1000,25597=>1000,25598=>1000,25599=>1000,25600=>1000,25601=>1000,25602=>1000,25603=>1000,25604=>1000, - 25605=>1000,25606=>1000,25607=>1000,25608=>1000,25609=>1000,25610=>1000,25611=>1000,25612=>1000,25613=>1000,25614=>1000,25615=>1000,25616=>1000,25617=>1000,25618=>1000,25619=>1000,25620=>1000, - 25621=>1000,25622=>1000,25623=>1000,25624=>1000,25625=>1000,25626=>1000,25627=>1000,25628=>1000,25629=>1000,25630=>1000,25631=>1000,25632=>1000,25633=>1000,25634=>1000,25635=>1000,25636=>1000, - 25637=>1000,25638=>1000,25639=>1000,25640=>1000,25641=>1000,25642=>1000,25643=>1000,25644=>1000,25645=>1000,25646=>1000,25647=>1000,25648=>1000,25649=>1000,25650=>1000,25651=>1000,25652=>1000, - 25653=>1000,25654=>1000,25655=>1000,25656=>1000,25657=>1000,25658=>1000,25659=>1000,25660=>1000,25661=>1000,25662=>1000,25663=>1000,25664=>1000,25665=>1000,25666=>1000,25667=>1000,25668=>1000, - 25669=>1000,25670=>1000,25671=>1000,25672=>1000,25673=>1000,25674=>1000,25675=>1000,25676=>1000,25677=>1000,25678=>1000,25679=>1000,25680=>1000,25681=>1000,25682=>1000,25683=>1000,25684=>1000, - 25685=>1000,25686=>1000,25687=>1000,25688=>1000,25689=>1000,25690=>1000,25691=>1000,25692=>1000,25693=>1000,25694=>1000,25695=>1000,25696=>1000,25697=>1000,25698=>1000,25699=>1000,25700=>1000, - 25701=>1000,25702=>1000,25703=>1000,25704=>1000,25705=>1000,25706=>1000,25707=>1000,25708=>1000,25709=>1000,25710=>1000,25711=>1000,25712=>1000,25713=>1000,25714=>1000,25715=>1000,25716=>1000, - 25717=>1000,25718=>1000,25719=>1000,25720=>1000,25721=>1000,25722=>1000,25723=>1000,25724=>1000,25725=>1000,25726=>1000,25727=>1000,25728=>1000,25729=>1000,25730=>1000,25731=>1000,25732=>1000, - 25733=>1000,25734=>1000,25735=>1000,25736=>1000,25737=>1000,25738=>1000,25739=>1000,25740=>1000,25741=>1000,25742=>1000,25743=>1000,25744=>1000,25745=>1000,25746=>1000,25747=>1000,25748=>1000, - 25749=>1000,25750=>1000,25751=>1000,25752=>1000,25753=>1000,25754=>1000,25755=>1000,25756=>1000,25757=>1000,25758=>1000,25759=>1000,25760=>1000,25761=>1000,25762=>1000,25763=>1000,25764=>1000, - 25765=>1000,25766=>1000,25767=>1000,25768=>1000,25769=>1000,25770=>1000,25771=>1000,25772=>1000,25773=>1000,25774=>1000,25775=>1000,25776=>1000,25777=>1000,25778=>1000,25779=>1000,25780=>1000, - 25781=>1000,25782=>1000,25783=>1000,25784=>1000,25785=>1000,25786=>1000,25787=>1000,25788=>1000,25789=>1000,25790=>1000,25791=>1000,25792=>1000,25793=>1000,25794=>1000,25795=>1000,25796=>1000, - 25797=>1000,25798=>1000,25799=>1000,25800=>1000,25801=>1000,25802=>1000,25803=>1000,25804=>1000,25805=>1000,25806=>1000,25807=>1000,25808=>1000,25809=>1000,25810=>1000,25811=>1000,25812=>1000, - 25813=>1000,25814=>1000,25815=>1000,25816=>1000,25817=>1000,25818=>1000,25819=>1000,25820=>1000,25821=>1000,25822=>1000,25823=>1000,25824=>1000,25825=>1000,25826=>1000,25827=>1000,25828=>1000, - 25829=>1000,25830=>1000,25831=>1000,25832=>1000,25833=>1000,25834=>1000,25835=>1000,25836=>1000,25837=>1000,25838=>1000,25839=>1000,25840=>1000,25841=>1000,25842=>1000,25843=>1000,25844=>1000, - 25845=>1000,25846=>1000,25847=>1000,25848=>1000,25849=>1000,25850=>1000,25851=>1000,25852=>1000,25853=>1000,25854=>1000,25855=>1000,25856=>1000,25857=>1000,25858=>1000,25859=>1000,25860=>1000, - 25861=>1000,25862=>1000,25863=>1000,25864=>1000,25865=>1000,25866=>1000,25867=>1000,25868=>1000,25869=>1000,25870=>1000,25871=>1000,25872=>1000,25873=>1000,25874=>1000,25875=>1000,25876=>1000, - 25877=>1000,25878=>1000,25879=>1000,25880=>1000,25881=>1000,25882=>1000,25883=>1000,25884=>1000,25885=>1000,25886=>1000,25887=>1000,25888=>1000,25889=>1000,25890=>1000,25891=>1000,25892=>1000, - 25893=>1000,25894=>1000,25895=>1000,25896=>1000,25897=>1000,25898=>1000,25899=>1000,25900=>1000,25901=>1000,25902=>1000,25903=>1000,25904=>1000,25905=>1000,25906=>1000,25907=>1000,25908=>1000, - 25909=>1000,25910=>1000,25911=>1000,25912=>1000,25913=>1000,25914=>1000,25915=>1000,25916=>1000,25917=>1000,25918=>1000,25919=>1000,25920=>1000,25921=>1000,25922=>1000,25923=>1000,25924=>1000, - 25925=>1000,25926=>1000,25927=>1000,25928=>1000,25929=>1000,25930=>1000,25931=>1000,25932=>1000,25933=>1000,25934=>1000,25935=>1000,25936=>1000,25937=>1000,25938=>1000,25939=>1000,25940=>1000, - 25941=>1000,25942=>1000,25943=>1000,25944=>1000,25945=>1000,25946=>1000,25947=>1000,25948=>1000,25949=>1000,25950=>1000,25951=>1000,25952=>1000,25953=>1000,25954=>1000,25955=>1000,25956=>1000, - 25957=>1000,25958=>1000,25959=>1000,25960=>1000,25961=>1000,25962=>1000,25963=>1000,25964=>1000,25965=>1000,25966=>1000,25967=>1000,25968=>1000,25969=>1000,25970=>1000,25971=>1000,25972=>1000, - 25973=>1000,25974=>1000,25975=>1000,25976=>1000,25977=>1000,25978=>1000,25979=>1000,25980=>1000,25981=>1000,25982=>1000,25983=>1000,25984=>1000,25985=>1000,25986=>1000,25987=>1000,25988=>1000, - 25989=>1000,25990=>1000,25991=>1000,25992=>1000,25993=>1000,25994=>1000,25995=>1000,25996=>1000,25997=>1000,25998=>1000,25999=>1000,26000=>1000,26001=>1000,26002=>1000,26003=>1000,26004=>1000, - 26005=>1000,26006=>1000,26007=>1000,26008=>1000,26009=>1000,26010=>1000,26011=>1000,26012=>1000,26013=>1000,26014=>1000,26015=>1000,26016=>1000,26017=>1000,26018=>1000,26019=>1000,26020=>1000, - 26021=>1000,26022=>1000,26023=>1000,26024=>1000,26025=>1000,26026=>1000,26027=>1000,26028=>1000,26029=>1000,26030=>1000,26031=>1000,26032=>1000,26033=>1000,26034=>1000,26035=>1000,26036=>1000, - 26037=>1000,26038=>1000,26039=>1000,26040=>1000,26041=>1000,26042=>1000,26043=>1000,26044=>1000,26045=>1000,26046=>1000,26047=>1000,26048=>1000,26049=>1000,26050=>1000,26051=>1000,26052=>1000, - 26053=>1000,26054=>1000,26055=>1000,26056=>1000,26057=>1000,26058=>1000,26059=>1000,26060=>1000,26061=>1000,26062=>1000,26063=>1000,26064=>1000,26065=>1000,26066=>1000,26067=>1000,26068=>1000, - 26069=>1000,26070=>1000,26071=>1000,26072=>1000,26073=>1000,26074=>1000,26075=>1000,26076=>1000,26077=>1000,26078=>1000,26079=>1000,26080=>1000,26081=>1000,26082=>1000,26083=>1000,26084=>1000, - 26085=>1000,26086=>1000,26087=>1000,26088=>1000,26089=>1000,26090=>1000,26091=>1000,26092=>1000,26093=>1000,26094=>1000,26095=>1000,26096=>1000,26097=>1000,26098=>1000,26099=>1000,26100=>1000, - 26101=>1000,26102=>1000,26103=>1000,26104=>1000,26105=>1000,26106=>1000,26107=>1000,26108=>1000,26109=>1000,26110=>1000,26111=>1000,26112=>1000,26113=>1000,26114=>1000,26115=>1000,26116=>1000, - 26117=>1000,26118=>1000,26119=>1000,26120=>1000,26121=>1000,26122=>1000,26123=>1000,26124=>1000,26125=>1000,26126=>1000,26127=>1000,26128=>1000,26129=>1000,26130=>1000,26131=>1000,26132=>1000, - 26133=>1000,26134=>1000,26135=>1000,26136=>1000,26137=>1000,26138=>1000,26139=>1000,26140=>1000,26141=>1000,26142=>1000,26143=>1000,26144=>1000,26145=>1000,26146=>1000,26147=>1000,26148=>1000, - 26149=>1000,26150=>1000,26151=>1000,26152=>1000,26153=>1000,26154=>1000,26155=>1000,26156=>1000,26157=>1000,26158=>1000,26159=>1000,26160=>1000,26161=>1000,26162=>1000,26163=>1000,26164=>1000, - 26165=>1000,26166=>1000,26167=>1000,26168=>1000,26169=>1000,26170=>1000,26171=>1000,26172=>1000,26173=>1000,26174=>1000,26175=>1000,26176=>1000,26177=>1000,26178=>1000,26179=>1000,26180=>1000, - 26181=>1000,26182=>1000,26183=>1000,26184=>1000,26185=>1000,26186=>1000,26187=>1000,26188=>1000,26189=>1000,26190=>1000,26191=>1000,26192=>1000,26193=>1000,26194=>1000,26195=>1000,26196=>1000, - 26197=>1000,26198=>1000,26199=>1000,26200=>1000,26201=>1000,26202=>1000,26203=>1000,26204=>1000,26205=>1000,26206=>1000,26207=>1000,26208=>1000,26209=>1000,26210=>1000,26211=>1000,26212=>1000, - 26213=>1000,26214=>1000,26215=>1000,26216=>1000,26217=>1000,26218=>1000,26219=>1000,26220=>1000,26221=>1000,26222=>1000,26223=>1000,26224=>1000,26225=>1000,26226=>1000,26227=>1000,26228=>1000, - 26229=>1000,26230=>1000,26231=>1000,26232=>1000,26233=>1000,26234=>1000,26235=>1000,26236=>1000,26237=>1000,26238=>1000,26239=>1000,26240=>1000,26241=>1000,26242=>1000,26243=>1000,26244=>1000, - 26245=>1000,26246=>1000,26247=>1000,26248=>1000,26249=>1000,26250=>1000,26251=>1000,26252=>1000,26253=>1000,26254=>1000,26255=>1000,26256=>1000,26257=>1000,26258=>1000,26259=>1000,26260=>1000, - 26261=>1000,26262=>1000,26263=>1000,26264=>1000,26265=>1000,26266=>1000,26267=>1000,26268=>1000,26269=>1000,26270=>1000,26271=>1000,26272=>1000,26273=>1000,26274=>1000,26275=>1000,26276=>1000, - 26277=>1000,26278=>1000,26279=>1000,26280=>1000,26281=>1000,26282=>1000,26283=>1000,26284=>1000,26285=>1000,26286=>1000,26287=>1000,26288=>1000,26289=>1000,26290=>1000,26291=>1000,26292=>1000, - 26293=>1000,26294=>1000,26295=>1000,26296=>1000,26297=>1000,26298=>1000,26299=>1000,26300=>1000,26301=>1000,26302=>1000,26303=>1000,26304=>1000,26305=>1000,26306=>1000,26307=>1000,26308=>1000, - 26309=>1000,26310=>1000,26311=>1000,26312=>1000,26313=>1000,26314=>1000,26315=>1000,26316=>1000,26317=>1000,26318=>1000,26319=>1000,26320=>1000,26321=>1000,26322=>1000,26323=>1000,26324=>1000, - 26325=>1000,26326=>1000,26327=>1000,26328=>1000,26329=>1000,26330=>1000,26331=>1000,26332=>1000,26333=>1000,26334=>1000,26335=>1000,26336=>1000,26337=>1000,26338=>1000,26339=>1000,26340=>1000, - 26341=>1000,26342=>1000,26343=>1000,26344=>1000,26345=>1000,26346=>1000,26347=>1000,26348=>1000,26349=>1000,26350=>1000,26351=>1000,26352=>1000,26353=>1000,26354=>1000,26355=>1000,26356=>1000, - 26357=>1000,26358=>1000,26359=>1000,26360=>1000,26361=>1000,26362=>1000,26363=>1000,26364=>1000,26365=>1000,26366=>1000,26367=>1000,26368=>1000,26369=>1000,26370=>1000,26371=>1000,26372=>1000, - 26373=>1000,26374=>1000,26375=>1000,26376=>1000,26377=>1000,26378=>1000,26379=>1000,26380=>1000,26381=>1000,26382=>1000,26383=>1000,26384=>1000,26385=>1000,26386=>1000,26387=>1000,26388=>1000, - 26389=>1000,26390=>1000,26391=>1000,26392=>1000,26393=>1000,26394=>1000,26395=>1000,26396=>1000,26397=>1000,26398=>1000,26399=>1000,26400=>1000,26401=>1000,26402=>1000,26403=>1000,26404=>1000, - 26405=>1000,26406=>1000,26407=>1000,26408=>1000,26409=>1000,26410=>1000,26411=>1000,26412=>1000,26413=>1000,26414=>1000,26415=>1000,26416=>1000,26417=>1000,26418=>1000,26419=>1000,26420=>1000, - 26421=>1000,26422=>1000,26423=>1000,26424=>1000,26425=>1000,26426=>1000,26427=>1000,26428=>1000,26429=>1000,26430=>1000,26431=>1000,26432=>1000,26433=>1000,26434=>1000,26435=>1000,26436=>1000, - 26437=>1000,26438=>1000,26439=>1000,26440=>1000,26441=>1000,26442=>1000,26443=>1000,26444=>1000,26445=>1000,26446=>1000,26447=>1000,26448=>1000,26449=>1000,26450=>1000,26451=>1000,26452=>1000, - 26453=>1000,26454=>1000,26455=>1000,26456=>1000,26457=>1000,26458=>1000,26459=>1000,26460=>1000,26461=>1000,26462=>1000,26463=>1000,26464=>1000,26465=>1000,26466=>1000,26467=>1000,26468=>1000, - 26469=>1000,26470=>1000,26471=>1000,26472=>1000,26473=>1000,26474=>1000,26475=>1000,26476=>1000,26477=>1000,26478=>1000,26479=>1000,26480=>1000,26481=>1000,26482=>1000,26483=>1000,26484=>1000, - 26485=>1000,26486=>1000,26487=>1000,26488=>1000,26489=>1000,26490=>1000,26491=>1000,26492=>1000,26493=>1000,26494=>1000,26495=>1000,26496=>1000,26497=>1000,26498=>1000,26499=>1000,26500=>1000, - 26501=>1000,26502=>1000,26503=>1000,26504=>1000,26505=>1000,26506=>1000,26507=>1000,26508=>1000,26509=>1000,26510=>1000,26511=>1000,26512=>1000,26513=>1000,26514=>1000,26515=>1000,26516=>1000, - 26517=>1000,26518=>1000,26519=>1000,26520=>1000,26521=>1000,26522=>1000,26523=>1000,26524=>1000,26525=>1000,26526=>1000,26527=>1000,26528=>1000,26529=>1000,26530=>1000,26531=>1000,26532=>1000, - 26533=>1000,26534=>1000,26535=>1000,26536=>1000,26537=>1000,26538=>1000,26539=>1000,26540=>1000,26541=>1000,26542=>1000,26543=>1000,26544=>1000,26545=>1000,26546=>1000,26547=>1000,26548=>1000, - 26549=>1000,26550=>1000,26551=>1000,26552=>1000,26553=>1000,26554=>1000,26555=>1000,26556=>1000,26557=>1000,26558=>1000,26559=>1000,26560=>1000,26561=>1000,26562=>1000,26563=>1000,26564=>1000, - 26565=>1000,26566=>1000,26567=>1000,26568=>1000,26569=>1000,26570=>1000,26571=>1000,26572=>1000,26573=>1000,26574=>1000,26575=>1000,26576=>1000,26577=>1000,26578=>1000,26579=>1000,26580=>1000, - 26581=>1000,26582=>1000,26583=>1000,26584=>1000,26585=>1000,26586=>1000,26587=>1000,26588=>1000,26589=>1000,26590=>1000,26591=>1000,26592=>1000,26593=>1000,26594=>1000,26595=>1000,26596=>1000, - 26597=>1000,26598=>1000,26599=>1000,26600=>1000,26601=>1000,26602=>1000,26603=>1000,26604=>1000,26605=>1000,26606=>1000,26607=>1000,26608=>1000,26609=>1000,26610=>1000,26611=>1000,26612=>1000, - 26613=>1000,26614=>1000,26615=>1000,26616=>1000,26617=>1000,26618=>1000,26619=>1000,26620=>1000,26621=>1000,26622=>1000,26623=>1000,26624=>1000,26625=>1000,26626=>1000,26627=>1000,26628=>1000, - 26629=>1000,26630=>1000,26631=>1000,26632=>1000,26633=>1000,26634=>1000,26635=>1000,26636=>1000,26637=>1000,26638=>1000,26639=>1000,26640=>1000,26641=>1000,26642=>1000,26643=>1000,26644=>1000, - 26645=>1000,26646=>1000,26647=>1000,26648=>1000,26649=>1000,26650=>1000,26651=>1000,26652=>1000,26653=>1000,26654=>1000,26655=>1000,26656=>1000,26657=>1000,26658=>1000,26659=>1000,26660=>1000, - 26661=>1000,26662=>1000,26663=>1000,26664=>1000,26665=>1000,26666=>1000,26667=>1000,26668=>1000,26669=>1000,26670=>1000,26671=>1000,26672=>1000,26673=>1000,26674=>1000,26675=>1000,26676=>1000, - 26677=>1000,26678=>1000,26679=>1000,26680=>1000,26681=>1000,26682=>1000,26683=>1000,26684=>1000,26685=>1000,26686=>1000,26687=>1000,26688=>1000,26689=>1000,26690=>1000,26691=>1000,26692=>1000, - 26693=>1000,26694=>1000,26695=>1000,26696=>1000,26697=>1000,26698=>1000,26699=>1000,26700=>1000,26701=>1000,26702=>1000,26703=>1000,26704=>1000,26705=>1000,26706=>1000,26707=>1000,26708=>1000, - 26709=>1000,26710=>1000,26711=>1000,26712=>1000,26713=>1000,26714=>1000,26715=>1000,26716=>1000,26717=>1000,26718=>1000,26719=>1000,26720=>1000,26721=>1000,26722=>1000,26723=>1000,26724=>1000, - 26725=>1000,26726=>1000,26727=>1000,26728=>1000,26729=>1000,26730=>1000,26731=>1000,26732=>1000,26733=>1000,26734=>1000,26735=>1000,26736=>1000,26737=>1000,26738=>1000,26739=>1000,26740=>1000, - 26741=>1000,26742=>1000,26743=>1000,26744=>1000,26745=>1000,26746=>1000,26747=>1000,26748=>1000,26749=>1000,26750=>1000,26751=>1000,26752=>1000,26753=>1000,26754=>1000,26755=>1000,26756=>1000, - 26757=>1000,26758=>1000,26759=>1000,26760=>1000,26761=>1000,26762=>1000,26763=>1000,26764=>1000,26765=>1000,26766=>1000,26767=>1000,26768=>1000,26769=>1000,26770=>1000,26771=>1000,26772=>1000, - 26773=>1000,26774=>1000,26775=>1000,26776=>1000,26777=>1000,26778=>1000,26779=>1000,26780=>1000,26781=>1000,26782=>1000,26783=>1000,26784=>1000,26785=>1000,26786=>1000,26787=>1000,26788=>1000, - 26789=>1000,26790=>1000,26791=>1000,26792=>1000,26793=>1000,26794=>1000,26795=>1000,26796=>1000,26797=>1000,26798=>1000,26799=>1000,26800=>1000,26801=>1000,26802=>1000,26803=>1000,26804=>1000, - 26805=>1000,26806=>1000,26807=>1000,26808=>1000,26809=>1000,26810=>1000,26811=>1000,26812=>1000,26813=>1000,26814=>1000,26815=>1000,26816=>1000,26817=>1000,26818=>1000,26819=>1000,26820=>1000, - 26821=>1000,26822=>1000,26823=>1000,26824=>1000,26825=>1000,26826=>1000,26827=>1000,26828=>1000,26829=>1000,26830=>1000,26831=>1000,26832=>1000,26833=>1000,26834=>1000,26835=>1000,26836=>1000, - 26837=>1000,26838=>1000,26839=>1000,26840=>1000,26841=>1000,26842=>1000,26843=>1000,26844=>1000,26845=>1000,26846=>1000,26847=>1000,26848=>1000,26849=>1000,26850=>1000,26851=>1000,26852=>1000, - 26853=>1000,26854=>1000,26855=>1000,26856=>1000,26857=>1000,26858=>1000,26859=>1000,26860=>1000,26861=>1000,26862=>1000,26863=>1000,26864=>1000,26865=>1000,26866=>1000,26867=>1000,26868=>1000, - 26869=>1000,26870=>1000,26871=>1000,26872=>1000,26873=>1000,26874=>1000,26875=>1000,26876=>1000,26877=>1000,26878=>1000,26879=>1000,26880=>1000,26881=>1000,26882=>1000,26883=>1000,26884=>1000, - 26885=>1000,26886=>1000,26887=>1000,26888=>1000,26889=>1000,26890=>1000,26891=>1000,26892=>1000,26893=>1000,26894=>1000,26895=>1000,26896=>1000,26897=>1000,26898=>1000,26899=>1000,26900=>1000, - 26901=>1000,26902=>1000,26903=>1000,26904=>1000,26905=>1000,26906=>1000,26907=>1000,26908=>1000,26909=>1000,26910=>1000,26911=>1000,26912=>1000,26913=>1000,26914=>1000,26915=>1000,26916=>1000, - 26917=>1000,26918=>1000,26919=>1000,26920=>1000,26921=>1000,26922=>1000,26923=>1000,26924=>1000,26925=>1000,26926=>1000,26927=>1000,26928=>1000,26929=>1000,26930=>1000,26931=>1000,26932=>1000, - 26933=>1000,26934=>1000,26935=>1000,26936=>1000,26937=>1000,26938=>1000,26939=>1000,26940=>1000,26941=>1000,26942=>1000,26943=>1000,26944=>1000,26945=>1000,26946=>1000,26947=>1000,26948=>1000, - 26949=>1000,26950=>1000,26951=>1000,26952=>1000,26953=>1000,26954=>1000,26955=>1000,26956=>1000,26957=>1000,26958=>1000,26959=>1000,26960=>1000,26961=>1000,26962=>1000,26963=>1000,26964=>1000, - 26965=>1000,26966=>1000,26967=>1000,26968=>1000,26969=>1000,26970=>1000,26971=>1000,26972=>1000,26973=>1000,26974=>1000,26975=>1000,26976=>1000,26977=>1000,26978=>1000,26979=>1000,26980=>1000, - 26981=>1000,26982=>1000,26983=>1000,26984=>1000,26985=>1000,26986=>1000,26987=>1000,26988=>1000,26989=>1000,26990=>1000,26991=>1000,26992=>1000,26993=>1000,26994=>1000,26995=>1000,26996=>1000, - 26997=>1000,26998=>1000,26999=>1000,27000=>1000,27001=>1000,27002=>1000,27003=>1000,27004=>1000,27005=>1000,27006=>1000,27007=>1000,27008=>1000,27009=>1000,27010=>1000,27011=>1000,27012=>1000, - 27013=>1000,27014=>1000,27015=>1000,27016=>1000,27017=>1000,27018=>1000,27019=>1000,27020=>1000,27021=>1000,27022=>1000,27023=>1000,27024=>1000,27025=>1000,27026=>1000,27027=>1000,27028=>1000, - 27029=>1000,27030=>1000,27031=>1000,27032=>1000,27033=>1000,27034=>1000,27035=>1000,27036=>1000,27037=>1000,27038=>1000,27039=>1000,27040=>1000,27041=>1000,27042=>1000,27043=>1000,27044=>1000, - 27045=>1000,27046=>1000,27047=>1000,27048=>1000,27049=>1000,27050=>1000,27051=>1000,27052=>1000,27053=>1000,27054=>1000,27055=>1000,27056=>1000,27057=>1000,27058=>1000,27059=>1000,27060=>1000, - 27061=>1000,27062=>1000,27063=>1000,27064=>1000,27065=>1000,27066=>1000,27067=>1000,27068=>1000,27069=>1000,27070=>1000,27071=>1000,27072=>1000,27073=>1000,27074=>1000,27075=>1000,27076=>1000, - 27077=>1000,27078=>1000,27079=>1000,27080=>1000,27081=>1000,27082=>1000,27083=>1000,27084=>1000,27085=>1000,27086=>1000,27087=>1000,27088=>1000,27089=>1000,27090=>1000,27091=>1000,27092=>1000, - 27093=>1000,27094=>1000,27095=>1000,27096=>1000,27097=>1000,27098=>1000,27099=>1000,27100=>1000,27101=>1000,27102=>1000,27103=>1000,27104=>1000,27105=>1000,27106=>1000,27107=>1000,27108=>1000, - 27109=>1000,27110=>1000,27111=>1000,27112=>1000,27113=>1000,27114=>1000,27115=>1000,27116=>1000,27117=>1000,27118=>1000,27119=>1000,27120=>1000,27121=>1000,27122=>1000,27123=>1000,27124=>1000, - 27125=>1000,27126=>1000,27127=>1000,27128=>1000,27129=>1000,27130=>1000,27131=>1000,27132=>1000,27133=>1000,27134=>1000,27135=>1000,27136=>1000,27137=>1000,27138=>1000,27139=>1000,27140=>1000, - 27141=>1000,27142=>1000,27143=>1000,27144=>1000,27145=>1000,27146=>1000,27147=>1000,27148=>1000,27149=>1000,27150=>1000,27151=>1000,27152=>1000,27153=>1000,27154=>1000,27155=>1000,27156=>1000, - 27157=>1000,27158=>1000,27159=>1000,27160=>1000,27161=>1000,27162=>1000,27163=>1000,27164=>1000,27165=>1000,27166=>1000,27167=>1000,27168=>1000,27169=>1000,27170=>1000,27171=>1000,27172=>1000, - 27173=>1000,27174=>1000,27175=>1000,27176=>1000,27177=>1000,27178=>1000,27179=>1000,27180=>1000,27181=>1000,27182=>1000,27183=>1000,27184=>1000,27185=>1000,27186=>1000,27187=>1000,27188=>1000, - 27189=>1000,27190=>1000,27191=>1000,27192=>1000,27193=>1000,27194=>1000,27195=>1000,27196=>1000,27197=>1000,27198=>1000,27199=>1000,27200=>1000,27201=>1000,27202=>1000,27203=>1000,27204=>1000, - 27205=>1000,27206=>1000,27207=>1000,27208=>1000,27209=>1000,27210=>1000,27211=>1000,27212=>1000,27213=>1000,27214=>1000,27215=>1000,27216=>1000,27217=>1000,27218=>1000,27219=>1000,27220=>1000, - 27221=>1000,27222=>1000,27223=>1000,27224=>1000,27225=>1000,27226=>1000,27227=>1000,27228=>1000,27229=>1000,27230=>1000,27231=>1000,27232=>1000,27233=>1000,27234=>1000,27235=>1000,27236=>1000, - 27237=>1000,27238=>1000,27239=>1000,27240=>1000,27241=>1000,27242=>1000,27243=>1000,27244=>1000,27245=>1000,27246=>1000,27247=>1000,27248=>1000,27249=>1000,27250=>1000,27251=>1000,27252=>1000, - 27253=>1000,27254=>1000,27255=>1000,27256=>1000,27257=>1000,27258=>1000,27259=>1000,27260=>1000,27261=>1000,27262=>1000,27263=>1000,27264=>1000,27265=>1000,27266=>1000,27267=>1000,27268=>1000, - 27269=>1000,27270=>1000,27271=>1000,27272=>1000,27273=>1000,27274=>1000,27275=>1000,27276=>1000,27277=>1000,27278=>1000,27279=>1000,27280=>1000,27281=>1000,27282=>1000,27283=>1000,27284=>1000, - 27285=>1000,27286=>1000,27287=>1000,27288=>1000,27289=>1000,27290=>1000,27291=>1000,27292=>1000,27293=>1000,27294=>1000,27295=>1000,27296=>1000,27297=>1000,27298=>1000,27299=>1000,27300=>1000, - 27301=>1000,27302=>1000,27303=>1000,27304=>1000,27305=>1000,27306=>1000,27307=>1000,27308=>1000,27309=>1000,27310=>1000,27311=>1000,27312=>1000,27313=>1000,27314=>1000,27315=>1000,27316=>1000, - 27317=>1000,27318=>1000,27319=>1000,27320=>1000,27321=>1000,27322=>1000,27323=>1000,27324=>1000,27325=>1000,27326=>1000,27327=>1000,27328=>1000,27329=>1000,27330=>1000,27331=>1000,27332=>1000, - 27333=>1000,27334=>1000,27335=>1000,27336=>1000,27337=>1000,27338=>1000,27339=>1000,27340=>1000,27341=>1000,27342=>1000,27343=>1000,27344=>1000,27345=>1000,27346=>1000,27347=>1000,27348=>1000, - 27349=>1000,27350=>1000,27351=>1000,27352=>1000,27353=>1000,27354=>1000,27355=>1000,27356=>1000,27357=>1000,27358=>1000,27359=>1000,27360=>1000,27361=>1000,27362=>1000,27363=>1000,27364=>1000, - 27365=>1000,27366=>1000,27367=>1000,27368=>1000,27369=>1000,27370=>1000,27371=>1000,27372=>1000,27373=>1000,27374=>1000,27375=>1000,27376=>1000,27377=>1000,27378=>1000,27379=>1000,27380=>1000, - 27381=>1000,27382=>1000,27383=>1000,27384=>1000,27385=>1000,27386=>1000,27387=>1000,27388=>1000,27389=>1000,27390=>1000,27391=>1000,27392=>1000,27393=>1000,27394=>1000,27395=>1000,27396=>1000, - 27397=>1000,27398=>1000,27399=>1000,27400=>1000,27401=>1000,27402=>1000,27403=>1000,27404=>1000,27405=>1000,27406=>1000,27407=>1000,27408=>1000,27409=>1000,27410=>1000,27411=>1000,27412=>1000, - 27413=>1000,27414=>1000,27415=>1000,27416=>1000,27417=>1000,27418=>1000,27419=>1000,27420=>1000,27421=>1000,27422=>1000,27423=>1000,27424=>1000,27425=>1000,27426=>1000,27427=>1000,27428=>1000, - 27429=>1000,27430=>1000,27431=>1000,27432=>1000,27433=>1000,27434=>1000,27435=>1000,27436=>1000,27437=>1000,27438=>1000,27439=>1000,27440=>1000,27441=>1000,27442=>1000,27443=>1000,27444=>1000, - 27445=>1000,27446=>1000,27447=>1000,27448=>1000,27449=>1000,27450=>1000,27451=>1000,27452=>1000,27453=>1000,27454=>1000,27455=>1000,27456=>1000,27457=>1000,27458=>1000,27459=>1000,27460=>1000, - 27461=>1000,27462=>1000,27463=>1000,27464=>1000,27465=>1000,27466=>1000,27467=>1000,27468=>1000,27469=>1000,27470=>1000,27471=>1000,27472=>1000,27473=>1000,27474=>1000,27475=>1000,27476=>1000, - 27477=>1000,27478=>1000,27479=>1000,27480=>1000,27481=>1000,27482=>1000,27483=>1000,27484=>1000,27485=>1000,27486=>1000,27487=>1000,27488=>1000,27489=>1000,27490=>1000,27491=>1000,27492=>1000, - 27493=>1000,27494=>1000,27495=>1000,27496=>1000,27497=>1000,27498=>1000,27499=>1000,27500=>1000,27501=>1000,27502=>1000,27503=>1000,27504=>1000,27505=>1000,27506=>1000,27507=>1000,27508=>1000, - 27509=>1000,27510=>1000,27511=>1000,27512=>1000,27513=>1000,27514=>1000,27515=>1000,27516=>1000,27517=>1000,27518=>1000,27519=>1000,27520=>1000,27521=>1000,27522=>1000,27523=>1000,27524=>1000, - 27525=>1000,27526=>1000,27527=>1000,27528=>1000,27529=>1000,27530=>1000,27531=>1000,27532=>1000,27533=>1000,27534=>1000,27535=>1000,27536=>1000,27537=>1000,27538=>1000,27539=>1000,27540=>1000, - 27541=>1000,27542=>1000,27543=>1000,27544=>1000,27545=>1000,27546=>1000,27547=>1000,27548=>1000,27549=>1000,27550=>1000,27551=>1000,27552=>1000,27553=>1000,27554=>1000,27555=>1000,27556=>1000, - 27557=>1000,27558=>1000,27559=>1000,27560=>1000,27561=>1000,27562=>1000,27563=>1000,27564=>1000,27565=>1000,27566=>1000,27567=>1000,27568=>1000,27569=>1000,27570=>1000,27571=>1000,27572=>1000, - 27573=>1000,27574=>1000,27575=>1000,27576=>1000,27577=>1000,27578=>1000,27579=>1000,27580=>1000,27581=>1000,27582=>1000,27583=>1000,27584=>1000,27585=>1000,27586=>1000,27587=>1000,27588=>1000, - 27589=>1000,27590=>1000,27591=>1000,27592=>1000,27593=>1000,27594=>1000,27595=>1000,27596=>1000,27597=>1000,27598=>1000,27599=>1000,27600=>1000,27601=>1000,27602=>1000,27603=>1000,27604=>1000, - 27605=>1000,27606=>1000,27607=>1000,27608=>1000,27609=>1000,27610=>1000,27611=>1000,27612=>1000,27613=>1000,27614=>1000,27615=>1000,27616=>1000,27617=>1000,27618=>1000,27619=>1000,27620=>1000, - 27621=>1000,27622=>1000,27623=>1000,27624=>1000,27625=>1000,27626=>1000,27627=>1000,27628=>1000,27629=>1000,27630=>1000,27631=>1000,27632=>1000,27633=>1000,27634=>1000,27635=>1000,27636=>1000, - 27637=>1000,27638=>1000,27639=>1000,27640=>1000,27641=>1000,27642=>1000,27643=>1000,27644=>1000,27645=>1000,27646=>1000,27647=>1000,27648=>1000,27649=>1000,27650=>1000,27651=>1000,27652=>1000, - 27653=>1000,27654=>1000,27655=>1000,27656=>1000,27657=>1000,27658=>1000,27659=>1000,27660=>1000,27661=>1000,27662=>1000,27663=>1000,27664=>1000,27665=>1000,27666=>1000,27667=>1000,27668=>1000, - 27669=>1000,27670=>1000,27671=>1000,27672=>1000,27673=>1000,27674=>1000,27675=>1000,27676=>1000,27677=>1000,27678=>1000,27679=>1000,27680=>1000,27681=>1000,27682=>1000,27683=>1000,27684=>1000, - 27685=>1000,27686=>1000,27687=>1000,27688=>1000,27689=>1000,27690=>1000,27691=>1000,27692=>1000,27693=>1000,27694=>1000,27695=>1000,27696=>1000,27697=>1000,27698=>1000,27699=>1000,27700=>1000, - 27701=>1000,27702=>1000,27703=>1000,27704=>1000,27705=>1000,27706=>1000,27707=>1000,27708=>1000,27709=>1000,27710=>1000,27711=>1000,27712=>1000,27713=>1000,27714=>1000,27715=>1000,27716=>1000, - 27717=>1000,27718=>1000,27719=>1000,27720=>1000,27721=>1000,27722=>1000,27723=>1000,27724=>1000,27725=>1000,27726=>1000,27727=>1000,27728=>1000,27729=>1000,27730=>1000,27731=>1000,27732=>1000, - 27733=>1000,27734=>1000,27735=>1000,27736=>1000,27737=>1000,27738=>1000,27739=>1000,27740=>1000,27741=>1000,27742=>1000,27743=>1000,27744=>1000,27745=>1000,27746=>1000,27747=>1000,27748=>1000, - 27749=>1000,27750=>1000,27751=>1000,27752=>1000,27753=>1000,27754=>1000,27755=>1000,27756=>1000,27757=>1000,27758=>1000,27759=>1000,27760=>1000,27761=>1000,27762=>1000,27763=>1000,27764=>1000, - 27765=>1000,27766=>1000,27767=>1000,27768=>1000,27769=>1000,27770=>1000,27771=>1000,27772=>1000,27773=>1000,27774=>1000,27775=>1000,27776=>1000,27777=>1000,27778=>1000,27779=>1000,27780=>1000, - 27781=>1000,27782=>1000,27783=>1000,27784=>1000,27785=>1000,27786=>1000,27787=>1000,27788=>1000,27789=>1000,27790=>1000,27791=>1000,27792=>1000,27793=>1000,27794=>1000,27795=>1000,27796=>1000, - 27797=>1000,27798=>1000,27799=>1000,27800=>1000,27801=>1000,27802=>1000,27803=>1000,27804=>1000,27805=>1000,27806=>1000,27807=>1000,27808=>1000,27809=>1000,27810=>1000,27811=>1000,27812=>1000, - 27813=>1000,27814=>1000,27815=>1000,27816=>1000,27817=>1000,27818=>1000,27819=>1000,27820=>1000,27821=>1000,27822=>1000,27823=>1000,27824=>1000,27825=>1000,27826=>1000,27827=>1000,27828=>1000, - 27829=>1000,27830=>1000,27831=>1000,27832=>1000,27833=>1000,27834=>1000,27835=>1000,27836=>1000,27837=>1000,27838=>1000,27839=>1000,27840=>1000,27841=>1000,27842=>1000,27843=>1000,27844=>1000, - 27845=>1000,27846=>1000,27847=>1000,27848=>1000,27849=>1000,27850=>1000,27851=>1000,27852=>1000,27853=>1000,27854=>1000,27855=>1000,27856=>1000,27857=>1000,27858=>1000,27859=>1000,27860=>1000, - 27861=>1000,27862=>1000,27863=>1000,27864=>1000,27865=>1000,27866=>1000,27867=>1000,27868=>1000,27869=>1000,27870=>1000,27871=>1000,27872=>1000,27873=>1000,27874=>1000,27875=>1000,27876=>1000, - 27877=>1000,27878=>1000,27879=>1000,27880=>1000,27881=>1000,27882=>1000,27883=>1000,27884=>1000,27885=>1000,27886=>1000,27887=>1000,27888=>1000,27889=>1000,27890=>1000,27891=>1000,27892=>1000, - 27893=>1000,27894=>1000,27895=>1000,27896=>1000,27897=>1000,27898=>1000,27899=>1000,27900=>1000,27901=>1000,27902=>1000,27903=>1000,27904=>1000,27905=>1000,27906=>1000,27907=>1000,27908=>1000, - 27909=>1000,27910=>1000,27911=>1000,27912=>1000,27913=>1000,27914=>1000,27915=>1000,27916=>1000,27917=>1000,27918=>1000,27919=>1000,27920=>1000,27921=>1000,27922=>1000,27923=>1000,27924=>1000, - 27925=>1000,27926=>1000,27927=>1000,27928=>1000,27929=>1000,27930=>1000,27931=>1000,27932=>1000,27933=>1000,27934=>1000,27935=>1000,27936=>1000,27937=>1000,27938=>1000,27939=>1000,27940=>1000, - 27941=>1000,27942=>1000,27943=>1000,27944=>1000,27945=>1000,27946=>1000,27947=>1000,27948=>1000,27949=>1000,27950=>1000,27951=>1000,27952=>1000,27953=>1000,27954=>1000,27955=>1000,27956=>1000, - 27957=>1000,27958=>1000,27959=>1000,27960=>1000,27961=>1000,27962=>1000,27963=>1000,27964=>1000,27965=>1000,27966=>1000,27967=>1000,27968=>1000,27969=>1000,27970=>1000,27971=>1000,27972=>1000, - 27973=>1000,27974=>1000,27975=>1000,27976=>1000,27977=>1000,27978=>1000,27979=>1000,27980=>1000,27981=>1000,27982=>1000,27983=>1000,27984=>1000,27985=>1000,27986=>1000,27987=>1000,27988=>1000, - 27989=>1000,27990=>1000,27991=>1000,27992=>1000,27993=>1000,27994=>1000,27995=>1000,27996=>1000,27997=>1000,27998=>1000,27999=>1000,28000=>1000,28001=>1000,28002=>1000,28003=>1000,28004=>1000, - 28005=>1000,28006=>1000,28007=>1000,28008=>1000,28009=>1000,28010=>1000,28011=>1000,28012=>1000,28013=>1000,28014=>1000,28015=>1000,28016=>1000,28017=>1000,28018=>1000,28019=>1000,28020=>1000, - 28021=>1000,28022=>1000,28023=>1000,28024=>1000,28025=>1000,28026=>1000,28027=>1000,28028=>1000,28029=>1000,28030=>1000,28031=>1000,28032=>1000,28033=>1000,28034=>1000,28035=>1000,28036=>1000, - 28037=>1000,28038=>1000,28039=>1000,28040=>1000,28041=>1000,28042=>1000,28043=>1000,28044=>1000,28045=>1000,28046=>1000,28047=>1000,28048=>1000,28049=>1000,28050=>1000,28051=>1000,28052=>1000, - 28053=>1000,28054=>1000,28055=>1000,28056=>1000,28057=>1000,28058=>1000,28059=>1000,28060=>1000,28061=>1000,28062=>1000,28063=>1000,28064=>1000,28065=>1000,28066=>1000,28067=>1000,28068=>1000, - 28069=>1000,28070=>1000,28071=>1000,28072=>1000,28073=>1000,28074=>1000,28075=>1000,28076=>1000,28077=>1000,28078=>1000,28079=>1000,28080=>1000,28081=>1000,28082=>1000,28083=>1000,28084=>1000, - 28085=>1000,28086=>1000,28087=>1000,28088=>1000,28089=>1000,28090=>1000,28091=>1000,28092=>1000,28093=>1000,28094=>1000,28095=>1000,28096=>1000,28097=>1000,28098=>1000,28099=>1000,28100=>1000, - 28101=>1000,28102=>1000,28103=>1000,28104=>1000,28105=>1000,28106=>1000,28107=>1000,28108=>1000,28109=>1000,28110=>1000,28111=>1000,28112=>1000,28113=>1000,28114=>1000,28115=>1000,28116=>1000, - 28117=>1000,28118=>1000,28119=>1000,28120=>1000,28121=>1000,28122=>1000,28123=>1000,28124=>1000,28125=>1000,28126=>1000,28127=>1000,28128=>1000,28129=>1000,28130=>1000,28131=>1000,28132=>1000, - 28133=>1000,28134=>1000,28135=>1000,28136=>1000,28137=>1000,28138=>1000,28139=>1000,28140=>1000,28141=>1000,28142=>1000,28143=>1000,28144=>1000,28145=>1000,28146=>1000,28147=>1000,28148=>1000, - 28149=>1000,28150=>1000,28151=>1000,28152=>1000,28153=>1000,28154=>1000,28155=>1000,28156=>1000,28157=>1000,28158=>1000,28159=>1000,28160=>1000,28161=>1000,28162=>1000,28163=>1000,28164=>1000, - 28165=>1000,28166=>1000,28167=>1000,28168=>1000,28169=>1000,28170=>1000,28171=>1000,28172=>1000,28173=>1000,28174=>1000,28175=>1000,28176=>1000,28177=>1000,28178=>1000,28179=>1000,28180=>1000, - 28181=>1000,28182=>1000,28183=>1000,28184=>1000,28185=>1000,28186=>1000,28187=>1000,28188=>1000,28189=>1000,28190=>1000,28191=>1000,28192=>1000,28193=>1000,28194=>1000,28195=>1000,28196=>1000, - 28197=>1000,28198=>1000,28199=>1000,28200=>1000,28201=>1000,28202=>1000,28203=>1000,28204=>1000,28205=>1000,28206=>1000,28207=>1000,28208=>1000,28209=>1000,28210=>1000,28211=>1000,28212=>1000, - 28213=>1000,28214=>1000,28215=>1000,28216=>1000,28217=>1000,28218=>1000,28219=>1000,28220=>1000,28221=>1000,28222=>1000,28223=>1000,28224=>1000,28225=>1000,28226=>1000,28227=>1000,28228=>1000, - 28229=>1000,28230=>1000,28231=>1000,28232=>1000,28233=>1000,28234=>1000,28235=>1000,28236=>1000,28237=>1000,28238=>1000,28239=>1000,28240=>1000,28241=>1000,28242=>1000,28243=>1000,28244=>1000, - 28245=>1000,28246=>1000,28247=>1000,28248=>1000,28249=>1000,28250=>1000,28251=>1000,28252=>1000,28253=>1000,28254=>1000,28255=>1000,28256=>1000,28257=>1000,28258=>1000,28259=>1000,28260=>1000, - 28261=>1000,28262=>1000,28263=>1000,28264=>1000,28265=>1000,28266=>1000,28267=>1000,28268=>1000,28269=>1000,28270=>1000,28271=>1000,28272=>1000,28273=>1000,28274=>1000,28275=>1000,28276=>1000, - 28277=>1000,28278=>1000,28279=>1000,28280=>1000,28281=>1000,28282=>1000,28283=>1000,28284=>1000,28285=>1000,28286=>1000,28287=>1000,28288=>1000,28289=>1000,28290=>1000,28291=>1000,28292=>1000, - 28293=>1000,28294=>1000,28295=>1000,28296=>1000,28297=>1000,28298=>1000,28299=>1000,28300=>1000,28301=>1000,28302=>1000,28303=>1000,28304=>1000,28305=>1000,28306=>1000,28307=>1000,28308=>1000, - 28309=>1000,28310=>1000,28311=>1000,28312=>1000,28313=>1000,28314=>1000,28315=>1000,28316=>1000,28317=>1000,28318=>1000,28319=>1000,28320=>1000,28321=>1000,28322=>1000,28323=>1000,28324=>1000, - 28325=>1000,28326=>1000,28327=>1000,28328=>1000,28329=>1000,28330=>1000,28331=>1000,28332=>1000,28333=>1000,28334=>1000,28335=>1000,28336=>1000,28337=>1000,28338=>1000,28339=>1000,28340=>1000, - 28341=>1000,28342=>1000,28343=>1000,28344=>1000,28345=>1000,28346=>1000,28347=>1000,28348=>1000,28349=>1000,28350=>1000,28351=>1000,28352=>1000,28353=>1000,28354=>1000,28355=>1000,28356=>1000, - 28357=>1000,28358=>1000,28359=>1000,28360=>1000,28361=>1000,28362=>1000,28363=>1000,28364=>1000,28365=>1000,28366=>1000,28367=>1000,28368=>1000,28369=>1000,28370=>1000,28371=>1000,28372=>1000, - 28373=>1000,28374=>1000,28375=>1000,28376=>1000,28377=>1000,28378=>1000,28379=>1000,28380=>1000,28381=>1000,28382=>1000,28383=>1000,28384=>1000,28385=>1000,28386=>1000,28387=>1000,28388=>1000, - 28389=>1000,28390=>1000,28391=>1000,28392=>1000,28393=>1000,28394=>1000,28395=>1000,28396=>1000,28397=>1000,28398=>1000,28399=>1000,28400=>1000,28401=>1000,28402=>1000,28403=>1000,28404=>1000, - 28405=>1000,28406=>1000,28407=>1000,28408=>1000,28409=>1000,28410=>1000,28411=>1000,28412=>1000,28413=>1000,28414=>1000,28415=>1000,28416=>1000,28417=>1000,28418=>1000,28419=>1000,28420=>1000, - 28421=>1000,28422=>1000,28423=>1000,28424=>1000,28425=>1000,28426=>1000,28427=>1000,28428=>1000,28429=>1000,28430=>1000,28431=>1000,28432=>1000,28433=>1000,28434=>1000,28435=>1000,28436=>1000, - 28437=>1000,28438=>1000,28439=>1000,28440=>1000,28441=>1000,28442=>1000,28443=>1000,28444=>1000,28445=>1000,28446=>1000,28447=>1000,28448=>1000,28449=>1000,28450=>1000,28451=>1000,28452=>1000, - 28453=>1000,28454=>1000,28455=>1000,28456=>1000,28457=>1000,28458=>1000,28459=>1000,28460=>1000,28461=>1000,28462=>1000,28463=>1000,28464=>1000,28465=>1000,28466=>1000,28467=>1000,28468=>1000, - 28469=>1000,28470=>1000,28471=>1000,28472=>1000,28473=>1000,28474=>1000,28475=>1000,28476=>1000,28477=>1000,28478=>1000,28479=>1000,28480=>1000,28481=>1000,28482=>1000,28483=>1000,28484=>1000, - 28485=>1000,28486=>1000,28487=>1000,28488=>1000,28489=>1000,28490=>1000,28491=>1000,28492=>1000,28493=>1000,28494=>1000,28495=>1000,28496=>1000,28497=>1000,28498=>1000,28499=>1000,28500=>1000, - 28501=>1000,28502=>1000,28503=>1000,28504=>1000,28505=>1000,28506=>1000,28507=>1000,28508=>1000,28509=>1000,28510=>1000,28511=>1000,28512=>1000,28513=>1000,28514=>1000,28515=>1000,28516=>1000, - 28517=>1000,28518=>1000,28519=>1000,28520=>1000,28521=>1000,28522=>1000,28523=>1000,28524=>1000,28525=>1000,28526=>1000,28527=>1000,28528=>1000,28529=>1000,28530=>1000,28531=>1000,28532=>1000, - 28533=>1000,28534=>1000,28535=>1000,28536=>1000,28537=>1000,28538=>1000,28539=>1000,28540=>1000,28541=>1000,28542=>1000,28543=>1000,28544=>1000,28545=>1000,28546=>1000,28547=>1000,28548=>1000, - 28549=>1000,28550=>1000,28551=>1000,28552=>1000,28553=>1000,28554=>1000,28555=>1000,28556=>1000,28557=>1000,28558=>1000,28559=>1000,28560=>1000,28561=>1000,28562=>1000,28563=>1000,28564=>1000, - 28565=>1000,28566=>1000,28567=>1000,28568=>1000,28569=>1000,28570=>1000,28571=>1000,28572=>1000,28573=>1000,28574=>1000,28575=>1000,28576=>1000,28577=>1000,28578=>1000,28579=>1000,28580=>1000, - 28581=>1000,28582=>1000,28583=>1000,28584=>1000,28585=>1000,28586=>1000,28587=>1000,28588=>1000,28589=>1000,28590=>1000,28591=>1000,28592=>1000,28593=>1000,28594=>1000,28595=>1000,28596=>1000, - 28597=>1000,28598=>1000,28599=>1000,28600=>1000,28601=>1000,28602=>1000,28603=>1000,28604=>1000,28605=>1000,28606=>1000,28607=>1000,28608=>1000,28609=>1000,28610=>1000,28611=>1000,28612=>1000, - 28613=>1000,28614=>1000,28615=>1000,28616=>1000,28617=>1000,28618=>1000,28619=>1000,28620=>1000,28621=>1000,28622=>1000,28623=>1000,28624=>1000,28625=>1000,28626=>1000,28627=>1000,28628=>1000, - 28629=>1000,28630=>1000,28631=>1000,28632=>1000,28633=>1000,28634=>1000,28635=>1000,28636=>1000,28637=>1000,28638=>1000,28639=>1000,28640=>1000,28641=>1000,28642=>1000,28643=>1000,28644=>1000, - 28645=>1000,28646=>1000,28647=>1000,28648=>1000,28649=>1000,28650=>1000,28651=>1000,28652=>1000,28653=>1000,28654=>1000,28655=>1000,28656=>1000,28657=>1000,28658=>1000,28659=>1000,28660=>1000, - 28661=>1000,28662=>1000,28663=>1000,28664=>1000,28665=>1000,28666=>1000,28667=>1000,28668=>1000,28669=>1000,28670=>1000,28671=>1000,28672=>1000,28673=>1000,28674=>1000,28675=>1000,28676=>1000, - 28677=>1000,28678=>1000,28679=>1000,28680=>1000,28681=>1000,28682=>1000,28683=>1000,28684=>1000,28685=>1000,28686=>1000,28687=>1000,28688=>1000,28689=>1000,28690=>1000,28691=>1000,28692=>1000, - 28693=>1000,28694=>1000,28695=>1000,28696=>1000,28697=>1000,28698=>1000,28699=>1000,28700=>1000,28701=>1000,28702=>1000,28703=>1000,28704=>1000,28705=>1000,28706=>1000,28707=>1000,28708=>1000, - 28709=>1000,28710=>1000,28711=>1000,28712=>1000,28713=>1000,28714=>1000,28715=>1000,28716=>1000,28717=>1000,28718=>1000,28719=>1000,28720=>1000,28721=>1000,28722=>1000,28723=>1000,28724=>1000, - 28725=>1000,28726=>1000,28727=>1000,28728=>1000,28729=>1000,28730=>1000,28731=>1000,28732=>1000,28733=>1000,28734=>1000,28735=>1000,28736=>1000,28737=>1000,28738=>1000,28739=>1000,28740=>1000, - 28741=>1000,28742=>1000,28743=>1000,28744=>1000,28745=>1000,28746=>1000,28747=>1000,28748=>1000,28749=>1000,28750=>1000,28751=>1000,28752=>1000,28753=>1000,28754=>1000,28755=>1000,28756=>1000, - 28757=>1000,28758=>1000,28759=>1000,28760=>1000,28761=>1000,28762=>1000,28763=>1000,28764=>1000,28765=>1000,28766=>1000,28767=>1000,28768=>1000,28769=>1000,28770=>1000,28771=>1000,28772=>1000, - 28773=>1000,28774=>1000,28775=>1000,28776=>1000,28777=>1000,28778=>1000,28779=>1000,28780=>1000,28781=>1000,28782=>1000,28783=>1000,28784=>1000,28785=>1000,28786=>1000,28787=>1000,28788=>1000, - 28789=>1000,28790=>1000,28791=>1000,28792=>1000,28793=>1000,28794=>1000,28795=>1000,28796=>1000,28797=>1000,28798=>1000,28799=>1000,28800=>1000,28801=>1000,28802=>1000,28803=>1000,28804=>1000, - 28805=>1000,28806=>1000,28807=>1000,28808=>1000,28809=>1000,28810=>1000,28811=>1000,28812=>1000,28813=>1000,28814=>1000,28815=>1000,28816=>1000,28817=>1000,28818=>1000,28819=>1000,28820=>1000, - 28821=>1000,28822=>1000,28823=>1000,28824=>1000,28825=>1000,28826=>1000,28827=>1000,28828=>1000,28829=>1000,28830=>1000,28831=>1000,28832=>1000,28833=>1000,28834=>1000,28835=>1000,28836=>1000, - 28837=>1000,28838=>1000,28839=>1000,28840=>1000,28841=>1000,28842=>1000,28843=>1000,28844=>1000,28845=>1000,28846=>1000,28847=>1000,28848=>1000,28849=>1000,28850=>1000,28851=>1000,28852=>1000, - 28853=>1000,28854=>1000,28855=>1000,28856=>1000,28857=>1000,28858=>1000,28859=>1000,28860=>1000,28861=>1000,28862=>1000,28863=>1000,28864=>1000,28865=>1000,28866=>1000,28867=>1000,28868=>1000, - 28869=>1000,28870=>1000,28871=>1000,28872=>1000,28873=>1000,28874=>1000,28875=>1000,28876=>1000,28877=>1000,28878=>1000,28879=>1000,28880=>1000,28881=>1000,28882=>1000,28883=>1000,28884=>1000, - 28885=>1000,28886=>1000,28887=>1000,28888=>1000,28889=>1000,28890=>1000,28891=>1000,28892=>1000,28893=>1000,28894=>1000,28895=>1000,28896=>1000,28897=>1000,28898=>1000,28899=>1000,28900=>1000, - 28901=>1000,28902=>1000,28903=>1000,28904=>1000,28905=>1000,28906=>1000,28907=>1000,28908=>1000,28909=>1000,28910=>1000,28911=>1000,28912=>1000,28913=>1000,28914=>1000,28915=>1000,28916=>1000, - 28917=>1000,28918=>1000,28919=>1000,28920=>1000,28921=>1000,28922=>1000,28923=>1000,28924=>1000,28925=>1000,28926=>1000,28927=>1000,28928=>1000,28929=>1000,28930=>1000,28931=>1000,28932=>1000, - 28933=>1000,28934=>1000,28935=>1000,28936=>1000,28937=>1000,28938=>1000,28939=>1000,28940=>1000,28941=>1000,28942=>1000,28943=>1000,28944=>1000,28945=>1000,28946=>1000,28947=>1000,28948=>1000, - 28949=>1000,28950=>1000,28951=>1000,28952=>1000,28953=>1000,28954=>1000,28955=>1000,28956=>1000,28957=>1000,28958=>1000,28959=>1000,28960=>1000,28961=>1000,28962=>1000,28963=>1000,28964=>1000, - 28965=>1000,28966=>1000,28967=>1000,28968=>1000,28969=>1000,28970=>1000,28971=>1000,28972=>1000,28973=>1000,28974=>1000,28975=>1000,28976=>1000,28977=>1000,28978=>1000,28979=>1000,28980=>1000, - 28981=>1000,28982=>1000,28983=>1000,28984=>1000,28985=>1000,28986=>1000,28987=>1000,28988=>1000,28989=>1000,28990=>1000,28991=>1000,28992=>1000,28993=>1000,28994=>1000,28995=>1000,28996=>1000, - 28997=>1000,28998=>1000,28999=>1000,29000=>1000,29001=>1000,29002=>1000,29003=>1000,29004=>1000,29005=>1000,29006=>1000,29007=>1000,29008=>1000,29009=>1000,29010=>1000,29011=>1000,29012=>1000, - 29013=>1000,29014=>1000,29015=>1000,29016=>1000,29017=>1000,29018=>1000,29019=>1000,29020=>1000,29021=>1000,29022=>1000,29023=>1000,29024=>1000,29025=>1000,29026=>1000,29027=>1000,29028=>1000, - 29029=>1000,29030=>1000,29031=>1000,29032=>1000,29033=>1000,29034=>1000,29035=>1000,29036=>1000,29037=>1000,29038=>1000,29039=>1000,29040=>1000,29041=>1000,29042=>1000,29043=>1000,29044=>1000, - 29045=>1000,29046=>1000,29047=>1000,29048=>1000,29049=>1000,29050=>1000,29051=>1000,29052=>1000,29053=>1000,29054=>1000,29055=>1000,29056=>1000,29057=>1000,29058=>1000,29059=>1000,29060=>1000, - 29061=>1000,29062=>1000,29063=>1000,29064=>1000,29065=>1000,29066=>1000,29067=>1000,29068=>1000,29069=>1000,29070=>1000,29071=>1000,29072=>1000,29073=>1000,29074=>1000,29075=>1000,29076=>1000, - 29077=>1000,29078=>1000,29079=>1000,29080=>1000,29081=>1000,29082=>1000,29083=>1000,29084=>1000,29085=>1000,29086=>1000,29087=>1000,29088=>1000,29089=>1000,29090=>1000,29091=>1000,29092=>1000, - 29093=>1000,29094=>1000,29095=>1000,29096=>1000,29097=>1000,29098=>1000,29099=>1000,29100=>1000,29101=>1000,29102=>1000,29103=>1000,29104=>1000,29105=>1000,29106=>1000,29107=>1000,29108=>1000, - 29109=>1000,29110=>1000,29111=>1000,29112=>1000,29113=>1000,29114=>1000,29115=>1000,29116=>1000,29117=>1000,29118=>1000,29119=>1000,29120=>1000,29121=>1000,29122=>1000,29123=>1000,29124=>1000, - 29125=>1000,29126=>1000,29127=>1000,29128=>1000,29129=>1000,29130=>1000,29131=>1000,29132=>1000,29133=>1000,29134=>1000,29135=>1000,29136=>1000,29137=>1000,29138=>1000,29139=>1000,29140=>1000, - 29141=>1000,29142=>1000,29143=>1000,29144=>1000,29145=>1000,29146=>1000,29147=>1000,29148=>1000,29149=>1000,29150=>1000,29151=>1000,29152=>1000,29153=>1000,29154=>1000,29155=>1000,29156=>1000, - 29157=>1000,29158=>1000,29159=>1000,29160=>1000,29161=>1000,29162=>1000,29163=>1000,29164=>1000,29165=>1000,29166=>1000,29167=>1000,29168=>1000,29169=>1000,29170=>1000,29171=>1000,29172=>1000, - 29173=>1000,29174=>1000,29175=>1000,29176=>1000,29177=>1000,29178=>1000,29179=>1000,29180=>1000,29181=>1000,29182=>1000,29183=>1000,29184=>1000,29185=>1000,29186=>1000,29187=>1000,29188=>1000, - 29189=>1000,29190=>1000,29191=>1000,29192=>1000,29193=>1000,29194=>1000,29195=>1000,29196=>1000,29197=>1000,29198=>1000,29199=>1000,29200=>1000,29201=>1000,29202=>1000,29203=>1000,29204=>1000, - 29205=>1000,29206=>1000,29207=>1000,29208=>1000,29209=>1000,29210=>1000,29211=>1000,29212=>1000,29213=>1000,29214=>1000,29215=>1000,29216=>1000,29217=>1000,29218=>1000,29219=>1000,29220=>1000, - 29221=>1000,29222=>1000,29223=>1000,29224=>1000,29225=>1000,29226=>1000,29227=>1000,29228=>1000,29229=>1000,29230=>1000,29231=>1000,29232=>1000,29233=>1000,29234=>1000,29235=>1000,29236=>1000, - 29237=>1000,29238=>1000,29239=>1000,29240=>1000,29241=>1000,29242=>1000,29243=>1000,29244=>1000,29245=>1000,29246=>1000,29247=>1000,29248=>1000,29249=>1000,29250=>1000,29251=>1000,29252=>1000, - 29253=>1000,29254=>1000,29255=>1000,29256=>1000,29257=>1000,29258=>1000,29259=>1000,29260=>1000,29261=>1000,29262=>1000,29263=>1000,29264=>1000,29265=>1000,29266=>1000,29267=>1000,29268=>1000, - 29269=>1000,29270=>1000,29271=>1000,29272=>1000,29273=>1000,29274=>1000,29275=>1000,29276=>1000,29277=>1000,29278=>1000,29279=>1000,29280=>1000,29281=>1000,29282=>1000,29283=>1000,29284=>1000, - 29285=>1000,29286=>1000,29287=>1000,29288=>1000,29289=>1000,29290=>1000,29291=>1000,29292=>1000,29293=>1000,29294=>1000,29295=>1000,29296=>1000,29297=>1000,29298=>1000,29299=>1000,29300=>1000, - 29301=>1000,29302=>1000,29303=>1000,29304=>1000,29305=>1000,29306=>1000,29307=>1000,29308=>1000,29309=>1000,29310=>1000,29311=>1000,29312=>1000,29313=>1000,29314=>1000,29315=>1000,29316=>1000, - 29317=>1000,29318=>1000,29319=>1000,29320=>1000,29321=>1000,29322=>1000,29323=>1000,29324=>1000,29325=>1000,29326=>1000,29327=>1000,29328=>1000,29329=>1000,29330=>1000,29331=>1000,29332=>1000, - 29333=>1000,29334=>1000,29335=>1000,29336=>1000,29337=>1000,29338=>1000,29339=>1000,29340=>1000,29341=>1000,29342=>1000,29343=>1000,29344=>1000,29345=>1000,29346=>1000,29347=>1000,29348=>1000, - 29349=>1000,29350=>1000,29351=>1000,29352=>1000,29353=>1000,29354=>1000,29355=>1000,29356=>1000,29357=>1000,29358=>1000,29359=>1000,29360=>1000,29361=>1000,29362=>1000,29363=>1000,29364=>1000, - 29365=>1000,29366=>1000,29367=>1000,29368=>1000,29369=>1000,29370=>1000,29371=>1000,29372=>1000,29373=>1000,29374=>1000,29375=>1000,29376=>1000,29377=>1000,29378=>1000,29379=>1000,29380=>1000, - 29381=>1000,29382=>1000,29383=>1000,29384=>1000,29385=>1000,29386=>1000,29387=>1000,29388=>1000,29389=>1000,29390=>1000,29391=>1000,29392=>1000,29393=>1000,29394=>1000,29395=>1000,29396=>1000, - 29397=>1000,29398=>1000,29399=>1000,29400=>1000,29401=>1000,29402=>1000,29403=>1000,29404=>1000,29405=>1000,29406=>1000,29407=>1000,29408=>1000,29409=>1000,29410=>1000,29411=>1000,29412=>1000, - 29413=>1000,29414=>1000,29415=>1000,29416=>1000,29417=>1000,29418=>1000,29419=>1000,29420=>1000,29421=>1000,29422=>1000,29423=>1000,29424=>1000,29425=>1000,29426=>1000,29427=>1000,29428=>1000, - 29429=>1000,29430=>1000,29431=>1000,29432=>1000,29433=>1000,29434=>1000,29435=>1000,29436=>1000,29437=>1000,29438=>1000,29439=>1000,29440=>1000,29441=>1000,29442=>1000,29443=>1000,29444=>1000, - 29445=>1000,29446=>1000,29447=>1000,29448=>1000,29449=>1000,29450=>1000,29451=>1000,29452=>1000,29453=>1000,29454=>1000,29455=>1000,29456=>1000,29457=>1000,29458=>1000,29459=>1000,29460=>1000, - 29461=>1000,29462=>1000,29463=>1000,29464=>1000,29465=>1000,29466=>1000,29467=>1000,29468=>1000,29469=>1000,29470=>1000,29471=>1000,29472=>1000,29473=>1000,29474=>1000,29475=>1000,29476=>1000, - 29477=>1000,29478=>1000,29479=>1000,29480=>1000,29481=>1000,29482=>1000,29483=>1000,29484=>1000,29485=>1000,29486=>1000,29487=>1000,29488=>1000,29489=>1000,29490=>1000,29491=>1000,29492=>1000, - 29493=>1000,29494=>1000,29495=>1000,29496=>1000,29497=>1000,29498=>1000,29499=>1000,29500=>1000,29501=>1000,29502=>1000,29503=>1000,29504=>1000,29505=>1000,29506=>1000,29507=>1000,29508=>1000, - 29509=>1000,29510=>1000,29511=>1000,29512=>1000,29513=>1000,29514=>1000,29515=>1000,29516=>1000,29517=>1000,29518=>1000,29519=>1000,29520=>1000,29521=>1000,29522=>1000,29523=>1000,29524=>1000, - 29525=>1000,29526=>1000,29527=>1000,29528=>1000,29529=>1000,29530=>1000,29531=>1000,29532=>1000,29533=>1000,29534=>1000,29535=>1000,29536=>1000,29537=>1000,29538=>1000,29539=>1000,29540=>1000, - 29541=>1000,29542=>1000,29543=>1000,29544=>1000,29545=>1000,29546=>1000,29547=>1000,29548=>1000,29549=>1000,29550=>1000,29551=>1000,29552=>1000,29553=>1000,29554=>1000,29555=>1000,29556=>1000, - 29557=>1000,29558=>1000,29559=>1000,29560=>1000,29561=>1000,29562=>1000,29563=>1000,29564=>1000,29565=>1000,29566=>1000,29567=>1000,29568=>1000,29569=>1000,29570=>1000,29571=>1000,29572=>1000, - 29573=>1000,29574=>1000,29575=>1000,29576=>1000,29577=>1000,29578=>1000,29579=>1000,29580=>1000,29581=>1000,29582=>1000,29583=>1000,29584=>1000,29585=>1000,29586=>1000,29587=>1000,29588=>1000, - 29589=>1000,29590=>1000,29591=>1000,29592=>1000,29593=>1000,29594=>1000,29595=>1000,29596=>1000,29597=>1000,29598=>1000,29599=>1000,29600=>1000,29601=>1000,29602=>1000,29603=>1000,29604=>1000, - 29605=>1000,29606=>1000,29607=>1000,29608=>1000,29609=>1000,29610=>1000,29611=>1000,29612=>1000,29613=>1000,29614=>1000,29615=>1000,29616=>1000,29617=>1000,29618=>1000,29619=>1000,29620=>1000, - 29621=>1000,29622=>1000,29623=>1000,29624=>1000,29625=>1000,29626=>1000,29627=>1000,29628=>1000,29629=>1000,29630=>1000,29631=>1000,29632=>1000,29633=>1000,29634=>1000,29635=>1000,29636=>1000, - 29637=>1000,29638=>1000,29639=>1000,29640=>1000,29641=>1000,29642=>1000,29643=>1000,29644=>1000,29645=>1000,29646=>1000,29647=>1000,29648=>1000,29649=>1000,29650=>1000,29651=>1000,29652=>1000, - 29653=>1000,29654=>1000,29655=>1000,29656=>1000,29657=>1000,29658=>1000,29659=>1000,29660=>1000,29661=>1000,29662=>1000,29663=>1000,29664=>1000,29665=>1000,29666=>1000,29667=>1000,29668=>1000, - 29669=>1000,29670=>1000,29671=>1000,29672=>1000,29673=>1000,29674=>1000,29675=>1000,29676=>1000,29677=>1000,29678=>1000,29679=>1000,29680=>1000,29681=>1000,29682=>1000,29683=>1000,29684=>1000, - 29685=>1000,29686=>1000,29687=>1000,29688=>1000,29689=>1000,29690=>1000,29691=>1000,29692=>1000,29693=>1000,29694=>1000,29695=>1000,29696=>1000,29697=>1000,29698=>1000,29699=>1000,29700=>1000, - 29701=>1000,29702=>1000,29703=>1000,29704=>1000,29705=>1000,29706=>1000,29707=>1000,29708=>1000,29709=>1000,29710=>1000,29711=>1000,29712=>1000,29713=>1000,29714=>1000,29715=>1000,29716=>1000, - 29717=>1000,29718=>1000,29719=>1000,29720=>1000,29721=>1000,29722=>1000,29723=>1000,29724=>1000,29725=>1000,29726=>1000,29727=>1000,29728=>1000,29729=>1000,29730=>1000,29731=>1000,29732=>1000, - 29733=>1000,29734=>1000,29735=>1000,29736=>1000,29737=>1000,29738=>1000,29739=>1000,29740=>1000,29741=>1000,29742=>1000,29743=>1000,29744=>1000,29745=>1000,29746=>1000,29747=>1000,29748=>1000, - 29749=>1000,29750=>1000,29751=>1000,29752=>1000,29753=>1000,29754=>1000,29755=>1000,29756=>1000,29757=>1000,29758=>1000,29759=>1000,29760=>1000,29761=>1000,29762=>1000,29763=>1000,29764=>1000, - 29765=>1000,29766=>1000,29767=>1000,29768=>1000,29769=>1000,29770=>1000,29771=>1000,29772=>1000,29773=>1000,29774=>1000,29775=>1000,29776=>1000,29777=>1000,29778=>1000,29779=>1000,29780=>1000, - 29781=>1000,29782=>1000,29783=>1000,29784=>1000,29785=>1000,29786=>1000,29787=>1000,29788=>1000,29789=>1000,29790=>1000,29791=>1000,29792=>1000,29793=>1000,29794=>1000,29795=>1000,29796=>1000, - 29797=>1000,29798=>1000,29799=>1000,29800=>1000,29801=>1000,29802=>1000,29803=>1000,29804=>1000,29805=>1000,29806=>1000,29807=>1000,29808=>1000,29809=>1000,29810=>1000,29811=>1000,29812=>1000, - 29813=>1000,29814=>1000,29815=>1000,29816=>1000,29817=>1000,29818=>1000,29819=>1000,29820=>1000,29821=>1000,29822=>1000,29823=>1000,29824=>1000,29825=>1000,29826=>1000,29827=>1000,29828=>1000, - 29829=>1000,29830=>1000,29831=>1000,29832=>1000,29833=>1000,29834=>1000,29835=>1000,29836=>1000,29837=>1000,29838=>1000,29839=>1000,29840=>1000,29841=>1000,29842=>1000,29843=>1000,29844=>1000, - 29845=>1000,29846=>1000,29847=>1000,29848=>1000,29849=>1000,29850=>1000,29851=>1000,29852=>1000,29853=>1000,29854=>1000,29855=>1000,29856=>1000,29857=>1000,29858=>1000,29859=>1000,29860=>1000, - 29861=>1000,29862=>1000,29863=>1000,29864=>1000,29865=>1000,29866=>1000,29867=>1000,29868=>1000,29869=>1000,29870=>1000,29871=>1000,29872=>1000,29873=>1000,29874=>1000,29875=>1000,29876=>1000, - 29877=>1000,29878=>1000,29879=>1000,29880=>1000,29881=>1000,29882=>1000,29883=>1000,29884=>1000,29885=>1000,29886=>1000,29887=>1000,29888=>1000,29889=>1000,29890=>1000,29891=>1000,29892=>1000, - 29893=>1000,29894=>1000,29895=>1000,29896=>1000,29897=>1000,29898=>1000,29899=>1000,29900=>1000,29901=>1000,29902=>1000,29903=>1000,29904=>1000,29905=>1000,29906=>1000,29907=>1000,29908=>1000, - 29909=>1000,29910=>1000,29911=>1000,29912=>1000,29913=>1000,29914=>1000,29915=>1000,29916=>1000,29917=>1000,29918=>1000,29919=>1000,29920=>1000,29921=>1000,29922=>1000,29923=>1000,29924=>1000, - 29925=>1000,29926=>1000,29927=>1000,29928=>1000,29929=>1000,29930=>1000,29931=>1000,29932=>1000,29933=>1000,29934=>1000,29935=>1000,29936=>1000,29937=>1000,29938=>1000,29939=>1000,29940=>1000, - 29941=>1000,29942=>1000,29943=>1000,29944=>1000,29945=>1000,29946=>1000,29947=>1000,29948=>1000,29949=>1000,29950=>1000,29951=>1000,29952=>1000,29953=>1000,29954=>1000,29955=>1000,29956=>1000, - 29957=>1000,29958=>1000,29959=>1000,29960=>1000,29961=>1000,29962=>1000,29963=>1000,29964=>1000,29965=>1000,29966=>1000,29967=>1000,29968=>1000,29969=>1000,29970=>1000,29971=>1000,29972=>1000, - 29973=>1000,29974=>1000,29975=>1000,29976=>1000,29977=>1000,29978=>1000,29979=>1000,29980=>1000,29981=>1000,29982=>1000,29983=>1000,29984=>1000,29985=>1000,29986=>1000,29987=>1000,29988=>1000, - 29989=>1000,29990=>1000,29991=>1000,29992=>1000,29993=>1000,29994=>1000,29995=>1000,29996=>1000,29997=>1000,29998=>1000,29999=>1000,30000=>1000,30001=>1000,30002=>1000,30003=>1000,30004=>1000, - 30005=>1000,30006=>1000,30007=>1000,30008=>1000,30009=>1000,30010=>1000,30011=>1000,30012=>1000,30013=>1000,30014=>1000,30015=>1000,30016=>1000,30017=>1000,30018=>1000,30019=>1000,30020=>1000, - 30021=>1000,30022=>1000,30023=>1000,30024=>1000,30025=>1000,30026=>1000,30027=>1000,30028=>1000,30029=>1000,30030=>1000,30031=>1000,30032=>1000,30033=>1000,30034=>1000,30035=>1000,30036=>1000, - 30037=>1000,30038=>1000,30039=>1000,30040=>1000,30041=>1000,30042=>1000,30043=>1000,30044=>1000,30045=>1000,30046=>1000,30047=>1000,30048=>1000,30049=>1000,30050=>1000,30051=>1000,30052=>1000, - 30053=>1000,30054=>1000,30055=>1000,30056=>1000,30057=>1000,30058=>1000,30059=>1000,30060=>1000,30061=>1000,30062=>1000,30063=>1000,30064=>1000,30065=>1000,30066=>1000,30067=>1000,30068=>1000, - 30069=>1000,30070=>1000,30071=>1000,30072=>1000,30073=>1000,30074=>1000,30075=>1000,30076=>1000,30077=>1000,30078=>1000,30079=>1000,30080=>1000,30081=>1000,30082=>1000,30083=>1000,30084=>1000, - 30085=>1000,30086=>1000,30087=>1000,30088=>1000,30089=>1000,30090=>1000,30091=>1000,30092=>1000,30093=>1000,30094=>1000,30095=>1000,30096=>1000,30097=>1000,30098=>1000,30099=>1000,30100=>1000, - 30101=>1000,30102=>1000,30103=>1000,30104=>1000,30105=>1000,30106=>1000,30107=>1000,30108=>1000,30109=>1000,30110=>1000,30111=>1000,30112=>1000,30113=>1000,30114=>1000,30115=>1000,30116=>1000, - 30117=>1000,30118=>1000,30119=>1000,30120=>1000,30121=>1000,30122=>1000,30123=>1000,30124=>1000,30125=>1000,30126=>1000,30127=>1000,30128=>1000,30129=>1000,30130=>1000,30131=>1000,30132=>1000, - 30133=>1000,30134=>1000,30135=>1000,30136=>1000,30137=>1000,30138=>1000,30139=>1000,30140=>1000,30141=>1000,30142=>1000,30143=>1000,30144=>1000,30145=>1000,30146=>1000,30147=>1000,30148=>1000, - 30149=>1000,30150=>1000,30151=>1000,30152=>1000,30153=>1000,30154=>1000,30155=>1000,30156=>1000,30157=>1000,30158=>1000,30159=>1000,30160=>1000,30161=>1000,30162=>1000,30163=>1000,30164=>1000, - 30165=>1000,30166=>1000,30167=>1000,30168=>1000,30169=>1000,30170=>1000,30171=>1000,30172=>1000,30173=>1000,30174=>1000,30175=>1000,30176=>1000,30177=>1000,30178=>1000,30179=>1000,30180=>1000, - 30181=>1000,30182=>1000,30183=>1000,30184=>1000,30185=>1000,30186=>1000,30187=>1000,30188=>1000,30189=>1000,30190=>1000,30191=>1000,30192=>1000,30193=>1000,30194=>1000,30195=>1000,30196=>1000, - 30197=>1000,30198=>1000,30199=>1000,30200=>1000,30201=>1000,30202=>1000,30203=>1000,30204=>1000,30205=>1000,30206=>1000,30207=>1000,30208=>1000,30209=>1000,30210=>1000,30211=>1000,30212=>1000, - 30213=>1000,30214=>1000,30215=>1000,30216=>1000,30217=>1000,30218=>1000,30219=>1000,30220=>1000,30221=>1000,30222=>1000,30223=>1000,30224=>1000,30225=>1000,30226=>1000,30227=>1000,30228=>1000, - 30229=>1000,30230=>1000,30231=>1000,30232=>1000,30233=>1000,30234=>1000,30235=>1000,30236=>1000,30237=>1000,30238=>1000,30239=>1000,30240=>1000,30241=>1000,30242=>1000,30243=>1000,30244=>1000, - 30245=>1000,30246=>1000,30247=>1000,30248=>1000,30249=>1000,30250=>1000,30251=>1000,30252=>1000,30253=>1000,30254=>1000,30255=>1000,30256=>1000,30257=>1000,30258=>1000,30259=>1000,30260=>1000, - 30261=>1000,30262=>1000,30263=>1000,30264=>1000,30265=>1000,30266=>1000,30267=>1000,30268=>1000,30269=>1000,30270=>1000,30271=>1000,30272=>1000,30273=>1000,30274=>1000,30275=>1000,30276=>1000, - 30277=>1000,30278=>1000,30279=>1000,30280=>1000,30281=>1000,30282=>1000,30283=>1000,30284=>1000,30285=>1000,30286=>1000,30287=>1000,30288=>1000,30289=>1000,30290=>1000,30291=>1000,30292=>1000, - 30293=>1000,30294=>1000,30295=>1000,30296=>1000,30297=>1000,30298=>1000,30299=>1000,30300=>1000,30301=>1000,30302=>1000,30303=>1000,30304=>1000,30305=>1000,30306=>1000,30307=>1000,30308=>1000, - 30309=>1000,30310=>1000,30311=>1000,30312=>1000,30313=>1000,30314=>1000,30315=>1000,30316=>1000,30317=>1000,30318=>1000,30319=>1000,30320=>1000,30321=>1000,30322=>1000,30323=>1000,30324=>1000, - 30325=>1000,30326=>1000,30327=>1000,30328=>1000,30329=>1000,30330=>1000,30331=>1000,30332=>1000,30333=>1000,30334=>1000,30335=>1000,30336=>1000,30337=>1000,30338=>1000,30339=>1000,30340=>1000, - 30341=>1000,30342=>1000,30343=>1000,30344=>1000,30345=>1000,30346=>1000,30347=>1000,30348=>1000,30349=>1000,30350=>1000,30351=>1000,30352=>1000,30353=>1000,30354=>1000,30355=>1000,30356=>1000, - 30357=>1000,30358=>1000,30359=>1000,30360=>1000,30361=>1000,30362=>1000,30363=>1000,30364=>1000,30365=>1000,30366=>1000,30367=>1000,30368=>1000,30369=>1000,30370=>1000,30371=>1000,30372=>1000, - 30373=>1000,30374=>1000,30375=>1000,30376=>1000,30377=>1000,30378=>1000,30379=>1000,30380=>1000,30381=>1000,30382=>1000,30383=>1000,30384=>1000,30385=>1000,30386=>1000,30387=>1000,30388=>1000, - 30389=>1000,30390=>1000,30391=>1000,30392=>1000,30393=>1000,30394=>1000,30395=>1000,30396=>1000,30397=>1000,30398=>1000,30399=>1000,30400=>1000,30401=>1000,30402=>1000,30403=>1000,30404=>1000, - 30405=>1000,30406=>1000,30407=>1000,30408=>1000,30409=>1000,30410=>1000,30411=>1000,30412=>1000,30413=>1000,30414=>1000,30415=>1000,30416=>1000,30417=>1000,30418=>1000,30419=>1000,30420=>1000, - 30421=>1000,30422=>1000,30423=>1000,30424=>1000,30425=>1000,30426=>1000,30427=>1000,30428=>1000,30429=>1000,30430=>1000,30431=>1000,30432=>1000,30433=>1000,30434=>1000,30435=>1000,30436=>1000, - 30437=>1000,30438=>1000,30439=>1000,30440=>1000,30441=>1000,30442=>1000,30443=>1000,30444=>1000,30445=>1000,30446=>1000,30447=>1000,30448=>1000,30449=>1000,30450=>1000,30451=>1000,30452=>1000, - 30453=>1000,30454=>1000,30455=>1000,30456=>1000,30457=>1000,30458=>1000,30459=>1000,30460=>1000,30461=>1000,30462=>1000,30463=>1000,30464=>1000,30465=>1000,30466=>1000,30467=>1000,30468=>1000, - 30469=>1000,30470=>1000,30471=>1000,30472=>1000,30473=>1000,30474=>1000,30475=>1000,30476=>1000,30477=>1000,30478=>1000,30479=>1000,30480=>1000,30481=>1000,30482=>1000,30483=>1000,30484=>1000, - 30485=>1000,30486=>1000,30487=>1000,30488=>1000,30489=>1000,30490=>1000,30491=>1000,30492=>1000,30493=>1000,30494=>1000,30495=>1000,30496=>1000,30497=>1000,30498=>1000,30499=>1000,30500=>1000, - 30501=>1000,30502=>1000,30503=>1000,30504=>1000,30505=>1000,30506=>1000,30507=>1000,30508=>1000,30509=>1000,30510=>1000,30511=>1000,30512=>1000,30513=>1000,30514=>1000,30515=>1000,30516=>1000, - 30517=>1000,30518=>1000,30519=>1000,30520=>1000,30521=>1000,30522=>1000,30523=>1000,30524=>1000,30525=>1000,30526=>1000,30527=>1000,30528=>1000,30529=>1000,30530=>1000,30531=>1000,30532=>1000, - 30533=>1000,30534=>1000,30535=>1000,30536=>1000,30537=>1000,30538=>1000,30539=>1000,30540=>1000,30541=>1000,30542=>1000,30543=>1000,30544=>1000,30545=>1000,30546=>1000,30547=>1000,30548=>1000, - 30549=>1000,30550=>1000,30551=>1000,30552=>1000,30553=>1000,30554=>1000,30555=>1000,30556=>1000,30557=>1000,30558=>1000,30559=>1000,30560=>1000,30561=>1000,30562=>1000,30563=>1000,30564=>1000, - 30565=>1000,30566=>1000,30567=>1000,30568=>1000,30569=>1000,30570=>1000,30571=>1000,30572=>1000,30573=>1000,30574=>1000,30575=>1000,30576=>1000,30577=>1000,30578=>1000,30579=>1000,30580=>1000, - 30581=>1000,30582=>1000,30583=>1000,30584=>1000,30585=>1000,30586=>1000,30587=>1000,30588=>1000,30589=>1000,30590=>1000,30591=>1000,30592=>1000,30593=>1000,30594=>1000,30595=>1000,30596=>1000, - 30597=>1000,30598=>1000,30599=>1000,30600=>1000,30601=>1000,30602=>1000,30603=>1000,30604=>1000,30605=>1000,30606=>1000,30607=>1000,30608=>1000,30609=>1000,30610=>1000,30611=>1000,30612=>1000, - 30613=>1000,30614=>1000,30615=>1000,30616=>1000,30617=>1000,30618=>1000,30619=>1000,30620=>1000,30621=>1000,30622=>1000,30623=>1000,30624=>1000,30625=>1000,30626=>1000,30627=>1000,30628=>1000, - 30629=>1000,30630=>1000,30631=>1000,30632=>1000,30633=>1000,30634=>1000,30635=>1000,30636=>1000,30637=>1000,30638=>1000,30639=>1000,30640=>1000,30641=>1000,30642=>1000,30643=>1000,30644=>1000, - 30645=>1000,30646=>1000,30647=>1000,30648=>1000,30649=>1000,30650=>1000,30651=>1000,30652=>1000,30653=>1000,30654=>1000,30655=>1000,30656=>1000,30657=>1000,30658=>1000,30659=>1000,30660=>1000, - 30661=>1000,30662=>1000,30663=>1000,30664=>1000,30665=>1000,30666=>1000,30667=>1000,30668=>1000,30669=>1000,30670=>1000,30671=>1000,30672=>1000,30673=>1000,30674=>1000,30675=>1000,30676=>1000, - 30677=>1000,30678=>1000,30679=>1000,30680=>1000,30681=>1000,30682=>1000,30683=>1000,30684=>1000,30685=>1000,30686=>1000,30687=>1000,30688=>1000,30689=>1000,30690=>1000,30691=>1000,30692=>1000, - 30693=>1000,30694=>1000,30695=>1000,30696=>1000,30697=>1000,30698=>1000,30699=>1000,30700=>1000,30701=>1000,30702=>1000,30703=>1000,30704=>1000,30705=>1000,30706=>1000,30707=>1000,30708=>1000, - 30709=>1000,30710=>1000,30711=>1000,30712=>1000,30713=>1000,30714=>1000,30715=>1000,30716=>1000,30717=>1000,30718=>1000,30719=>1000,30720=>1000,30721=>1000,30722=>1000,30723=>1000,30724=>1000, - 30725=>1000,30726=>1000,30727=>1000,30728=>1000,30729=>1000,30730=>1000,30731=>1000,30732=>1000,30733=>1000,30734=>1000,30735=>1000,30736=>1000,30737=>1000,30738=>1000,30739=>1000,30740=>1000, - 30741=>1000,30742=>1000,30743=>1000,30744=>1000,30745=>1000,30746=>1000,30747=>1000,30748=>1000,30749=>1000,30750=>1000,30751=>1000,30752=>1000,30753=>1000,30754=>1000,30755=>1000,30756=>1000, - 30757=>1000,30758=>1000,30759=>1000,30760=>1000,30761=>1000,30762=>1000,30763=>1000,30764=>1000,30765=>1000,30766=>1000,30767=>1000,30768=>1000,30769=>1000,30770=>1000,30771=>1000,30772=>1000, - 30773=>1000,30774=>1000,30775=>1000,30776=>1000,30777=>1000,30778=>1000,30779=>1000,30780=>1000,30781=>1000,30782=>1000,30783=>1000,30784=>1000,30785=>1000,30786=>1000,30787=>1000,30788=>1000, - 30789=>1000,30790=>1000,30791=>1000,30792=>1000,30793=>1000,30794=>1000,30795=>1000,30796=>1000,30797=>1000,30798=>1000,30799=>1000,30800=>1000,30801=>1000,30802=>1000,30803=>1000,30804=>1000, - 30805=>1000,30806=>1000,30807=>1000,30808=>1000,30809=>1000,30810=>1000,30811=>1000,30812=>1000,30813=>1000,30814=>1000,30815=>1000,30816=>1000,30817=>1000,30818=>1000,30819=>1000,30820=>1000, - 30821=>1000,30822=>1000,30823=>1000,30824=>1000,30825=>1000,30826=>1000,30827=>1000,30828=>1000,30829=>1000,30830=>1000,30831=>1000,30832=>1000,30833=>1000,30834=>1000,30835=>1000,30836=>1000, - 30837=>1000,30838=>1000,30839=>1000,30840=>1000,30841=>1000,30842=>1000,30843=>1000,30844=>1000,30845=>1000,30846=>1000,30847=>1000,30848=>1000,30849=>1000,30850=>1000,30851=>1000,30852=>1000, - 30853=>1000,30854=>1000,30855=>1000,30856=>1000,30857=>1000,30858=>1000,30859=>1000,30860=>1000,30861=>1000,30862=>1000,30863=>1000,30864=>1000,30865=>1000,30866=>1000,30867=>1000,30868=>1000, - 30869=>1000,30870=>1000,30871=>1000,30872=>1000,30873=>1000,30874=>1000,30875=>1000,30876=>1000,30877=>1000,30878=>1000,30879=>1000,30880=>1000,30881=>1000,30882=>1000,30883=>1000,30884=>1000, - 30885=>1000,30886=>1000,30887=>1000,30888=>1000,30889=>1000,30890=>1000,30891=>1000,30892=>1000,30893=>1000,30894=>1000,30895=>1000,30896=>1000,30897=>1000,30898=>1000,30899=>1000,30900=>1000, - 30901=>1000,30902=>1000,30903=>1000,30904=>1000,30905=>1000,30906=>1000,30907=>1000,30908=>1000,30909=>1000,30910=>1000,30911=>1000,30912=>1000,30913=>1000,30914=>1000,30915=>1000,30916=>1000, - 30917=>1000,30918=>1000,30919=>1000,30920=>1000,30921=>1000,30922=>1000,30923=>1000,30924=>1000,30925=>1000,30926=>1000,30927=>1000,30928=>1000,30929=>1000,30930=>1000,30931=>1000,30932=>1000, - 30933=>1000,30934=>1000,30935=>1000,30936=>1000,30937=>1000,30938=>1000,30939=>1000,30940=>1000,30941=>1000,30942=>1000,30943=>1000,30944=>1000,30945=>1000,30946=>1000,30947=>1000,30948=>1000, - 30949=>1000,30950=>1000,30951=>1000,30952=>1000,30953=>1000,30954=>1000,30955=>1000,30956=>1000,30957=>1000,30958=>1000,30959=>1000,30960=>1000,30961=>1000,30962=>1000,30963=>1000,30964=>1000, - 30965=>1000,30966=>1000,30967=>1000,30968=>1000,30969=>1000,30970=>1000,30971=>1000,30972=>1000,30973=>1000,30974=>1000,30975=>1000,30976=>1000,30977=>1000,30978=>1000,30979=>1000,30980=>1000, - 30981=>1000,30982=>1000,30983=>1000,30984=>1000,30985=>1000,30986=>1000,30987=>1000,30988=>1000,30989=>1000,30990=>1000,30991=>1000,30992=>1000,30993=>1000,30994=>1000,30995=>1000,30996=>1000, - 30997=>1000,30998=>1000,30999=>1000,31000=>1000,31001=>1000,31002=>1000,31003=>1000,31004=>1000,31005=>1000,31006=>1000,31007=>1000,31008=>1000,31009=>1000,31010=>1000,31011=>1000,31012=>1000, - 31013=>1000,31014=>1000,31015=>1000,31016=>1000,31017=>1000,31018=>1000,31019=>1000,31020=>1000,31021=>1000,31022=>1000,31023=>1000,31024=>1000,31025=>1000,31026=>1000,31027=>1000,31028=>1000, - 31029=>1000,31030=>1000,31031=>1000,31032=>1000,31033=>1000,31034=>1000,31035=>1000,31036=>1000,31037=>1000,31038=>1000,31039=>1000,31040=>1000,31041=>1000,31042=>1000,31043=>1000,31044=>1000, - 31045=>1000,31046=>1000,31047=>1000,31048=>1000,31049=>1000,31050=>1000,31051=>1000,31052=>1000,31053=>1000,31054=>1000,31055=>1000,31056=>1000,31057=>1000,31058=>1000,31059=>1000,31060=>1000, - 31061=>1000,31062=>1000,31063=>1000,31064=>1000,31065=>1000,31066=>1000,31067=>1000,31068=>1000,31069=>1000,31070=>1000,31071=>1000,31072=>1000,31073=>1000,31074=>1000,31075=>1000,31076=>1000, - 31077=>1000,31078=>1000,31079=>1000,31080=>1000,31081=>1000,31082=>1000,31083=>1000,31084=>1000,31085=>1000,31086=>1000,31087=>1000,31088=>1000,31089=>1000,31090=>1000,31091=>1000,31092=>1000, - 31093=>1000,31094=>1000,31095=>1000,31096=>1000,31097=>1000,31098=>1000,31099=>1000,31100=>1000,31101=>1000,31102=>1000,31103=>1000,31104=>1000,31105=>1000,31106=>1000,31107=>1000,31108=>1000, - 31109=>1000,31110=>1000,31111=>1000,31112=>1000,31113=>1000,31114=>1000,31115=>1000,31116=>1000,31117=>1000,31118=>1000,31119=>1000,31120=>1000,31121=>1000,31122=>1000,31123=>1000,31124=>1000, - 31125=>1000,31126=>1000,31127=>1000,31128=>1000,31129=>1000,31130=>1000,31131=>1000,31132=>1000,31133=>1000,31134=>1000,31135=>1000,31136=>1000,31137=>1000,31138=>1000,31139=>1000,31140=>1000, - 31141=>1000,31142=>1000,31143=>1000,31144=>1000,31145=>1000,31146=>1000,31147=>1000,31148=>1000,31149=>1000,31150=>1000,31151=>1000,31152=>1000,31153=>1000,31154=>1000,31155=>1000,31156=>1000, - 31157=>1000,31158=>1000,31159=>1000,31160=>1000,31161=>1000,31162=>1000,31163=>1000,31164=>1000,31165=>1000,31166=>1000,31167=>1000,31168=>1000,31169=>1000,31170=>1000,31171=>1000,31172=>1000, - 31173=>1000,31174=>1000,31175=>1000,31176=>1000,31177=>1000,31178=>1000,31179=>1000,31180=>1000,31181=>1000,31182=>1000,31183=>1000,31184=>1000,31185=>1000,31186=>1000,31187=>1000,31188=>1000, - 31189=>1000,31190=>1000,31191=>1000,31192=>1000,31193=>1000,31194=>1000,31195=>1000,31196=>1000,31197=>1000,31198=>1000,31199=>1000,31200=>1000,31201=>1000,31202=>1000,31203=>1000,31204=>1000, - 31205=>1000,31206=>1000,31207=>1000,31208=>1000,31209=>1000,31210=>1000,31211=>1000,31212=>1000,31213=>1000,31214=>1000,31215=>1000,31216=>1000,31217=>1000,31218=>1000,31219=>1000,31220=>1000, - 31221=>1000,31222=>1000,31223=>1000,31224=>1000,31225=>1000,31226=>1000,31227=>1000,31228=>1000,31229=>1000,31230=>1000,31231=>1000,31232=>1000,31233=>1000,31234=>1000,31235=>1000,31236=>1000, - 31237=>1000,31238=>1000,31239=>1000,31240=>1000,31241=>1000,31242=>1000,31243=>1000,31244=>1000,31245=>1000,31246=>1000,31247=>1000,31248=>1000,31249=>1000,31250=>1000,31251=>1000,31252=>1000, - 31253=>1000,31254=>1000,31255=>1000,31256=>1000,31257=>1000,31258=>1000,31259=>1000,31260=>1000,31261=>1000,31262=>1000,31263=>1000,31264=>1000,31265=>1000,31266=>1000,31267=>1000,31268=>1000, - 31269=>1000,31270=>1000,31271=>1000,31272=>1000,31273=>1000,31274=>1000,31275=>1000,31276=>1000,31277=>1000,31278=>1000,31279=>1000,31280=>1000,31281=>1000,31282=>1000,31283=>1000,31284=>1000, - 31285=>1000,31286=>1000,31287=>1000,31288=>1000,31289=>1000,31290=>1000,31291=>1000,31292=>1000,31293=>1000,31294=>1000,31295=>1000,31296=>1000,31297=>1000,31298=>1000,31299=>1000,31300=>1000, - 31301=>1000,31302=>1000,31303=>1000,31304=>1000,31305=>1000,31306=>1000,31307=>1000,31308=>1000,31309=>1000,31310=>1000,31311=>1000,31312=>1000,31313=>1000,31314=>1000,31315=>1000,31316=>1000, - 31317=>1000,31318=>1000,31319=>1000,31320=>1000,31321=>1000,31322=>1000,31323=>1000,31324=>1000,31325=>1000,31326=>1000,31327=>1000,31328=>1000,31329=>1000,31330=>1000,31331=>1000,31332=>1000, - 31333=>1000,31334=>1000,31335=>1000,31336=>1000,31337=>1000,31338=>1000,31339=>1000,31340=>1000,31341=>1000,31342=>1000,31343=>1000,31344=>1000,31345=>1000,31346=>1000,31347=>1000,31348=>1000, - 31349=>1000,31350=>1000,31351=>1000,31352=>1000,31353=>1000,31354=>1000,31355=>1000,31356=>1000,31357=>1000,31358=>1000,31359=>1000,31360=>1000,31361=>1000,31362=>1000,31363=>1000,31364=>1000, - 31365=>1000,31366=>1000,31367=>1000,31368=>1000,31369=>1000,31370=>1000,31371=>1000,31372=>1000,31373=>1000,31374=>1000,31375=>1000,31376=>1000,31377=>1000,31378=>1000,31379=>1000,31380=>1000, - 31381=>1000,31382=>1000,31383=>1000,31384=>1000,31385=>1000,31386=>1000,31387=>1000,31388=>1000,31389=>1000,31390=>1000,31391=>1000,31392=>1000,31393=>1000,31394=>1000,31395=>1000,31396=>1000, - 31397=>1000,31398=>1000,31399=>1000,31400=>1000,31401=>1000,31402=>1000,31403=>1000,31404=>1000,31405=>1000,31406=>1000,31407=>1000,31408=>1000,31409=>1000,31410=>1000,31411=>1000,31412=>1000, - 31413=>1000,31414=>1000,31415=>1000,31416=>1000,31417=>1000,31418=>1000,31419=>1000,31420=>1000,31421=>1000,31422=>1000,31423=>1000,31424=>1000,31425=>1000,31426=>1000,31427=>1000,31428=>1000, - 31429=>1000,31430=>1000,31431=>1000,31432=>1000,31433=>1000,31434=>1000,31435=>1000,31436=>1000,31437=>1000,31438=>1000,31439=>1000,31440=>1000,31441=>1000,31442=>1000,31443=>1000,31444=>1000, - 31445=>1000,31446=>1000,31447=>1000,31448=>1000,31449=>1000,31450=>1000,31451=>1000,31452=>1000,31453=>1000,31454=>1000,31455=>1000,31456=>1000,31457=>1000,31458=>1000,31459=>1000,31460=>1000, - 31461=>1000,31462=>1000,31463=>1000,31464=>1000,31465=>1000,31466=>1000,31467=>1000,31468=>1000,31469=>1000,31470=>1000,31471=>1000,31472=>1000,31473=>1000,31474=>1000,31475=>1000,31476=>1000, - 31477=>1000,31478=>1000,31479=>1000,31480=>1000,31481=>1000,31482=>1000,31483=>1000,31484=>1000,31485=>1000,31486=>1000,31487=>1000,31488=>1000,31489=>1000,31490=>1000,31491=>1000,31492=>1000, - 31493=>1000,31494=>1000,31495=>1000,31496=>1000,31497=>1000,31498=>1000,31499=>1000,31500=>1000,31501=>1000,31502=>1000,31503=>1000,31504=>1000,31505=>1000,31506=>1000,31507=>1000,31508=>1000, - 31509=>1000,31510=>1000,31511=>1000,31512=>1000,31513=>1000,31514=>1000,31515=>1000,31516=>1000,31517=>1000,31518=>1000,31519=>1000,31520=>1000,31521=>1000,31522=>1000,31523=>1000,31524=>1000, - 31525=>1000,31526=>1000,31527=>1000,31528=>1000,31529=>1000,31530=>1000,31531=>1000,31532=>1000,31533=>1000,31534=>1000,31535=>1000,31536=>1000,31537=>1000,31538=>1000,31539=>1000,31540=>1000, - 31541=>1000,31542=>1000,31543=>1000,31544=>1000,31545=>1000,31546=>1000,31547=>1000,31548=>1000,31549=>1000,31550=>1000,31551=>1000,31552=>1000,31553=>1000,31554=>1000,31555=>1000,31556=>1000, - 31557=>1000,31558=>1000,31559=>1000,31560=>1000,31561=>1000,31562=>1000,31563=>1000,31564=>1000,31565=>1000,31566=>1000,31567=>1000,31568=>1000,31569=>1000,31570=>1000,31571=>1000,31572=>1000, - 31573=>1000,31574=>1000,31575=>1000,31576=>1000,31577=>1000,31578=>1000,31579=>1000,31580=>1000,31581=>1000,31582=>1000,31583=>1000,31584=>1000,31585=>1000,31586=>1000,31587=>1000,31588=>1000, - 31589=>1000,31590=>1000,31591=>1000,31592=>1000,31593=>1000,31594=>1000,31595=>1000,31596=>1000,31597=>1000,31598=>1000,31599=>1000,31600=>1000,31601=>1000,31602=>1000,31603=>1000,31604=>1000, - 31605=>1000,31606=>1000,31607=>1000,31608=>1000,31609=>1000,31610=>1000,31611=>1000,31612=>1000,31613=>1000,31614=>1000,31615=>1000,31616=>1000,31617=>1000,31618=>1000,31619=>1000,31620=>1000, - 31621=>1000,31622=>1000,31623=>1000,31624=>1000,31625=>1000,31626=>1000,31627=>1000,31628=>1000,31629=>1000,31630=>1000,31631=>1000,31632=>1000,31633=>1000,31634=>1000,31635=>1000,31636=>1000, - 31637=>1000,31638=>1000,31639=>1000,31640=>1000,31641=>1000,31642=>1000,31643=>1000,31644=>1000,31645=>1000,31646=>1000,31647=>1000,31648=>1000,31649=>1000,31650=>1000,31651=>1000,31652=>1000, - 31653=>1000,31654=>1000,31655=>1000,31656=>1000,31657=>1000,31658=>1000,31659=>1000,31660=>1000,31661=>1000,31662=>1000,31663=>1000,31664=>1000,31665=>1000,31666=>1000,31667=>1000,31668=>1000, - 31669=>1000,31670=>1000,31671=>1000,31672=>1000,31673=>1000,31674=>1000,31675=>1000,31676=>1000,31677=>1000,31678=>1000,31679=>1000,31680=>1000,31681=>1000,31682=>1000,31683=>1000,31684=>1000, - 31685=>1000,31686=>1000,31687=>1000,31688=>1000,31689=>1000,31690=>1000,31691=>1000,31692=>1000,31693=>1000,31694=>1000,31695=>1000,31696=>1000,31697=>1000,31698=>1000,31699=>1000,31700=>1000, - 31701=>1000,31702=>1000,31703=>1000,31704=>1000,31705=>1000,31706=>1000,31707=>1000,31708=>1000,31709=>1000,31710=>1000,31711=>1000,31712=>1000,31713=>1000,31714=>1000,31715=>1000,31716=>1000, - 31717=>1000,31718=>1000,31719=>1000,31720=>1000,31721=>1000,31722=>1000,31723=>1000,31724=>1000,31725=>1000,31726=>1000,31727=>1000,31728=>1000,31729=>1000,31730=>1000,31731=>1000,31732=>1000, - 31733=>1000,31734=>1000,31735=>1000,31736=>1000,31737=>1000,31738=>1000,31739=>1000,31740=>1000,31741=>1000,31742=>1000,31743=>1000,31744=>1000,31745=>1000,31746=>1000,31747=>1000,31748=>1000, - 31749=>1000,31750=>1000,31751=>1000,31752=>1000,31753=>1000,31754=>1000,31755=>1000,31756=>1000,31757=>1000,31758=>1000,31759=>1000,31760=>1000,31761=>1000,31762=>1000,31763=>1000,31764=>1000, - 31765=>1000,31766=>1000,31767=>1000,31768=>1000,31769=>1000,31770=>1000,31771=>1000,31772=>1000,31773=>1000,31774=>1000,31775=>1000,31776=>1000,31777=>1000,31778=>1000,31779=>1000,31780=>1000, - 31781=>1000,31782=>1000,31783=>1000,31784=>1000,31785=>1000,31786=>1000,31787=>1000,31788=>1000,31789=>1000,31790=>1000,31791=>1000,31792=>1000,31793=>1000,31794=>1000,31795=>1000,31796=>1000, - 31797=>1000,31798=>1000,31799=>1000,31800=>1000,31801=>1000,31802=>1000,31803=>1000,31804=>1000,31805=>1000,31806=>1000,31807=>1000,31808=>1000,31809=>1000,31810=>1000,31811=>1000,31812=>1000, - 31813=>1000,31814=>1000,31815=>1000,31816=>1000,31817=>1000,31818=>1000,31819=>1000,31820=>1000,31821=>1000,31822=>1000,31823=>1000,31824=>1000,31825=>1000,31826=>1000,31827=>1000,31828=>1000, - 31829=>1000,31830=>1000,31831=>1000,31832=>1000,31833=>1000,31834=>1000,31835=>1000,31836=>1000,31837=>1000,31838=>1000,31839=>1000,31840=>1000,31841=>1000,31842=>1000,31843=>1000,31844=>1000, - 31845=>1000,31846=>1000,31847=>1000,31848=>1000,31849=>1000,31850=>1000,31851=>1000,31852=>1000,31853=>1000,31854=>1000,31855=>1000,31856=>1000,31857=>1000,31858=>1000,31859=>1000,31860=>1000, - 31861=>1000,31862=>1000,31863=>1000,31864=>1000,31865=>1000,31866=>1000,31867=>1000,31868=>1000,31869=>1000,31870=>1000,31871=>1000,31872=>1000,31873=>1000,31874=>1000,31875=>1000,31876=>1000, - 31877=>1000,31878=>1000,31879=>1000,31880=>1000,31881=>1000,31882=>1000,31883=>1000,31884=>1000,31885=>1000,31886=>1000,31887=>1000,31888=>1000,31889=>1000,31890=>1000,31891=>1000,31892=>1000, - 31893=>1000,31894=>1000,31895=>1000,31896=>1000,31897=>1000,31898=>1000,31899=>1000,31900=>1000,31901=>1000,31902=>1000,31903=>1000,31904=>1000,31905=>1000,31906=>1000,31907=>1000,31908=>1000, - 31909=>1000,31910=>1000,31911=>1000,31912=>1000,31913=>1000,31914=>1000,31915=>1000,31916=>1000,31917=>1000,31918=>1000,31919=>1000,31920=>1000,31921=>1000,31922=>1000,31923=>1000,31924=>1000, - 31925=>1000,31926=>1000,31927=>1000,31928=>1000,31929=>1000,31930=>1000,31931=>1000,31932=>1000,31933=>1000,31934=>1000,31935=>1000,31936=>1000,31937=>1000,31938=>1000,31939=>1000,31940=>1000, - 31941=>1000,31942=>1000,31943=>1000,31944=>1000,31945=>1000,31946=>1000,31947=>1000,31948=>1000,31949=>1000,31950=>1000,31951=>1000,31952=>1000,31953=>1000,31954=>1000,31955=>1000,31956=>1000, - 31957=>1000,31958=>1000,31959=>1000,31960=>1000,31961=>1000,31962=>1000,31963=>1000,31964=>1000,31965=>1000,31966=>1000,31967=>1000,31968=>1000,31969=>1000,31970=>1000,31971=>1000,31972=>1000, - 31973=>1000,31974=>1000,31975=>1000,31976=>1000,31977=>1000,31978=>1000,31979=>1000,31980=>1000,31981=>1000,31982=>1000,31983=>1000,31984=>1000,31985=>1000,31986=>1000,31987=>1000,31988=>1000, - 31989=>1000,31990=>1000,31991=>1000,31992=>1000,31993=>1000,31994=>1000,31995=>1000,31996=>1000,31997=>1000,31998=>1000,31999=>1000,32000=>1000,32001=>1000,32002=>1000,32003=>1000,32004=>1000, - 32005=>1000,32006=>1000,32007=>1000,32008=>1000,32009=>1000,32010=>1000,32011=>1000,32012=>1000,32013=>1000,32014=>1000,32015=>1000,32016=>1000,32017=>1000,32018=>1000,32019=>1000,32020=>1000, - 32021=>1000,32022=>1000,32023=>1000,32024=>1000,32025=>1000,32026=>1000,32027=>1000,32028=>1000,32029=>1000,32030=>1000,32031=>1000,32032=>1000,32033=>1000,32034=>1000,32035=>1000,32036=>1000, - 32037=>1000,32038=>1000,32039=>1000,32040=>1000,32041=>1000,32042=>1000,32043=>1000,32044=>1000,32045=>1000,32046=>1000,32047=>1000,32048=>1000,32049=>1000,32050=>1000,32051=>1000,32052=>1000, - 32053=>1000,32054=>1000,32055=>1000,32056=>1000,32057=>1000,32058=>1000,32059=>1000,32060=>1000,32061=>1000,32062=>1000,32063=>1000,32064=>1000,32065=>1000,32066=>1000,32067=>1000,32068=>1000, - 32069=>1000,32070=>1000,32071=>1000,32072=>1000,32073=>1000,32074=>1000,32075=>1000,32076=>1000,32077=>1000,32078=>1000,32079=>1000,32080=>1000,32081=>1000,32082=>1000,32083=>1000,32084=>1000, - 32085=>1000,32086=>1000,32087=>1000,32088=>1000,32089=>1000,32090=>1000,32091=>1000,32092=>1000,32093=>1000,32094=>1000,32095=>1000,32096=>1000,32097=>1000,32098=>1000,32099=>1000,32100=>1000, - 32101=>1000,32102=>1000,32103=>1000,32104=>1000,32105=>1000,32106=>1000,32107=>1000,32108=>1000,32109=>1000,32110=>1000,32111=>1000,32112=>1000,32113=>1000,32114=>1000,32115=>1000,32116=>1000, - 32117=>1000,32118=>1000,32119=>1000,32120=>1000,32121=>1000,32122=>1000,32123=>1000,32124=>1000,32125=>1000,32126=>1000,32127=>1000,32128=>1000,32129=>1000,32130=>1000,32131=>1000,32132=>1000, - 32133=>1000,32134=>1000,32135=>1000,32136=>1000,32137=>1000,32138=>1000,32139=>1000,32140=>1000,32141=>1000,32142=>1000,32143=>1000,32144=>1000,32145=>1000,32146=>1000,32147=>1000,32148=>1000, - 32149=>1000,32150=>1000,32151=>1000,32152=>1000,32153=>1000,32154=>1000,32155=>1000,32156=>1000,32157=>1000,32158=>1000,32159=>1000,32160=>1000,32161=>1000,32162=>1000,32163=>1000,32164=>1000, - 32165=>1000,32166=>1000,32167=>1000,32168=>1000,32169=>1000,32170=>1000,32171=>1000,32172=>1000,32173=>1000,32174=>1000,32175=>1000,32176=>1000,32177=>1000,32178=>1000,32179=>1000,32180=>1000, - 32181=>1000,32182=>1000,32183=>1000,32184=>1000,32185=>1000,32186=>1000,32187=>1000,32188=>1000,32189=>1000,32190=>1000,32191=>1000,32192=>1000,32193=>1000,32194=>1000,32195=>1000,32196=>1000, - 32197=>1000,32198=>1000,32199=>1000,32200=>1000,32201=>1000,32202=>1000,32203=>1000,32204=>1000,32205=>1000,32206=>1000,32207=>1000,32208=>1000,32209=>1000,32210=>1000,32211=>1000,32212=>1000, - 32213=>1000,32214=>1000,32215=>1000,32216=>1000,32217=>1000,32218=>1000,32219=>1000,32220=>1000,32221=>1000,32222=>1000,32223=>1000,32224=>1000,32225=>1000,32226=>1000,32227=>1000,32228=>1000, - 32229=>1000,32230=>1000,32231=>1000,32232=>1000,32233=>1000,32234=>1000,32235=>1000,32236=>1000,32237=>1000,32238=>1000,32239=>1000,32240=>1000,32241=>1000,32242=>1000,32243=>1000,32244=>1000, - 32245=>1000,32246=>1000,32247=>1000,32248=>1000,32249=>1000,32250=>1000,32251=>1000,32252=>1000,32253=>1000,32254=>1000,32255=>1000,32256=>1000,32257=>1000,32258=>1000,32259=>1000,32260=>1000, - 32261=>1000,32262=>1000,32263=>1000,32264=>1000,32265=>1000,32266=>1000,32267=>1000,32268=>1000,32269=>1000,32270=>1000,32271=>1000,32272=>1000,32273=>1000,32274=>1000,32275=>1000,32276=>1000, - 32277=>1000,32278=>1000,32279=>1000,32280=>1000,32281=>1000,32282=>1000,32283=>1000,32284=>1000,32285=>1000,32286=>1000,32287=>1000,32288=>1000,32289=>1000,32290=>1000,32291=>1000,32292=>1000, - 32293=>1000,32294=>1000,32295=>1000,32296=>1000,32297=>1000,32298=>1000,32299=>1000,32300=>1000,32301=>1000,32302=>1000,32303=>1000,32304=>1000,32305=>1000,32306=>1000,32307=>1000,32308=>1000, - 32309=>1000,32310=>1000,32311=>1000,32312=>1000,32313=>1000,32314=>1000,32315=>1000,32316=>1000,32317=>1000,32318=>1000,32319=>1000,32320=>1000,32321=>1000,32322=>1000,32323=>1000,32324=>1000, - 32325=>1000,32326=>1000,32327=>1000,32328=>1000,32329=>1000,32330=>1000,32331=>1000,32332=>1000,32333=>1000,32334=>1000,32335=>1000,32336=>1000,32337=>1000,32338=>1000,32339=>1000,32340=>1000, - 32341=>1000,32342=>1000,32343=>1000,32344=>1000,32345=>1000,32346=>1000,32347=>1000,32348=>1000,32349=>1000,32350=>1000,32351=>1000,32352=>1000,32353=>1000,32354=>1000,32355=>1000,32356=>1000, - 32357=>1000,32358=>1000,32359=>1000,32360=>1000,32361=>1000,32362=>1000,32363=>1000,32364=>1000,32365=>1000,32366=>1000,32367=>1000,32368=>1000,32369=>1000,32370=>1000,32371=>1000,32372=>1000, - 32373=>1000,32374=>1000,32375=>1000,32376=>1000,32377=>1000,32378=>1000,32379=>1000,32380=>1000,32381=>1000,32382=>1000,32383=>1000,32384=>1000,32385=>1000,32386=>1000,32387=>1000,32388=>1000, - 32389=>1000,32390=>1000,32391=>1000,32392=>1000,32393=>1000,32394=>1000,32395=>1000,32396=>1000,32397=>1000,32398=>1000,32399=>1000,32400=>1000,32401=>1000,32402=>1000,32403=>1000,32404=>1000, - 32405=>1000,32406=>1000,32407=>1000,32408=>1000,32409=>1000,32410=>1000,32411=>1000,32412=>1000,32413=>1000,32414=>1000,32415=>1000,32416=>1000,32417=>1000,32418=>1000,32419=>1000,32420=>1000, - 32421=>1000,32422=>1000,32423=>1000,32424=>1000,32425=>1000,32426=>1000,32427=>1000,32428=>1000,32429=>1000,32430=>1000,32431=>1000,32432=>1000,32433=>1000,32434=>1000,32435=>1000,32436=>1000, - 32437=>1000,32438=>1000,32439=>1000,32440=>1000,32441=>1000,32442=>1000,32443=>1000,32444=>1000,32445=>1000,32446=>1000,32447=>1000,32448=>1000,32449=>1000,32450=>1000,32451=>1000,32452=>1000, - 32453=>1000,32454=>1000,32455=>1000,32456=>1000,32457=>1000,32458=>1000,32459=>1000,32460=>1000,32461=>1000,32462=>1000,32463=>1000,32464=>1000,32465=>1000,32466=>1000,32467=>1000,32468=>1000, - 32469=>1000,32470=>1000,32471=>1000,32472=>1000,32473=>1000,32474=>1000,32475=>1000,32476=>1000,32477=>1000,32478=>1000,32479=>1000,32480=>1000,32481=>1000,32482=>1000,32483=>1000,32484=>1000, - 32485=>1000,32486=>1000,32487=>1000,32488=>1000,32489=>1000,32490=>1000,32491=>1000,32492=>1000,32493=>1000,32494=>1000,32495=>1000,32496=>1000,32497=>1000,32498=>1000,32499=>1000,32500=>1000, - 32501=>1000,32502=>1000,32503=>1000,32504=>1000,32505=>1000,32506=>1000,32507=>1000,32508=>1000,32509=>1000,32510=>1000,32511=>1000,32512=>1000,32513=>1000,32514=>1000,32515=>1000,32516=>1000, - 32517=>1000,32518=>1000,32519=>1000,32520=>1000,32521=>1000,32522=>1000,32523=>1000,32524=>1000,32525=>1000,32526=>1000,32527=>1000,32528=>1000,32529=>1000,32530=>1000,32531=>1000,32532=>1000, - 32533=>1000,32534=>1000,32535=>1000,32536=>1000,32537=>1000,32538=>1000,32539=>1000,32540=>1000,32541=>1000,32542=>1000,32543=>1000,32544=>1000,32545=>1000,32546=>1000,32547=>1000,32548=>1000, - 32549=>1000,32550=>1000,32551=>1000,32552=>1000,32553=>1000,32554=>1000,32555=>1000,32556=>1000,32557=>1000,32558=>1000,32559=>1000,32560=>1000,32561=>1000,32562=>1000,32563=>1000,32564=>1000, - 32565=>1000,32566=>1000,32567=>1000,32568=>1000,32569=>1000,32570=>1000,32571=>1000,32572=>1000,32573=>1000,32574=>1000,32575=>1000,32576=>1000,32577=>1000,32578=>1000,32579=>1000,32580=>1000, - 32581=>1000,32582=>1000,32583=>1000,32584=>1000,32585=>1000,32586=>1000,32587=>1000,32588=>1000,32589=>1000,32590=>1000,32591=>1000,32592=>1000,32593=>1000,32594=>1000,32595=>1000,32596=>1000, - 32597=>1000,32598=>1000,32599=>1000,32600=>1000,32601=>1000,32602=>1000,32603=>1000,32604=>1000,32605=>1000,32606=>1000,32607=>1000,32608=>1000,32609=>1000,32610=>1000,32611=>1000,32612=>1000, - 32613=>1000,32614=>1000,32615=>1000,32616=>1000,32617=>1000,32618=>1000,32619=>1000,32620=>1000,32621=>1000,32622=>1000,32623=>1000,32624=>1000,32625=>1000,32626=>1000,32627=>1000,32628=>1000, - 32629=>1000,32630=>1000,32631=>1000,32632=>1000,32633=>1000,32634=>1000,32635=>1000,32636=>1000,32637=>1000,32638=>1000,32639=>1000,32640=>1000,32641=>1000,32642=>1000,32643=>1000,32644=>1000, - 32645=>1000,32646=>1000,32647=>1000,32648=>1000,32649=>1000,32650=>1000,32651=>1000,32652=>1000,32653=>1000,32654=>1000,32655=>1000,32656=>1000,32657=>1000,32658=>1000,32659=>1000,32660=>1000, - 32661=>1000,32662=>1000,32663=>1000,32664=>1000,32665=>1000,32666=>1000,32667=>1000,32668=>1000,32669=>1000,32670=>1000,32671=>1000,32672=>1000,32673=>1000,32674=>1000,32675=>1000,32676=>1000, - 32677=>1000,32678=>1000,32679=>1000,32680=>1000,32681=>1000,32682=>1000,32683=>1000,32684=>1000,32685=>1000,32686=>1000,32687=>1000,32688=>1000,32689=>1000,32690=>1000,32691=>1000,32692=>1000, - 32693=>1000,32694=>1000,32695=>1000,32696=>1000,32697=>1000,32698=>1000,32699=>1000,32700=>1000,32701=>1000,32702=>1000,32703=>1000,32704=>1000,32705=>1000,32706=>1000,32707=>1000,32708=>1000, - 32709=>1000,32710=>1000,32711=>1000,32712=>1000,32713=>1000,32714=>1000,32715=>1000,32716=>1000,32717=>1000,32718=>1000,32719=>1000,32720=>1000,32721=>1000,32722=>1000,32723=>1000,32724=>1000, - 32725=>1000,32726=>1000,32727=>1000,32728=>1000,32729=>1000,32730=>1000,32731=>1000,32732=>1000,32733=>1000,32734=>1000,32735=>1000,32736=>1000,32737=>1000,32738=>1000,32739=>1000,32740=>1000, - 32741=>1000,32742=>1000,32743=>1000,32744=>1000,32745=>1000,32746=>1000,32747=>1000,32748=>1000,32749=>1000,32750=>1000,32751=>1000,32752=>1000,32753=>1000,32754=>1000,32755=>1000,32756=>1000, - 32757=>1000,32758=>1000,32759=>1000,32760=>1000,32761=>1000,32762=>1000,32763=>1000,32764=>1000,32765=>1000,32766=>1000,32767=>1000,32768=>1000,32769=>1000,32770=>1000,32771=>1000,32772=>1000, - 32773=>1000,32774=>1000,32775=>1000,32776=>1000,32777=>1000,32778=>1000,32779=>1000,32780=>1000,32781=>1000,32782=>1000,32783=>1000,32784=>1000,32785=>1000,32786=>1000,32787=>1000,32788=>1000, - 32789=>1000,32790=>1000,32791=>1000,32792=>1000,32793=>1000,32794=>1000,32795=>1000,32796=>1000,32797=>1000,32798=>1000,32799=>1000,32800=>1000,32801=>1000,32802=>1000,32803=>1000,32804=>1000, - 32805=>1000,32806=>1000,32807=>1000,32808=>1000,32809=>1000,32810=>1000,32811=>1000,32812=>1000,32813=>1000,32814=>1000,32815=>1000,32816=>1000,32817=>1000,32818=>1000,32819=>1000,32820=>1000, - 32821=>1000,32822=>1000,32823=>1000,32824=>1000,32825=>1000,32826=>1000,32827=>1000,32828=>1000,32829=>1000,32830=>1000,32831=>1000,32832=>1000,32833=>1000,32834=>1000,32835=>1000,32836=>1000, - 32837=>1000,32838=>1000,32839=>1000,32840=>1000,32841=>1000,32842=>1000,32843=>1000,32844=>1000,32845=>1000,32846=>1000,32847=>1000,32848=>1000,32849=>1000,32850=>1000,32851=>1000,32852=>1000, - 32853=>1000,32854=>1000,32855=>1000,32856=>1000,32857=>1000,32858=>1000,32859=>1000,32860=>1000,32861=>1000,32862=>1000,32863=>1000,32864=>1000,32865=>1000,32866=>1000,32867=>1000,32868=>1000, - 32869=>1000,32870=>1000,32871=>1000,32872=>1000,32873=>1000,32874=>1000,32875=>1000,32876=>1000,32877=>1000,32878=>1000,32879=>1000,32880=>1000,32881=>1000,32882=>1000,32883=>1000,32884=>1000, - 32885=>1000,32886=>1000,32887=>1000,32888=>1000,32889=>1000,32890=>1000,32891=>1000,32892=>1000,32893=>1000,32894=>1000,32895=>1000,32896=>1000,32897=>1000,32898=>1000,32899=>1000,32900=>1000, - 32901=>1000,32902=>1000,32903=>1000,32904=>1000,32905=>1000,32906=>1000,32907=>1000,32908=>1000,32909=>1000,32910=>1000,32911=>1000,32912=>1000,32913=>1000,32914=>1000,32915=>1000,32916=>1000, - 32917=>1000,32918=>1000,32919=>1000,32920=>1000,32921=>1000,32922=>1000,32923=>1000,32924=>1000,32925=>1000,32926=>1000,32927=>1000,32928=>1000,32929=>1000,32930=>1000,32931=>1000,32932=>1000, - 32933=>1000,32934=>1000,32935=>1000,32936=>1000,32937=>1000,32938=>1000,32939=>1000,32940=>1000,32941=>1000,32942=>1000,32943=>1000,32944=>1000,32945=>1000,32946=>1000,32947=>1000,32948=>1000, - 32949=>1000,32950=>1000,32951=>1000,32952=>1000,32953=>1000,32954=>1000,32955=>1000,32956=>1000,32957=>1000,32958=>1000,32959=>1000,32960=>1000,32961=>1000,32962=>1000,32963=>1000,32964=>1000, - 32965=>1000,32966=>1000,32967=>1000,32968=>1000,32969=>1000,32970=>1000,32971=>1000,32972=>1000,32973=>1000,32974=>1000,32975=>1000,32976=>1000,32977=>1000,32978=>1000,32979=>1000,32980=>1000, - 32981=>1000,32982=>1000,32983=>1000,32984=>1000,32985=>1000,32986=>1000,32987=>1000,32988=>1000,32989=>1000,32990=>1000,32991=>1000,32992=>1000,32993=>1000,32994=>1000,32995=>1000,32996=>1000, - 32997=>1000,32998=>1000,32999=>1000,33000=>1000,33001=>1000,33002=>1000,33003=>1000,33004=>1000,33005=>1000,33006=>1000,33007=>1000,33008=>1000,33009=>1000,33010=>1000,33011=>1000,33012=>1000, - 33013=>1000,33014=>1000,33015=>1000,33016=>1000,33017=>1000,33018=>1000,33019=>1000,33020=>1000,33021=>1000,33022=>1000,33023=>1000,33024=>1000,33025=>1000,33026=>1000,33027=>1000,33028=>1000, - 33029=>1000,33030=>1000,33031=>1000,33032=>1000,33033=>1000,33034=>1000,33035=>1000,33036=>1000,33037=>1000,33038=>1000,33039=>1000,33040=>1000,33041=>1000,33042=>1000,33043=>1000,33044=>1000, - 33045=>1000,33046=>1000,33047=>1000,33048=>1000,33049=>1000,33050=>1000,33051=>1000,33052=>1000,33053=>1000,33054=>1000,33055=>1000,33056=>1000,33057=>1000,33058=>1000,33059=>1000,33060=>1000, - 33061=>1000,33062=>1000,33063=>1000,33064=>1000,33065=>1000,33066=>1000,33067=>1000,33068=>1000,33069=>1000,33070=>1000,33071=>1000,33072=>1000,33073=>1000,33074=>1000,33075=>1000,33076=>1000, - 33077=>1000,33078=>1000,33079=>1000,33080=>1000,33081=>1000,33082=>1000,33083=>1000,33084=>1000,33085=>1000,33086=>1000,33087=>1000,33088=>1000,33089=>1000,33090=>1000,33091=>1000,33092=>1000, - 33093=>1000,33094=>1000,33095=>1000,33096=>1000,33097=>1000,33098=>1000,33099=>1000,33100=>1000,33101=>1000,33102=>1000,33103=>1000,33104=>1000,33105=>1000,33106=>1000,33107=>1000,33108=>1000, - 33109=>1000,33110=>1000,33111=>1000,33112=>1000,33113=>1000,33114=>1000,33115=>1000,33116=>1000,33117=>1000,33118=>1000,33119=>1000,33120=>1000,33121=>1000,33122=>1000,33123=>1000,33124=>1000, - 33125=>1000,33126=>1000,33127=>1000,33128=>1000,33129=>1000,33130=>1000,33131=>1000,33132=>1000,33133=>1000,33134=>1000,33135=>1000,33136=>1000,33137=>1000,33138=>1000,33139=>1000,33140=>1000, - 33141=>1000,33142=>1000,33143=>1000,33144=>1000,33145=>1000,33146=>1000,33147=>1000,33148=>1000,33149=>1000,33150=>1000,33151=>1000,33152=>1000,33153=>1000,33154=>1000,33155=>1000,33156=>1000, - 33157=>1000,33158=>1000,33159=>1000,33160=>1000,33161=>1000,33162=>1000,33163=>1000,33164=>1000,33165=>1000,33166=>1000,33167=>1000,33168=>1000,33169=>1000,33170=>1000,33171=>1000,33172=>1000, - 33173=>1000,33174=>1000,33175=>1000,33176=>1000,33177=>1000,33178=>1000,33179=>1000,33180=>1000,33181=>1000,33182=>1000,33183=>1000,33184=>1000,33185=>1000,33186=>1000,33187=>1000,33188=>1000, - 33189=>1000,33190=>1000,33191=>1000,33192=>1000,33193=>1000,33194=>1000,33195=>1000,33196=>1000,33197=>1000,33198=>1000,33199=>1000,33200=>1000,33201=>1000,33202=>1000,33203=>1000,33204=>1000, - 33205=>1000,33206=>1000,33207=>1000,33208=>1000,33209=>1000,33210=>1000,33211=>1000,33212=>1000,33213=>1000,33214=>1000,33215=>1000,33216=>1000,33217=>1000,33218=>1000,33219=>1000,33220=>1000, - 33221=>1000,33222=>1000,33223=>1000,33224=>1000,33225=>1000,33226=>1000,33227=>1000,33228=>1000,33229=>1000,33230=>1000,33231=>1000,33232=>1000,33233=>1000,33234=>1000,33235=>1000,33236=>1000, - 33237=>1000,33238=>1000,33239=>1000,33240=>1000,33241=>1000,33242=>1000,33243=>1000,33244=>1000,33245=>1000,33246=>1000,33247=>1000,33248=>1000,33249=>1000,33250=>1000,33251=>1000,33252=>1000, - 33253=>1000,33254=>1000,33255=>1000,33256=>1000,33257=>1000,33258=>1000,33259=>1000,33260=>1000,33261=>1000,33262=>1000,33263=>1000,33264=>1000,33265=>1000,33266=>1000,33267=>1000,33268=>1000, - 33269=>1000,33270=>1000,33271=>1000,33272=>1000,33273=>1000,33274=>1000,33275=>1000,33276=>1000,33277=>1000,33278=>1000,33279=>1000,33280=>1000,33281=>1000,33282=>1000,33283=>1000,33284=>1000, - 33285=>1000,33286=>1000,33287=>1000,33288=>1000,33289=>1000,33290=>1000,33291=>1000,33292=>1000,33293=>1000,33294=>1000,33295=>1000,33296=>1000,33297=>1000,33298=>1000,33299=>1000,33300=>1000, - 33301=>1000,33302=>1000,33303=>1000,33304=>1000,33305=>1000,33306=>1000,33307=>1000,33308=>1000,33309=>1000,33310=>1000,33311=>1000,33312=>1000,33313=>1000,33314=>1000,33315=>1000,33316=>1000, - 33317=>1000,33318=>1000,33319=>1000,33320=>1000,33321=>1000,33322=>1000,33323=>1000,33324=>1000,33325=>1000,33326=>1000,33327=>1000,33328=>1000,33329=>1000,33330=>1000,33331=>1000,33332=>1000, - 33333=>1000,33334=>1000,33335=>1000,33336=>1000,33337=>1000,33338=>1000,33339=>1000,33340=>1000,33341=>1000,33342=>1000,33343=>1000,33344=>1000,33345=>1000,33346=>1000,33347=>1000,33348=>1000, - 33349=>1000,33350=>1000,33351=>1000,33352=>1000,33353=>1000,33354=>1000,33355=>1000,33356=>1000,33357=>1000,33358=>1000,33359=>1000,33360=>1000,33361=>1000,33362=>1000,33363=>1000,33364=>1000, - 33365=>1000,33366=>1000,33367=>1000,33368=>1000,33369=>1000,33370=>1000,33371=>1000,33372=>1000,33373=>1000,33374=>1000,33375=>1000,33376=>1000,33377=>1000,33378=>1000,33379=>1000,33380=>1000, - 33381=>1000,33382=>1000,33383=>1000,33384=>1000,33385=>1000,33386=>1000,33387=>1000,33388=>1000,33389=>1000,33390=>1000,33391=>1000,33392=>1000,33393=>1000,33394=>1000,33395=>1000,33396=>1000, - 33397=>1000,33398=>1000,33399=>1000,33400=>1000,33401=>1000,33402=>1000,33403=>1000,33404=>1000,33405=>1000,33406=>1000,33407=>1000,33408=>1000,33409=>1000,33410=>1000,33411=>1000,33412=>1000, - 33413=>1000,33414=>1000,33415=>1000,33416=>1000,33417=>1000,33418=>1000,33419=>1000,33420=>1000,33421=>1000,33422=>1000,33423=>1000,33424=>1000,33425=>1000,33426=>1000,33427=>1000,33428=>1000, - 33429=>1000,33430=>1000,33431=>1000,33432=>1000,33433=>1000,33434=>1000,33435=>1000,33436=>1000,33437=>1000,33438=>1000,33439=>1000,33440=>1000,33441=>1000,33442=>1000,33443=>1000,33444=>1000, - 33445=>1000,33446=>1000,33447=>1000,33448=>1000,33449=>1000,33450=>1000,33451=>1000,33452=>1000,33453=>1000,33454=>1000,33455=>1000,33456=>1000,33457=>1000,33458=>1000,33459=>1000,33460=>1000, - 33461=>1000,33462=>1000,33463=>1000,33464=>1000,33465=>1000,33466=>1000,33467=>1000,33468=>1000,33469=>1000,33470=>1000,33471=>1000,33472=>1000,33473=>1000,33474=>1000,33475=>1000,33476=>1000, - 33477=>1000,33478=>1000,33479=>1000,33480=>1000,33481=>1000,33482=>1000,33483=>1000,33484=>1000,33485=>1000,33486=>1000,33487=>1000,33488=>1000,33489=>1000,33490=>1000,33491=>1000,33492=>1000, - 33493=>1000,33494=>1000,33495=>1000,33496=>1000,33497=>1000,33498=>1000,33499=>1000,33500=>1000,33501=>1000,33502=>1000,33503=>1000,33504=>1000,33505=>1000,33506=>1000,33507=>1000,33508=>1000, - 33509=>1000,33510=>1000,33511=>1000,33512=>1000,33513=>1000,33514=>1000,33515=>1000,33516=>1000,33517=>1000,33518=>1000,33519=>1000,33520=>1000,33521=>1000,33522=>1000,33523=>1000,33524=>1000, - 33525=>1000,33526=>1000,33527=>1000,33528=>1000,33529=>1000,33530=>1000,33531=>1000,33532=>1000,33533=>1000,33534=>1000,33535=>1000,33536=>1000,33537=>1000,33538=>1000,33539=>1000,33540=>1000, - 33541=>1000,33542=>1000,33543=>1000,33544=>1000,33545=>1000,33546=>1000,33547=>1000,33548=>1000,33549=>1000,33550=>1000,33551=>1000,33552=>1000,33553=>1000,33554=>1000,33555=>1000,33556=>1000, - 33557=>1000,33558=>1000,33559=>1000,33560=>1000,33561=>1000,33562=>1000,33563=>1000,33564=>1000,33565=>1000,33566=>1000,33567=>1000,33568=>1000,33569=>1000,33570=>1000,33571=>1000,33572=>1000, - 33573=>1000,33574=>1000,33575=>1000,33576=>1000,33577=>1000,33578=>1000,33579=>1000,33580=>1000,33581=>1000,33582=>1000,33583=>1000,33584=>1000,33585=>1000,33586=>1000,33587=>1000,33588=>1000, - 33589=>1000,33590=>1000,33591=>1000,33592=>1000,33593=>1000,33594=>1000,33595=>1000,33596=>1000,33597=>1000,33598=>1000,33599=>1000,33600=>1000,33601=>1000,33602=>1000,33603=>1000,33604=>1000, - 33605=>1000,33606=>1000,33607=>1000,33608=>1000,33609=>1000,33610=>1000,33611=>1000,33612=>1000,33613=>1000,33614=>1000,33615=>1000,33616=>1000,33617=>1000,33618=>1000,33619=>1000,33620=>1000, - 33621=>1000,33622=>1000,33623=>1000,33624=>1000,33625=>1000,33626=>1000,33627=>1000,33628=>1000,33629=>1000,33630=>1000,33631=>1000,33632=>1000,33633=>1000,33634=>1000,33635=>1000,33636=>1000, - 33637=>1000,33638=>1000,33639=>1000,33640=>1000,33641=>1000,33642=>1000,33643=>1000,33644=>1000,33645=>1000,33646=>1000,33647=>1000,33648=>1000,33649=>1000,33650=>1000,33651=>1000,33652=>1000, - 33653=>1000,33654=>1000,33655=>1000,33656=>1000,33657=>1000,33658=>1000,33659=>1000,33660=>1000,33661=>1000,33662=>1000,33663=>1000,33664=>1000,33665=>1000,33666=>1000,33667=>1000,33668=>1000, - 33669=>1000,33670=>1000,33671=>1000,33672=>1000,33673=>1000,33674=>1000,33675=>1000,33676=>1000,33677=>1000,33678=>1000,33679=>1000,33680=>1000,33681=>1000,33682=>1000,33683=>1000,33684=>1000, - 33685=>1000,33686=>1000,33687=>1000,33688=>1000,33689=>1000,33690=>1000,33691=>1000,33692=>1000,33693=>1000,33694=>1000,33695=>1000,33696=>1000,33697=>1000,33698=>1000,33699=>1000,33700=>1000, - 33701=>1000,33702=>1000,33703=>1000,33704=>1000,33705=>1000,33706=>1000,33707=>1000,33708=>1000,33709=>1000,33710=>1000,33711=>1000,33712=>1000,33713=>1000,33714=>1000,33715=>1000,33716=>1000, - 33717=>1000,33718=>1000,33719=>1000,33720=>1000,33721=>1000,33722=>1000,33723=>1000,33724=>1000,33725=>1000,33726=>1000,33727=>1000,33728=>1000,33729=>1000,33730=>1000,33731=>1000,33732=>1000, - 33733=>1000,33734=>1000,33735=>1000,33736=>1000,33737=>1000,33738=>1000,33739=>1000,33740=>1000,33741=>1000,33742=>1000,33743=>1000,33744=>1000,33745=>1000,33746=>1000,33747=>1000,33748=>1000, - 33749=>1000,33750=>1000,33751=>1000,33752=>1000,33753=>1000,33754=>1000,33755=>1000,33756=>1000,33757=>1000,33758=>1000,33759=>1000,33760=>1000,33761=>1000,33762=>1000,33763=>1000,33764=>1000, - 33765=>1000,33766=>1000,33767=>1000,33768=>1000,33769=>1000,33770=>1000,33771=>1000,33772=>1000,33773=>1000,33774=>1000,33775=>1000,33776=>1000,33777=>1000,33778=>1000,33779=>1000,33780=>1000, - 33781=>1000,33782=>1000,33783=>1000,33784=>1000,33785=>1000,33786=>1000,33787=>1000,33788=>1000,33789=>1000,33790=>1000,33791=>1000,33792=>1000,33793=>1000,33794=>1000,33795=>1000,33796=>1000, - 33797=>1000,33798=>1000,33799=>1000,33800=>1000,33801=>1000,33802=>1000,33803=>1000,33804=>1000,33805=>1000,33806=>1000,33807=>1000,33808=>1000,33809=>1000,33810=>1000,33811=>1000,33812=>1000, - 33813=>1000,33814=>1000,33815=>1000,33816=>1000,33817=>1000,33818=>1000,33819=>1000,33820=>1000,33821=>1000,33822=>1000,33823=>1000,33824=>1000,33825=>1000,33826=>1000,33827=>1000,33828=>1000, - 33829=>1000,33830=>1000,33831=>1000,33832=>1000,33833=>1000,33834=>1000,33835=>1000,33836=>1000,33837=>1000,33838=>1000,33839=>1000,33840=>1000,33841=>1000,33842=>1000,33843=>1000,33844=>1000, - 33845=>1000,33846=>1000,33847=>1000,33848=>1000,33849=>1000,33850=>1000,33851=>1000,33852=>1000,33853=>1000,33854=>1000,33855=>1000,33856=>1000,33857=>1000,33858=>1000,33859=>1000,33860=>1000, - 33861=>1000,33862=>1000,33863=>1000,33864=>1000,33865=>1000,33866=>1000,33867=>1000,33868=>1000,33869=>1000,33870=>1000,33871=>1000,33872=>1000,33873=>1000,33874=>1000,33875=>1000,33876=>1000, - 33877=>1000,33878=>1000,33879=>1000,33880=>1000,33881=>1000,33882=>1000,33883=>1000,33884=>1000,33885=>1000,33886=>1000,33887=>1000,33888=>1000,33889=>1000,33890=>1000,33891=>1000,33892=>1000, - 33893=>1000,33894=>1000,33895=>1000,33896=>1000,33897=>1000,33898=>1000,33899=>1000,33900=>1000,33901=>1000,33902=>1000,33903=>1000,33904=>1000,33905=>1000,33906=>1000,33907=>1000,33908=>1000, - 33909=>1000,33910=>1000,33911=>1000,33912=>1000,33913=>1000,33914=>1000,33915=>1000,33916=>1000,33917=>1000,33918=>1000,33919=>1000,33920=>1000,33921=>1000,33922=>1000,33923=>1000,33924=>1000, - 33925=>1000,33926=>1000,33927=>1000,33928=>1000,33929=>1000,33930=>1000,33931=>1000,33932=>1000,33933=>1000,33934=>1000,33935=>1000,33936=>1000,33937=>1000,33938=>1000,33939=>1000,33940=>1000, - 33941=>1000,33942=>1000,33943=>1000,33944=>1000,33945=>1000,33946=>1000,33947=>1000,33948=>1000,33949=>1000,33950=>1000,33951=>1000,33952=>1000,33953=>1000,33954=>1000,33955=>1000,33956=>1000, - 33957=>1000,33958=>1000,33959=>1000,33960=>1000,33961=>1000,33962=>1000,33963=>1000,33964=>1000,33965=>1000,33966=>1000,33967=>1000,33968=>1000,33969=>1000,33970=>1000,33971=>1000,33972=>1000, - 33973=>1000,33974=>1000,33975=>1000,33976=>1000,33977=>1000,33978=>1000,33979=>1000,33980=>1000,33981=>1000,33982=>1000,33983=>1000,33984=>1000,33985=>1000,33986=>1000,33987=>1000,33988=>1000, - 33989=>1000,33990=>1000,33991=>1000,33992=>1000,33993=>1000,33994=>1000,33995=>1000,33996=>1000,33997=>1000,33998=>1000,33999=>1000,34000=>1000,34001=>1000,34002=>1000,34003=>1000,34004=>1000, - 34005=>1000,34006=>1000,34007=>1000,34008=>1000,34009=>1000,34010=>1000,34011=>1000,34012=>1000,34013=>1000,34014=>1000,34015=>1000,34016=>1000,34017=>1000,34018=>1000,34019=>1000,34020=>1000, - 34021=>1000,34022=>1000,34023=>1000,34024=>1000,34025=>1000,34026=>1000,34027=>1000,34028=>1000,34029=>1000,34030=>1000,34031=>1000,34032=>1000,34033=>1000,34034=>1000,34035=>1000,34036=>1000, - 34037=>1000,34038=>1000,34039=>1000,34040=>1000,34041=>1000,34042=>1000,34043=>1000,34044=>1000,34045=>1000,34046=>1000,34047=>1000,34048=>1000,34049=>1000,34050=>1000,34051=>1000,34052=>1000, - 34053=>1000,34054=>1000,34055=>1000,34056=>1000,34057=>1000,34058=>1000,34059=>1000,34060=>1000,34061=>1000,34062=>1000,34063=>1000,34064=>1000,34065=>1000,34066=>1000,34067=>1000,34068=>1000, - 34069=>1000,34070=>1000,34071=>1000,34072=>1000,34073=>1000,34074=>1000,34075=>1000,34076=>1000,34077=>1000,34078=>1000,34079=>1000,34080=>1000,34081=>1000,34082=>1000,34083=>1000,34084=>1000, - 34085=>1000,34086=>1000,34087=>1000,34088=>1000,34089=>1000,34090=>1000,34091=>1000,34092=>1000,34093=>1000,34094=>1000,34095=>1000,34096=>1000,34097=>1000,34098=>1000,34099=>1000,34100=>1000, - 34101=>1000,34102=>1000,34103=>1000,34104=>1000,34105=>1000,34106=>1000,34107=>1000,34108=>1000,34109=>1000,34110=>1000,34111=>1000,34112=>1000,34113=>1000,34114=>1000,34115=>1000,34116=>1000, - 34117=>1000,34118=>1000,34119=>1000,34120=>1000,34121=>1000,34122=>1000,34123=>1000,34124=>1000,34125=>1000,34126=>1000,34127=>1000,34128=>1000,34129=>1000,34130=>1000,34131=>1000,34132=>1000, - 34133=>1000,34134=>1000,34135=>1000,34136=>1000,34137=>1000,34138=>1000,34139=>1000,34140=>1000,34141=>1000,34142=>1000,34143=>1000,34144=>1000,34145=>1000,34146=>1000,34147=>1000,34148=>1000, - 34149=>1000,34150=>1000,34151=>1000,34152=>1000,34153=>1000,34154=>1000,34155=>1000,34156=>1000,34157=>1000,34158=>1000,34159=>1000,34160=>1000,34161=>1000,34162=>1000,34163=>1000,34164=>1000, - 34165=>1000,34166=>1000,34167=>1000,34168=>1000,34169=>1000,34170=>1000,34171=>1000,34172=>1000,34173=>1000,34174=>1000,34175=>1000,34176=>1000,34177=>1000,34178=>1000,34179=>1000,34180=>1000, - 34181=>1000,34182=>1000,34183=>1000,34184=>1000,34185=>1000,34186=>1000,34187=>1000,34188=>1000,34189=>1000,34190=>1000,34191=>1000,34192=>1000,34193=>1000,34194=>1000,34195=>1000,34196=>1000, - 34197=>1000,34198=>1000,34199=>1000,34200=>1000,34201=>1000,34202=>1000,34203=>1000,34204=>1000,34205=>1000,34206=>1000,34207=>1000,34208=>1000,34209=>1000,34210=>1000,34211=>1000,34212=>1000, - 34213=>1000,34214=>1000,34215=>1000,34216=>1000,34217=>1000,34218=>1000,34219=>1000,34220=>1000,34221=>1000,34222=>1000,34223=>1000,34224=>1000,34225=>1000,34226=>1000,34227=>1000,34228=>1000, - 34229=>1000,34230=>1000,34231=>1000,34232=>1000,34233=>1000,34234=>1000,34235=>1000,34236=>1000,34237=>1000,34238=>1000,34239=>1000,34240=>1000,34241=>1000,34242=>1000,34243=>1000,34244=>1000, - 34245=>1000,34246=>1000,34247=>1000,34248=>1000,34249=>1000,34250=>1000,34251=>1000,34252=>1000,34253=>1000,34254=>1000,34255=>1000,34256=>1000,34257=>1000,34258=>1000,34259=>1000,34260=>1000, - 34261=>1000,34262=>1000,34263=>1000,34264=>1000,34265=>1000,34266=>1000,34267=>1000,34268=>1000,34269=>1000,34270=>1000,34271=>1000,34272=>1000,34273=>1000,34274=>1000,34275=>1000,34276=>1000, - 34277=>1000,34278=>1000,34279=>1000,34280=>1000,34281=>1000,34282=>1000,34283=>1000,34284=>1000,34285=>1000,34286=>1000,34287=>1000,34288=>1000,34289=>1000,34290=>1000,34291=>1000,34292=>1000, - 34293=>1000,34294=>1000,34295=>1000,34296=>1000,34297=>1000,34298=>1000,34299=>1000,34300=>1000,34301=>1000,34302=>1000,34303=>1000,34304=>1000,34305=>1000,34306=>1000,34307=>1000,34308=>1000, - 34309=>1000,34310=>1000,34311=>1000,34312=>1000,34313=>1000,34314=>1000,34315=>1000,34316=>1000,34317=>1000,34318=>1000,34319=>1000,34320=>1000,34321=>1000,34322=>1000,34323=>1000,34324=>1000, - 34325=>1000,34326=>1000,34327=>1000,34328=>1000,34329=>1000,34330=>1000,34331=>1000,34332=>1000,34333=>1000,34334=>1000,34335=>1000,34336=>1000,34337=>1000,34338=>1000,34339=>1000,34340=>1000, - 34341=>1000,34342=>1000,34343=>1000,34344=>1000,34345=>1000,34346=>1000,34347=>1000,34348=>1000,34349=>1000,34350=>1000,34351=>1000,34352=>1000,34353=>1000,34354=>1000,34355=>1000,34356=>1000, - 34357=>1000,34358=>1000,34359=>1000,34360=>1000,34361=>1000,34362=>1000,34363=>1000,34364=>1000,34365=>1000,34366=>1000,34367=>1000,34368=>1000,34369=>1000,34370=>1000,34371=>1000,34372=>1000, - 34373=>1000,34374=>1000,34375=>1000,34376=>1000,34377=>1000,34378=>1000,34379=>1000,34380=>1000,34381=>1000,34382=>1000,34383=>1000,34384=>1000,34385=>1000,34386=>1000,34387=>1000,34388=>1000, - 34389=>1000,34390=>1000,34391=>1000,34392=>1000,34393=>1000,34394=>1000,34395=>1000,34396=>1000,34397=>1000,34398=>1000,34399=>1000,34400=>1000,34401=>1000,34402=>1000,34403=>1000,34404=>1000, - 34405=>1000,34406=>1000,34407=>1000,34408=>1000,34409=>1000,34410=>1000,34411=>1000,34412=>1000,34413=>1000,34414=>1000,34415=>1000,34416=>1000,34417=>1000,34418=>1000,34419=>1000,34420=>1000, - 34421=>1000,34422=>1000,34423=>1000,34424=>1000,34425=>1000,34426=>1000,34427=>1000,34428=>1000,34429=>1000,34430=>1000,34431=>1000,34432=>1000,34433=>1000,34434=>1000,34435=>1000,34436=>1000, - 34437=>1000,34438=>1000,34439=>1000,34440=>1000,34441=>1000,34442=>1000,34443=>1000,34444=>1000,34445=>1000,34446=>1000,34447=>1000,34448=>1000,34449=>1000,34450=>1000,34451=>1000,34452=>1000, - 34453=>1000,34454=>1000,34455=>1000,34456=>1000,34457=>1000,34458=>1000,34459=>1000,34460=>1000,34461=>1000,34462=>1000,34463=>1000,34464=>1000,34465=>1000,34466=>1000,34467=>1000,34468=>1000, - 34469=>1000,34470=>1000,34471=>1000,34472=>1000,34473=>1000,34474=>1000,34475=>1000,34476=>1000,34477=>1000,34478=>1000,34479=>1000,34480=>1000,34481=>1000,34482=>1000,34483=>1000,34484=>1000, - 34485=>1000,34486=>1000,34487=>1000,34488=>1000,34489=>1000,34490=>1000,34491=>1000,34492=>1000,34493=>1000,34494=>1000,34495=>1000,34496=>1000,34497=>1000,34498=>1000,34499=>1000,34500=>1000, - 34501=>1000,34502=>1000,34503=>1000,34504=>1000,34505=>1000,34506=>1000,34507=>1000,34508=>1000,34509=>1000,34510=>1000,34511=>1000,34512=>1000,34513=>1000,34514=>1000,34515=>1000,34516=>1000, - 34517=>1000,34518=>1000,34519=>1000,34520=>1000,34521=>1000,34522=>1000,34523=>1000,34524=>1000,34525=>1000,34526=>1000,34527=>1000,34528=>1000,34529=>1000,34530=>1000,34531=>1000,34532=>1000, - 34533=>1000,34534=>1000,34535=>1000,34536=>1000,34537=>1000,34538=>1000,34539=>1000,34540=>1000,34541=>1000,34542=>1000,34543=>1000,34544=>1000,34545=>1000,34546=>1000,34547=>1000,34548=>1000, - 34549=>1000,34550=>1000,34551=>1000,34552=>1000,34553=>1000,34554=>1000,34555=>1000,34556=>1000,34557=>1000,34558=>1000,34559=>1000,34560=>1000,34561=>1000,34562=>1000,34563=>1000,34564=>1000, - 34565=>1000,34566=>1000,34567=>1000,34568=>1000,34569=>1000,34570=>1000,34571=>1000,34572=>1000,34573=>1000,34574=>1000,34575=>1000,34576=>1000,34577=>1000,34578=>1000,34579=>1000,34580=>1000, - 34581=>1000,34582=>1000,34583=>1000,34584=>1000,34585=>1000,34586=>1000,34587=>1000,34588=>1000,34589=>1000,34590=>1000,34591=>1000,34592=>1000,34593=>1000,34594=>1000,34595=>1000,34596=>1000, - 34597=>1000,34598=>1000,34599=>1000,34600=>1000,34601=>1000,34602=>1000,34603=>1000,34604=>1000,34605=>1000,34606=>1000,34607=>1000,34608=>1000,34609=>1000,34610=>1000,34611=>1000,34612=>1000, - 34613=>1000,34614=>1000,34615=>1000,34616=>1000,34617=>1000,34618=>1000,34619=>1000,34620=>1000,34621=>1000,34622=>1000,34623=>1000,34624=>1000,34625=>1000,34626=>1000,34627=>1000,34628=>1000, - 34629=>1000,34630=>1000,34631=>1000,34632=>1000,34633=>1000,34634=>1000,34635=>1000,34636=>1000,34637=>1000,34638=>1000,34639=>1000,34640=>1000,34641=>1000,34642=>1000,34643=>1000,34644=>1000, - 34645=>1000,34646=>1000,34647=>1000,34648=>1000,34649=>1000,34650=>1000,34651=>1000,34652=>1000,34653=>1000,34654=>1000,34655=>1000,34656=>1000,34657=>1000,34658=>1000,34659=>1000,34660=>1000, - 34661=>1000,34662=>1000,34663=>1000,34664=>1000,34665=>1000,34666=>1000,34667=>1000,34668=>1000,34669=>1000,34670=>1000,34671=>1000,34672=>1000,34673=>1000,34674=>1000,34675=>1000,34676=>1000, - 34677=>1000,34678=>1000,34679=>1000,34680=>1000,34681=>1000,34682=>1000,34683=>1000,34684=>1000,34685=>1000,34686=>1000,34687=>1000,34688=>1000,34689=>1000,34690=>1000,34691=>1000,34692=>1000, - 34693=>1000,34694=>1000,34695=>1000,34696=>1000,34697=>1000,34698=>1000,34699=>1000,34700=>1000,34701=>1000,34702=>1000,34703=>1000,34704=>1000,34705=>1000,34706=>1000,34707=>1000,34708=>1000, - 34709=>1000,34710=>1000,34711=>1000,34712=>1000,34713=>1000,34714=>1000,34715=>1000,34716=>1000,34717=>1000,34718=>1000,34719=>1000,34720=>1000,34721=>1000,34722=>1000,34723=>1000,34724=>1000, - 34725=>1000,34726=>1000,34727=>1000,34728=>1000,34729=>1000,34730=>1000,34731=>1000,34732=>1000,34733=>1000,34734=>1000,34735=>1000,34736=>1000,34737=>1000,34738=>1000,34739=>1000,34740=>1000, - 34741=>1000,34742=>1000,34743=>1000,34744=>1000,34745=>1000,34746=>1000,34747=>1000,34748=>1000,34749=>1000,34750=>1000,34751=>1000,34752=>1000,34753=>1000,34754=>1000,34755=>1000,34756=>1000, - 34757=>1000,34758=>1000,34759=>1000,34760=>1000,34761=>1000,34762=>1000,34763=>1000,34764=>1000,34765=>1000,34766=>1000,34767=>1000,34768=>1000,34769=>1000,34770=>1000,34771=>1000,34772=>1000, - 34773=>1000,34774=>1000,34775=>1000,34776=>1000,34777=>1000,34778=>1000,34779=>1000,34780=>1000,34781=>1000,34782=>1000,34783=>1000,34784=>1000,34785=>1000,34786=>1000,34787=>1000,34788=>1000, - 34789=>1000,34790=>1000,34791=>1000,34792=>1000,34793=>1000,34794=>1000,34795=>1000,34796=>1000,34797=>1000,34798=>1000,34799=>1000,34800=>1000,34801=>1000,34802=>1000,34803=>1000,34804=>1000, - 34805=>1000,34806=>1000,34807=>1000,34808=>1000,34809=>1000,34810=>1000,34811=>1000,34812=>1000,34813=>1000,34814=>1000,34815=>1000,34816=>1000,34817=>1000,34818=>1000,34819=>1000,34820=>1000, - 34821=>1000,34822=>1000,34823=>1000,34824=>1000,34825=>1000,34826=>1000,34827=>1000,34828=>1000,34829=>1000,34830=>1000,34831=>1000,34832=>1000,34833=>1000,34834=>1000,34835=>1000,34836=>1000, - 34837=>1000,34838=>1000,34839=>1000,34840=>1000,34841=>1000,34842=>1000,34843=>1000,34844=>1000,34845=>1000,34846=>1000,34847=>1000,34848=>1000,34849=>1000,34850=>1000,34851=>1000,34852=>1000, - 34853=>1000,34854=>1000,34855=>1000,34856=>1000,34857=>1000,34858=>1000,34859=>1000,34860=>1000,34861=>1000,34862=>1000,34863=>1000,34864=>1000,34865=>1000,34866=>1000,34867=>1000,34868=>1000, - 34869=>1000,34870=>1000,34871=>1000,34872=>1000,34873=>1000,34874=>1000,34875=>1000,34876=>1000,34877=>1000,34878=>1000,34879=>1000,34880=>1000,34881=>1000,34882=>1000,34883=>1000,34884=>1000, - 34885=>1000,34886=>1000,34887=>1000,34888=>1000,34889=>1000,34890=>1000,34891=>1000,34892=>1000,34893=>1000,34894=>1000,34895=>1000,34896=>1000,34897=>1000,34898=>1000,34899=>1000,34900=>1000, - 34901=>1000,34902=>1000,34903=>1000,34904=>1000,34905=>1000,34906=>1000,34907=>1000,34908=>1000,34909=>1000,34910=>1000,34911=>1000,34912=>1000,34913=>1000,34914=>1000,34915=>1000,34916=>1000, - 34917=>1000,34918=>1000,34919=>1000,34920=>1000,34921=>1000,34922=>1000,34923=>1000,34924=>1000,34925=>1000,34926=>1000,34927=>1000,34928=>1000,34929=>1000,34930=>1000,34931=>1000,34932=>1000, - 34933=>1000,34934=>1000,34935=>1000,34936=>1000,34937=>1000,34938=>1000,34939=>1000,34940=>1000,34941=>1000,34942=>1000,34943=>1000,34944=>1000,34945=>1000,34946=>1000,34947=>1000,34948=>1000, - 34949=>1000,34950=>1000,34951=>1000,34952=>1000,34953=>1000,34954=>1000,34955=>1000,34956=>1000,34957=>1000,34958=>1000,34959=>1000,34960=>1000,34961=>1000,34962=>1000,34963=>1000,34964=>1000, - 34965=>1000,34966=>1000,34967=>1000,34968=>1000,34969=>1000,34970=>1000,34971=>1000,34972=>1000,34973=>1000,34974=>1000,34975=>1000,34976=>1000,34977=>1000,34978=>1000,34979=>1000,34980=>1000, - 34981=>1000,34982=>1000,34983=>1000,34984=>1000,34985=>1000,34986=>1000,34987=>1000,34988=>1000,34989=>1000,34990=>1000,34991=>1000,34992=>1000,34993=>1000,34994=>1000,34995=>1000,34996=>1000, - 34997=>1000,34998=>1000,34999=>1000,35000=>1000,35001=>1000,35002=>1000,35003=>1000,35004=>1000,35005=>1000,35006=>1000,35007=>1000,35008=>1000,35009=>1000,35010=>1000,35011=>1000,35012=>1000, - 35013=>1000,35014=>1000,35015=>1000,35016=>1000,35017=>1000,35018=>1000,35019=>1000,35020=>1000,35021=>1000,35022=>1000,35023=>1000,35024=>1000,35025=>1000,35026=>1000,35027=>1000,35028=>1000, - 35029=>1000,35030=>1000,35031=>1000,35032=>1000,35033=>1000,35034=>1000,35035=>1000,35036=>1000,35037=>1000,35038=>1000,35039=>1000,35040=>1000,35041=>1000,35042=>1000,35043=>1000,35044=>1000, - 35045=>1000,35046=>1000,35047=>1000,35048=>1000,35049=>1000,35050=>1000,35051=>1000,35052=>1000,35053=>1000,35054=>1000,35055=>1000,35056=>1000,35057=>1000,35058=>1000,35059=>1000,35060=>1000, - 35061=>1000,35062=>1000,35063=>1000,35064=>1000,35065=>1000,35066=>1000,35067=>1000,35068=>1000,35069=>1000,35070=>1000,35071=>1000,35072=>1000,35073=>1000,35074=>1000,35075=>1000,35076=>1000, - 35077=>1000,35078=>1000,35079=>1000,35080=>1000,35081=>1000,35082=>1000,35083=>1000,35084=>1000,35085=>1000,35086=>1000,35087=>1000,35088=>1000,35089=>1000,35090=>1000,35091=>1000,35092=>1000, - 35093=>1000,35094=>1000,35095=>1000,35096=>1000,35097=>1000,35098=>1000,35099=>1000,35100=>1000,35101=>1000,35102=>1000,35103=>1000,35104=>1000,35105=>1000,35106=>1000,35107=>1000,35108=>1000, - 35109=>1000,35110=>1000,35111=>1000,35112=>1000,35113=>1000,35114=>1000,35115=>1000,35116=>1000,35117=>1000,35118=>1000,35119=>1000,35120=>1000,35121=>1000,35122=>1000,35123=>1000,35124=>1000, - 35125=>1000,35126=>1000,35127=>1000,35128=>1000,35129=>1000,35130=>1000,35131=>1000,35132=>1000,35133=>1000,35134=>1000,35135=>1000,35136=>1000,35137=>1000,35138=>1000,35139=>1000,35140=>1000, - 35141=>1000,35142=>1000,35143=>1000,35144=>1000,35145=>1000,35146=>1000,35147=>1000,35148=>1000,35149=>1000,35150=>1000,35151=>1000,35152=>1000,35153=>1000,35154=>1000,35155=>1000,35156=>1000, - 35157=>1000,35158=>1000,35159=>1000,35160=>1000,35161=>1000,35162=>1000,35163=>1000,35164=>1000,35165=>1000,35166=>1000,35167=>1000,35168=>1000,35169=>1000,35170=>1000,35171=>1000,35172=>1000, - 35173=>1000,35174=>1000,35175=>1000,35176=>1000,35177=>1000,35178=>1000,35179=>1000,35180=>1000,35181=>1000,35182=>1000,35183=>1000,35184=>1000,35185=>1000,35186=>1000,35187=>1000,35188=>1000, - 35189=>1000,35190=>1000,35191=>1000,35192=>1000,35193=>1000,35194=>1000,35195=>1000,35196=>1000,35197=>1000,35198=>1000,35199=>1000,35200=>1000,35201=>1000,35202=>1000,35203=>1000,35204=>1000, - 35205=>1000,35206=>1000,35207=>1000,35208=>1000,35209=>1000,35210=>1000,35211=>1000,35212=>1000,35213=>1000,35214=>1000,35215=>1000,35216=>1000,35217=>1000,35218=>1000,35219=>1000,35220=>1000, - 35221=>1000,35222=>1000,35223=>1000,35224=>1000,35225=>1000,35226=>1000,35227=>1000,35228=>1000,35229=>1000,35230=>1000,35231=>1000,35232=>1000,35233=>1000,35234=>1000,35235=>1000,35236=>1000, - 35237=>1000,35238=>1000,35239=>1000,35240=>1000,35241=>1000,35242=>1000,35243=>1000,35244=>1000,35245=>1000,35246=>1000,35247=>1000,35248=>1000,35249=>1000,35250=>1000,35251=>1000,35252=>1000, - 35253=>1000,35254=>1000,35255=>1000,35256=>1000,35257=>1000,35258=>1000,35259=>1000,35260=>1000,35261=>1000,35262=>1000,35263=>1000,35264=>1000,35265=>1000,35266=>1000,35267=>1000,35268=>1000, - 35269=>1000,35270=>1000,35271=>1000,35272=>1000,35273=>1000,35274=>1000,35275=>1000,35276=>1000,35277=>1000,35278=>1000,35279=>1000,35280=>1000,35281=>1000,35282=>1000,35283=>1000,35284=>1000, - 35285=>1000,35286=>1000,35287=>1000,35288=>1000,35289=>1000,35290=>1000,35291=>1000,35292=>1000,35293=>1000,35294=>1000,35295=>1000,35296=>1000,35297=>1000,35298=>1000,35299=>1000,35300=>1000, - 35301=>1000,35302=>1000,35303=>1000,35304=>1000,35305=>1000,35306=>1000,35307=>1000,35308=>1000,35309=>1000,35310=>1000,35311=>1000,35312=>1000,35313=>1000,35314=>1000,35315=>1000,35316=>1000, - 35317=>1000,35318=>1000,35319=>1000,35320=>1000,35321=>1000,35322=>1000,35323=>1000,35324=>1000,35325=>1000,35326=>1000,35327=>1000,35328=>1000,35329=>1000,35330=>1000,35331=>1000,35332=>1000, - 35333=>1000,35334=>1000,35335=>1000,35336=>1000,35337=>1000,35338=>1000,35339=>1000,35340=>1000,35341=>1000,35342=>1000,35343=>1000,35344=>1000,35345=>1000,35346=>1000,35347=>1000,35348=>1000, - 35349=>1000,35350=>1000,35351=>1000,35352=>1000,35353=>1000,35354=>1000,35355=>1000,35356=>1000,35357=>1000,35358=>1000,35359=>1000,35360=>1000,35361=>1000,35362=>1000,35363=>1000,35364=>1000, - 35365=>1000,35366=>1000,35367=>1000,35368=>1000,35369=>1000,35370=>1000,35371=>1000,35372=>1000,35373=>1000,35374=>1000,35375=>1000,35376=>1000,35377=>1000,35378=>1000,35379=>1000,35380=>1000, - 35381=>1000,35382=>1000,35383=>1000,35384=>1000,35385=>1000,35386=>1000,35387=>1000,35388=>1000,35389=>1000,35390=>1000,35391=>1000,35392=>1000,35393=>1000,35394=>1000,35395=>1000,35396=>1000, - 35397=>1000,35398=>1000,35399=>1000,35400=>1000,35401=>1000,35402=>1000,35403=>1000,35404=>1000,35405=>1000,35406=>1000,35407=>1000,35408=>1000,35409=>1000,35410=>1000,35411=>1000,35412=>1000, - 35413=>1000,35414=>1000,35415=>1000,35416=>1000,35417=>1000,35418=>1000,35419=>1000,35420=>1000,35421=>1000,35422=>1000,35423=>1000,35424=>1000,35425=>1000,35426=>1000,35427=>1000,35428=>1000, - 35429=>1000,35430=>1000,35431=>1000,35432=>1000,35433=>1000,35434=>1000,35435=>1000,35436=>1000,35437=>1000,35438=>1000,35439=>1000,35440=>1000,35441=>1000,35442=>1000,35443=>1000,35444=>1000, - 35445=>1000,35446=>1000,35447=>1000,35448=>1000,35449=>1000,35450=>1000,35451=>1000,35452=>1000,35453=>1000,35454=>1000,35455=>1000,35456=>1000,35457=>1000,35458=>1000,35459=>1000,35460=>1000, - 35461=>1000,35462=>1000,35463=>1000,35464=>1000,35465=>1000,35466=>1000,35467=>1000,35468=>1000,35469=>1000,35470=>1000,35471=>1000,35472=>1000,35473=>1000,35474=>1000,35475=>1000,35476=>1000, - 35477=>1000,35478=>1000,35479=>1000,35480=>1000,35481=>1000,35482=>1000,35483=>1000,35484=>1000,35485=>1000,35486=>1000,35487=>1000,35488=>1000,35489=>1000,35490=>1000,35491=>1000,35492=>1000, - 35493=>1000,35494=>1000,35495=>1000,35496=>1000,35497=>1000,35498=>1000,35499=>1000,35500=>1000,35501=>1000,35502=>1000,35503=>1000,35504=>1000,35505=>1000,35506=>1000,35507=>1000,35508=>1000, - 35509=>1000,35510=>1000,35511=>1000,35512=>1000,35513=>1000,35514=>1000,35515=>1000,35516=>1000,35517=>1000,35518=>1000,35519=>1000,35520=>1000,35521=>1000,35522=>1000,35523=>1000,35524=>1000, - 35525=>1000,35526=>1000,35527=>1000,35528=>1000,35529=>1000,35530=>1000,35531=>1000,35532=>1000,35533=>1000,35534=>1000,35535=>1000,35536=>1000,35537=>1000,35538=>1000,35539=>1000,35540=>1000, - 35541=>1000,35542=>1000,35543=>1000,35544=>1000,35545=>1000,35546=>1000,35547=>1000,35548=>1000,35549=>1000,35550=>1000,35551=>1000,35552=>1000,35553=>1000,35554=>1000,35555=>1000,35556=>1000, - 35557=>1000,35558=>1000,35559=>1000,35560=>1000,35561=>1000,35562=>1000,35563=>1000,35564=>1000,35565=>1000,35566=>1000,35567=>1000,35568=>1000,35569=>1000,35570=>1000,35571=>1000,35572=>1000, - 35573=>1000,35574=>1000,35575=>1000,35576=>1000,35577=>1000,35578=>1000,35579=>1000,35580=>1000,35581=>1000,35582=>1000,35583=>1000,35584=>1000,35585=>1000,35586=>1000,35587=>1000,35588=>1000, - 35589=>1000,35590=>1000,35591=>1000,35592=>1000,35593=>1000,35594=>1000,35595=>1000,35596=>1000,35597=>1000,35598=>1000,35599=>1000,35600=>1000,35601=>1000,35602=>1000,35603=>1000,35604=>1000, - 35605=>1000,35606=>1000,35607=>1000,35608=>1000,35609=>1000,35610=>1000,35611=>1000,35612=>1000,35613=>1000,35614=>1000,35615=>1000,35616=>1000,35617=>1000,35618=>1000,35619=>1000,35620=>1000, - 35621=>1000,35622=>1000,35623=>1000,35624=>1000,35625=>1000,35626=>1000,35627=>1000,35628=>1000,35629=>1000,35630=>1000,35631=>1000,35632=>1000,35633=>1000,35634=>1000,35635=>1000,35636=>1000, - 35637=>1000,35638=>1000,35639=>1000,35640=>1000,35641=>1000,35642=>1000,35643=>1000,35644=>1000,35645=>1000,35646=>1000,35647=>1000,35648=>1000,35649=>1000,35650=>1000,35651=>1000,35652=>1000, - 35653=>1000,35654=>1000,35655=>1000,35656=>1000,35657=>1000,35658=>1000,35659=>1000,35660=>1000,35661=>1000,35662=>1000,35663=>1000,35664=>1000,35665=>1000,35666=>1000,35667=>1000,35668=>1000, - 35669=>1000,35670=>1000,35671=>1000,35672=>1000,35673=>1000,35674=>1000,35675=>1000,35676=>1000,35677=>1000,35678=>1000,35679=>1000,35680=>1000,35681=>1000,35682=>1000,35683=>1000,35684=>1000, - 35685=>1000,35686=>1000,35687=>1000,35688=>1000,35689=>1000,35690=>1000,35691=>1000,35692=>1000,35693=>1000,35694=>1000,35695=>1000,35696=>1000,35697=>1000,35698=>1000,35699=>1000,35700=>1000, - 35701=>1000,35702=>1000,35703=>1000,35704=>1000,35705=>1000,35706=>1000,35707=>1000,35708=>1000,35709=>1000,35710=>1000,35711=>1000,35712=>1000,35713=>1000,35714=>1000,35715=>1000,35716=>1000, - 35717=>1000,35718=>1000,35719=>1000,35720=>1000,35721=>1000,35722=>1000,35723=>1000,35724=>1000,35725=>1000,35726=>1000,35727=>1000,35728=>1000,35729=>1000,35730=>1000,35731=>1000,35732=>1000, - 35733=>1000,35734=>1000,35735=>1000,35736=>1000,35737=>1000,35738=>1000,35739=>1000,35740=>1000,35741=>1000,35742=>1000,35743=>1000,35744=>1000,35745=>1000,35746=>1000,35747=>1000,35748=>1000, - 35749=>1000,35750=>1000,35751=>1000,35752=>1000,35753=>1000,35754=>1000,35755=>1000,35756=>1000,35757=>1000,35758=>1000,35759=>1000,35760=>1000,35761=>1000,35762=>1000,35763=>1000,35764=>1000, - 35765=>1000,35766=>1000,35767=>1000,35768=>1000,35769=>1000,35770=>1000,35771=>1000,35772=>1000,35773=>1000,35774=>1000,35775=>1000,35776=>1000,35777=>1000,35778=>1000,35779=>1000,35780=>1000, - 35781=>1000,35782=>1000,35783=>1000,35784=>1000,35785=>1000,35786=>1000,35787=>1000,35788=>1000,35789=>1000,35790=>1000,35791=>1000,35792=>1000,35793=>1000,35794=>1000,35795=>1000,35796=>1000, - 35797=>1000,35798=>1000,35799=>1000,35800=>1000,35801=>1000,35802=>1000,35803=>1000,35804=>1000,35805=>1000,35806=>1000,35807=>1000,35808=>1000,35809=>1000,35810=>1000,35811=>1000,35812=>1000, - 35813=>1000,35814=>1000,35815=>1000,35816=>1000,35817=>1000,35818=>1000,35819=>1000,35820=>1000,35821=>1000,35822=>1000,35823=>1000,35824=>1000,35825=>1000,35826=>1000,35827=>1000,35828=>1000, - 35829=>1000,35830=>1000,35831=>1000,35832=>1000,35833=>1000,35834=>1000,35835=>1000,35836=>1000,35837=>1000,35838=>1000,35839=>1000,35840=>1000,35841=>1000,35842=>1000,35843=>1000,35844=>1000, - 35845=>1000,35846=>1000,35847=>1000,35848=>1000,35849=>1000,35850=>1000,35851=>1000,35852=>1000,35853=>1000,35854=>1000,35855=>1000,35856=>1000,35857=>1000,35858=>1000,35859=>1000,35860=>1000, - 35861=>1000,35862=>1000,35863=>1000,35864=>1000,35865=>1000,35866=>1000,35867=>1000,35868=>1000,35869=>1000,35870=>1000,35871=>1000,35872=>1000,35873=>1000,35874=>1000,35875=>1000,35876=>1000, - 35877=>1000,35878=>1000,35879=>1000,35880=>1000,35881=>1000,35882=>1000,35883=>1000,35884=>1000,35885=>1000,35886=>1000,35887=>1000,35888=>1000,35889=>1000,35890=>1000,35891=>1000,35892=>1000, - 35893=>1000,35894=>1000,35895=>1000,35896=>1000,35897=>1000,35898=>1000,35899=>1000,35900=>1000,35901=>1000,35902=>1000,35903=>1000,35904=>1000,35905=>1000,35906=>1000,35907=>1000,35908=>1000, - 35909=>1000,35910=>1000,35911=>1000,35912=>1000,35913=>1000,35914=>1000,35915=>1000,35916=>1000,35917=>1000,35918=>1000,35919=>1000,35920=>1000,35921=>1000,35922=>1000,35923=>1000,35924=>1000, - 35925=>1000,35926=>1000,35927=>1000,35928=>1000,35929=>1000,35930=>1000,35931=>1000,35932=>1000,35933=>1000,35934=>1000,35935=>1000,35936=>1000,35937=>1000,35938=>1000,35939=>1000,35940=>1000, - 35941=>1000,35942=>1000,35943=>1000,35944=>1000,35945=>1000,35946=>1000,35947=>1000,35948=>1000,35949=>1000,35950=>1000,35951=>1000,35952=>1000,35953=>1000,35954=>1000,35955=>1000,35956=>1000, - 35957=>1000,35958=>1000,35959=>1000,35960=>1000,35961=>1000,35962=>1000,35963=>1000,35964=>1000,35965=>1000,35966=>1000,35967=>1000,35968=>1000,35969=>1000,35970=>1000,35971=>1000,35972=>1000, - 35973=>1000,35974=>1000,35975=>1000,35976=>1000,35977=>1000,35978=>1000,35979=>1000,35980=>1000,35981=>1000,35982=>1000,35983=>1000,35984=>1000,35985=>1000,35986=>1000,35987=>1000,35988=>1000, - 35989=>1000,35990=>1000,35991=>1000,35992=>1000,35993=>1000,35994=>1000,35995=>1000,35996=>1000,35997=>1000,35998=>1000,35999=>1000,36000=>1000,36001=>1000,36002=>1000,36003=>1000,36004=>1000, - 36005=>1000,36006=>1000,36007=>1000,36008=>1000,36009=>1000,36010=>1000,36011=>1000,36012=>1000,36013=>1000,36014=>1000,36015=>1000,36016=>1000,36017=>1000,36018=>1000,36019=>1000,36020=>1000, - 36021=>1000,36022=>1000,36023=>1000,36024=>1000,36025=>1000,36026=>1000,36027=>1000,36028=>1000,36029=>1000,36030=>1000,36031=>1000,36032=>1000,36033=>1000,36034=>1000,36035=>1000,36036=>1000, - 36037=>1000,36038=>1000,36039=>1000,36040=>1000,36041=>1000,36042=>1000,36043=>1000,36044=>1000,36045=>1000,36046=>1000,36047=>1000,36048=>1000,36049=>1000,36050=>1000,36051=>1000,36052=>1000, - 36053=>1000,36054=>1000,36055=>1000,36056=>1000,36057=>1000,36058=>1000,36059=>1000,36060=>1000,36061=>1000,36062=>1000,36063=>1000,36064=>1000,36065=>1000,36066=>1000,36067=>1000,36068=>1000, - 36069=>1000,36070=>1000,36071=>1000,36072=>1000,36073=>1000,36074=>1000,36075=>1000,36076=>1000,36077=>1000,36078=>1000,36079=>1000,36080=>1000,36081=>1000,36082=>1000,36083=>1000,36084=>1000, - 36085=>1000,36086=>1000,36087=>1000,36088=>1000,36089=>1000,36090=>1000,36091=>1000,36092=>1000,36093=>1000,36094=>1000,36095=>1000,36096=>1000,36097=>1000,36098=>1000,36099=>1000,36100=>1000, - 36101=>1000,36102=>1000,36103=>1000,36104=>1000,36105=>1000,36106=>1000,36107=>1000,36108=>1000,36109=>1000,36110=>1000,36111=>1000,36112=>1000,36113=>1000,36114=>1000,36115=>1000,36116=>1000, - 36117=>1000,36118=>1000,36119=>1000,36120=>1000,36121=>1000,36122=>1000,36123=>1000,36124=>1000,36125=>1000,36126=>1000,36127=>1000,36128=>1000,36129=>1000,36130=>1000,36131=>1000,36132=>1000, - 36133=>1000,36134=>1000,36135=>1000,36136=>1000,36137=>1000,36138=>1000,36139=>1000,36140=>1000,36141=>1000,36142=>1000,36143=>1000,36144=>1000,36145=>1000,36146=>1000,36147=>1000,36148=>1000, - 36149=>1000,36150=>1000,36151=>1000,36152=>1000,36153=>1000,36154=>1000,36155=>1000,36156=>1000,36157=>1000,36158=>1000,36159=>1000,36160=>1000,36161=>1000,36162=>1000,36163=>1000,36164=>1000, - 36165=>1000,36166=>1000,36167=>1000,36168=>1000,36169=>1000,36170=>1000,36171=>1000,36172=>1000,36173=>1000,36174=>1000,36175=>1000,36176=>1000,36177=>1000,36178=>1000,36179=>1000,36180=>1000, - 36181=>1000,36182=>1000,36183=>1000,36184=>1000,36185=>1000,36186=>1000,36187=>1000,36188=>1000,36189=>1000,36190=>1000,36191=>1000,36192=>1000,36193=>1000,36194=>1000,36195=>1000,36196=>1000, - 36197=>1000,36198=>1000,36199=>1000,36200=>1000,36201=>1000,36202=>1000,36203=>1000,36204=>1000,36205=>1000,36206=>1000,36207=>1000,36208=>1000,36209=>1000,36210=>1000,36211=>1000,36212=>1000, - 36213=>1000,36214=>1000,36215=>1000,36216=>1000,36217=>1000,36218=>1000,36219=>1000,36220=>1000,36221=>1000,36222=>1000,36223=>1000,36224=>1000,36225=>1000,36226=>1000,36227=>1000,36228=>1000, - 36229=>1000,36230=>1000,36231=>1000,36232=>1000,36233=>1000,36234=>1000,36235=>1000,36236=>1000,36237=>1000,36238=>1000,36239=>1000,36240=>1000,36241=>1000,36242=>1000,36243=>1000,36244=>1000, - 36245=>1000,36246=>1000,36247=>1000,36248=>1000,36249=>1000,36250=>1000,36251=>1000,36252=>1000,36253=>1000,36254=>1000,36255=>1000,36256=>1000,36257=>1000,36258=>1000,36259=>1000,36260=>1000, - 36261=>1000,36262=>1000,36263=>1000,36264=>1000,36265=>1000,36266=>1000,36267=>1000,36268=>1000,36269=>1000,36270=>1000,36271=>1000,36272=>1000,36273=>1000,36274=>1000,36275=>1000,36276=>1000, - 36277=>1000,36278=>1000,36279=>1000,36280=>1000,36281=>1000,36282=>1000,36283=>1000,36284=>1000,36285=>1000,36286=>1000,36287=>1000,36288=>1000,36289=>1000,36290=>1000,36291=>1000,36292=>1000, - 36293=>1000,36294=>1000,36295=>1000,36296=>1000,36297=>1000,36298=>1000,36299=>1000,36300=>1000,36301=>1000,36302=>1000,36303=>1000,36304=>1000,36305=>1000,36306=>1000,36307=>1000,36308=>1000, - 36309=>1000,36310=>1000,36311=>1000,36312=>1000,36313=>1000,36314=>1000,36315=>1000,36316=>1000,36317=>1000,36318=>1000,36319=>1000,36320=>1000,36321=>1000,36322=>1000,36323=>1000,36324=>1000, - 36325=>1000,36326=>1000,36327=>1000,36328=>1000,36329=>1000,36330=>1000,36331=>1000,36332=>1000,36333=>1000,36334=>1000,36335=>1000,36336=>1000,36337=>1000,36338=>1000,36339=>1000,36340=>1000, - 36341=>1000,36342=>1000,36343=>1000,36344=>1000,36345=>1000,36346=>1000,36347=>1000,36348=>1000,36349=>1000,36350=>1000,36351=>1000,36352=>1000,36353=>1000,36354=>1000,36355=>1000,36356=>1000, - 36357=>1000,36358=>1000,36359=>1000,36360=>1000,36361=>1000,36362=>1000,36363=>1000,36364=>1000,36365=>1000,36366=>1000,36367=>1000,36368=>1000,36369=>1000,36370=>1000,36371=>1000,36372=>1000, - 36373=>1000,36374=>1000,36375=>1000,36376=>1000,36377=>1000,36378=>1000,36379=>1000,36380=>1000,36381=>1000,36382=>1000,36383=>1000,36384=>1000,36385=>1000,36386=>1000,36387=>1000,36388=>1000, - 36389=>1000,36390=>1000,36391=>1000,36392=>1000,36393=>1000,36394=>1000,36395=>1000,36396=>1000,36397=>1000,36398=>1000,36399=>1000,36400=>1000,36401=>1000,36402=>1000,36403=>1000,36404=>1000, - 36405=>1000,36406=>1000,36407=>1000,36408=>1000,36409=>1000,36410=>1000,36411=>1000,36412=>1000,36413=>1000,36414=>1000,36415=>1000,36416=>1000,36417=>1000,36418=>1000,36419=>1000,36420=>1000, - 36421=>1000,36422=>1000,36423=>1000,36424=>1000,36425=>1000,36426=>1000,36427=>1000,36428=>1000,36429=>1000,36430=>1000,36431=>1000,36432=>1000,36433=>1000,36434=>1000,36435=>1000,36436=>1000, - 36437=>1000,36438=>1000,36439=>1000,36440=>1000,36441=>1000,36442=>1000,36443=>1000,36444=>1000,36445=>1000,36446=>1000,36447=>1000,36448=>1000,36449=>1000,36450=>1000,36451=>1000,36452=>1000, - 36453=>1000,36454=>1000,36455=>1000,36456=>1000,36457=>1000,36458=>1000,36459=>1000,36460=>1000,36461=>1000,36462=>1000,36463=>1000,36464=>1000,36465=>1000,36466=>1000,36467=>1000,36468=>1000, - 36469=>1000,36470=>1000,36471=>1000,36472=>1000,36473=>1000,36474=>1000,36475=>1000,36476=>1000,36477=>1000,36478=>1000,36479=>1000,36480=>1000,36481=>1000,36482=>1000,36483=>1000,36484=>1000, - 36485=>1000,36486=>1000,36487=>1000,36488=>1000,36489=>1000,36490=>1000,36491=>1000,36492=>1000,36493=>1000,36494=>1000,36495=>1000,36496=>1000,36497=>1000,36498=>1000,36499=>1000,36500=>1000, - 36501=>1000,36502=>1000,36503=>1000,36504=>1000,36505=>1000,36506=>1000,36507=>1000,36508=>1000,36509=>1000,36510=>1000,36511=>1000,36512=>1000,36513=>1000,36514=>1000,36515=>1000,36516=>1000, - 36517=>1000,36518=>1000,36519=>1000,36520=>1000,36521=>1000,36522=>1000,36523=>1000,36524=>1000,36525=>1000,36526=>1000,36527=>1000,36528=>1000,36529=>1000,36530=>1000,36531=>1000,36532=>1000, - 36533=>1000,36534=>1000,36535=>1000,36536=>1000,36537=>1000,36538=>1000,36539=>1000,36540=>1000,36541=>1000,36542=>1000,36543=>1000,36544=>1000,36545=>1000,36546=>1000,36547=>1000,36548=>1000, - 36549=>1000,36550=>1000,36551=>1000,36552=>1000,36553=>1000,36554=>1000,36555=>1000,36556=>1000,36557=>1000,36558=>1000,36559=>1000,36560=>1000,36561=>1000,36562=>1000,36563=>1000,36564=>1000, - 36565=>1000,36566=>1000,36567=>1000,36568=>1000,36569=>1000,36570=>1000,36571=>1000,36572=>1000,36573=>1000,36574=>1000,36575=>1000,36576=>1000,36577=>1000,36578=>1000,36579=>1000,36580=>1000, - 36581=>1000,36582=>1000,36583=>1000,36584=>1000,36585=>1000,36586=>1000,36587=>1000,36588=>1000,36589=>1000,36590=>1000,36591=>1000,36592=>1000,36593=>1000,36594=>1000,36595=>1000,36596=>1000, - 36597=>1000,36598=>1000,36599=>1000,36600=>1000,36601=>1000,36602=>1000,36603=>1000,36604=>1000,36605=>1000,36606=>1000,36607=>1000,36608=>1000,36609=>1000,36610=>1000,36611=>1000,36612=>1000, - 36613=>1000,36614=>1000,36615=>1000,36616=>1000,36617=>1000,36618=>1000,36619=>1000,36620=>1000,36621=>1000,36622=>1000,36623=>1000,36624=>1000,36625=>1000,36626=>1000,36627=>1000,36628=>1000, - 36629=>1000,36630=>1000,36631=>1000,36632=>1000,36633=>1000,36634=>1000,36635=>1000,36636=>1000,36637=>1000,36638=>1000,36639=>1000,36640=>1000,36641=>1000,36642=>1000,36643=>1000,36644=>1000, - 36645=>1000,36646=>1000,36647=>1000,36648=>1000,36649=>1000,36650=>1000,36651=>1000,36652=>1000,36653=>1000,36654=>1000,36655=>1000,36656=>1000,36657=>1000,36658=>1000,36659=>1000,36660=>1000, - 36661=>1000,36662=>1000,36663=>1000,36664=>1000,36665=>1000,36666=>1000,36667=>1000,36668=>1000,36669=>1000,36670=>1000,36671=>1000,36672=>1000,36673=>1000,36674=>1000,36675=>1000,36676=>1000, - 36677=>1000,36678=>1000,36679=>1000,36680=>1000,36681=>1000,36682=>1000,36683=>1000,36684=>1000,36685=>1000,36686=>1000,36687=>1000,36688=>1000,36689=>1000,36690=>1000,36691=>1000,36692=>1000, - 36693=>1000,36694=>1000,36695=>1000,36696=>1000,36697=>1000,36698=>1000,36699=>1000,36700=>1000,36701=>1000,36702=>1000,36703=>1000,36704=>1000,36705=>1000,36706=>1000,36707=>1000,36708=>1000, - 36709=>1000,36710=>1000,36711=>1000,36712=>1000,36713=>1000,36714=>1000,36715=>1000,36716=>1000,36717=>1000,36718=>1000,36719=>1000,36720=>1000,36721=>1000,36722=>1000,36723=>1000,36724=>1000, - 36725=>1000,36726=>1000,36727=>1000,36728=>1000,36729=>1000,36730=>1000,36731=>1000,36732=>1000,36733=>1000,36734=>1000,36735=>1000,36736=>1000,36737=>1000,36738=>1000,36739=>1000,36740=>1000, - 36741=>1000,36742=>1000,36743=>1000,36744=>1000,36745=>1000,36746=>1000,36747=>1000,36748=>1000,36749=>1000,36750=>1000,36751=>1000,36752=>1000,36753=>1000,36754=>1000,36755=>1000,36756=>1000, - 36757=>1000,36758=>1000,36759=>1000,36760=>1000,36761=>1000,36762=>1000,36763=>1000,36764=>1000,36765=>1000,36766=>1000,36767=>1000,36768=>1000,36769=>1000,36770=>1000,36771=>1000,36772=>1000, - 36773=>1000,36774=>1000,36775=>1000,36776=>1000,36777=>1000,36778=>1000,36779=>1000,36780=>1000,36781=>1000,36782=>1000,36783=>1000,36784=>1000,36785=>1000,36786=>1000,36787=>1000,36788=>1000, - 36789=>1000,36790=>1000,36791=>1000,36792=>1000,36793=>1000,36794=>1000,36795=>1000,36796=>1000,36797=>1000,36798=>1000,36799=>1000,36800=>1000,36801=>1000,36802=>1000,36803=>1000,36804=>1000, - 36805=>1000,36806=>1000,36807=>1000,36808=>1000,36809=>1000,36810=>1000,36811=>1000,36812=>1000,36813=>1000,36814=>1000,36815=>1000,36816=>1000,36817=>1000,36818=>1000,36819=>1000,36820=>1000, - 36821=>1000,36822=>1000,36823=>1000,36824=>1000,36825=>1000,36826=>1000,36827=>1000,36828=>1000,36829=>1000,36830=>1000,36831=>1000,36832=>1000,36833=>1000,36834=>1000,36835=>1000,36836=>1000, - 36837=>1000,36838=>1000,36839=>1000,36840=>1000,36841=>1000,36842=>1000,36843=>1000,36844=>1000,36845=>1000,36846=>1000,36847=>1000,36848=>1000,36849=>1000,36850=>1000,36851=>1000,36852=>1000, - 36853=>1000,36854=>1000,36855=>1000,36856=>1000,36857=>1000,36858=>1000,36859=>1000,36860=>1000,36861=>1000,36862=>1000,36863=>1000,36864=>1000,36865=>1000,36866=>1000,36867=>1000,36868=>1000, - 36869=>1000,36870=>1000,36871=>1000,36872=>1000,36873=>1000,36874=>1000,36875=>1000,36876=>1000,36877=>1000,36878=>1000,36879=>1000,36880=>1000,36881=>1000,36882=>1000,36883=>1000,36884=>1000, - 36885=>1000,36886=>1000,36887=>1000,36888=>1000,36889=>1000,36890=>1000,36891=>1000,36892=>1000,36893=>1000,36894=>1000,36895=>1000,36896=>1000,36897=>1000,36898=>1000,36899=>1000,36900=>1000, - 36901=>1000,36902=>1000,36903=>1000,36904=>1000,36905=>1000,36906=>1000,36907=>1000,36908=>1000,36909=>1000,36910=>1000,36911=>1000,36912=>1000,36913=>1000,36914=>1000,36915=>1000,36916=>1000, - 36917=>1000,36918=>1000,36919=>1000,36920=>1000,36921=>1000,36922=>1000,36923=>1000,36924=>1000,36925=>1000,36926=>1000,36927=>1000,36928=>1000,36929=>1000,36930=>1000,36931=>1000,36932=>1000, - 36933=>1000,36934=>1000,36935=>1000,36936=>1000,36937=>1000,36938=>1000,36939=>1000,36940=>1000,36941=>1000,36942=>1000,36943=>1000,36944=>1000,36945=>1000,36946=>1000,36947=>1000,36948=>1000, - 36949=>1000,36950=>1000,36951=>1000,36952=>1000,36953=>1000,36954=>1000,36955=>1000,36956=>1000,36957=>1000,36958=>1000,36959=>1000,36960=>1000,36961=>1000,36962=>1000,36963=>1000,36964=>1000, - 36965=>1000,36966=>1000,36967=>1000,36968=>1000,36969=>1000,36970=>1000,36971=>1000,36972=>1000,36973=>1000,36974=>1000,36975=>1000,36976=>1000,36977=>1000,36978=>1000,36979=>1000,36980=>1000, - 36981=>1000,36982=>1000,36983=>1000,36984=>1000,36985=>1000,36986=>1000,36987=>1000,36988=>1000,36989=>1000,36990=>1000,36991=>1000,36992=>1000,36993=>1000,36994=>1000,36995=>1000,36996=>1000, - 36997=>1000,36998=>1000,36999=>1000,37000=>1000,37001=>1000,37002=>1000,37003=>1000,37004=>1000,37005=>1000,37006=>1000,37007=>1000,37008=>1000,37009=>1000,37010=>1000,37011=>1000,37012=>1000, - 37013=>1000,37014=>1000,37015=>1000,37016=>1000,37017=>1000,37018=>1000,37019=>1000,37020=>1000,37021=>1000,37022=>1000,37023=>1000,37024=>1000,37025=>1000,37026=>1000,37027=>1000,37028=>1000, - 37029=>1000,37030=>1000,37031=>1000,37032=>1000,37033=>1000,37034=>1000,37035=>1000,37036=>1000,37037=>1000,37038=>1000,37039=>1000,37040=>1000,37041=>1000,37042=>1000,37043=>1000,37044=>1000, - 37045=>1000,37046=>1000,37047=>1000,37048=>1000,37049=>1000,37050=>1000,37051=>1000,37052=>1000,37053=>1000,37054=>1000,37055=>1000,37056=>1000,37057=>1000,37058=>1000,37059=>1000,37060=>1000, - 37061=>1000,37062=>1000,37063=>1000,37064=>1000,37065=>1000,37066=>1000,37067=>1000,37068=>1000,37069=>1000,37070=>1000,37071=>1000,37072=>1000,37073=>1000,37074=>1000,37075=>1000,37076=>1000, - 37077=>1000,37078=>1000,37079=>1000,37080=>1000,37081=>1000,37082=>1000,37083=>1000,37084=>1000,37085=>1000,37086=>1000,37087=>1000,37088=>1000,37089=>1000,37090=>1000,37091=>1000,37092=>1000, - 37093=>1000,37094=>1000,37095=>1000,37096=>1000,37097=>1000,37098=>1000,37099=>1000,37100=>1000,37101=>1000,37102=>1000,37103=>1000,37104=>1000,37105=>1000,37106=>1000,37107=>1000,37108=>1000, - 37109=>1000,37110=>1000,37111=>1000,37112=>1000,37113=>1000,37114=>1000,37115=>1000,37116=>1000,37117=>1000,37118=>1000,37119=>1000,37120=>1000,37121=>1000,37122=>1000,37123=>1000,37124=>1000, - 37125=>1000,37126=>1000,37127=>1000,37128=>1000,37129=>1000,37130=>1000,37131=>1000,37132=>1000,37133=>1000,37134=>1000,37135=>1000,37136=>1000,37137=>1000,37138=>1000,37139=>1000,37140=>1000, - 37141=>1000,37142=>1000,37143=>1000,37144=>1000,37145=>1000,37146=>1000,37147=>1000,37148=>1000,37149=>1000,37150=>1000,37151=>1000,37152=>1000,37153=>1000,37154=>1000,37155=>1000,37156=>1000, - 37157=>1000,37158=>1000,37159=>1000,37160=>1000,37161=>1000,37162=>1000,37163=>1000,37164=>1000,37165=>1000,37166=>1000,37167=>1000,37168=>1000,37169=>1000,37170=>1000,37171=>1000,37172=>1000, - 37173=>1000,37174=>1000,37175=>1000,37176=>1000,37177=>1000,37178=>1000,37179=>1000,37180=>1000,37181=>1000,37182=>1000,37183=>1000,37184=>1000,37185=>1000,37186=>1000,37187=>1000,37188=>1000, - 37189=>1000,37190=>1000,37191=>1000,37192=>1000,37193=>1000,37194=>1000,37195=>1000,37196=>1000,37197=>1000,37198=>1000,37199=>1000,37200=>1000,37201=>1000,37202=>1000,37203=>1000,37204=>1000, - 37205=>1000,37206=>1000,37207=>1000,37208=>1000,37209=>1000,37210=>1000,37211=>1000,37212=>1000,37213=>1000,37214=>1000,37215=>1000,37216=>1000,37217=>1000,37218=>1000,37219=>1000,37220=>1000, - 37221=>1000,37222=>1000,37223=>1000,37224=>1000,37225=>1000,37226=>1000,37227=>1000,37228=>1000,37229=>1000,37230=>1000,37231=>1000,37232=>1000,37233=>1000,37234=>1000,37235=>1000,37236=>1000, - 37237=>1000,37238=>1000,37239=>1000,37240=>1000,37241=>1000,37242=>1000,37243=>1000,37244=>1000,37245=>1000,37246=>1000,37247=>1000,37248=>1000,37249=>1000,37250=>1000,37251=>1000,37252=>1000, - 37253=>1000,37254=>1000,37255=>1000,37256=>1000,37257=>1000,37258=>1000,37259=>1000,37260=>1000,37261=>1000,37262=>1000,37263=>1000,37264=>1000,37265=>1000,37266=>1000,37267=>1000,37268=>1000, - 37269=>1000,37270=>1000,37271=>1000,37272=>1000,37273=>1000,37274=>1000,37275=>1000,37276=>1000,37277=>1000,37278=>1000,37279=>1000,37280=>1000,37281=>1000,37282=>1000,37283=>1000,37284=>1000, - 37285=>1000,37286=>1000,37287=>1000,37288=>1000,37289=>1000,37290=>1000,37291=>1000,37292=>1000,37293=>1000,37294=>1000,37295=>1000,37296=>1000,37297=>1000,37298=>1000,37299=>1000,37300=>1000, - 37301=>1000,37302=>1000,37303=>1000,37304=>1000,37305=>1000,37306=>1000,37307=>1000,37308=>1000,37309=>1000,37310=>1000,37311=>1000,37312=>1000,37313=>1000,37314=>1000,37315=>1000,37316=>1000, - 37317=>1000,37318=>1000,37319=>1000,37320=>1000,37321=>1000,37322=>1000,37323=>1000,37324=>1000,37325=>1000,37326=>1000,37327=>1000,37328=>1000,37329=>1000,37330=>1000,37331=>1000,37332=>1000, - 37333=>1000,37334=>1000,37335=>1000,37336=>1000,37337=>1000,37338=>1000,37339=>1000,37340=>1000,37341=>1000,37342=>1000,37343=>1000,37344=>1000,37345=>1000,37346=>1000,37347=>1000,37348=>1000, - 37349=>1000,37350=>1000,37351=>1000,37352=>1000,37353=>1000,37354=>1000,37355=>1000,37356=>1000,37357=>1000,37358=>1000,37359=>1000,37360=>1000,37361=>1000,37362=>1000,37363=>1000,37364=>1000, - 37365=>1000,37366=>1000,37367=>1000,37368=>1000,37369=>1000,37370=>1000,37371=>1000,37372=>1000,37373=>1000,37374=>1000,37375=>1000,37376=>1000,37377=>1000,37378=>1000,37379=>1000,37380=>1000, - 37381=>1000,37382=>1000,37383=>1000,37384=>1000,37385=>1000,37386=>1000,37387=>1000,37388=>1000,37389=>1000,37390=>1000,37391=>1000,37392=>1000,37393=>1000,37394=>1000,37395=>1000,37396=>1000, - 37397=>1000,37398=>1000,37399=>1000,37400=>1000,37401=>1000,37402=>1000,37403=>1000,37404=>1000,37405=>1000,37406=>1000,37407=>1000,37408=>1000,37409=>1000,37410=>1000,37411=>1000,37412=>1000, - 37413=>1000,37414=>1000,37415=>1000,37416=>1000,37417=>1000,37418=>1000,37419=>1000,37420=>1000,37421=>1000,37422=>1000,37423=>1000,37424=>1000,37425=>1000,37426=>1000,37427=>1000,37428=>1000, - 37429=>1000,37430=>1000,37431=>1000,37432=>1000,37433=>1000,37434=>1000,37435=>1000,37436=>1000,37437=>1000,37438=>1000,37439=>1000,37440=>1000,37441=>1000,37442=>1000,37443=>1000,37444=>1000, - 37445=>1000,37446=>1000,37447=>1000,37448=>1000,37449=>1000,37450=>1000,37451=>1000,37452=>1000,37453=>1000,37454=>1000,37455=>1000,37456=>1000,37457=>1000,37458=>1000,37459=>1000,37460=>1000, - 37461=>1000,37462=>1000,37463=>1000,37464=>1000,37465=>1000,37466=>1000,37467=>1000,37468=>1000,37469=>1000,37470=>1000,37471=>1000,37472=>1000,37473=>1000,37474=>1000,37475=>1000,37476=>1000, - 37477=>1000,37478=>1000,37479=>1000,37480=>1000,37481=>1000,37482=>1000,37483=>1000,37484=>1000,37485=>1000,37486=>1000,37487=>1000,37488=>1000,37489=>1000,37490=>1000,37491=>1000,37492=>1000, - 37493=>1000,37494=>1000,37495=>1000,37496=>1000,37497=>1000,37498=>1000,37499=>1000,37500=>1000,37501=>1000,37502=>1000,37503=>1000,37504=>1000,37505=>1000,37506=>1000,37507=>1000,37508=>1000, - 37509=>1000,37510=>1000,37511=>1000,37512=>1000,37513=>1000,37514=>1000,37515=>1000,37516=>1000,37517=>1000,37518=>1000,37519=>1000,37520=>1000,37521=>1000,37522=>1000,37523=>1000,37524=>1000, - 37525=>1000,37526=>1000,37527=>1000,37528=>1000,37529=>1000,37530=>1000,37531=>1000,37532=>1000,37533=>1000,37534=>1000,37535=>1000,37536=>1000,37537=>1000,37538=>1000,37539=>1000,37540=>1000, - 37541=>1000,37542=>1000,37543=>1000,37544=>1000,37545=>1000,37546=>1000,37547=>1000,37548=>1000,37549=>1000,37550=>1000,37551=>1000,37552=>1000,37553=>1000,37554=>1000,37555=>1000,37556=>1000, - 37557=>1000,37558=>1000,37559=>1000,37560=>1000,37561=>1000,37562=>1000,37563=>1000,37564=>1000,37565=>1000,37566=>1000,37567=>1000,37568=>1000,37569=>1000,37570=>1000,37571=>1000,37572=>1000, - 37573=>1000,37574=>1000,37575=>1000,37576=>1000,37577=>1000,37578=>1000,37579=>1000,37580=>1000,37581=>1000,37582=>1000,37583=>1000,37584=>1000,37585=>1000,37586=>1000,37587=>1000,37588=>1000, - 37589=>1000,37590=>1000,37591=>1000,37592=>1000,37593=>1000,37594=>1000,37595=>1000,37596=>1000,37597=>1000,37598=>1000,37599=>1000,37600=>1000,37601=>1000,37602=>1000,37603=>1000,37604=>1000, - 37605=>1000,37606=>1000,37607=>1000,37608=>1000,37609=>1000,37610=>1000,37611=>1000,37612=>1000,37613=>1000,37614=>1000,37615=>1000,37616=>1000,37617=>1000,37618=>1000,37619=>1000,37620=>1000, - 37621=>1000,37622=>1000,37623=>1000,37624=>1000,37625=>1000,37626=>1000,37627=>1000,37628=>1000,37629=>1000,37630=>1000,37631=>1000,37632=>1000,37633=>1000,37634=>1000,37635=>1000,37636=>1000, - 37637=>1000,37638=>1000,37639=>1000,37640=>1000,37641=>1000,37642=>1000,37643=>1000,37644=>1000,37645=>1000,37646=>1000,37647=>1000,37648=>1000,37649=>1000,37650=>1000,37651=>1000,37652=>1000, - 37653=>1000,37654=>1000,37655=>1000,37656=>1000,37657=>1000,37658=>1000,37659=>1000,37660=>1000,37661=>1000,37662=>1000,37663=>1000,37664=>1000,37665=>1000,37666=>1000,37667=>1000,37668=>1000, - 37669=>1000,37670=>1000,37671=>1000,37672=>1000,37673=>1000,37674=>1000,37675=>1000,37676=>1000,37677=>1000,37678=>1000,37679=>1000,37680=>1000,37681=>1000,37682=>1000,37683=>1000,37684=>1000, - 37685=>1000,37686=>1000,37687=>1000,37688=>1000,37689=>1000,37690=>1000,37691=>1000,37692=>1000,37693=>1000,37694=>1000,37695=>1000,37696=>1000,37697=>1000,37698=>1000,37699=>1000,37700=>1000, - 37701=>1000,37702=>1000,37703=>1000,37704=>1000,37705=>1000,37706=>1000,37707=>1000,37708=>1000,37709=>1000,37710=>1000,37711=>1000,37712=>1000,37713=>1000,37714=>1000,37715=>1000,37716=>1000, - 37717=>1000,37718=>1000,37719=>1000,37720=>1000,37721=>1000,37722=>1000,37723=>1000,37724=>1000,37725=>1000,37726=>1000,37727=>1000,37728=>1000,37729=>1000,37730=>1000,37731=>1000,37732=>1000, - 37733=>1000,37734=>1000,37735=>1000,37736=>1000,37737=>1000,37738=>1000,37739=>1000,37740=>1000,37741=>1000,37742=>1000,37743=>1000,37744=>1000,37745=>1000,37746=>1000,37747=>1000,37748=>1000, - 37749=>1000,37750=>1000,37751=>1000,37752=>1000,37753=>1000,37754=>1000,37755=>1000,37756=>1000,37757=>1000,37758=>1000,37759=>1000,37760=>1000,37761=>1000,37762=>1000,37763=>1000,37764=>1000, - 37765=>1000,37766=>1000,37767=>1000,37768=>1000,37769=>1000,37770=>1000,37771=>1000,37772=>1000,37773=>1000,37774=>1000,37775=>1000,37776=>1000,37777=>1000,37778=>1000,37779=>1000,37780=>1000, - 37781=>1000,37782=>1000,37783=>1000,37784=>1000,37785=>1000,37786=>1000,37787=>1000,37788=>1000,37789=>1000,37790=>1000,37791=>1000,37792=>1000,37793=>1000,37794=>1000,37795=>1000,37796=>1000, - 37797=>1000,37798=>1000,37799=>1000,37800=>1000,37801=>1000,37802=>1000,37803=>1000,37804=>1000,37805=>1000,37806=>1000,37807=>1000,37808=>1000,37809=>1000,37810=>1000,37811=>1000,37812=>1000, - 37813=>1000,37814=>1000,37815=>1000,37816=>1000,37817=>1000,37818=>1000,37819=>1000,37820=>1000,37821=>1000,37822=>1000,37823=>1000,37824=>1000,37825=>1000,37826=>1000,37827=>1000,37828=>1000, - 37829=>1000,37830=>1000,37831=>1000,37832=>1000,37833=>1000,37834=>1000,37835=>1000,37836=>1000,37837=>1000,37838=>1000,37839=>1000,37840=>1000,37841=>1000,37842=>1000,37843=>1000,37844=>1000, - 37845=>1000,37846=>1000,37847=>1000,37848=>1000,37849=>1000,37850=>1000,37851=>1000,37852=>1000,37853=>1000,37854=>1000,37855=>1000,37856=>1000,37857=>1000,37858=>1000,37859=>1000,37860=>1000, - 37861=>1000,37862=>1000,37863=>1000,37864=>1000,37865=>1000,37866=>1000,37867=>1000,37868=>1000,37869=>1000,37870=>1000,37871=>1000,37872=>1000,37873=>1000,37874=>1000,37875=>1000,37876=>1000, - 37877=>1000,37878=>1000,37879=>1000,37880=>1000,37881=>1000,37882=>1000,37883=>1000,37884=>1000,37885=>1000,37886=>1000,37887=>1000,37888=>1000,37889=>1000,37890=>1000,37891=>1000,37892=>1000, - 37893=>1000,37894=>1000,37895=>1000,37896=>1000,37897=>1000,37898=>1000,37899=>1000,37900=>1000,37901=>1000,37902=>1000,37903=>1000,37904=>1000,37905=>1000,37906=>1000,37907=>1000,37908=>1000, - 37909=>1000,37910=>1000,37911=>1000,37912=>1000,37913=>1000,37914=>1000,37915=>1000,37916=>1000,37917=>1000,37918=>1000,37919=>1000,37920=>1000,37921=>1000,37922=>1000,37923=>1000,37924=>1000, - 37925=>1000,37926=>1000,37927=>998,37928=>1000,37929=>1000,37930=>1000,37931=>1000,37932=>1000,37933=>1000,37934=>1000,37935=>1000,37936=>1000,37937=>1000,37938=>1000,37939=>1000,37940=>1000, - 37941=>1000,37942=>1000,37943=>1000,37944=>1000,37945=>1000,37946=>1000,37947=>1000,37948=>1000,37949=>1000,37950=>1000,37951=>1000,37952=>1000,37953=>1000,37954=>1000,37955=>1000,37956=>1000, - 37957=>1000,37958=>1000,37959=>1000,37960=>1000,37961=>1000,37962=>1000,37963=>1000,37964=>1000,37965=>1000,37966=>1000,37967=>1000,37968=>1000,37969=>1000,37970=>1000,37971=>1000,37972=>1000, - 37973=>1000,37974=>1000,37975=>1000,37976=>1000,37977=>1000,37978=>1000,37979=>1000,37980=>1000,37981=>1000,37982=>1000,37983=>1000,37984=>1000,37985=>1000,37986=>1000,37987=>1000,37988=>1000, - 37989=>1000,37990=>1000,37991=>1000,37992=>1000,37993=>1000,37994=>1000,37995=>1000,37996=>1000,37997=>1000,37998=>1000,37999=>1000,38000=>1000,38001=>1000,38002=>1000,38003=>1000,38004=>1000, - 38005=>1000,38006=>1000,38007=>1000,38008=>1000,38009=>1000,38010=>1000,38011=>1000,38012=>1000,38013=>1000,38014=>1000,38015=>1000,38016=>1000,38017=>1000,38018=>1000,38019=>1000,38020=>1000, - 38021=>1000,38022=>1000,38023=>1000,38024=>1000,38025=>1000,38026=>1000,38027=>1000,38028=>1000,38029=>1000,38030=>1000,38031=>1000,38032=>1000,38033=>1000,38034=>1000,38035=>1000,38036=>1000, - 38037=>1000,38038=>1000,38039=>1000,38040=>1000,38041=>1000,38042=>1000,38043=>1000,38044=>1000,38045=>1000,38046=>1000,38047=>1000,38048=>1000,38049=>1000,38050=>1000,38051=>1000,38052=>1000, - 38053=>1000,38054=>1000,38055=>1000,38056=>1000,38057=>1000,38058=>1000,38059=>1000,38060=>1000,38061=>1000,38062=>1000,38063=>1000,38064=>1000,38065=>1000,38066=>1000,38067=>1000,38068=>1000, - 38069=>1000,38070=>1000,38071=>1000,38072=>1000,38073=>1000,38074=>1000,38075=>1000,38076=>1000,38077=>1000,38078=>1000,38079=>1000,38080=>1000,38081=>1000,38082=>1000,38083=>1000,38084=>1000, - 38085=>1000,38086=>1000,38087=>1000,38088=>1000,38089=>1000,38090=>1000,38091=>1000,38092=>1000,38093=>1000,38094=>1000,38095=>1000,38096=>1000,38097=>1000,38098=>1000,38099=>1000,38100=>1000, - 38101=>1000,38102=>1000,38103=>1000,38104=>1000,38105=>1000,38106=>1000,38107=>1000,38108=>1000,38109=>1000,38110=>1000,38111=>1000,38112=>1000,38113=>1000,38114=>1000,38115=>1000,38116=>1000, - 38117=>1000,38118=>1000,38119=>1000,38120=>1000,38121=>1000,38122=>1000,38123=>1000,38124=>1000,38125=>1000,38126=>1000,38127=>1000,38128=>1000,38129=>1000,38130=>1000,38131=>1000,38132=>1000, - 38133=>1000,38134=>1000,38135=>1000,38136=>1000,38137=>1000,38138=>1000,38139=>1000,38140=>1000,38141=>1000,38142=>1000,38143=>1000,38144=>1000,38145=>1000,38146=>1000,38147=>1000,38148=>1000, - 38149=>1000,38150=>1000,38151=>1000,38152=>1000,38153=>1000,38154=>1000,38155=>1000,38156=>1000,38157=>1000,38158=>1000,38159=>1000,38160=>1000,38161=>1000,38162=>1000,38163=>1000,38164=>1000, - 38165=>1000,38166=>1000,38167=>1000,38168=>1000,38169=>1000,38170=>1000,38171=>1000,38172=>1000,38173=>1000,38174=>1000,38175=>1000,38176=>1000,38177=>1000,38178=>1000,38179=>1000,38180=>1000, - 38181=>1000,38182=>1000,38183=>1000,38184=>1000,38185=>1000,38186=>1000,38187=>1000,38188=>1000,38189=>1000,38190=>1000,38191=>1000,38192=>1000,38193=>1000,38194=>1000,38195=>1000,38196=>1000, - 38197=>1000,38198=>1000,38199=>1000,38200=>1000,38201=>1000,38202=>1000,38203=>1000,38204=>1000,38205=>1000,38206=>1000,38207=>1000,38208=>1000,38209=>1000,38210=>1000,38211=>1000,38212=>1000, - 38213=>1000,38214=>1000,38215=>1000,38216=>1000,38217=>1000,38218=>1000,38219=>1000,38220=>1000,38221=>1000,38222=>1000,38223=>1000,38224=>1000,38225=>1000,38226=>1000,38227=>1000,38228=>1000, - 38229=>1000,38230=>1000,38231=>1000,38232=>1000,38233=>1000,38234=>1000,38235=>1000,38236=>1000,38237=>1000,38238=>1000,38239=>1000,38240=>1000,38241=>1000,38242=>1000,38243=>1000,38244=>1000, - 38245=>1000,38246=>1000,38247=>1000,38248=>1000,38249=>1000,38250=>1000,38251=>1000,38252=>1000,38253=>1000,38254=>1000,38255=>1000,38256=>1000,38257=>1000,38258=>1000,38259=>1000,38260=>1000, - 38261=>1000,38262=>1000,38263=>1000,38264=>1000,38265=>1000,38266=>1000,38267=>1000,38268=>1000,38269=>1000,38270=>1000,38271=>1000,38272=>1000,38273=>1000,38274=>1000,38275=>1000,38276=>1000, - 38277=>1000,38278=>1000,38279=>1000,38280=>1000,38281=>1000,38282=>1000,38283=>1000,38284=>1000,38285=>1000,38286=>1000,38287=>1000,38288=>1000,38289=>1000,38290=>1000,38291=>1000,38292=>1000, - 38293=>1000,38294=>1000,38295=>1000,38296=>1000,38297=>1000,38298=>1000,38299=>1000,38300=>1000,38301=>1000,38302=>1000,38303=>1000,38304=>1000,38305=>1000,38306=>1000,38307=>1000,38308=>1000, - 38309=>1000,38310=>1000,38311=>1000,38312=>1000,38313=>1000,38314=>1000,38315=>1000,38316=>1000,38317=>1000,38318=>1000,38319=>1000,38320=>1000,38321=>1000,38322=>1000,38323=>1000,38324=>1000, - 38325=>1000,38326=>1000,38327=>1000,38328=>1000,38329=>1000,38330=>1000,38331=>1000,38332=>1000,38333=>1000,38334=>1000,38335=>1000,38336=>1000,38337=>1000,38338=>1000,38339=>1000,38340=>1000, - 38341=>1000,38342=>1000,38343=>1000,38344=>1000,38345=>1000,38346=>1000,38347=>1000,38348=>1000,38349=>1000,38350=>1000,38351=>1000,38352=>1000,38353=>1000,38354=>1000,38355=>1000,38356=>1000, - 38357=>1000,38358=>1000,38359=>1000,38360=>1000,38361=>1000,38362=>1000,38363=>1000,38364=>1000,38365=>1000,38366=>1000,38367=>1000,38368=>1000,38369=>1000,38370=>1000,38371=>1000,38372=>1000, - 38373=>1000,38374=>1000,38375=>1000,38376=>1000,38377=>1000,38378=>1000,38379=>1000,38380=>1000,38381=>1000,38382=>1000,38383=>1000,38384=>1000,38385=>1000,38386=>1000,38387=>1000,38388=>1000, - 38389=>1000,38390=>1000,38391=>1000,38392=>1000,38393=>1000,38394=>1000,38395=>1000,38396=>1000,38397=>1000,38398=>1000,38399=>1000,38400=>1000,38401=>1000,38402=>1000,38403=>1000,38404=>1000, - 38405=>1000,38406=>1000,38407=>1000,38408=>1000,38409=>1000,38410=>1000,38411=>1000,38412=>1000,38413=>1000,38414=>1000,38415=>1000,38416=>1000,38417=>1000,38418=>1000,38419=>1000,38420=>1000, - 38421=>1000,38422=>1000,38423=>1000,38424=>1000,38425=>1000,38426=>1000,38427=>1000,38428=>1000,38429=>1000,38430=>1000,38431=>1000,38432=>1000,38433=>1000,38434=>1000,38435=>1000,38436=>1000, - 38437=>1000,38438=>1000,38439=>1000,38440=>1000,38441=>1000,38442=>1000,38443=>1000,38444=>1000,38445=>1000,38446=>1000,38447=>1000,38448=>1000,38449=>1000,38450=>1000,38451=>1000,38452=>1000, - 38453=>1000,38454=>1000,38455=>1000,38456=>1000,38457=>1000,38458=>1000,38459=>1000,38460=>1000,38461=>1000,38462=>1000,38463=>1000,38464=>1000,38465=>1000,38466=>1000,38467=>1000,38468=>1000, - 38469=>1000,38470=>1000,38471=>1000,38472=>1000,38473=>1000,38474=>1000,38475=>1000,38476=>1000,38477=>1000,38478=>1000,38479=>1000,38480=>1000,38481=>1000,38482=>1000,38483=>1000,38484=>1000, - 38485=>1000,38486=>1000,38487=>1000,38488=>1000,38489=>1000,38490=>1000,38491=>1000,38492=>1000,38493=>1000,38494=>1000,38495=>1000,38496=>1000,38497=>1000,38498=>1000,38499=>1000,38500=>1000, - 38501=>1000,38502=>1000,38503=>1000,38504=>1000,38505=>1000,38506=>1000,38507=>1000,38508=>1000,38509=>1000,38510=>1000,38511=>1000,38512=>1000,38513=>1000,38514=>1000,38515=>1000,38516=>1000, - 38517=>1000,38518=>1000,38519=>1000,38520=>1000,38521=>1000,38522=>1000,38523=>1000,38524=>1000,38525=>1000,38526=>1000,38527=>1000,38528=>1000,38529=>1000,38530=>1000,38531=>1000,38532=>1000, - 38533=>1000,38534=>1000,38535=>1000,38536=>1000,38537=>1000,38538=>1000,38539=>1000,38540=>1000,38541=>1000,38542=>1000,38543=>1000,38544=>1000,38545=>1000,38546=>1000,38547=>1000,38548=>1000, - 38549=>1000,38550=>1000,38551=>1000,38552=>1000,38553=>1000,38554=>1000,38555=>1000,38556=>1000,38557=>1000,38558=>1000,38559=>1000,38560=>1000,38561=>1000,38562=>1000,38563=>1000,38564=>1000, - 38565=>1000,38566=>1000,38567=>1000,38568=>1000,38569=>1000,38570=>1000,38571=>1000,38572=>1000,38573=>1000,38574=>1000,38575=>1000,38576=>1000,38577=>1000,38578=>1000,38579=>1000,38580=>1000, - 38581=>1000,38582=>1000,38583=>1000,38584=>1000,38585=>1000,38586=>1000,38587=>1000,38588=>1000,38589=>1000,38590=>1000,38591=>1000,38592=>1000,38593=>1000,38594=>1000,38595=>1000,38596=>1000, - 38597=>1000,38598=>1000,38599=>1000,38600=>1000,38601=>1000,38602=>1000,38603=>1000,38604=>1000,38605=>1000,38606=>1000,38607=>1000,38608=>1000,38609=>1000,38610=>1000,38611=>1000,38612=>1000, - 38613=>1000,38614=>1000,38615=>1000,38616=>1000,38617=>1000,38618=>1000,38619=>1000,38620=>1000,38621=>1000,38622=>1000,38623=>1000,38624=>1000,38625=>1000,38626=>1000,38627=>1000,38628=>1000, - 38629=>1000,38630=>1000,38631=>1000,38632=>1000,38633=>1000,38634=>1000,38635=>1000,38636=>1000,38637=>1000,38638=>1000,38639=>1000,38640=>1000,38641=>1000,38642=>1000,38643=>1000,38644=>1000, - 38645=>1000,38646=>1000,38647=>1000,38648=>1000,38649=>1000,38650=>1000,38651=>1000,38652=>1000,38653=>1000,38654=>1000,38655=>1000,38656=>1000,38657=>1000,38658=>1000,38659=>1000,38660=>1000, - 38661=>1000,38662=>1000,38663=>1000,38664=>1000,38665=>1000,38666=>1000,38667=>1000,38668=>1000,38669=>1000,38670=>1000,38671=>1000,38672=>1000,38673=>1000,38674=>1000,38675=>1000,38676=>1000, - 38677=>1000,38678=>1000,38679=>1000,38680=>1000,38681=>1000,38682=>1000,38683=>1000,38684=>1000,38685=>1000,38686=>1000,38687=>1000,38688=>1000,38689=>1000,38690=>1000,38691=>1000,38692=>1000, - 38693=>1000,38694=>1000,38695=>1000,38696=>1000,38697=>1000,38698=>1000,38699=>1000,38700=>1000,38701=>1000,38702=>1000,38703=>1000,38704=>1000,38705=>1000,38706=>1000,38707=>1000,38708=>1000, - 38709=>1000,38710=>1000,38711=>1000,38712=>1000,38713=>1000,38714=>1000,38715=>1000,38716=>1000,38717=>1000,38718=>1000,38719=>1000,38720=>1000,38721=>1000,38722=>1000,38723=>1000,38724=>1000, - 38725=>1000,38726=>1000,38727=>1000,38728=>1000,38729=>1000,38730=>1000,38731=>1000,38732=>1000,38733=>1000,38734=>1000,38735=>1000,38736=>1000,38737=>1000,38738=>1000,38739=>1000,38740=>1000, - 38741=>1000,38742=>1000,38743=>1000,38744=>1000,38745=>1000,38746=>1000,38747=>1000,38748=>1000,38749=>1000,38750=>1000,38751=>1000,38752=>1000,38753=>1000,38754=>1000,38755=>1000,38756=>1000, - 38757=>1000,38758=>1000,38759=>1000,38760=>1000,38761=>1000,38762=>1000,38763=>1000,38764=>1000,38765=>1000,38766=>1000,38767=>1000,38768=>1000,38769=>1000,38770=>1000,38771=>1000,38772=>1000, - 38773=>1000,38774=>1000,38775=>1000,38776=>1000,38777=>1000,38778=>1000,38779=>1000,38780=>1000,38781=>1000,38782=>1000,38783=>1000,38784=>1000,38785=>1000,38786=>1000,38787=>1000,38788=>1000, - 38789=>1000,38790=>1000,38791=>1000,38792=>1000,38793=>1000,38794=>1000,38795=>1000,38796=>1000,38797=>1000,38798=>1000,38799=>1000,38800=>1000,38801=>1000,38802=>1000,38803=>1000,38804=>1000, - 38805=>1000,38806=>1000,38807=>1000,38808=>1000,38809=>1000,38810=>1000,38811=>1000,38812=>1000,38813=>1000,38814=>1000,38815=>1000,38816=>1000,38817=>1000,38818=>1000,38819=>1000,38820=>1000, - 38821=>1000,38822=>1000,38823=>1000,38824=>1000,38825=>1000,38826=>1000,38827=>1000,38828=>1000,38829=>1000,38830=>1000,38831=>1000,38832=>1000,38833=>1000,38834=>1000,38835=>1000,38836=>1000, - 38837=>1000,38838=>1000,38839=>1000,38840=>1000,38841=>1000,38842=>1000,38843=>1000,38844=>1000,38845=>1000,38846=>1000,38847=>1000,38848=>1000,38849=>1000,38850=>1000,38851=>1000,38852=>1000, - 38853=>1000,38854=>1000,38855=>1000,38856=>1000,38857=>1000,38858=>1000,38859=>1000,38860=>1000,38861=>1000,38862=>1000,38863=>1000,38864=>1000,38865=>1000,38866=>1000,38867=>1000,38868=>1000, - 38869=>1000,38870=>1000,38871=>1000,38872=>1000,38873=>1000,38874=>1000,38875=>1000,38876=>1000,38877=>1000,38878=>1000,38879=>1000,38880=>1000,38881=>1000,38882=>1000,38883=>1000,38884=>1000, - 38885=>1000,38886=>1000,38887=>1000,38888=>1000,38889=>1000,38890=>1000,38891=>1000,38892=>1000,38893=>1000,38894=>1000,38895=>1000,38896=>1000,38897=>1000,38898=>1000,38899=>1000,38900=>1000, - 38901=>1000,38902=>1000,38903=>1000,38904=>1000,38905=>1000,38906=>1000,38907=>1000,38908=>1000,38909=>1000,38910=>1000,38911=>1000,38912=>1000,38913=>1000,38914=>1000,38915=>1000,38916=>1000, - 38917=>1000,38918=>1000,38919=>1000,38920=>1000,38921=>1000,38922=>1000,38923=>1000,38924=>1000,38925=>1000,38926=>1000,38927=>1000,38928=>1000,38929=>1000,38930=>1000,38931=>1000,38932=>1000, - 38933=>1000,38934=>1000,38935=>1000,38936=>1000,38937=>1000,38938=>1000,38939=>1000,38940=>1000,38941=>1000,38942=>1000,38943=>1000,38944=>1000,38945=>1000,38946=>1000,38947=>1000,38948=>1000, - 38949=>1000,38950=>1000,38951=>1000,38952=>1000,38953=>1000,38954=>1000,38955=>1000,38956=>1000,38957=>1000,38958=>1000,38959=>1000,38960=>1000,38961=>1000,38962=>1000,38963=>1000,38964=>1000, - 38965=>1000,38966=>1000,38967=>1000,38968=>1000,38969=>1000,38970=>1000,38971=>1000,38972=>1000,38973=>1000,38974=>1000,38975=>1000,38976=>1000,38977=>1000,38978=>1000,38979=>1000,38980=>1000, - 38981=>1000,38982=>1000,38983=>1000,38984=>1000,38985=>1000,38986=>1000,38987=>1000,38988=>1000,38989=>1000,38990=>1000,38991=>1000,38992=>1000,38993=>1000,38994=>1000,38995=>1000,38996=>1000, - 38997=>1000,38998=>1000,38999=>1000,39000=>1000,39001=>1000,39002=>1000,39003=>1000,39004=>1000,39005=>1000,39006=>1000,39007=>1000,39008=>1000,39009=>1000,39010=>1000,39011=>1000,39012=>1000, - 39013=>1000,39014=>1000,39015=>1000,39016=>1000,39017=>1000,39018=>1000,39019=>1000,39020=>1000,39021=>1000,39022=>1000,39023=>1000,39024=>1000,39025=>1000,39026=>1000,39027=>1000,39028=>1000, - 39029=>1000,39030=>1000,39031=>1000,39032=>1000,39033=>1000,39034=>1000,39035=>1000,39036=>1000,39037=>1000,39038=>1000,39039=>1000,39040=>1000,39041=>1000,39042=>1000,39043=>1000,39044=>1000, - 39045=>1000,39046=>1000,39047=>1000,39048=>1000,39049=>1000,39050=>1000,39051=>1000,39052=>1000,39053=>1000,39054=>1000,39055=>1000,39056=>1000,39057=>1000,39058=>1000,39059=>1000,39060=>1000, - 39061=>1000,39062=>1000,39063=>1000,39064=>1000,39065=>1000,39066=>1000,39067=>1000,39068=>1000,39069=>1000,39070=>1000,39071=>1000,39072=>1000,39073=>1000,39074=>1000,39075=>1000,39076=>1000, - 39077=>1000,39078=>1000,39079=>1000,39080=>1000,39081=>1000,39082=>1000,39083=>1000,39084=>1000,39085=>1000,39086=>1000,39087=>1000,39088=>1000,39089=>1000,39090=>1000,39091=>1000,39092=>1000, - 39093=>1000,39094=>1000,39095=>1000,39096=>1000,39097=>1000,39098=>1000,39099=>1000,39100=>1000,39101=>1000,39102=>1000,39103=>1000,39104=>1000,39105=>1000,39106=>1000,39107=>1000,39108=>1000, - 39109=>1000,39110=>1000,39111=>1000,39112=>1000,39113=>1000,39114=>1000,39115=>1000,39116=>1000,39117=>1000,39118=>1000,39119=>1000,39120=>1000,39121=>1000,39122=>1000,39123=>1000,39124=>1000, - 39125=>1000,39126=>1000,39127=>1000,39128=>1000,39129=>1000,39130=>1000,39131=>1000,39132=>1000,39133=>1000,39134=>1000,39135=>1000,39136=>1000,39137=>1000,39138=>1000,39139=>1000,39140=>1000, - 39141=>1000,39142=>1000,39143=>1000,39144=>1000,39145=>1000,39146=>1000,39147=>1000,39148=>1000,39149=>1000,39150=>1000,39151=>1000,39152=>1000,39153=>1000,39154=>1000,39155=>1000,39156=>1000, - 39157=>1000,39158=>1000,39159=>1000,39160=>1000,39161=>1000,39162=>1000,39163=>1000,39164=>1000,39165=>1000,39166=>1000,39167=>1000,39168=>1000,39169=>1000,39170=>1000,39171=>1000,39172=>1000, - 39173=>1000,39174=>1000,39175=>1000,39176=>1000,39177=>1000,39178=>1000,39179=>1000,39180=>1000,39181=>1000,39182=>1000,39183=>1000,39184=>1000,39185=>1000,39186=>1000,39187=>1000,39188=>1000, - 39189=>1000,39190=>1000,39191=>1000,39192=>1000,39193=>1000,39194=>1000,39195=>1000,39196=>1000,39197=>1000,39198=>1000,39199=>1000,39200=>1000,39201=>1000,39202=>1000,39203=>1000,39204=>1000, - 39205=>1000,39206=>1000,39207=>1000,39208=>1000,39209=>1000,39210=>1000,39211=>1000,39212=>1000,39213=>1000,39214=>1000,39215=>1000,39216=>1000,39217=>1000,39218=>1000,39219=>1000,39220=>1000, - 39221=>1000,39222=>1000,39223=>1000,39224=>1000,39225=>1000,39226=>1000,39227=>1000,39228=>1000,39229=>1000,39230=>1000,39231=>1000,39232=>1000,39233=>1000,39234=>1000,39235=>1000,39236=>1000, - 39237=>1000,39238=>1000,39239=>1000,39240=>1000,39241=>1000,39242=>1000,39243=>1000,39244=>1000,39245=>1000,39246=>1000,39247=>1000,39248=>1000,39249=>1000,39250=>1000,39251=>1000,39252=>1000, - 39253=>1000,39254=>1000,39255=>1000,39256=>1000,39257=>1000,39258=>1000,39259=>1000,39260=>1000,39261=>1000,39262=>1000,39263=>1000,39264=>1000,39265=>1000,39266=>1000,39267=>1000,39268=>1000, - 39269=>1000,39270=>1000,39271=>1000,39272=>1000,39273=>1000,39274=>1000,39275=>1000,39276=>1000,39277=>1000,39278=>1000,39279=>1000,39280=>1000,39281=>1000,39282=>1000,39283=>1000,39284=>1000, - 39285=>1000,39286=>1000,39287=>1000,39288=>1000,39289=>1000,39290=>1000,39291=>1000,39292=>1000,39293=>1000,39294=>1000,39295=>1000,39296=>1000,39297=>1000,39298=>1000,39299=>1000,39300=>1000, - 39301=>1000,39302=>1000,39303=>1000,39304=>1000,39305=>1000,39306=>1000,39307=>1000,39308=>1000,39309=>1000,39310=>1000,39311=>1000,39312=>1000,39313=>1000,39314=>1000,39315=>1000,39316=>1000, - 39317=>1000,39318=>1000,39319=>1000,39320=>1000,39321=>1000,39322=>1000,39323=>1000,39324=>1000,39325=>1000,39326=>1000,39327=>1000,39328=>1000,39329=>1000,39330=>1000,39331=>1000,39332=>1000, - 39333=>1000,39334=>1000,39335=>1000,39336=>1000,39337=>1000,39338=>1000,39339=>1000,39340=>1000,39341=>1000,39342=>1000,39343=>1000,39344=>1000,39345=>1000,39346=>1000,39347=>1000,39348=>1000, - 39349=>1000,39350=>1000,39351=>1000,39352=>1000,39353=>1000,39354=>1000,39355=>1000,39356=>1000,39357=>1000,39358=>1000,39359=>1000,39360=>1000,39361=>1000,39362=>1000,39363=>1000,39364=>1000, - 39365=>1000,39366=>1000,39367=>1000,39368=>1000,39369=>1000,39370=>1000,39371=>1000,39372=>1000,39373=>1000,39374=>1000,39375=>1000,39376=>1000,39377=>1000,39378=>1000,39379=>1000,39380=>1000, - 39381=>1000,39382=>1000,39383=>1000,39384=>1000,39385=>1000,39386=>1000,39387=>1000,39388=>1000,39389=>1000,39390=>1000,39391=>1000,39392=>1000,39393=>1000,39394=>1000,39395=>1000,39396=>1000, - 39397=>1000,39398=>1000,39399=>1000,39400=>1000,39401=>1000,39402=>1000,39403=>1000,39404=>1000,39405=>1000,39406=>1000,39407=>1000,39408=>1000,39409=>1000,39410=>1000,39411=>1000,39412=>1000, - 39413=>1000,39414=>1000,39415=>1000,39416=>1000,39417=>1000,39418=>1000,39419=>1000,39420=>1000,39421=>1000,39422=>1000,39423=>1000,39424=>1000,39425=>1000,39426=>1000,39427=>1000,39428=>1000, - 39429=>1000,39430=>1000,39431=>1000,39432=>1000,39433=>1000,39434=>1000,39435=>1000,39436=>1000,39437=>1000,39438=>1000,39439=>1000,39440=>1000,39441=>1000,39442=>1000,39443=>1000,39444=>1000, - 39445=>1000,39446=>1000,39447=>1000,39448=>1000,39449=>1000,39450=>1000,39451=>1000,39452=>1000,39453=>1000,39454=>1000,39455=>1000,39456=>1000,39457=>1000,39458=>1000,39459=>1000,39460=>1000, - 39461=>1000,39462=>1000,39463=>1000,39464=>1000,39465=>1000,39466=>1000,39467=>1000,39468=>1000,39469=>1000,39470=>1000,39471=>1000,39472=>1000,39473=>1000,39474=>1000,39475=>1000,39476=>1000, - 39477=>1000,39478=>1000,39479=>1000,39480=>1000,39481=>1000,39482=>1000,39483=>1000,39484=>1000,39485=>1000,39486=>1000,39487=>1000,39488=>1000,39489=>1000,39490=>1000,39491=>1000,39492=>1000, - 39493=>1000,39494=>1000,39495=>1000,39496=>1000,39497=>1000,39498=>1000,39499=>1000,39500=>1000,39501=>1000,39502=>1000,39503=>1000,39504=>1000,39505=>1000,39506=>1000,39507=>1000,39508=>1000, - 39509=>1000,39510=>1000,39511=>1000,39512=>1000,39513=>1000,39514=>1000,39515=>1000,39516=>1000,39517=>1000,39518=>1000,39519=>1000,39520=>1000,39521=>1000,39522=>1000,39523=>1000,39524=>1000, - 39525=>1000,39526=>1000,39527=>1000,39528=>1000,39529=>1000,39530=>1000,39531=>1000,39532=>1000,39533=>1000,39534=>1000,39535=>1000,39536=>1000,39537=>1000,39538=>1000,39539=>1000,39540=>1000, - 39541=>1000,39542=>1000,39543=>1000,39544=>1000,39545=>1000,39546=>1000,39547=>1000,39548=>1000,39549=>1000,39550=>1000,39551=>1000,39552=>1000,39553=>1000,39554=>1000,39555=>1000,39556=>1000, - 39557=>1000,39558=>1000,39559=>1000,39560=>1000,39561=>1000,39562=>1000,39563=>1000,39564=>1000,39565=>1000,39566=>1000,39567=>1000,39568=>1000,39569=>1000,39570=>1000,39571=>1000,39572=>1000, - 39573=>1000,39574=>1000,39575=>1000,39576=>1000,39577=>1000,39578=>1000,39579=>1000,39580=>1000,39581=>1000,39582=>1000,39583=>1000,39584=>1000,39585=>1000,39586=>1000,39587=>1000,39588=>1000, - 39589=>1000,39590=>1000,39591=>1000,39592=>1000,39593=>1000,39594=>1000,39595=>1000,39596=>1000,39597=>1000,39598=>1000,39599=>1000,39600=>1000,39601=>1000,39602=>1000,39603=>1000,39604=>1000, - 39605=>1000,39606=>1000,39607=>1000,39608=>1000,39609=>1000,39610=>1000,39611=>1000,39612=>1000,39613=>1000,39614=>1000,39615=>1000,39616=>1000,39617=>1000,39618=>1000,39619=>1000,39620=>1000, - 39621=>1000,39622=>1000,39623=>1000,39624=>1000,39625=>1000,39626=>1000,39627=>1000,39628=>1000,39629=>1000,39630=>1000,39631=>1000,39632=>1000,39633=>1000,39634=>1000,39635=>1000,39636=>1000, - 39637=>1000,39638=>1000,39639=>1000,39640=>1000,39641=>1000,39642=>1000,39643=>1000,39644=>1000,39645=>1000,39646=>1000,39647=>1000,39648=>1000,39649=>1000,39650=>1000,39651=>1000,39652=>1000, - 39653=>1000,39654=>1000,39655=>1000,39656=>1000,39657=>1000,39658=>1000,39659=>1000,39660=>1000,39661=>1000,39662=>1000,39663=>1000,39664=>1000,39665=>1000,39666=>1000,39667=>1000,39668=>1000, - 39669=>1000,39670=>1000,39671=>1000,39672=>1000,39673=>1000,39674=>1000,39675=>1000,39676=>1000,39677=>1000,39678=>1000,39679=>1000,39680=>1000,39681=>1000,39682=>1000,39683=>1000,39684=>1000, - 39685=>1000,39686=>1000,39687=>1000,39688=>1000,39689=>1000,39690=>1000,39691=>1000,39692=>1000,39693=>1000,39694=>1000,39695=>1000,39696=>1000,39697=>1000,39698=>1000,39699=>1000,39700=>1000, - 39701=>1000,39702=>1000,39703=>1000,39704=>1000,39705=>1000,39706=>1000,39707=>1000,39708=>1000,39709=>1000,39710=>1000,39711=>1000,39712=>1000,39713=>1000,39714=>1000,39715=>1000,39716=>1000, - 39717=>1000,39718=>1000,39719=>1000,39720=>1000,39721=>1000,39722=>1000,39723=>1000,39724=>1000,39725=>1000,39726=>1000,39727=>1000,39728=>1000,39729=>1000,39730=>1000,39731=>1000,39732=>1000, - 39733=>1000,39734=>1000,39735=>1000,39736=>1000,39737=>1000,39738=>1000,39739=>1000,39740=>1000,39741=>1000,39742=>1000,39743=>1000,39744=>1000,39745=>1000,39746=>1000,39747=>1000,39748=>1000, - 39749=>1000,39750=>1000,39751=>1000,39752=>1000,39753=>1000,39754=>1000,39755=>1000,39756=>1000,39757=>1000,39758=>1000,39759=>1000,39760=>1000,39761=>1000,39762=>1000,39763=>1000,39764=>1000, - 39765=>1000,39766=>1000,39767=>1000,39768=>1000,39769=>1000,39770=>1000,39771=>1000,39772=>1000,39773=>1000,39774=>1000,39775=>1000,39776=>1000,39777=>1000,39778=>1000,39779=>1000,39780=>1000, - 39781=>1000,39782=>1000,39783=>1000,39784=>1000,39785=>1000,39786=>1000,39787=>1000,39788=>1000,39789=>1000,39790=>1000,39791=>1000,39792=>1000,39793=>1000,39794=>1000,39795=>1000,39796=>1000, - 39797=>1000,39798=>1000,39799=>1000,39800=>1000,39801=>1000,39802=>1000,39803=>1000,39804=>1000,39805=>1000,39806=>1000,39807=>1000,39808=>1000,39809=>1000,39810=>1000,39811=>1000,39812=>1000, - 39813=>1000,39814=>1000,39815=>1000,39816=>1000,39817=>1000,39818=>1000,39819=>1000,39820=>1000,39821=>1000,39822=>1000,39823=>1000,39824=>1000,39825=>1000,39826=>1000,39827=>1000,39828=>1000, - 39829=>1000,39830=>1000,39831=>1000,39832=>1000,39833=>1000,39834=>1000,39835=>1000,39836=>1000,39837=>1000,39838=>1000,39839=>1000,39840=>1000,39841=>1000,39842=>1000,39843=>1000,39844=>1000, - 39845=>1000,39846=>1000,39847=>1000,39848=>1000,39849=>1000,39850=>1000,39851=>1000,39852=>1000,39853=>1000,39854=>1000,39855=>1000,39856=>1000,39857=>1000,39858=>1000,39859=>1000,39860=>1000, - 39861=>1000,39862=>1000,39863=>1000,39864=>1000,39865=>1000,39866=>1000,39867=>1000,39868=>1000,39869=>1000,39870=>1000,39871=>1000,39872=>1000,39873=>1000,39874=>1000,39875=>1000,39876=>1000, - 39877=>1000,39878=>1000,39879=>1000,39880=>1000,39881=>1000,39882=>1000,39883=>1000,39884=>1000,39885=>1000,39886=>1000,39887=>1000,39888=>1000,39889=>1000,39890=>1000,39891=>1000,39892=>1000, - 39893=>1000,39894=>1000,39895=>1000,39896=>1000,39897=>1000,39898=>1000,39899=>1000,39900=>1000,39901=>1000,39902=>1000,39903=>1000,39904=>1000,39905=>1000,39906=>1000,39907=>1000,39908=>1000, - 39909=>1000,39910=>1000,39911=>1000,39912=>1000,39913=>1000,39914=>1000,39915=>1000,39916=>1000,39917=>1000,39918=>1000,39919=>1000,39920=>1000,39921=>1000,39922=>1000,39923=>1000,39924=>1000, - 39925=>1000,39926=>1000,39927=>1000,39928=>1000,39929=>1000,39930=>1000,39931=>1000,39932=>1000,39933=>1000,39934=>1000,39935=>1000,39936=>1000,39937=>1000,39938=>1000,39939=>1000,39940=>1000, - 39941=>1000,39942=>1000,39943=>1000,39944=>1000,39945=>1000,39946=>1000,39947=>1000,39948=>1000,39949=>1000,39950=>1000,39951=>1000,39952=>1000,39953=>1000,39954=>1000,39955=>1000,39956=>1000, - 39957=>1000,39958=>1000,39959=>1000,39960=>1000,39961=>1000,39962=>1000,39963=>1000,39964=>1000,39965=>1000,39966=>1000,39967=>1000,39968=>1000,39969=>1000,39970=>1000,39971=>1000,39972=>1000, - 39973=>1000,39974=>1000,39975=>1000,39976=>1000,39977=>1000,39978=>1000,39979=>1000,39980=>1000,39981=>1000,39982=>1000,39983=>1000,39984=>1000,39985=>1000,39986=>1000,39987=>1000,39988=>1000, - 39989=>1000,39990=>1000,39991=>1000,39992=>1000,39993=>1000,39994=>1000,39995=>1000,39996=>1000,39997=>1000,39998=>1000,39999=>1000,40000=>1000,40001=>1000,40002=>1000,40003=>1000,40004=>1000, - 40005=>1000,40006=>1000,40007=>1000,40008=>1000,40009=>1000,40010=>1000,40011=>1000,40012=>1000,40013=>1000,40014=>1000,40015=>1000,40016=>1000,40017=>1000,40018=>1000,40019=>1000,40020=>1000, - 40021=>1000,40022=>1000,40023=>1000,40024=>1000,40025=>1000,40026=>1000,40027=>1000,40028=>1000,40029=>1000,40030=>1000,40031=>1000,40032=>1000,40033=>1000,40034=>1000,40035=>1000,40036=>1000, - 40037=>1000,40038=>1000,40039=>1000,40040=>1000,40041=>1000,40042=>1000,40043=>1000,40044=>1000,40045=>1000,40046=>1000,40047=>1000,40048=>1000,40049=>1000,40050=>1000,40051=>1000,40052=>1000, - 40053=>1000,40054=>1000,40055=>1000,40056=>1000,40057=>1000,40058=>1000,40059=>1000,40060=>1000,40061=>1000,40062=>1000,40063=>1000,40064=>1000,40065=>1000,40066=>1000,40067=>1000,40068=>1000, - 40069=>1000,40070=>1000,40071=>1000,40072=>1000,40073=>1000,40074=>1000,40075=>1000,40076=>1000,40077=>1000,40078=>1000,40079=>1000,40080=>1000,40081=>1000,40082=>1000,40083=>1000,40084=>1000, - 40085=>1000,40086=>1000,40087=>1000,40088=>1000,40089=>1000,40090=>1000,40091=>1000,40092=>1000,40093=>1000,40094=>1000,40095=>1000,40096=>1000,40097=>1000,40098=>1000,40099=>1000,40100=>1000, - 40101=>1000,40102=>1000,40103=>1000,40104=>1000,40105=>1000,40106=>1000,40107=>1000,40108=>1000,40109=>1000,40110=>1000,40111=>1000,40112=>1000,40113=>1000,40114=>1000,40115=>1000,40116=>1000, - 40117=>1000,40118=>1000,40119=>1000,40120=>1000,40121=>1000,40122=>1000,40123=>1000,40124=>1000,40125=>1000,40126=>1000,40127=>1000,40128=>1000,40129=>1000,40130=>1000,40131=>1000,40132=>1000, - 40133=>1000,40134=>1000,40135=>1000,40136=>1000,40137=>1000,40138=>1000,40139=>1000,40140=>1000,40141=>1000,40142=>1000,40143=>1000,40144=>1000,40145=>1000,40146=>1000,40147=>1000,40148=>1000, - 40149=>1000,40150=>1000,40151=>1000,40152=>1000,40153=>1000,40154=>1000,40155=>1000,40156=>1000,40157=>1000,40158=>1000,40159=>1000,40160=>1000,40161=>1000,40162=>1000,40163=>1000,40164=>1000, - 40165=>1000,40166=>1000,40167=>1000,40168=>1000,40169=>1000,40170=>1000,40171=>1000,40172=>1000,40173=>1000,40174=>1000,40175=>1000,40176=>1000,40177=>1000,40178=>1000,40179=>1000,40180=>1000, - 40181=>1000,40182=>1000,40183=>1000,40184=>1000,40185=>1000,40186=>1000,40187=>1000,40188=>1000,40189=>1000,40190=>1000,40191=>1000,40192=>1000,40193=>1000,40194=>1000,40195=>1000,40196=>1000, - 40197=>1000,40198=>1000,40199=>1000,40200=>1000,40201=>1000,40202=>1000,40203=>1000,40204=>1000,40205=>1000,40206=>1000,40207=>1000,40208=>1000,40209=>1000,40210=>1000,40211=>1000,40212=>1000, - 40213=>1000,40214=>1000,40215=>1000,40216=>1000,40217=>1000,40218=>1000,40219=>1000,40220=>1000,40221=>1000,40222=>1000,40223=>1000,40224=>1000,40225=>1000,40226=>1000,40227=>1000,40228=>1000, - 40229=>1000,40230=>1000,40231=>1000,40232=>1000,40233=>1000,40234=>1000,40235=>1000,40236=>1000,40237=>1000,40238=>1000,40239=>1000,40240=>1000,40241=>1000,40242=>1000,40243=>1000,40244=>1000, - 40245=>1000,40246=>1000,40247=>1000,40248=>1000,40249=>1000,40250=>1000,40251=>1000,40252=>1000,40253=>1000,40254=>1000,40255=>1000,40256=>1000,40257=>1000,40258=>1000,40259=>1000,40260=>1000, - 40261=>1000,40262=>1000,40263=>1000,40264=>1000,40265=>1000,40266=>1000,40267=>1000,40268=>1000,40269=>1000,40270=>1000,40271=>1000,40272=>1000,40273=>1000,40274=>1000,40275=>1000,40276=>1000, - 40277=>1000,40278=>1000,40279=>1000,40280=>1000,40281=>1000,40282=>1000,40283=>1000,40284=>1000,40285=>1000,40286=>1000,40287=>1000,40288=>1000,40289=>1000,40290=>1000,40291=>1000,40292=>1000, - 40293=>1000,40294=>1000,40295=>1000,40296=>1000,40297=>1000,40298=>1000,40299=>1000,40300=>1000,40301=>1000,40302=>1000,40303=>1000,40304=>1000,40305=>1000,40306=>1000,40307=>1000,40308=>1000, - 40309=>1000,40310=>1000,40311=>1000,40312=>1000,40313=>1000,40314=>1000,40315=>1000,40316=>1000,40317=>1000,40318=>1000,40319=>1000,40320=>1000,40321=>1000,40322=>1000,40323=>1000,40324=>1000, - 40325=>1000,40326=>1000,40327=>1000,40328=>1000,40329=>1000,40330=>1000,40331=>1000,40332=>1000,40333=>1000,40334=>1000,40335=>1000,40336=>1000,40337=>1000,40338=>1000,40339=>1000,40340=>1000, - 40341=>1000,40342=>1000,40343=>1000,40344=>1000,40345=>1000,40346=>1000,40347=>1000,40348=>1000,40349=>1000,40350=>1000,40351=>1000,40352=>1000,40353=>1000,40354=>1000,40355=>1000,40356=>1000, - 40357=>1000,40358=>1000,40359=>1000,40360=>1000,40361=>1000,40362=>1000,40363=>1000,40364=>1000,40365=>1000,40366=>1000,40367=>1000,40368=>1000,40369=>1000,40370=>1000,40371=>1000,40372=>1000, - 40373=>1000,40374=>1000,40375=>1000,40376=>1000,40377=>1000,40378=>1000,40379=>1000,40380=>1000,40381=>1000,40382=>1000,40383=>1000,40384=>1000,40385=>1000,40386=>1000,40387=>1000,40388=>1000, - 40389=>1000,40390=>1000,40391=>1000,40392=>1000,40393=>1000,40394=>1000,40395=>1000,40396=>1000,40397=>1000,40398=>1000,40399=>1000,40400=>1000,40401=>1000,40402=>1000,40403=>1000,40404=>1000, - 40405=>1000,40406=>1000,40407=>1000,40408=>1000,40409=>1000,40410=>1000,40411=>1000,40412=>1000,40413=>1000,40414=>1000,40415=>1000,40416=>1000,40417=>1000,40418=>1000,40419=>1000,40420=>1000, - 40421=>1000,40422=>1000,40423=>1000,40424=>1000,40425=>1000,40426=>1000,40427=>1000,40428=>1000,40429=>1000,40430=>1000,40431=>1000,40432=>1000,40433=>1000,40434=>1000,40435=>1000,40436=>1000, - 40437=>1000,40438=>1000,40439=>1000,40440=>1000,40441=>1000,40442=>1000,40443=>1000,40444=>1000,40445=>1000,40446=>1000,40447=>1000,40448=>1000,40449=>1000,40450=>1000,40451=>1000,40452=>1000, - 40453=>1000,40454=>1000,40455=>1000,40456=>1000,40457=>1000,40458=>1000,40459=>1000,40460=>1000,40461=>1000,40462=>1000,40463=>1000,40464=>1000,40465=>1000,40466=>1000,40467=>1000,40468=>1000, - 40469=>1000,40470=>1000,40471=>1000,40472=>1000,40473=>1000,40474=>1000,40475=>1000,40476=>1000,40477=>1000,40478=>1000,40479=>1000,40480=>1000,40481=>1000,40482=>1000,40483=>1000,40484=>1000, - 40485=>1000,40486=>1000,40487=>1000,40488=>1000,40489=>1000,40490=>1000,40491=>1000,40492=>1000,40493=>1000,40494=>1000,40495=>1000,40496=>1000,40497=>1000,40498=>1000,40499=>1000,40500=>1000, - 40501=>1000,40502=>1000,40503=>1000,40504=>1000,40505=>1000,40506=>1000,40507=>1000,40508=>1000,40509=>1000,40510=>1000,40511=>1000,40512=>1000,40513=>1000,40514=>1000,40515=>1000,40516=>1000, - 40517=>1000,40518=>1000,40519=>1000,40520=>1000,40521=>1000,40522=>1000,40523=>1000,40524=>1000,40525=>1000,40526=>1000,40527=>1000,40528=>1000,40529=>1000,40530=>1000,40531=>1000,40532=>1000, - 40533=>1000,40534=>1000,40535=>1000,40536=>1000,40537=>1000,40538=>1000,40539=>1000,40540=>1000,40541=>1000,40542=>1000,40543=>1000,40544=>1000,40545=>1000,40546=>1000,40547=>1000,40548=>1000, - 40549=>1000,40550=>1000,40551=>1000,40552=>1000,40553=>1000,40554=>1000,40555=>1000,40556=>1000,40557=>1000,40558=>1000,40559=>1000,40560=>1000,40561=>1000,40562=>1000,40563=>1000,40564=>1000, - 40565=>1000,40566=>1000,40567=>1000,40568=>1000,40569=>1000,40570=>1000,40571=>1000,40572=>1000,40573=>1000,40574=>1000,40575=>1000,40576=>1000,40577=>1000,40578=>1000,40579=>1000,40580=>1000, - 40581=>1000,40582=>1000,40583=>1000,40584=>1000,40585=>1000,40586=>1000,40587=>1000,40588=>1000,40589=>1000,40590=>1000,40591=>1000,40592=>1000,40593=>1000,40594=>1000,40595=>1000,40596=>1000, - 40597=>1000,40598=>1000,40599=>1000,40600=>1000,40601=>1000,40602=>1000,40603=>1000,40604=>1000,40605=>1000,40606=>1000,40607=>1000,40608=>1000,40609=>1000,40610=>1000,40611=>1000,40612=>1000, - 40613=>1000,40614=>1000,40615=>1000,40616=>1000,40617=>1000,40618=>1000,40619=>1000,40620=>1000,40621=>1000,40622=>1000,40623=>1000,40624=>1000,40625=>1000,40626=>1000,40627=>1000,40628=>1000, - 40629=>1000,40630=>1000,40631=>1000,40632=>1000,40633=>1000,40634=>1000,40635=>1000,40636=>1000,40637=>1000,40638=>1000,40639=>1000,40640=>1000,40641=>1000,40642=>1000,40643=>1000,40644=>1000, - 40645=>1000,40646=>1000,40647=>1000,40648=>1000,40649=>1000,40650=>1000,40651=>1000,40652=>1000,40653=>1000,40654=>1000,40655=>1000,40656=>1000,40657=>1000,40658=>1000,40659=>1000,40660=>1000, - 40661=>1000,40662=>1000,40663=>1000,40664=>1000,40665=>1000,40666=>1000,40667=>1000,40668=>1000,40669=>1000,40670=>1000,40671=>1000,40672=>1000,40673=>1000,40674=>1000,40675=>1000,40676=>1000, - 40677=>1000,40678=>1000,40679=>1000,40680=>1000,40681=>1000,40682=>1000,40683=>1000,40684=>1000,40685=>1000,40686=>1000,40687=>1000,40688=>1000,40689=>1000,40690=>1000,40691=>1000,40692=>1000, - 40693=>1000,40694=>1000,40695=>1000,40696=>1000,40697=>1000,40698=>1000,40699=>1000,40700=>1000,40701=>1000,40702=>1000,40703=>1000,40704=>1000,40705=>1000,40706=>1000,40707=>1000,40708=>1000, - 40709=>1000,40710=>1000,40711=>1000,40712=>1000,40713=>1000,40714=>1000,40715=>1000,40716=>1000,40717=>1000,40718=>1000,40719=>1000,40720=>1000,40721=>1000,40722=>1000,40723=>1000,40724=>1000, - 40725=>1000,40726=>1000,40727=>1000,40728=>1000,40729=>1000,40730=>1000,40731=>1000,40732=>1000,40733=>1000,40734=>1000,40735=>1000,40736=>1000,40737=>1000,40738=>1000,40739=>1000,40740=>1000, - 40741=>1000,40742=>1000,40743=>1000,40744=>1000,40745=>1000,40746=>1000,40747=>1000,40748=>1000,40749=>1000,40750=>1000,40751=>1000,40752=>1000,40753=>1000,40754=>1000,40755=>1000,40756=>1000, - 40757=>1000,40758=>1000,40759=>1000,40760=>1000,40761=>1000,40762=>1000,40763=>1000,40764=>1000,40765=>1000,40766=>1000,40767=>1000,40768=>1000,40769=>1000,40770=>1000,40771=>1000,40772=>1000, - 40773=>1000,40774=>1000,40775=>1000,40776=>1000,40777=>1000,40778=>1000,40779=>1000,40780=>1000,40781=>1000,40782=>1000,40783=>1000,40784=>1000,40785=>1000,40786=>1000,40787=>1000,40788=>1000, - 40789=>1000,40790=>1000,40791=>1000,40792=>1000,40793=>1000,40794=>1000,40795=>1000,40796=>1000,40797=>1000,40798=>1000,40799=>1000,40800=>1000,40801=>1000,40802=>1000,40803=>1000,40804=>1000, - 40805=>1000,40806=>1000,40807=>1000,40808=>1000,40809=>1000,40810=>1000,40811=>1000,40812=>1000,40813=>1000,40814=>1000,40815=>1000,40816=>1000,40817=>1000,40818=>1000,40819=>1000,40820=>1000, - 40821=>1000,40822=>1000,40823=>1000,40824=>1000,40825=>1000,40826=>1000,40827=>1000,40828=>1000,40829=>1000,40830=>1000,40831=>1000,40832=>1000,40833=>1000,40834=>1000,40835=>1000,40836=>1000, - 40837=>1000,40838=>1000,40839=>1000,40840=>1000,40841=>1000,40842=>1000,40843=>1000,40844=>1000,40845=>1000,40846=>1000,40847=>1000,40848=>1000,40849=>1000,40850=>1000,40851=>1000,40852=>1000, - 40853=>1000,40854=>1000,40855=>1000,40856=>1000,40857=>1000,40858=>1000,40859=>1000,40860=>1000,40861=>1000,40862=>1000,40863=>1000,40864=>1000,40865=>1000,40866=>1000,40867=>1000,40868=>1000, - 40869=>1000); -$diff=''; +$dw=1000; +$cw=array( + 32=>278,33=>278,34=>355,35=>556,36=>556,37=>889,38=>667,39=>191,40=>333,41=>333,42=>389,43=>584,44=>278,45=>333,46=>278,47=>278, + 48=>556,49=>556,50=>556,51=>556,52=>556,53=>556,54=>556,55=>556,56=>556,57=>556,58=>278,59=>278,60=>584,61=>584,62=>584,63=>556, + 64=>1015,65=>667,66=>667,67=>722,68=>722,69=>667,70=>611,71=>778,72=>722,73=>278,74=>500,75=>667,76=>556,77=>833,78=>722,79=>778, + 80=>667,81=>778,82=>722,83=>667,84=>611,85=>722,86=>667,87=>944,88=>667,89=>667,90=>611,91=>278,92=>278,93=>278,94=>469,95=>500, + 96=>333,97=>556,98=>556,99=>500,100=>556,101=>556,102=>278,103=>556,104=>556,105=>222,106=>222,107=>500,108=>222,109=>833,110=>556,111=>556, + 112=>556,113=>556,114=>333,115=>500,116=>278,117=>556,118=>500,119=>722,120=>500,121=>500,122=>500,123=>334,124=>260,125=>334,126=>584,8364=>556, + 1027=>567,8218=>222,402=>278,8222=>333,8230=>1000,8224=>556,8225=>556,710=>333,8240=>1000,352=>667,8249=>333,338=>1000,1036=>584,381=>611,1039=>723,8216=>222, + 8217=>222,8220=>333,8221=>333,8226=>350,8211=>500,8212=>1000,732=>333,8482=>1000,353=>500,8250=>333,339=>944,1116=>437,382=>500,376=>667,160=>278,161=>333, + 162=>556,163=>556,164=>556,165=>556,166=>260,167=>556,168=>333,169=>737,170=>370,171=>556,172=>584,173=>333,174=>737,175=>500,176=>400,177=>584, + 178=>333,179=>333,180=>333,181=>556,182=>537,183=>278,184=>333,185=>333,186=>365,187=>556,188=>834,189=>834,190=>834,191=>611,192=>667,193=>667, + 194=>667,195=>667,196=>667,197=>667,198=>1000,199=>722,200=>667,201=>667,202=>667,203=>667,204=>278,205=>278,206=>278,207=>278,208=>722,209=>722, + 210=>778,211=>778,212=>778,213=>778,214=>778,215=>584,216=>778,217=>722,218=>722,219=>722,220=>722,221=>667,222=>667,223=>611,224=>556,225=>556, + 226=>556,227=>556,228=>556,229=>556,230=>889,231=>500,232=>556,233=>556,234=>556,235=>556,236=>278,237=>278,238=>278,239=>278,240=>556,241=>556, + 242=>556,243=>556,244=>556,245=>556,246=>556,247=>584,248=>611,249=>556,250=>556,251=>556,252=>556,253=>500,254=>556,255=>500,256=>667,257=>556, + 258=>667,259=>556,260=>667,261=>556,262=>722,263=>500,264=>722,265=>500,266=>722,267=>500,268=>722,269=>500,270=>722,271=>627,272=>722,273=>556, + 274=>667,275=>556,276=>667,277=>556,278=>667,279=>556,280=>667,281=>556,282=>667,283=>556,284=>778,285=>556,286=>778,287=>556,288=>778,289=>556, + 290=>778,291=>556,292=>722,293=>556,294=>722,295=>556,296=>278,297=>222,298=>278,299=>222,300=>278,301=>222,302=>278,303=>222,304=>278,305=>278, + 306=>751,307=>444,308=>500,309=>222,310=>667,311=>500,312=>437,313=>556,314=>222,315=>556,316=>222,317=>556,318=>222,319=>556,320=>318,321=>556, + 322=>222,323=>722,324=>556,325=>722,326=>556,327=>722,328=>556,329=>626,330=>723,331=>556,332=>778,333=>556,334=>778,335=>556,336=>778,337=>556, + 340=>722,341=>333,342=>722,343=>333,344=>722,345=>333,346=>667,347=>500,348=>667,349=>500,350=>667,351=>500,354=>611,355=>278,356=>611,357=>406, + 358=>611,359=>278,360=>722,361=>556,362=>722,363=>556,364=>722,365=>556,366=>722,367=>556,368=>722,369=>556,370=>722,371=>556,372=>944,373=>722, + 374=>667,375=>500,377=>611,378=>500,379=>611,380=>500,383=>222,384=>556,385=>740,386=>655,387=>556,388=>556,389=>556,390=>722,391=>766,392=>579, + 393=>722,394=>789,395=>655,396=>556,397=>557,398=>667,399=>729,400=>604,401=>611,403=>791,404=>649,405=>806,406=>245,407=>322,408=>667,409=>500, + 410=>322,411=>500,412=>833,413=>722,414=>556,415=>778,416=>776,417=>556,418=>1019,419=>782,420=>735,421=>556,422=>722,423=>667,424=>500,425=>602, + 426=>366,427=>278,428=>571,429=>278,430=>611,431=>776,432=>620,433=>748,434=>667,435=>752,436=>615,437=>611,438=>500,439=>628,440=>628,441=>526, + 442=>480,443=>556,444=>556,445=>526,446=>556,447=>556,448=>278,449=>464,450=>474,451=>278,452=>1333,453=>1222,454=>1056,455=>1030,456=>778,457=>444, + 458=>1222,459=>944,460=>778,461=>667,462=>556,463=>278,464=>278,465=>778,466=>556,467=>722,468=>556,469=>722,470=>556,471=>722,472=>556,473=>722, + 474=>556,475=>722,476=>556,477=>556,478=>667,479=>556,480=>667,481=>556,482=>1000,483=>889,484=>778,485=>556,486=>778,487=>556,488=>667,489=>500, + 490=>778,491=>556,492=>778,493=>556,494=>534,495=>534,496=>222,497=>1333,498=>1222,499=>1056,500=>778,501=>556,506=>667,507=>556,508=>1000,509=>889, + 510=>778,511=>611,512=>667,513=>556,514=>667,515=>556,516=>667,517=>556,518=>667,519=>556,520=>278,521=>278,522=>278,523=>278,524=>778,525=>556, + 526=>778,527=>556,528=>722,529=>333,530=>722,531=>333,532=>722,533=>556,534=>722,535=>556,592=>556,593=>556,594=>556,595=>556,596=>500,597=>500, + 598=>556,599=>556,600=>556,601=>556,602=>777,603=>485,604=>485,605=>686,606=>519,607=>260,608=>556,609=>556,610=>557,611=>500,612=>500,613=>556, + 614=>556,615=>556,616=>242,617=>282,618=>356,619=>356,620=>425,621=>222,622=>635,623=>833,624=>833,625=>833,626=>556,627=>556,628=>558,629=>556, + 630=>715,631=>674,632=>558,633=>333,634=>333,635=>333,636=>333,637=>333,638=>312,639=>312,640=>530,641=>530,642=>500,643=>216,644=>276,645=>216, + 646=>222,647=>278,648=>278,649=>596,650=>558,651=>556,652=>500,653=>722,654=>500,655=>500,656=>500,657=>564,658=>530,659=>530,660=>464,661=>464, + 662=>464,663=>500,664=>614,665=>526,666=>519,667=>557,668=>558,669=>222,670=>500,671=>416,672=>556,673=>464,674=>464,675=>966,676=>966,677=>1030, + 678=>689,679=>484,680=>718,688=>326,689=>326,690=>153,691=>201,692=>201,693=>201,694=>304,695=>389,696=>278,697=>222,698=>372,699=>222,700=>222, + 701=>222,702=>222,703=>222,704=>250,705=>250,706=>320,707=>320,708=>320,709=>320,711=>333,712=>192,713=>333,714=>333,715=>333,716=>192,717=>333, + 718=>333,719=>333,720=>300,721=>300,722=>222,723=>222,724=>340,725=>340,726=>280,727=>362,728=>333,729=>333,730=>333,731=>333,733=>333,734=>333, + 736=>278,737=>153,738=>270,739=>274,740=>325,741=>360,742=>360,743=>360,744=>360,745=>360,768=>0,769=>0,770=>0,771=>0,772=>0,773=>0, + 774=>0,775=>0,776=>0,777=>0,778=>0,779=>0,780=>0,781=>0,782=>0,783=>0,784=>0,785=>0,786=>0,787=>0,788=>0,789=>0, + 790=>0,791=>0,792=>0,793=>0,794=>0,795=>0,796=>0,797=>0,798=>0,799=>0,800=>0,801=>0,802=>0,803=>0,804=>0,805=>0, + 806=>0,807=>0,808=>0,809=>0,810=>0,811=>0,812=>0,813=>0,814=>0,815=>0,816=>0,817=>0,818=>0,819=>0,820=>0,821=>0, + 822=>0,823=>0,824=>0,825=>0,826=>0,827=>0,828=>0,829=>0,830=>0,831=>0,832=>0,833=>0,834=>0,835=>0,836=>0,837=>0, + 864=>0,865=>0,884=>308,885=>308,890=>278,894=>278,900=>278,901=>278,902=>667,903=>278,904=>704,905=>759,906=>315,908=>778,910=>746,911=>758, + 912=>222,913=>667,914=>667,915=>550,916=>682,917=>667,918=>611,919=>722,920=>778,921=>278,922=>667,923=>667,924=>833,925=>722,926=>650,927=>778, + 928=>722,929=>667,931=>602,932=>611,933=>667,934=>808,935=>667,936=>804,937=>758,938=>278,939=>667,940=>576,941=>434,942=>556,943=>222,944=>551, + 945=>576,946=>563,947=>500,948=>557,949=>434,950=>440,951=>556,952=>556,953=>222,954=>498,955=>500,956=>553,957=>500,958=>432,959=>556,960=>678, + 961=>571,962=>472,963=>619,964=>382,965=>551,966=>649,967=>522,968=>729,969=>766,970=>222,971=>551,972=>556,973=>551,974=>766,976=>563,977=>616, + 978=>631,979=>726,980=>631,981=>644,982=>781,986=>722,988=>578,990=>570,992=>692,994=>880,995=>833,996=>684,997=>558,998=>680,999=>529,1000=>557, + 1001=>505,1002=>623,1003=>603,1004=>610,1005=>611,1006=>568,1007=>434,1008=>600,1009=>571,1010=>500,1011=>222,1025=>667,1026=>865,1028=>717,1029=>667,1030=>278, + 1031=>278,1032=>500,1033=>1105,1034=>1009,1035=>867,1038=>635,1040=>667,1041=>655,1042=>667,1043=>567,1044=>677,1045=>667,1046=>923,1047=>604,1048=>722,1049=>722, + 1050=>584,1051=>705,1052=>833,1053=>722,1054=>778,1055=>723,1056=>667,1057=>722,1058=>611,1059=>635,1060=>760,1061=>667,1062=>740,1063=>684,1064=>920,1065=>939, + 1066=>793,1067=>883,1068=>655,1069=>717,1070=>1006,1071=>722,1072=>556,1073=>573,1074=>531,1075=>383,1076=>583,1077=>556,1078=>669,1079=>458,1080=>559,1081=>559, + 1082=>437,1083=>571,1084=>683,1085=>552,1086=>556,1087=>542,1088=>556,1089=>500,1090=>458,1091=>500,1092=>823,1093=>500,1094=>562,1095=>533,1096=>802,1097=>823, + 1098=>620,1099=>717,1100=>523,1101=>510,1102=>744,1103=>542,1105=>556,1106=>556,1107=>383,1108=>510,1109=>500,1110=>222,1111=>278,1112=>222,1113=>873,1114=>811, + 1115=>556,1118=>500,1119=>542,1120=>976,1121=>766,1122=>656,1123=>521,1124=>950,1125=>694,1126=>667,1127=>597,1128=>952,1129=>817,1130=>654,1131=>600,1132=>932, + 1133=>817,1134=>604,1135=>458,1136=>804,1137=>729,1138=>778,1139=>556,1140=>667,1141=>500,1142=>667,1143=>500,1144=>1279,1145=>1060,1146=>778,1147=>556,1148=>976, + 1149=>766,1150=>976,1151=>766,1152=>722,1153=>514,1154=>686,1155=>334,1156=>382,1157=>334,1158=>334,1168=>435,1169=>339,1170=>567,1171=>383,1172=>656,1173=>556, + 1174=>923,1175=>669,1176=>604,1177=>458,1178=>584,1179=>437,1180=>584,1181=>437,1182=>584,1183=>437,1184=>764,1185=>537,1186=>741,1187=>573,1188=>900,1189=>670, + 1190=>736,1191=>560,1192=>778,1193=>560,1194=>722,1195=>500,1196=>611,1197=>458,1198=>667,1199=>500,1200=>667,1201=>500,1202=>667,1203=>500,1204=>916,1205=>661, + 1206=>684,1207=>533,1208=>684,1209=>533,1210=>684,1211=>556,1212=>829,1213=>667,1214=>829,1215=>667,1216=>278,1217=>923,1218=>669,1219=>584,1220=>437,1223=>735, + 1224=>570,1227=>684,1228=>533,1232=>667,1233=>556,1234=>667,1235=>556,1236=>1000,1237=>889,1238=>667,1239=>556,1240=>729,1241=>556,1242=>729,1243=>556,1244=>923, + 1245=>669,1246=>604,1247=>458,1248=>604,1249=>492,1250=>722,1251=>559,1252=>722,1253=>559,1254=>778,1255=>556,1256=>778,1257=>556,1258=>778,1259=>556,1262=>635, + 1263=>500,1264=>635,1265=>500,1266=>635,1267=>500,1268=>684,1269=>533,1272=>883,1273=>717,1329=>635,1330=>531,1331=>583,1332=>583,1333=>531,1334=>531,1335=>427, + 1336=>531,1337=>750,1338=>635,1339=>531,1340=>375,1341=>583,1342=>698,1343=>531,1344=>427,1345=>531,1346=>583,1347=>531,1348=>635,1349=>698,1350=>635,1351=>635, + 1352=>531,1353=>531,1354=>698,1355=>531,1356=>635,1357=>531,1358=>698,1359=>583,1360=>479,1361=>583,1362=>531,1363=>698,1364=>698,1365=>635,1366=>750,1369=>271, + 1370=>271,1371=>150,1372=>300,1373=>271,1374=>271,1375=>420,1377=>583,1378=>427,1379=>427,1380=>427,1381=>427,1382=>427,1383=>427,1384=>427,1385=>459,1386=>427, + 1387=>427,1388=>323,1389=>531,1390=>427,1391=>427,1392=>427,1393=>427,1394=>427,1395=>427,1396=>427,1397=>271,1398=>427,1399=>375,1400=>427,1401=>375,1402=>583, + 1403=>427,1404=>427,1405=>427,1406=>427,1407=>583,1408=>427,1409=>427,1410=>323,1411=>583,1412=>375,1413=>375,1414=>583,1415=>527,1417=>271,1425=>360,1426=>360, + 1427=>360,1428=>360,1429=>360,1430=>360,1431=>360,1432=>360,1433=>360,1434=>360,1435=>360,1436=>360,1437=>360,1438=>360,1439=>360,1440=>360,1441=>360,1443=>360, + 1444=>360,1445=>360,1446=>360,1447=>360,1448=>360,1449=>360,1450=>360,1451=>360,1452=>360,1453=>360,1454=>360,1455=>360,1456=>360,1457=>360,1458=>360,1459=>360, + 1460=>360,1461=>360,1462=>360,1463=>360,1464=>360,1465=>360,1467=>360,1468=>360,1469=>360,1470=>366,1471=>360,1472=>225,1473=>360,1474=>360,1475=>238,1476=>360, + 1488=>577,1489=>563,1490=>411,1491=>512,1492=>594,1493=>316,1494=>326,1495=>594,1496=>594,1497=>316,1498=>507,1499=>527,1500=>484,1501=>594,1502=>594,1503=>316, + 1504=>338,1505=>604,1506=>550,1507=>567,1508=>569,1509=>505,1510=>514,1511=>583,1512=>507,1513=>700,1514=>633,1520=>590,1521=>590,1522=>590,1523=>216,1524=>412, + 1548=>278,1563=>278,1567=>556,1569=>529,1570=>243,1571=>243,1572=>470,1573=>243,1574=>731,1575=>243,1576=>771,1577=>514,1578=>771,1579=>771,1580=>544,1581=>544, + 1582=>544,1583=>430,1584=>430,1585=>421,1586=>421,1587=>1194,1588=>1194,1589=>1291,1590=>1291,1591=>843,1592=>843,1593=>594,1594=>594,1600=>279,1601=>957,1602=>800, + 1603=>757,1604=>662,1605=>589,1606=>692,1607=>514,1608=>470,1609=>731,1610=>731,1611=>0,1612=>0,1613=>0,1614=>0,1615=>0,1616=>0,1617=>0,1618=>0, + 1632=>480,1633=>480,1634=>480,1635=>480,1636=>480,1637=>480,1638=>480,1639=>480,1640=>480,1641=>480,1642=>547,1643=>278,1644=>278,1645=>438,1648=>0,1649=>243, + 1650=>243,1651=>243,1652=>0,1653=>380,1654=>470,1655=>548,1656=>772,1657=>771,1658=>771,1659=>771,1660=>771,1661=>771,1662=>771,1663=>771,1664=>771,1665=>544, + 1666=>544,1667=>544,1668=>544,1669=>544,1670=>544,1671=>544,1672=>430,1673=>430,1674=>430,1675=>430,1676=>430,1677=>430,1678=>430,1679=>430,1680=>430,1681=>421, + 1682=>421,1683=>421,1684=>421,1685=>421,1686=>419,1687=>421,1688=>421,1689=>421,1690=>1194,1691=>1194,1692=>1194,1693=>1291,1694=>1291,1695=>843,1696=>594,1697=>957, + 1698=>957,1699=>957,1700=>957,1701=>957,1702=>957,1703=>800,1704=>800,1705=>828,1706=>1058,1707=>828,1708=>757,1709=>757,1710=>757,1711=>828,1712=>828,1713=>828, + 1714=>828,1715=>828,1716=>828,1717=>662,1718=>662,1719=>662,1722=>692,1723=>692,1724=>692,1725=>692,1726=>706,1728=>514,1729=>509,1730=>509,1731=>509,1732=>470, + 1733=>470,1734=>470,1735=>470,1736=>470,1737=>470,1738=>470,1739=>470,1740=>731,1741=>841,1742=>731,1744=>731,1745=>731,1746=>550,1747=>550,1748=>279,1749=>514, + 1750=>726,1751=>558,1752=>321,1753=>318,1754=>342,1755=>373,1756=>716,1757=>688,1758=>852,1759=>288,1760=>288,1761=>388,1762=>350,1763=>716,1764=>146,1765=>282, + 1766=>339,1767=>339,1768=>415,1769=>514,1770=>220,1771=>220,1772=>220,1773=>350,1776=>480,1777=>480,1778=>480,1779=>480,1780=>480,1781=>480,1782=>480,1783=>480, + 1784=>480,1785=>480,2305=>0,2306=>0,2307=>294,2309=>693,2310=>910,2311=>533,2312=>533,2313=>590,2314=>713,2315=>920,2316=>677,2317=>611,2318=>611,2319=>611, + 2320=>611,2321=>910,2322=>910,2323=>910,2324=>910,2325=>667,2326=>732,2327=>593,2328=>639,2329=>624,2330=>688,2331=>713,2332=>688,2333=>712,2334=>697,2335=>502, + 2336=>533,2337=>583,2338=>523,2339=>693,2340=>585,2341=>638,2342=>533,2343=>640,2344=>585,2345=>585,2346=>565,2347=>699,2348=>592,2349=>689,2350=>633,2351=>600, + 2352=>486,2353=>486,2354=>680,2355=>730,2356=>730,2357=>592,2358=>684,2359=>608,2360=>646,2361=>546,2364=>0,2365=>373,2366=>319,2367=>319,2368=>319,2369=>0, + 2370=>0,2371=>0,2372=>0,2373=>0,2374=>0,2375=>0,2376=>0,2377=>319,2378=>319,2379=>319,2380=>319,2381=>0,2384=>884,2385=>0,2386=>0,2387=>0, + 2388=>0,2392=>667,2393=>732,2394=>593,2395=>688,2396=>583,2397=>523,2398=>699,2399=>600,2400=>920,2401=>677,2402=>0,2403=>0,2404=>331,2405=>513,2406=>639, + 2407=>639,2408=>639,2409=>639,2410=>639,2411=>639,2412=>639,2413=>639,2414=>639,2415=>639,2416=>362,2433=>0,2434=>430,2435=>430,2437=>786,2438=>1030,2439=>582, + 2440=>603,2441=>648,2442=>757,2443=>758,2444=>630,2447=>685,2448=>746,2451=>711,2452=>776,2453=>779,2454=>655,2455=>606,2456=>645,2457=>661,2458=>554,2459=>585, + 2460=>729,2461=>752,2462=>893,2463=>567,2464=>625,2465=>648,2466=>567,2467=>598,2468=>680,2469=>645,2470=>609,2471=>596,2472=>595,2474=>635,2475=>780,2476=>593, + 2477=>677,2478=>621,2479=>601,2480=>593,2482=>640,2486=>598,2487=>596,2488=>637,2489=>582,2492=>0,2494=>245,2495=>245,2496=>245,2497=>0,2498=>0,2499=>0, + 2500=>0,2503=>309,2504=>309,2507=>932,2508=>932,2509=>0,2519=>245,2524=>648,2525=>553,2527=>596,2528=>758,2529=>630,2530=>0,2531=>335,2534=>610,2535=>559, + 2536=>595,2537=>711,2538=>610,2539=>661,2540=>661,2541=>559,2542=>661,2543=>600,2544=>593,2545=>593,2546=>601,2547=>567,2548=>601,2549=>699,2550=>661,2551=>267, + 2552=>610,2553=>424,2554=>548,2562=>0,2565=>691,2566=>936,2567=>803,2568=>803,2569=>678,2570=>678,2575=>557,2576=>691,2579=>678,2580=>691,2581=>602,2582=>567, + 2583=>641,2584=>688,2585=>565,2586=>592,2587=>603,2588=>591,2589=>541,2590=>558,2591=>543,2592=>581,2593=>596,2594=>640,2595=>640,2596=>591,2597=>564,2598=>640, + 2599=>564,2600=>581,2602=>564,2603=>551,2604=>560,2605=>549,2606=>558,2607=>652,2608=>540,2610=>677,2611=>677,2613=>601,2614=>558,2616=>558,2617=>549,2620=>0, + 2622=>246,2623=>246,2624=>246,2625=>0,2626=>0,2631=>0,2632=>0,2635=>0,2636=>0,2637=>0,2649=>567,2650=>690,2651=>591,2652=>591,2654=>581,2662=>591, + 2663=>591,2664=>591,2665=>591,2666=>591,2667=>591,2668=>591,2669=>591,2670=>591,2671=>591,2672=>0,2673=>0,2674=>557,2675=>678,2676=>894,2689=>0,2690=>0, + 2691=>300,2693=>781,2694=>1044,2695=>589,2696=>589,2697=>560,2698=>758,2699=>806,2701=>781,2703=>781,2704=>781,2705=>1044,2707=>1044,2708=>1044,2709=>413,2710=>773, + 2711=>606,2712=>558,2713=>483,2714=>600,2715=>691,2716=>811,2717=>647,2718=>651,2719=>453,2720=>450,2721=>425,2722=>478,2723=>694,2724=>534,2725=>553,2726=>446, + 2727=>541,2728=>582,2730=>572,2731=>437,2732=>663,2733=>756,2734=>594,2735=>493,2736=>392,2738=>613,2739=>656,2741=>538,2742=>611,2743=>507,2744=>663,2745=>587, + 2748=>0,2749=>478,2750=>273,2751=>273,2752=>273,2753=>0,2754=>0,2755=>0,2756=>0,2757=>0,2759=>0,2760=>0,2761=>273,2763=>273,2764=>273,2765=>0, + 2768=>843,2784=>893,2790=>625,2791=>625,2792=>625,2793=>625,2794=>625,2795=>625,2796=>625,2797=>625,2798=>625,2799=>625,2817=>0,2818=>306,2819=>391,2821=>590, + 2822=>808,2823=>658,2824=>658,2825=>633,2826=>654,2827=>636,2828=>540,2831=>560,2832=>938,2835=>600,2836=>973,2837=>603,2838=>620,2839=>620,2840=>605,2841=>712, + 2842=>579,2843=>579,2844=>593,2845=>564,2846=>581,2847=>604,2848=>578,2849=>579,2850=>579,2851=>607,2852=>579,2853=>587,2854=>579,2855=>602,2856=>579,2858=>605, + 2859=>728,2860=>579,2861=>643,2862=>605,2863=>628,2864=>619,2866=>653,2867=>593,2870=>620,2871=>605,2872=>605,2873=>579,2876=>0,2877=>333,2878=>218,2879=>0, + 2880=>294,2881=>0,2882=>0,2883=>0,2887=>479,2888=>479,2891=>1026,2892=>1026,2893=>0,2902=>0,2903=>218,2908=>579,2909=>579,2911=>599,2912=>636,2913=>540, + 2918=>578,2919=>480,2920=>480,2921=>622,2922=>506,2923=>605,2924=>529,2925=>548,2926=>512,2927=>528,2928=>561,2946=>0,2947=>742,2949=>1002,2950=>1118,2951=>994, + 2952=>660,2953=>1012,2954=>1231,2958=>726,2959=>731,2960=>870,2962=>763,2963=>763,2964=>1636,2965=>667,2969=>830,2970=>584,2972=>876,2974=>986,2975=>802,2979=>1295, + 2980=>656,2984=>630,2985=>1012,2986=>694,2990=>727,2991=>790,2992=>545,2993=>718,2994=>821,2995=>871,2996=>724,2997=>873,2999=>1087,3000=>1098,3001=>1274,3006=>547, + 3007=>172,3008=>93,3009=>519,3010=>814,3014=>748,3015=>681,3016=>956,3018=>1666,3019=>1666,3020=>1994,3021=>0,3031=>871,3047=>667,3048=>1012,3049=>751,3050=>740, + 3051=>924,3052=>884,3053=>726,3054=>1002,3055=>825,3056=>717,3057=>719,3058=>774,3073=>365,3074=>601,3075=>346,3077=>720,3078=>786,3079=>567,3080=>1159,3081=>690, + 3082=>1047,3083=>1299,3084=>913,3086=>625,3087=>625,3088=>712,3090=>655,3091=>655,3092=>862,3093=>515,3094=>680,3095=>526,3096=>943,3097=>655,3098=>684,3099=>684, + 3100=>670,3101=>1205,3102=>732,3103=>888,3104=>597,3105=>709,3106=>709,3107=>809,3108=>715,3109=>702,3110=>702,3111=>702,3112=>607,3114=>623,3115=>623,3116=>681, + 3117=>681,3118=>932,3119=>1203,3120=>597,3121=>893,3122=>631,3123=>608,3125=>620,3126=>541,3127=>667,3128=>640,3129=>911,3134=>644,3135=>298,3136=>298,3137=>361, + 3138=>682,3139=>342,3140=>704,3142=>624,3143=>624,3144=>900,3146=>849,3147=>849,3148=>976,3149=>669,3157=>298,3158=>119,3168=>1620,3169=>1281,3174=>840,3175=>840, + 3176=>840,3177=>840,3178=>840,3179=>840,3180=>840,3181=>840,3182=>840,3183=>840,3202=>440,3203=>251,3205=>654,3206=>654,3207=>631,3208=>891,3209=>957,3210=>1293, + 3211=>1044,3212=>744,3214=>650,3215=>650,3216=>659,3218=>667,3219=>667,3220=>667,3221=>462,3222=>749,3223=>543,3224=>779,3225=>674,3226=>682,3227=>660,3228=>667, + 3229=>1171,3230=>926,3231=>671,3232=>557,3233=>669,3234=>669,3235=>728,3236=>544,3237=>672,3238=>672,3239=>672,3240=>560,3242=>668,3243=>668,3244=>681,3245=>687, + 3246=>972,3247=>1101,3248=>556,3249=>677,3250=>661,3251=>545,3253=>666,3254=>553,3255=>670,3256=>549,3257=>716,3262=>425,3263=>341,3264=>680,3265=>354,3266=>714, + 3267=>386,3268=>638,3270=>307,3271=>670,3272=>462,3274=>908,3275=>1251,3276=>434,3277=>336,3285=>344,3286=>404,3294=>673,3296=>1695,3297=>978,3302=>549,3303=>549, + 3304=>549,3305=>549,3306=>549,3307=>549,3308=>549,3309=>549,3310=>549,3311=>549,3330=>368,3331=>305,3333=>1201,3334=>1351,3335=>905,3336=>1459,3337=>635,3338=>1198, + 3339=>861,3340=>957,3342=>1211,3343=>1202,3344=>1839,3346=>642,3347=>1114,3348=>1195,3349=>861,3350=>982,3351=>874,3352=>1354,3353=>957,3354=>1016,3355=>1266,3356=>712, + 3357=>1454,3358=>1215,3359=>563,3360=>565,3361=>1192,3362=>1244,3363=>1268,3364=>878,3365=>966,3366=>545,3367=>879,3368=>879,3370=>1031,3371=>1175,3372=>1334,3373=>546, + 3374=>643,3375=>949,3376=>642,3377=>555,3378=>945,3379=>631,3380=>553,3381=>959,3382=>936,3383=>1122,3384=>1190,3385=>1112,3390=>475,3391=>418,3392=>442,3393=>340, + 3394=>340,3395=>473,3398=>640,3399=>530,3400=>1279,3402=>1368,3403=>1258,3404=>1447,3405=>0,3415=>553,3424=>861,3425=>1100,3430=>1095,3431=>929,3432=>854,3433=>1181, + 3434=>658,3435=>972,3436=>1210,3437=>650,3438=>959,3439=>896,3585=>595,3586=>648,3587=>665,3588=>608,3589=>608,3590=>665,3591=>471,3592=>556,3593=>652,3594=>664, + 3595=>681,3596=>816,3597=>849,3598=>620,3599=>620,3600=>541,3601=>785,3602=>826,3603=>887,3604=>598,3605=>605,3606=>595,3607=>650,3608=>541,3609=>652,3610=>608, + 3611=>608,3612=>630,3613=>630,3614=>695,3615=>695,3616=>620,3617=>581,3618=>588,3619=>501,3620=>595,3621=>569,3622=>620,3623=>519,3624=>592,3625=>659,3626=>574, + 3627=>654,3628=>695,3629=>566,3630=>574,3631=>517,3632=>452,3633=>0,3634=>496,3635=>496,3636=>0,3637=>0,3638=>0,3639=>0,3640=>0,3641=>0,3642=>0, + 3647=>687,3648=>302,3649=>571,3650=>478,3651=>515,3652=>515,3653=>496,3654=>506,3655=>0,3656=>0,3657=>0,3658=>0,3659=>0,3660=>0,3661=>0,3662=>0, + 3663=>555,3664=>598,3665=>640,3666=>688,3667=>690,3668=>657,3669=>657,3670=>635,3671=>839,3672=>693,3673=>769,3674=>673,3675=>994,3713=>775,3714=>707,3716=>724, + 3719=>524,3720=>690,3722=>678,3725=>711,3732=>719,3733=>834,3734=>776,3735=>916,3737=>744,3738=>740,3739=>740,3740=>834,3741=>834,3742=>854,3743=>854,3745=>775, + 3746=>724,3747=>697,3749=>700,3751=>700,3754=>708,3755=>916,3757=>700,3758=>697,3759=>658,3760=>432,3761=>534,3762=>476,3763=>476,3764=>778,3765=>778,3766=>778, + 3767=>778,3768=>778,3769=>778,3771=>778,3772=>778,3773=>670,3776=>420,3777=>806,3778=>430,3779=>446,3780=>346,3782=>571,3784=>778,3785=>778,3786=>778,3787=>778, + 3788=>778,3789=>778,3792=>721,3793=>719,3794=>601,3795=>711,3796=>686,3797=>686,3798=>834,3799=>756,3800=>724,3801=>906,3804=>1272,3805=>1272,3840=>600,3841=>600, + 3842=>600,3843=>600,3844=>600,3845=>600,3846=>600,3847=>600,3848=>600,3849=>600,3850=>600,3851=>600,3852=>600,3853=>600,3854=>600,3855=>600,3856=>600,3857=>600, + 3858=>600,3859=>600,3860=>600,3861=>600,3862=>600,3863=>600,3864=>600,3865=>600,3866=>600,3867=>600,3868=>600,3869=>600,3870=>600,3871=>600,3872=>600,3873=>600, + 3874=>600,3875=>600,3876=>600,3877=>600,3878=>600,3879=>600,3880=>600,3881=>600,3882=>600,3883=>600,3884=>600,3885=>600,3886=>600,3887=>600,3888=>600,3889=>600, + 3890=>600,3891=>600,3892=>600,3893=>600,3894=>600,3895=>600,3896=>600,3897=>600,3898=>600,3899=>600,3900=>600,3901=>600,3902=>600,3903=>600,3904=>600,3905=>600, + 3906=>600,3907=>600,3908=>600,3909=>600,3910=>600,3911=>600,3913=>600,3914=>600,3915=>600,3916=>600,3917=>600,3918=>600,3919=>600,3920=>600,3921=>600,3922=>600, + 3923=>600,3924=>600,3925=>600,3926=>600,3927=>600,3928=>600,3929=>600,3930=>600,3931=>600,3932=>600,3933=>600,3934=>600,3935=>600,3936=>600,3937=>600,3938=>600, + 3939=>600,3940=>600,3941=>600,3942=>600,3943=>600,3944=>600,3945=>600,3953=>600,3954=>600,3955=>600,3956=>600,3957=>600,3958=>600,3959=>600,3960=>600,3961=>600, + 3962=>600,3963=>600,3964=>600,3965=>600,3966=>600,3967=>600,3968=>600,3969=>600,3970=>600,3971=>600,3972=>600,3973=>600,3974=>600,3975=>600,3976=>600,3977=>600, + 3978=>600,3979=>600,3984=>600,3985=>600,3986=>600,3987=>600,3988=>600,3989=>600,3991=>600,3993=>600,3994=>600,3995=>600,3996=>600,3997=>600,3998=>600,3999=>600, + 4000=>600,4001=>600,4002=>600,4003=>600,4004=>600,4005=>600,4006=>600,4007=>600,4008=>600,4009=>600,4010=>600,4011=>600,4012=>600,4013=>600,4017=>600,4018=>600, + 4019=>600,4020=>600,4021=>600,4022=>600,4023=>600,4025=>600,4256=>662,4257=>677,4258=>708,4259=>696,4260=>609,4261=>790,4262=>664,4263=>785,4264=>560,4265=>634, + 4266=>782,4267=>701,4268=>629,4269=>682,4270=>705,4271=>692,4272=>734,4273=>615,4274=>592,4275=>680,4276=>679,4277=>705,4278=>643,4279=>623,4280=>623,4281=>629, + 4282=>633,4283=>770,4284=>592,4285=>662,4286=>629,4287=>672,4288=>735,4289=>576,4290=>606,4291=>605,4292=>676,4293=>792,4304=>435,4305=>556,4306=>565,4307=>872, + 4308=>506,4309=>544,4310=>723,4311=>868,4312=>530,4313=>532,4314=>955,4315=>552,4316=>565,4317=>712,4318=>547,4319=>574,4320=>685,4321=>554,4322=>806,4323=>810, + 4324=>777,4325=>502,4326=>686,4327=>512,4328=>552,4329=>496,4330=>568,4331=>552,4332=>592,4333=>565,4334=>552,4335=>741,4336=>549,4337=>659,4338=>559,4339=>524, + 4340=>482,4341=>565,4342=>822,4347=>506,4352=>1000,4353=>1000,4354=>1000,4355=>1000,4356=>1000,4357=>1000,4358=>1000,4359=>1000,4360=>1000,4361=>1000,4362=>1000,4363=>1000, + 4364=>1000,4365=>1000,4366=>1000,4367=>1000,4368=>1000,4369=>1000,4370=>1000,4371=>1000,4372=>1000,4373=>1000,4374=>1000,4375=>1000,4376=>1000,4377=>1000,4378=>1000,4379=>1000, + 4380=>1000,4381=>1000,4382=>1000,4383=>1000,4384=>1000,4385=>1000,4386=>1000,4387=>1000,4388=>1000,4389=>1000,4390=>1000,4391=>1000,4392=>1000,4393=>1000,4394=>1000,4395=>1000, + 4396=>1000,4397=>1000,4398=>1000,4399=>1000,4400=>1000,4401=>1000,4402=>1000,4403=>1000,4404=>1000,4405=>1000,4406=>1000,4407=>1000,4408=>1000,4409=>1000,4410=>1000,4411=>1000, + 4412=>1000,4413=>1000,4414=>1000,4415=>1000,4416=>1000,4417=>1000,4418=>1000,4419=>1000,4420=>1000,4421=>1000,4422=>1000,4423=>1000,4424=>1000,4425=>1000,4426=>1000,4427=>1000, + 4428=>1000,4429=>1000,4430=>1000,4431=>1000,4432=>1000,4433=>1000,4434=>1000,4435=>1000,4436=>1000,4437=>1000,4438=>1000,4439=>1000,4440=>1000,4441=>1000,4447=>1000,4448=>1000, + 4449=>1000,4450=>1000,4451=>1000,4452=>1000,4453=>1000,4454=>1000,4455=>1000,4456=>1000,4457=>1000,4458=>1000,4459=>1000,4460=>1000,4461=>1000,4462=>1000,4463=>1000,4464=>1000, + 4465=>1000,4466=>1000,4467=>1000,4468=>1000,4469=>1000,4470=>1000,4471=>1000,4472=>1000,4473=>1000,4474=>1000,4475=>1000,4476=>1000,4477=>1000,4478=>1000,4479=>1000,4480=>1000, + 4481=>1000,4482=>1000,4483=>1000,4484=>1000,4485=>1000,4486=>1000,4487=>1000,4488=>1000,4489=>1000,4490=>1000,4491=>1000,4492=>1000,4493=>1000,4494=>1000,4495=>1000,4496=>1000, + 4497=>1000,4498=>1000,4499=>1000,4500=>1000,4501=>1000,4502=>1000,4503=>1000,4504=>1000,4505=>1000,4506=>1000,4507=>1000,4508=>1000,4509=>1000,4510=>1000,4511=>1000,4512=>1000, + 4513=>1000,4514=>1000,4520=>1000,4521=>1000,4522=>1000,4523=>1000,4524=>1000,4525=>1000,4526=>1000,4527=>1000,4528=>1000,4529=>1000,4530=>1000,4531=>1000,4532=>1000,4533=>1000, + 4534=>1000,4535=>1000,4536=>1000,4537=>1000,4538=>1000,4539=>1000,4540=>1000,4541=>1000,4542=>1000,4543=>1000,4544=>1000,4545=>1000,4546=>1000,4547=>1000,4548=>1000,4549=>1000, + 4550=>1000,4551=>1000,4552=>1000,4553=>1000,4554=>1000,4555=>1000,4556=>1000,4557=>1000,4558=>1000,4559=>1000,4560=>1000,4561=>1000,4562=>1000,4563=>1000,4564=>1000,4565=>1000, + 4566=>1000,4567=>1000,4568=>1000,4569=>1000,4570=>1000,4571=>1000,4572=>1000,4573=>1000,4574=>1000,4575=>1000,4576=>1000,4577=>1000,4578=>1000,4579=>1000,4580=>1000,4581=>1000, + 4582=>1000,4583=>1000,4584=>1000,4585=>1000,4586=>1000,4587=>1000,4588=>1000,4589=>1000,4590=>1000,4591=>1000,4592=>1000,4593=>1000,4594=>1000,4595=>1000,4596=>1000,4597=>1000, + 4598=>1000,4599=>1000,4600=>1000,4601=>1000,7680=>667,7681=>556,7682=>667,7683=>556,7684=>667,7685=>556,7686=>667,7687=>556,7688=>722,7689=>500,7690=>722,7691=>556, + 7692=>722,7693=>556,7694=>722,7695=>556,7696=>722,7697=>556,7698=>722,7699=>556,7700=>667,7701=>556,7702=>667,7703=>556,7704=>667,7705=>556,7706=>667,7707=>556, + 7708=>667,7709=>556,7710=>611,7711=>278,7712=>778,7713=>556,7714=>722,7715=>556,7716=>722,7717=>556,7718=>722,7719=>556,7720=>722,7721=>556,7722=>722,7723=>556, + 7724=>278,7725=>222,7726=>278,7727=>278,7728=>667,7729=>500,7730=>667,7731=>500,7732=>667,7733=>500,7734=>556,7735=>222,7736=>556,7737=>222,7738=>556,7739=>222, + 7740=>556,7741=>222,7742=>833,7743=>833,7744=>833,7745=>833,7746=>833,7747=>833,7748=>722,7749=>556,7750=>722,7751=>556,7752=>722,7753=>556,7754=>722,7755=>556, + 7756=>778,7757=>556,7758=>778,7759=>556,7760=>778,7761=>556,7762=>778,7763=>556,7764=>667,7765=>556,7766=>667,7767=>556,7768=>722,7769=>333,7770=>722,7771=>333, + 7772=>722,7773=>333,7774=>722,7775=>333,7776=>667,7777=>500,7778=>667,7779=>500,7780=>667,7781=>500,7782=>667,7783=>500,7784=>667,7785=>500,7786=>611,7787=>278, + 7788=>611,7789=>278,7790=>611,7791=>278,7792=>611,7793=>278,7794=>722,7795=>556,7796=>722,7797=>556,7798=>722,7799=>556,7800=>722,7801=>556,7802=>722,7803=>556, + 7804=>667,7805=>500,7806=>667,7807=>500,7808=>944,7809=>722,7810=>944,7811=>722,7812=>944,7813=>722,7814=>944,7815=>722,7816=>944,7817=>722,7818=>667,7819=>500, + 7820=>667,7821=>500,7822=>667,7823=>500,7824=>611,7825=>500,7826=>611,7827=>500,7828=>611,7829=>500,7830=>556,7831=>278,7832=>722,7833=>500,7834=>556,7835=>278, + 7840=>667,7841=>556,7842=>667,7843=>556,7844=>667,7845=>556,7846=>667,7847=>556,7848=>667,7849=>556,7850=>667,7851=>556,7852=>667,7853=>556,7854=>667,7855=>556, + 7856=>667,7857=>556,7858=>667,7859=>556,7860=>667,7861=>556,7862=>667,7863=>556,7864=>667,7865=>556,7866=>667,7867=>556,7868=>667,7869=>556,7870=>667,7871=>556, + 7872=>667,7873=>556,7874=>667,7875=>556,7876=>667,7877=>556,7878=>667,7879=>556,7880=>278,7881=>278,7882=>278,7883=>222,7884=>778,7885=>556,7886=>778,7887=>556, + 7888=>778,7889=>556,7890=>778,7891=>556,7892=>778,7893=>556,7894=>778,7895=>556,7896=>778,7897=>556,7898=>776,7899=>556,7900=>776,7901=>556,7902=>776,7903=>556, + 7904=>776,7905=>556,7906=>776,7907=>556,7908=>722,7909=>556,7910=>722,7911=>556,7912=>776,7913=>620,7914=>776,7915=>620,7916=>776,7917=>620,7918=>776,7919=>620, + 7920=>776,7921=>620,7922=>667,7923=>500,7924=>667,7925=>500,7926=>667,7927=>500,7928=>667,7929=>500,7936=>576,7937=>576,7938=>576,7939=>576,7940=>576,7941=>576, + 7942=>576,7943=>576,7944=>667,7945=>667,7946=>680,7947=>680,7948=>680,7949=>680,7950=>718,7951=>718,7952=>434,7953=>434,7954=>434,7955=>434,7956=>434,7957=>434, + 7960=>692,7961=>692,7962=>823,7963=>823,7964=>823,7965=>823,7968=>556,7969=>556,7970=>556,7971=>556,7972=>556,7973=>556,7974=>556,7975=>556,7976=>747,7977=>747, + 7978=>878,7979=>878,7980=>878,7981=>878,7982=>923,7983=>923,7984=>222,7985=>222,7986=>222,7987=>222,7988=>222,7989=>222,7990=>222,7991=>222,7992=>303,7993=>303, + 7994=>434,7995=>434,7996=>434,7997=>434,7998=>479,7999=>479,8000=>556,8001=>556,8002=>556,8003=>556,8004=>556,8005=>556,8008=>778,8009=>778,8010=>894,8011=>894, + 8012=>894,8013=>894,8016=>551,8017=>551,8018=>551,8019=>551,8020=>551,8021=>551,8022=>551,8023=>551,8025=>777,8027=>893,8029=>885,8031=>940,8032=>766,8033=>766, + 8034=>766,8035=>766,8036=>766,8037=>766,8038=>766,8039=>766,8040=>758,8041=>758,8042=>874,8043=>874,8044=>868,8045=>867,8046=>911,8047=>911,8048=>576,8049=>576, + 8050=>434,8051=>434,8052=>556,8053=>556,8054=>222,8055=>222,8056=>556,8057=>556,8058=>551,8059=>551,8060=>766,8061=>766,8064=>576,8065=>576,8066=>576,8067=>576, + 8068=>576,8069=>576,8070=>576,8071=>576,8072=>667,8073=>667,8074=>680,8075=>680,8076=>680,8077=>680,8078=>718,8079=>718,8080=>556,8081=>556,8082=>556,8083=>556, + 8084=>556,8085=>556,8086=>556,8087=>556,8088=>747,8089=>747,8090=>878,8091=>878,8092=>878,8093=>878,8094=>923,8095=>923,8096=>766,8097=>766,8098=>766,8099=>766, + 8100=>766,8101=>766,8102=>766,8103=>766,8104=>758,8105=>758,8106=>874,8107=>874,8108=>868,8109=>867,8110=>911,8111=>911,8112=>576,8113=>576,8114=>576,8115=>576, + 8116=>576,8118=>576,8119=>576,8120=>667,8121=>667,8122=>667,8123=>667,8124=>667,8125=>278,8126=>278,8127=>278,8128=>278,8129=>278,8130=>556,8131=>556,8132=>556, + 8134=>556,8135=>556,8136=>693,8137=>704,8138=>748,8139=>759,8140=>722,8141=>278,8142=>278,8143=>278,8144=>222,8145=>222,8146=>222,8147=>222,8150=>222,8151=>222, + 8152=>278,8153=>278,8154=>304,8155=>304,8157=>278,8158=>278,8159=>278,8160=>551,8161=>551,8162=>551,8163=>551,8164=>571,8165=>571,8166=>551,8167=>551,8168=>667, + 8169=>667,8170=>742,8171=>746,8172=>693,8173=>278,8174=>278,8175=>278,8178=>766,8179=>766,8180=>766,8182=>766,8183=>766,8184=>778,8185=>778,8186=>758,8187=>758, + 8188=>758,8189=>278,8190=>278,8192=>500,8193=>1000,8194=>500,8195=>1000,8196=>333,8197=>250,8198=>167,8199=>556,8200=>278,8201=>100,8202=>50,8203=>0,8204=>0, + 8205=>0,8208=>333,8209=>333,8210=>556,8213=>564,8214=>428,8215=>500,8219=>222,8223=>333,8227=>350,8228=>278,8229=>556,8231=>278,8232=>0,8233=>0,8241=>1330, + 8242=>222,8243=>372,8244=>522,8245=>206,8246=>356,8247=>506,8248=>312,8251=>1000,8252=>471,8253=>556,8254=>500,8255=>945,8256=>945,8257=>312,8258=>820,8259=>333, + 8260=>167,8261=>278,8262=>278,8304=>333,8308=>333,8309=>333,8310=>333,8311=>333,8312=>333,8313=>333,8314=>333,8315=>333,8316=>333,8317=>210,8318=>210,8319=>333, + 8320=>333,8321=>333,8322=>333,8323=>333,8324=>333,8325=>333,8326=>333,8327=>333,8328=>333,8329=>333,8330=>333,8331=>333,8332=>333,8333=>210,8334=>210,8352=>556, + 8353=>556,8354=>556,8355=>556,8356=>556,8357=>833,8358=>556,8359=>556,8360=>1024,8361=>940,8362=>784,8363=>556,8400=>600,8401=>600,8402=>600,8403=>600,8404=>700, + 8405=>700,8406=>600,8407=>600,8408=>600,8409=>600,8410=>600,8411=>600,8412=>600,8413=>900,8414=>900,8415=>900,8416=>900,8417=>700,8448=>889,8449=>889,8450=>667, + 8451=>1022,8452=>611,8453=>889,8454=>889,8455=>501,8456=>667,8457=>921,8458=>510,8459=>906,8460=>988,8461=>722,8462=>500,8463=>500,8464=>688,8465=>553,8466=>708, + 8467=>291,8468=>778,8469=>722,8470=>1073,8471=>737,8472=>740,8473=>556,8474=>722,8475=>927,8476=>795,8477=>667,8478=>667,8479=>667,8480=>1000,8481=>1174,8483=>722, + 8484=>611,8485=>542,8486=>768,8487=>768,8488=>698,8489=>321,8490=>667,8491=>667,8492=>927,8493=>646,8494=>556,8495=>385,8496=>615,8497=>688,8498=>611,8499=>1115, + 8500=>406,8501=>688,8502=>688,8503=>344,8504=>688,8531=>834,8532=>834,8533=>834,8534=>834,8535=>834,8536=>834,8537=>834,8538=>834,8539=>834,8540=>834,8541=>834, + 8542=>834,8543=>834,8544=>278,8545=>555,8546=>832,8547=>933,8548=>667,8549=>934,8550=>1031,8551=>1268,8552=>944,8553=>667,8554=>944,8555=>1035,8556=>556,8557=>722, + 8558=>722,8559=>833,8560=>222,8561=>444,8562=>666,8563=>700,8564=>500,8565=>700,8566=>922,8567=>1144,8568=>712,8569=>500,8570=>712,8571=>934,8572=>222,8573=>500, + 8574=>556,8575=>833,8576=>983,8577=>722,8578=>983,8592=>713,8593=>713,8594=>713,8595=>713,8596=>713,8597=>713,8598=>713,8599=>713,8600=>713,8601=>713,8602=>713, + 8603=>713,8604=>713,8605=>713,8606=>713,8607=>713,8608=>713,8609=>713,8610=>713,8611=>713,8612=>713,8613=>713,8614=>713,8615=>713,8616=>713,8617=>713,8618=>713, + 8619=>713,8620=>713,8621=>813,8622=>813,8623=>713,8624=>713,8625=>713,8626=>713,8627=>713,8628=>713,8629=>713,8630=>713,8631=>713,8632=>713,8633=>713,8634=>800, + 8635=>800,8636=>713,8637=>713,8638=>713,8639=>713,8640=>713,8641=>713,8642=>713,8643=>713,8644=>713,8645=>713,8646=>713,8647=>713,8648=>713,8649=>713,8650=>713, + 8651=>713,8652=>713,8653=>713,8654=>950,8655=>713,8656=>713,8657=>713,8658=>713,8659=>713,8660=>863,8661=>713,8662=>713,8663=>713,8664=>713,8665=>713,8666=>713, + 8667=>713,8668=>813,8669=>813,8670=>713,8671=>713,8672=>713,8673=>713,8674=>713,8675=>713,8676=>713,8677=>713,8678=>713,8679=>713,8680=>713,8681=>713,8682=>713, + 8704=>600,8705=>600,8706=>494,8707=>600,8708=>600,8709=>800,8710=>612,8711=>612,8712=>549,8713=>549,8714=>549,8715=>549,8716=>549,8717=>549,8718=>549,8719=>823, + 8720=>823,8721=>713,8722=>584,8723=>584,8724=>584,8725=>167,8726=>278,8727=>389,8728=>400,8729=>400,8730=>600,8731=>600,8732=>600,8733=>549,8734=>549,8735=>584, + 8736=>584,8737=>584,8738=>584,8739=>260,8740=>444,8741=>418,8742=>602,8743=>561,8744=>561,8745=>561,8746=>561,8747=>506,8748=>806,8749=>1106,8750=>506,8751=>806, + 8752=>1106,8753=>506,8754=>506,8755=>506,8756=>561,8757=>561,8758=>422,8759=>561,8760=>584,8761=>584,8762=>584,8763=>584,8764=>584,8765=>584,8766=>584,8767=>584, + 8768=>422,8769=>584,8770=>584,8771=>584,8772=>584,8773=>584,8774=>584,8775=>584,8776=>584,8777=>584,8778=>584,8779=>584,8780=>584,8781=>584,8782=>584,8783=>584, + 8784=>584,8785=>584,8786=>584,8787=>584,8788=>737,8789=>737,8790=>584,8791=>584,8792=>584,8793=>584,8794=>584,8795=>584,8796=>584,8797=>584,8798=>584,8799=>584, + 8800=>584,8801=>584,8802=>584,8803=>584,8804=>584,8805=>584,8806=>584,8807=>584,8808=>584,8809=>584,8810=>969,8811=>969,8812=>584,8813=>584,8814=>584,8815=>584, + 8816=>584,8817=>584,8818=>584,8819=>584,8820=>584,8821=>584,8822=>584,8823=>584,8824=>584,8825=>584,8826=>584,8827=>584,8828=>584,8829=>584,8830=>584,8831=>584, + 8832=>584,8833=>584,8834=>678,8835=>678,8836=>678,8837=>678,8838=>678,8839=>678,8840=>678,8841=>678,8842=>678,8843=>678,8844=>561,8845=>561,8846=>561,8847=>678, + 8848=>678,8849=>673,8850=>673,8851=>561,8852=>561,8853=>800,8854=>800,8855=>800,8856=>800,8857=>800,8858=>800,8859=>800,8860=>800,8861=>800,8862=>800,8863=>800, + 8864=>800,8865=>800,8866=>549,8867=>549,8868=>549,8869=>549,8870=>399,8871=>399,8872=>549,8873=>549,8874=>549,8875=>672,8876=>549,8877=>549,8878=>549,8879=>672, + 8880=>549,8881=>549,8882=>549,8883=>549,8884=>549,8885=>549,8886=>713,8887=>713,8888=>713,8889=>549,8890=>549,8891=>584,8892=>584,8893=>584,8894=>584,8895=>584, + 8896=>561,8897=>561,8898=>561,8899=>561,8900=>549,8901=>250,8902=>549,8903=>649,8904=>630,8905=>630,8906=>630,8907=>630,8908=>630,8909=>584,8910=>561,8911=>561, + 8912=>668,8913=>668,8914=>668,8915=>668,8916=>561,8917=>602,8918=>584,8919=>584,8920=>1354,8921=>1354,8922=>584,8923=>584,8924=>584,8925=>584,8926=>584,8927=>584, + 8928=>584,8929=>584,8930=>673,8931=>673,8932=>673,8933=>673,8934=>584,8935=>584,8936=>584,8937=>584,8938=>584,8939=>584,8940=>584,8941=>584,8942=>278,8943=>1000, + 8944=>1000,8945=>1000,8960=>549,8962=>549,8963=>549,8964=>549,8965=>549,8966=>549,8967=>549,8968=>449,8969=>449,8970=>449,8971=>449,8972=>549,8973=>549,8974=>549, + 8975=>549,8976=>549,8977=>549,8978=>800,8979=>800,8980=>549,8981=>549,8982=>549,8983=>650,8984=>780,8985=>549,8986=>549,8987=>549,8988=>549,8989=>549,8990=>549, + 8991=>549,8992=>506,8993=>506,8994=>713,8995=>713,8996=>1000,8997=>1000,8998=>1000,8999=>1000,9000=>1000,9001=>329,9002=>329,9003=>1000,9004=>549,9005=>549,9006=>549, + 9007=>549,9008=>549,9009=>549,9010=>549,9011=>549,9012=>549,9013=>549,9014=>600,9015=>600,9016=>600,9017=>600,9018=>600,9019=>600,9020=>600,9021=>600,9022=>600, + 9023=>600,9024=>600,9025=>600,9026=>600,9027=>600,9028=>600,9029=>600,9030=>600,9031=>600,9032=>600,9033=>600,9034=>600,9035=>600,9036=>600,9037=>600,9038=>600, + 9039=>600,9040=>600,9041=>600,9042=>600,9043=>600,9044=>600,9045=>600,9046=>600,9047=>600,9048=>600,9049=>600,9050=>600,9051=>600,9052=>600,9053=>600,9054=>600, + 9055=>600,9056=>600,9057=>600,9058=>600,9059=>600,9060=>600,9061=>600,9062=>600,9063=>600,9064=>600,9065=>600,9066=>600,9067=>600,9068=>600,9069=>600,9070=>600, + 9071=>600,9072=>600,9073=>600,9074=>600,9075=>600,9076=>600,9077=>600,9078=>600,9079=>600,9080=>600,9081=>600,9082=>600,9109=>600,9216=>600,9217=>600,9218=>600, + 9219=>600,9220=>600,9221=>600,9222=>600,9223=>600,9224=>600,9225=>600,9226=>600,9227=>600,9228=>600,9229=>600,9230=>600,9231=>600,9232=>600,9233=>600,9234=>600, + 9235=>600,9236=>600,9237=>600,9238=>600,9239=>600,9240=>600,9241=>600,9242=>600,9243=>600,9244=>600,9245=>600,9246=>600,9247=>600,9248=>600,9249=>600,9250=>600, + 9251=>600,9252=>600,9280=>604,9281=>604,9282=>604,9283=>604,9284=>604,9285=>604,9286=>750,9287=>750,9288=>750,9289=>750,9290=>604,9312=>1000,9313=>1000,9314=>1000, + 9315=>1000,9316=>1000,9317=>1000,9318=>1000,9319=>1000,9320=>1000,9321=>1000,9322=>1000,9323=>1000,9324=>1000,9325=>1000,9326=>1000,9327=>1000,9328=>1000,9329=>1000,9330=>1000, + 9331=>1000,9332=>1000,9333=>1000,9334=>1000,9335=>1000,9336=>1000,9337=>1000,9338=>1000,9339=>1000,9340=>1000,9341=>1000,9342=>1000,9343=>1000,9344=>1000,9345=>1000,9346=>1000, + 9347=>1000,9348=>1000,9349=>1000,9350=>1000,9351=>1000,9352=>1000,9353=>1000,9354=>1000,9355=>1000,9356=>1000,9357=>1000,9358=>1000,9359=>1000,9360=>1000,9361=>1000,9362=>1000, + 9363=>1000,9364=>1000,9365=>1000,9366=>1000,9367=>1000,9368=>1000,9369=>1000,9370=>1000,9371=>1000,9372=>1000,9373=>1000,9374=>1000,9375=>1000,9376=>1000,9377=>1000,9378=>1000, + 9379=>1000,9380=>1000,9381=>1000,9382=>1000,9383=>1000,9384=>1000,9385=>1000,9386=>1000,9387=>1000,9388=>1000,9389=>1000,9390=>1000,9391=>1000,9392=>1000,9393=>1000,9394=>1000, + 9395=>1000,9396=>1000,9397=>1000,9398=>1000,9399=>1000,9400=>1000,9401=>1000,9402=>1000,9403=>1000,9404=>1000,9405=>1000,9406=>1000,9407=>1000,9408=>1000,9409=>1000,9410=>1000, + 9411=>1000,9412=>1000,9413=>1000,9414=>1000,9415=>1000,9416=>1000,9417=>1000,9418=>1000,9419=>1000,9420=>1000,9421=>1000,9422=>1000,9423=>1000,9424=>1000,9425=>1000,9426=>1000, + 9427=>1000,9428=>1000,9429=>1000,9430=>1000,9431=>1000,9432=>1000,9433=>1000,9434=>1000,9435=>1000,9436=>1000,9437=>1000,9438=>1000,9439=>1000,9440=>1000,9441=>1000,9442=>1000, + 9443=>1000,9444=>1000,9445=>1000,9446=>1000,9447=>1000,9448=>1000,9449=>1000,9450=>1000,9472=>600,9473=>600,9474=>600,9475=>600,9476=>600,9477=>600,9478=>600,9479=>600, + 9480=>600,9481=>600,9482=>600,9483=>600,9484=>600,9485=>600,9486=>600,9487=>600,9488=>600,9489=>600,9490=>600,9491=>600,9492=>600,9493=>600,9494=>600,9495=>600, + 9496=>600,9497=>600,9498=>600,9499=>600,9500=>600,9501=>600,9502=>600,9503=>600,9504=>600,9505=>600,9506=>600,9507=>600,9508=>600,9509=>600,9510=>600,9511=>600, + 9512=>600,9513=>600,9514=>600,9515=>600,9516=>600,9517=>600,9518=>600,9519=>600,9520=>600,9521=>600,9522=>600,9523=>600,9524=>600,9525=>600,9526=>600,9527=>600, + 9528=>600,9529=>600,9530=>600,9531=>600,9532=>600,9533=>600,9534=>600,9535=>600,9536=>600,9537=>600,9538=>600,9539=>600,9540=>600,9541=>600,9542=>600,9543=>600, + 9544=>600,9545=>600,9546=>600,9547=>600,9548=>600,9549=>600,9550=>600,9551=>600,9552=>600,9553=>600,9554=>600,9555=>600,9556=>600,9557=>600,9558=>600,9559=>600, + 9560=>600,9561=>600,9562=>600,9563=>600,9564=>600,9565=>600,9566=>600,9567=>600,9568=>600,9569=>600,9570=>600,9571=>600,9572=>600,9573=>600,9574=>600,9575=>600, + 9576=>600,9577=>600,9578=>600,9579=>600,9580=>600,9581=>600,9582=>600,9583=>600,9584=>600,9585=>600,9586=>600,9587=>600,9588=>600,9589=>600,9590=>600,9591=>600, + 9592=>600,9593=>600,9594=>600,9595=>600,9596=>600,9597=>600,9598=>600,9599=>600,9600=>600,9601=>600,9602=>600,9603=>600,9604=>600,9605=>600,9606=>600,9607=>600, + 9608=>600,9609=>600,9610=>600,9611=>600,9612=>600,9613=>600,9614=>600,9615=>600,9616=>600,9617=>600,9618=>600,9619=>600,9620=>600,9621=>600,9632=>600,9633=>600, + 9634=>600,9635=>600,9636=>600,9637=>600,9638=>600,9639=>600,9640=>600,9641=>600,9642=>600,9643=>600,9644=>600,9645=>600,9646=>600,9647=>600,9648=>600,9649=>600, + 9650=>600,9651=>600,9652=>600,9653=>600,9654=>600,9655=>600,9656=>600,9657=>600,9658=>600,9659=>600,9660=>600,9661=>600,9662=>600,9663=>600,9664=>600,9665=>600, + 9666=>600,9667=>600,9668=>600,9669=>600,9670=>600,9671=>600,9672=>600,9673=>600,9674=>600,9675=>600,9676=>600,9677=>600,9678=>600,9679=>600,9680=>600,9681=>600, + 9682=>600,9683=>600,9684=>600,9685=>600,9686=>600,9687=>600,9688=>600,9689=>600,9690=>600,9691=>600,9692=>600,9693=>600,9694=>600,9695=>600,9696=>600,9697=>600, + 9698=>600,9699=>600,9700=>600,9701=>600,9702=>600,9703=>600,9704=>600,9705=>600,9706=>600,9707=>600,9708=>600,9709=>600,9710=>600,9711=>600,9728=>750,9729=>1000, + 9730=>750,9731=>750,9732=>1000,9733=>816,9734=>823,9735=>500,9736=>500,9737=>800,9738=>800,9739=>800,9740=>800,9741=>800,9742=>719,9743=>719,9744=>734,9745=>734, + 9746=>734,9747=>762,9754=>960,9755=>960,9756=>939,9757=>939,9758=>939,9759=>939,9760=>750,9761=>600,9762=>750,9763=>750,9764=>580,9765=>460,9766=>444,9767=>650, + 9768=>444,9769=>768,9770=>800,9771=>850,9772=>675,9773=>800,9774=>750,9775=>750,9776=>900,9777=>900,9778=>900,9779=>900,9780=>900,9781=>900,9782=>900,9783=>900, + 9784=>750,9785=>750,9786=>750,9787=>750,9788=>750,9789=>750,9790=>750,9791=>740,9792=>740,9793=>740,9794=>740,9795=>653,9796=>490,9797=>632,9798=>780,9799=>560, + 9800=>838,9801=>780,9802=>734,9803=>887,9804=>780,9805=>1080,9806=>896,9807=>1080,9808=>804,9809=>868,9810=>922,9811=>696,9812=>1000,9813=>1000,9814=>1000,9815=>1000, + 9816=>1000,9817=>1000,9818=>1000,9819=>1000,9820=>1000,9821=>1000,9822=>1000,9823=>1000,9824=>722,9825=>734,9826=>674,9827=>804,9828=>722,9829=>734,9830=>674,9831=>804, + 9832=>860,9833=>423,9834=>592,9835=>750,9836=>750,9837=>439,9838=>439,9839=>439,9985=>974,9986=>961,9987=>974,9988=>980,9990=>789,9991=>790,9992=>791,9993=>690, + 9996=>549,9997=>855,9998=>911,9999=>933,10000=>911,10001=>945,10002=>974,10003=>755,10004=>846,10005=>762,10006=>761,10007=>571,10008=>677,10009=>763,10010=>760,10011=>759, + 10012=>754,10013=>494,10014=>552,10015=>537,10016=>577,10017=>692,10018=>786,10019=>788,10020=>788,10021=>790,10022=>793,10023=>794,10025=>823,10026=>789,10027=>841,10028=>823, + 10029=>833,10030=>816,10031=>831,10032=>923,10033=>744,10034=>723,10035=>749,10036=>790,10037=>792,10038=>695,10039=>776,10040=>768,10041=>792,10042=>759,10043=>707,10044=>708, + 10045=>682,10046=>701,10047=>826,10048=>815,10049=>789,10050=>789,10051=>707,10052=>687,10053=>696,10054=>689,10055=>786,10056=>787,10057=>713,10058=>791,10059=>785,10061=>873, + 10063=>762,10064=>762,10065=>759,10066=>759,10070=>784,10072=>138,10073=>277,10074=>415,10075=>392,10076=>392,10077=>668,10078=>668,10081=>732,10082=>544,10083=>544,10084=>910, + 10085=>667,10086=>760,10087=>760,10102=>788,10103=>788,10104=>788,10105=>788,10106=>788,10107=>788,10108=>788,10109=>788,10110=>788,10111=>788,10112=>788,10113=>788,10114=>788, + 10115=>788,10116=>788,10117=>788,10118=>788,10119=>788,10120=>788,10121=>788,10122=>788,10123=>788,10124=>788,10125=>788,10126=>788,10127=>788,10128=>788,10129=>788,10130=>788, + 10131=>788,10132=>894,10136=>748,10137=>924,10138=>748,10139=>918,10140=>927,10141=>928,10142=>928,10143=>834,10144=>873,10145=>828,10146=>924,10147=>924,10148=>917,10149=>930, + 10150=>931,10151=>463,10152=>883,10153=>836,10154=>836,10155=>867,10156=>867,10157=>696,10158=>696,10159=>874,10161=>874,10162=>760,10163=>946,10164=>771,10165=>865,10166=>771, + 10167=>888,10168=>967,10169=>888,10170=>831,10171=>873,10172=>927,10173=>970,10174=>918,12288=>1000,12289=>1000,12290=>1000,12291=>1000,12292=>1000,12293=>1000,12294=>1000,12295=>1000, + 12296=>1000,12297=>1000,12298=>1000,12299=>1000,12300=>1000,12301=>1000,12302=>1000,12303=>1000,12304=>1000,12305=>1000,12306=>1000,12307=>1000,12308=>1000,12309=>1000,12310=>1000,12311=>1000, + 12312=>1000,12313=>1000,12314=>1000,12315=>1000,12316=>1000,12317=>1000,12318=>1000,12319=>1000,12320=>1000,12321=>1000,12322=>1000,12323=>1000,12324=>1000,12325=>1000,12326=>1000,12327=>1000, + 12328=>1000,12329=>1000,12330=>1000,12331=>1000,12332=>1000,12333=>1000,12334=>1000,12335=>1000,12336=>1000,12337=>1000,12338=>1000,12339=>1000,12340=>1000,12341=>1000,12342=>1000,12343=>1000, + 12351=>1000,12353=>1000,12354=>1000,12355=>1000,12356=>1000,12357=>1000,12358=>1000,12359=>1000,12360=>1000,12361=>1000,12362=>1000,12363=>1000,12364=>1000,12365=>1000,12366=>1000,12367=>1000, + 12368=>1000,12369=>1000,12370=>1000,12371=>1000,12372=>1000,12373=>1000,12374=>1000,12375=>1000,12376=>1000,12377=>1000,12378=>1000,12379=>1000,12380=>1000,12381=>1000,12382=>1000,12383=>1000, + 12384=>1000,12385=>1000,12386=>1000,12387=>1000,12388=>1000,12389=>1000,12390=>1000,12391=>1000,12392=>1000,12393=>1000,12394=>1000,12395=>1000,12396=>1000,12397=>1000,12398=>1000,12399=>1000, + 12400=>1000,12401=>1000,12402=>1000,12403=>1000,12404=>1000,12405=>1000,12406=>1000,12407=>1000,12408=>1000,12409=>1000,12410=>1000,12411=>1000,12412=>1000,12413=>1000,12414=>1000,12415=>1000, + 12416=>1000,12417=>1000,12418=>1000,12419=>1000,12420=>1000,12421=>1000,12422=>1000,12423=>1000,12424=>1000,12425=>1000,12426=>1000,12427=>1000,12428=>1000,12429=>1000,12430=>1000,12431=>1000, + 12432=>1000,12433=>1000,12434=>1000,12435=>1000,12436=>1000,12441=>1000,12442=>1000,12443=>1000,12444=>1000,12445=>1000,12446=>1000,12449=>1000,12450=>1000,12451=>1000,12452=>1000,12453=>1000, + 12454=>1000,12455=>1000,12456=>1000,12457=>1000,12458=>1000,12459=>1000,12460=>1000,12461=>1000,12462=>1000,12463=>1000,12464=>1000,12465=>1000,12466=>1000,12467=>1000,12468=>1000,12469=>1000, + 12470=>1000,12471=>1000,12472=>1000,12473=>1000,12474=>1000,12475=>1000,12476=>1000,12477=>1000,12478=>1000,12479=>1000,12480=>1000,12481=>1000,12482=>1000,12483=>1000,12484=>1000,12485=>1000, + 12486=>1000,12487=>1000,12488=>1000,12489=>1000,12490=>1000,12491=>1000,12492=>1000,12493=>1000,12494=>1000,12495=>1000,12496=>1000,12497=>1000,12498=>1000,12499=>1000,12500=>1000,12501=>1000, + 12502=>1000,12503=>1000,12504=>1000,12505=>1000,12506=>1000,12507=>1000,12508=>1000,12509=>1000,12510=>1000,12511=>1000,12512=>1000,12513=>1000,12514=>1000,12515=>1000,12516=>1000,12517=>1000, + 12518=>1000,12519=>1000,12520=>1000,12521=>1000,12522=>1000,12523=>1000,12524=>1000,12525=>1000,12526=>1000,12527=>1000,12528=>1000,12529=>1000,12530=>1000,12531=>1000,12532=>1000,12533=>1000, + 12534=>1000,12535=>1000,12536=>1000,12537=>1000,12538=>1000,12539=>1000,12540=>1000,12541=>1000,12542=>1000,12549=>1000,12550=>1000,12551=>1000,12552=>1000,12553=>1000,12554=>1000,12555=>1000, + 12556=>1000,12557=>1000,12558=>1000,12559=>1000,12560=>1000,12561=>1000,12562=>1000,12563=>1000,12564=>1000,12565=>1000,12566=>1000,12567=>1000,12568=>1000,12569=>1000,12570=>1000,12571=>1000, + 12572=>1000,12573=>1000,12574=>1000,12575=>1000,12576=>1000,12577=>1000,12578=>1000,12579=>1000,12580=>1000,12581=>1000,12582=>1000,12583=>1000,12584=>1000,12585=>1000,12586=>1000,12587=>1000, + 12588=>1000,12593=>1000,12594=>1000,12595=>1000,12596=>1000,12597=>1000,12598=>1000,12599=>1000,12600=>1000,12601=>1000,12602=>1000,12603=>1000,12604=>1000,12605=>1000,12606=>1000,12607=>1000, + 12608=>1000,12609=>1000,12610=>1000,12611=>1000,12612=>1000,12613=>1000,12614=>1000,12615=>1000,12616=>1000,12617=>1000,12618=>1000,12619=>1000,12620=>1000,12621=>1000,12622=>1000,12623=>1000, + 12624=>1000,12625=>1000,12626=>1000,12627=>1000,12628=>1000,12629=>1000,12630=>1000,12631=>1000,12632=>1000,12633=>1000,12634=>1000,12635=>1000,12636=>1000,12637=>1000,12638=>1000,12639=>1000, + 12640=>1000,12641=>1000,12642=>1000,12643=>1000,12644=>1000,12645=>1000,12646=>1000,12647=>1000,12648=>1000,12649=>1000,12650=>1000,12651=>1000,12652=>1000,12653=>1000,12654=>1000,12655=>1000, + 12656=>1000,12657=>1000,12658=>1000,12659=>1000,12660=>1000,12661=>1000,12662=>1000,12663=>1000,12664=>1000,12665=>1000,12666=>1000,12667=>1000,12668=>1000,12669=>1000,12670=>1000,12671=>1000, + 12672=>1000,12673=>1000,12674=>1000,12675=>1000,12676=>1000,12677=>1000,12678=>1000,12679=>1000,12680=>1000,12681=>1000,12682=>1000,12683=>1000,12684=>1000,12685=>1000,12686=>1000,12688=>1000, + 12689=>1000,12690=>1000,12691=>1000,12692=>1000,12693=>1000,12694=>1000,12695=>1000,12696=>1000,12697=>1000,12698=>1000,12699=>1000,12700=>1000,12701=>1000,12702=>1000,12703=>1000,12800=>1000, + 12801=>1000,12802=>1000,12803=>1000,12804=>1000,12805=>1000,12806=>1000,12807=>1000,12808=>1000,12809=>1000,12810=>1000,12811=>1000,12812=>1000,12813=>1000,12814=>1000,12815=>1000,12816=>1000, + 12817=>1000,12818=>1000,12819=>1000,12820=>1000,12821=>1000,12822=>1000,12823=>1000,12824=>1000,12825=>1000,12826=>1000,12827=>1000,12828=>1000,12832=>1000,12833=>1000,12834=>1000,12835=>1000, + 12836=>1000,12837=>1000,12838=>1000,12839=>1000,12840=>1000,12841=>1000,12842=>1000,12843=>1000,12844=>1000,12845=>1000,12846=>1000,12847=>1000,12848=>1000,12849=>1000,12850=>1000,12851=>1000, + 12852=>1000,12853=>1000,12854=>1000,12855=>1000,12856=>1000,12857=>1000,12858=>1000,12859=>1000,12860=>1000,12861=>1000,12862=>1000,12863=>1000,12864=>1000,12865=>1000,12866=>1000,12867=>1000, + 12896=>1000,12897=>1000,12898=>1000,12899=>1000,12900=>1000,12901=>1000,12902=>1000,12903=>1000,12904=>1000,12905=>1000,12906=>1000,12907=>1000,12908=>1000,12909=>1000,12910=>1000,12911=>1000, + 12912=>1000,12913=>1000,12914=>1000,12915=>1000,12916=>1000,12917=>1000,12918=>1000,12919=>1000,12920=>1000,12921=>1000,12922=>1000,12923=>1000,12927=>1000,12928=>1000,12929=>1000,12930=>1000, + 12931=>1000,12932=>1000,12933=>1000,12934=>1000,12935=>1000,12936=>1000,12937=>1000,12938=>1000,12939=>1000,12940=>1000,12941=>1000,12942=>1000,12943=>1000,12944=>1000,12945=>1000,12946=>1000, + 12947=>1000,12948=>1000,12949=>1000,12950=>1000,12951=>1000,12952=>1000,12953=>1000,12954=>1000,12955=>1000,12956=>1000,12957=>1000,12958=>1000,12959=>1000,12960=>1000,12961=>1000,12962=>1000, + 12963=>1000,12964=>1000,12965=>1000,12966=>1000,12967=>1000,12968=>1000,12969=>1000,12970=>1000,12971=>1000,12972=>1000,12973=>1000,12974=>1000,12975=>1000,12976=>1000,12992=>1000,12993=>1000, + 12994=>1000,12995=>1000,12996=>1000,12997=>1000,12998=>1000,12999=>1000,13000=>1000,13001=>1000,13002=>1000,13003=>1000,13008=>1000,13009=>1000,13010=>1000,13011=>1000,13012=>1000,13013=>1000, + 13014=>1000,13015=>1000,13016=>1000,13017=>1000,13018=>1000,13019=>1000,13020=>1000,13021=>1000,13022=>1000,13023=>1000,13024=>1000,13025=>1000,13026=>1000,13027=>1000,13028=>1000,13029=>1000, + 13030=>1000,13031=>1000,13032=>1000,13033=>1000,13034=>1000,13035=>1000,13036=>1000,13037=>1000,13038=>1000,13039=>1000,13040=>1000,13041=>1000,13042=>1000,13043=>1000,13044=>1000,13045=>1000, + 13046=>1000,13047=>1000,13048=>1000,13049=>1000,13050=>1000,13051=>1000,13052=>1000,13053=>1000,13054=>1000,13056=>1000,13057=>1000,13058=>1000,13059=>1000,13060=>1000,13061=>1000,13062=>1000, + 13063=>1000,13064=>1000,13065=>1000,13066=>1000,13067=>1000,13068=>1000,13069=>1000,13070=>1000,13071=>1000,13072=>1000,13073=>1000,13074=>1000,13075=>1000,13076=>1000,13077=>1000,13078=>1000, + 13079=>1000,13080=>1000,13081=>1000,13082=>1000,13083=>1000,13084=>1000,13085=>1000,13086=>1000,13087=>1000,13088=>1000,13089=>1000,13090=>1000,13091=>1000,13092=>1000,13093=>1000,13094=>1000, + 13095=>1000,13096=>1000,13097=>1000,13098=>1000,13099=>1000,13100=>1000,13101=>1000,13102=>1000,13103=>1000,13104=>1000,13105=>1000,13106=>1000,13107=>1000,13108=>1000,13109=>1000,13110=>1000, + 13111=>1000,13112=>1000,13113=>1000,13114=>1000,13115=>1000,13116=>1000,13117=>1000,13118=>1000,13119=>1000,13120=>1000,13121=>1000,13122=>1000,13123=>1000,13124=>1000,13125=>1000,13126=>1000, + 13127=>1000,13128=>1000,13129=>1000,13130=>1000,13131=>1000,13132=>1000,13133=>1000,13134=>1000,13135=>1000,13136=>1000,13137=>1000,13138=>1000,13139=>1000,13140=>1000,13141=>1000,13142=>1000, + 13143=>1000,13144=>1000,13145=>1000,13146=>1000,13147=>1000,13148=>1000,13149=>1000,13150=>1000,13151=>1000,13152=>1000,13153=>1000,13154=>1000,13155=>1000,13156=>1000,13157=>1000,13158=>1000, + 13159=>1000,13160=>1000,13161=>1000,13162=>1000,13163=>1000,13164=>1000,13165=>1000,13166=>1000,13167=>1000,13168=>1000,13169=>1000,13170=>1000,13171=>1000,13172=>1000,13173=>1000,13174=>1000, + 13179=>1000,13180=>1000,13181=>1000,13182=>1000,13183=>1000,13184=>1000,13185=>1000,13186=>1000,13187=>1000,13188=>1000,13189=>1000,13190=>1000,13191=>1000,13192=>1000,13193=>1000,13194=>1000, + 13195=>1000,13196=>1000,13197=>1000,13198=>1000,13199=>1000,13200=>1000,13201=>1000,13202=>1000,13203=>1000,13204=>1000,13205=>1000,13206=>1000,13207=>1000,13208=>1000,13209=>1000,13210=>1000, + 13211=>1000,13212=>1000,13213=>1000,13214=>1000,13215=>1000,13216=>1000,13217=>1000,13218=>1000,13219=>1000,13220=>1000,13221=>1000,13222=>1000,13223=>1000,13224=>1000,13225=>1000,13226=>1000, + 13227=>1000,13228=>1000,13229=>1000,13230=>1000,13231=>1000,13232=>1000,13233=>1000,13234=>1000,13235=>1000,13236=>1000,13237=>1000,13238=>1000,13239=>1000,13240=>1000,13241=>1000,13242=>1000, + 13243=>1000,13244=>1000,13245=>1000,13246=>1000,13247=>1000,13248=>1000,13249=>1000,13250=>1000,13251=>1000,13252=>1000,13253=>1000,13254=>1000,13255=>1000,13256=>1000,13257=>1000,13258=>1000, + 13259=>1000,13260=>1000,13261=>1000,13262=>1000,13263=>1000,13264=>1000,13265=>1000,13266=>1000,13267=>1000,13268=>1000,13269=>1000,13270=>1000,13271=>1000,13272=>1000,13273=>1000,13274=>1000, + 13275=>1000,13276=>1000,13277=>1000,13280=>1000,13281=>1000,13282=>1000,13283=>1000,13284=>1000,13285=>1000,13286=>1000,13287=>1000,13288=>1000,13289=>1000,13290=>1000,13291=>1000,13292=>1000, + 13293=>1000,13294=>1000,13295=>1000,13296=>1000,13297=>1000,13298=>1000,13299=>1000,13300=>1000,13301=>1000,13302=>1000,13303=>1000,13304=>1000,13305=>1000,13306=>1000,13307=>1000,13308=>1000, + 13309=>1000,13310=>1000,59393=>316,59394=>507,59395=>507,59396=>484,59397=>484,59416=>0,59492=>480,59495=>480,59536=>458,59557=>466,59558=>480,59559=>903,61441=>500,61442=>500, + 63232=>541,63233=>0,63234=>0,63235=>0,63236=>0,63237=>0,63238=>0,63239=>0,63240=>0,63241=>0,63242=>0,63243=>0,63244=>0,63245=>0,63246=>0,63247=>849, + 63248=>0,63249=>0,63250=>0,63251=>0,63252=>0,63253=>0,63254=>0,63255=>0,63256=>0,63257=>0,63258=>0,63260=>333,63261=>287,63744=>1000,63745=>1000,63746=>1000, + 63747=>1000,63748=>1000,63749=>1000,63750=>1000,63751=>1000,63752=>1000,63753=>1000,63754=>1000,63755=>1000,63756=>1000,63757=>1000,63758=>1000,63759=>1000,63760=>1000,63761=>1000,63762=>1000, + 63763=>1000,63764=>1000,63765=>1000,63766=>1000,63767=>1000,63768=>1000,63769=>1000,63770=>1000,63771=>1000,63772=>1000,63773=>1000,63774=>1000,63775=>1000,63776=>1000,63777=>1000,63778=>1000, + 63779=>1000,63780=>1000,63781=>1000,63782=>1000,63783=>1000,63784=>1000,63785=>1000,63786=>1000,63787=>1000,63788=>1000,63789=>1000,63790=>1000,63791=>1000,63792=>1000,63793=>1000,63794=>1000, + 63795=>1000,63796=>1000,63797=>1000,63798=>1000,63799=>1000,63800=>1000,63801=>1000,63802=>1000,63803=>1000,63804=>1000,63805=>1000,63806=>1000,63807=>1000,63808=>1000,63809=>1000,63810=>1000, + 63811=>1000,63812=>1000,63813=>1000,63814=>1000,63815=>1000,63816=>1000,63817=>1000,63818=>1000,63819=>1000,63820=>1000,63821=>1000,63822=>1000,63823=>1000,63824=>1000,63825=>1000,63826=>1000, + 63827=>1000,63828=>1000,63829=>1000,63830=>1000,63831=>1000,63832=>1000,63833=>1000,63834=>1000,63835=>1000,63836=>1000,63837=>1000,63838=>1000,63839=>1000,63840=>1000,63841=>1000,63842=>1000, + 63843=>1000,63844=>1000,63845=>1000,63846=>1000,63847=>1000,63848=>1000,63849=>1000,63850=>1000,63851=>1000,63852=>1000,63853=>1000,63854=>1000,63855=>1000,63856=>1000,63857=>1000,63858=>1000, + 63859=>1000,63860=>1000,63861=>1000,63862=>1000,63863=>1000,63864=>1000,63865=>1000,63866=>1000,63867=>1000,63868=>1000,63869=>1000,63870=>1000,63871=>1000,63872=>1000,63873=>1000,63874=>1000, + 63875=>1000,63876=>1000,63877=>1000,63878=>1000,63879=>1000,63880=>1000,63881=>1000,63882=>1000,63883=>1000,63884=>1000,63885=>1000,63886=>1000,63887=>1000,63888=>1000,63889=>1000,63890=>1000, + 63891=>1000,63892=>1000,63893=>1000,63894=>1000,63895=>1000,63896=>1000,63897=>1000,63898=>1000,63899=>1000,63900=>1000,63901=>1000,63902=>1000,63903=>1000,63904=>1000,63905=>1000,63906=>1000, + 63907=>1000,63908=>1000,63909=>1000,63910=>1000,63911=>1000,63912=>1000,63913=>1000,63914=>1000,63915=>1000,63916=>1000,63917=>1000,63918=>1000,63919=>1000,63920=>1000,63921=>1000,63922=>1000, + 63923=>1000,63924=>1000,63925=>1000,63926=>1000,63927=>1000,63928=>1000,63929=>1000,63930=>1000,63931=>1000,63932=>1000,63933=>1000,63934=>1000,63935=>1000,63936=>1000,63937=>1000,63938=>1000, + 63939=>1000,63940=>1000,63941=>1000,63942=>1000,63943=>1000,63944=>1000,63945=>1000,63946=>1000,63947=>1000,63948=>1000,63949=>1000,63950=>1000,63951=>1000,63952=>1000,63953=>1000,63954=>1000, + 63955=>1000,63956=>1000,63957=>1000,63958=>1000,63959=>1000,63960=>1000,63961=>1000,63962=>1000,63963=>1000,63964=>1000,63965=>1000,63966=>1000,63967=>1000,63968=>1000,63969=>1000,63970=>1000, + 63971=>1000,63972=>1000,63973=>1000,63974=>1000,63975=>1000,63976=>1000,63977=>1000,63978=>1000,63979=>1000,63980=>1000,63981=>1000,63982=>1000,63983=>1000,63984=>1000,63985=>1000,63986=>1000, + 63987=>1000,63988=>1000,63989=>1000,63990=>1000,63991=>1000,63992=>1000,63993=>1000,63994=>1000,63995=>1000,63996=>1000,63997=>1000,63998=>1000,63999=>1000,64000=>1000,64001=>1000,64002=>1000, + 64003=>1000,64004=>1000,64005=>1000,64006=>1000,64007=>1000,64008=>1000,64009=>1000,64010=>1000,64011=>1000,64012=>1000,64013=>1000,64014=>1000,64015=>1000,64016=>1000,64017=>1000,64018=>1000, + 64019=>1000,64020=>1000,64021=>1000,64022=>1000,64023=>1000,64024=>1000,64025=>1000,64026=>1000,64027=>1000,64028=>1000,64029=>1000,64030=>1000,64031=>1000,64032=>1000,64033=>1000,64034=>1000, + 64035=>1000,64036=>1000,64037=>1000,64038=>1000,64039=>1000,64040=>1000,64041=>1000,64042=>1000,64043=>1000,64044=>1000,64045=>1000,64256=>537,64257=>500,64258=>500,64259=>778,64260=>750, + 64261=>532,64262=>758,64275=>784,64276=>784,64277=>784,64278=>784,64279=>893,64286=>333,64287=>590,64288=>550,64289=>709,64290=>649,64291=>730,64292=>656,64293=>605,64294=>730, + 64295=>633,64296=>794,64297=>584,64298=>700,64299=>700,64300=>700,64301=>700,64302=>577,64303=>577,64304=>577,64305=>563,64306=>411,64307=>512,64308=>594,64309=>316,64310=>326, + 64312=>594,64313=>316,64314=>507,64315=>527,64316=>484,64318=>594,64320=>338,64321=>604,64323=>567,64324=>569,64326=>514,64327=>583,64328=>507,64329=>700,64330=>633,64331=>316, + 64332=>563,64333=>527,64334=>569,64335=>577,64336=>243,64337=>273,64338=>771,64339=>788,64340=>276,64341=>243,64342=>771,64343=>788,64344=>276,64345=>243,64346=>771,64347=>788, + 64348=>276,64349=>243,64350=>771,64351=>788,64352=>276,64353=>243,64354=>771,64355=>788,64356=>276,64357=>243,64358=>771,64359=>788,64360=>276,64361=>243,64362=>957,64363=>903, + 64364=>466,64365=>480,64366=>957,64367=>903,64368=>466,64369=>480,64370=>544,64371=>658,64372=>646,64373=>637,64374=>544,64375=>658,64376=>646,64377=>637,64378=>544,64379=>658, + 64380=>646,64381=>637,64382=>544,64383=>658,64384=>646,64385=>637,64386=>430,64387=>458,64388=>430,64389=>458,64390=>430,64391=>458,64392=>430,64393=>458,64394=>421,64395=>436, + 64396=>421,64397=>436,64398=>828,64399=>942,64400=>432,64401=>549,64402=>828,64403=>942,64404=>432,64405=>549,64406=>828,64407=>942,64408=>432,64409=>549,64410=>828,64411=>942, + 64412=>432,64413=>549,64414=>692,64415=>723,64416=>692,64417=>723,64418=>276,64419=>243,64420=>514,64421=>477,64422=>514,64423=>509,64424=>273,64425=>427,64426=>706,64427=>706, + 64428=>686,64429=>686,64430=>550,64431=>461,64432=>550,64433=>461,64467=>757,64468=>733,64469=>432,64470=>549,64471=>470,64472=>466,64473=>470,64474=>466,64475=>470,64476=>466, + 64477=>470,64478=>470,64479=>466,64480=>470,64481=>466,64482=>470,64483=>466,64484=>781,64485=>933,64486=>276,64487=>243,64488=>276,64489=>243,64490=>547,64491=>517,64492=>783, + 64493=>753,64494=>740,64495=>710,64496=>740,64497=>710,64498=>740,64499=>710,64500=>740,64501=>710,64502=>1207,64503=>1177,64504=>517,64505=>1067,64506=>1037,64507=>517,64508=>731, + 64509=>793,64510=>276,64511=>243,64512=>932,64513=>932,64514=>914,64515=>1067,64516=>1077,64517=>935,64518=>935,64519=>935,64520=>917,64521=>1070,64522=>1080,64523=>932,64524=>932, + 64525=>932,64526=>914,64527=>1067,64528=>1077,64529=>932,64530=>914,64531=>1067,64532=>1077,64533=>1305,64534=>1287,64535=>1305,64536=>1287,64537=>1305,64538=>1305,64539=>1287,64540=>1429, + 64541=>1429,64542=>1429,64543=>1411,64544=>1476,64545=>1458,64546=>1476,64547=>1476,64548=>1476,64549=>1458,64550=>1392,64551=>1374,64552=>1374,64553=>1245,64554=>1227,64555=>1245,64556=>1227, + 64557=>1125,64558=>1125,64559=>1125,64560=>1107,64561=>1260,64562=>1270,64563=>1125,64564=>1107,64565=>1260,64566=>1270,64567=>706,64568=>1091,64569=>1091,64570=>1091,64571=>1106,64572=>1073, + 64573=>1226,64574=>1236,64575=>932,64576=>932,64577=>932,64578=>914,64579=>1067,64580=>1077,64581=>1140,64582=>1140,64583=>1140,64584=>1122,64585=>1275,64586=>1285,64587=>932,64588=>932, + 64589=>932,64590=>914,64591=>1067,64592=>1077,64593=>1345,64594=>1327,64595=>1480,64596=>1490,64597=>932,64598=>932,64599=>932,64600=>914,64601=>1067,64602=>1077,64603=>430,64604=>421, + 64605=>731,64606=>296,64607=>300,64608=>300,64609=>300,64610=>300,64611=>300,64612=>680,64613=>680,64614=>884,64615=>967,64616=>1037,64617=>1047,64618=>680,64619=>680,64620=>884, + 64621=>967,64622=>1037,64623=>1047,64624=>680,64625=>680,64626=>884,64627=>967,64628=>1037,64629=>1047,64630=>680,64631=>680,64632=>884,64633=>967,64634=>1037,64635=>1047,64636=>1274, + 64637=>1284,64638=>1274,64639=>1284,64640=>821,64641=>1221,64642=>1188,64643=>1341,64644=>1351,64645=>884,64646=>1037,64647=>1047,64648=>806,64649=>1173,64650=>680,64651=>680,64652=>884, + 64653=>967,64654=>1037,64655=>1047,64656=>793,64657=>680,64658=>680,64659=>884,64660=>967,64661=>1037,64662=>1047,64663=>911,64664=>911,64665=>911,64666=>806,64667=>679,64668=>911, + 64669=>911,64670=>911,64671=>806,64672=>679,64673=>911,64674=>911,64675=>911,64676=>806,64677=>679,64678=>806,64679=>1284,64680=>1179,64681=>1284,64682=>1179,64683=>1284,64684=>1179, + 64685=>1408,64686=>1408,64687=>1408,64688=>1303,64689=>1455,64690=>1455,64691=>1350,64692=>1455,64693=>1455,64694=>1455,64695=>1350,64696=>1371,64697=>1266,64698=>1224,64699=>1119,64700=>1224, + 64701=>1119,64702=>1104,64703=>1104,64704=>1104,64705=>999,64706=>1104,64707=>999,64708=>1070,64709=>1070,64710=>1070,64711=>676,64712=>965,64713=>911,64714=>911,64715=>911,64716=>806, + 64717=>679,64718=>1119,64719=>1119,64720=>1119,64721=>1014,64722=>911,64723=>911,64724=>911,64725=>806,64726=>679,64727=>1324,64728=>1219,64729=>686,64730=>911,64731=>911,64732=>911, + 64733=>806,64734=>679,64735=>776,64736=>649,64737=>776,64738=>649,64739=>776,64740=>649,64741=>776,64742=>649,64743=>1303,64744=>1176,64745=>1303,64746=>1176,64747=>793,64748=>1082, + 64749=>776,64750=>776,64751=>649,64752=>776,64753=>649,64754=>306,64755=>302,64756=>298,64757=>1527,64758=>1537,64759=>1380,64760=>1390,64761=>1380,64762=>1390,64763=>1564,64764=>1574, + 64765=>1564,64766=>1574,64767=>1440,64768=>1450,64769=>1440,64770=>1450,64771=>1440,64772=>1450,64773=>1611,64774=>1621,64775=>1611,64776=>1621,64777=>1429,64778=>1429,64779=>1429,64780=>1411, + 64781=>1207,64782=>1207,64783=>1254,64784=>1254,64785=>1527,64786=>1537,64787=>1348,64788=>1358,64789=>1348,64790=>1358,64791=>1564,64792=>1574,64793=>1564,64794=>1574,64795=>1431,64796=>1441, + 64797=>1431,64798=>1441,64799=>1431,64800=>1441,64801=>1611,64802=>1621,64803=>1611,64804=>1621,64805=>1429,64806=>1429,64807=>1429,64808=>1411,64809=>1207,64810=>1207,64811=>1254,64812=>1254, + 64813=>1408,64814=>1408,64815=>1408,64816=>1303,64817=>1176,64818=>1176,64819=>1266,64820=>1408,64821=>1408,64822=>1408,64823=>1408,64824=>1408,64825=>1408,64826=>1266,64827=>1266,64828=>273, + 64829=>243,64830=>600,64831=>600,64848=>1444,64849=>1541,64850=>1549,64851=>1444,64852=>1444,64853=>1444,64854=>1444,64855=>1444,64856=>1830,64857=>1817,64858=>1975,64859=>1964,64860=>2046, + 64861=>2046,64862=>2202,64863=>1962,64864=>1941,64865=>1941,64866=>1944,64867=>1836,64868=>2114,64869=>2093,64870=>1991,64871=>2049,64872=>1941,64873=>2212,64874=>1962,64875=>1941,64876=>1944, + 64877=>1836,64878=>2249,64879=>2096,64880=>1988,64881=>1925,64882=>1904,64883=>1799,64884=>2070,64885=>1833,64886=>1729,64887=>1652,64888=>1881,64889=>1729,64890=>1892,64891=>1881,64892=>1759, + 64893=>1637,64894=>1670,64895=>1654,64896=>1522,64897=>1686,64898=>1675,64899=>1549,64900=>1541,64901=>1522,64902=>1444,64903=>1436,64904=>1444,64905=>1757,64906=>1652,64907=>1975,64908=>1757, + 64909=>1652,64910=>1757,64911=>1652,64914=>1757,64915=>1857,64916=>1752,64917=>1444,64918=>1675,64919=>1522,64920=>1444,64921=>1675,64922=>1581,64923=>1570,64924=>1417,64925=>1362,64926=>1686, + 64927=>1686,64928=>1675,64929=>1686,64930=>1675,64931=>1581,64932=>1570,64933=>1975,64934=>2069,64935=>1964,64936=>2202,64937=>2259,64938=>2212,64939=>2259,64940=>1686,64941=>1581,64942=>1686, + 64943=>1686,64944=>1581,64945=>1870,64946=>1817,64947=>1686,64948=>1637,64949=>1444,64950=>1892,64951=>1886,64952=>1549,64953=>1975,64954=>1444,64955=>1723,64956=>1522,64957=>1541,64958=>2080, + 64959=>2080,64960=>1975,64961=>1817,64962=>1686,64963=>1499,64964=>1757,64965=>1883,64966=>2212,64967=>1686,65008=>1523,65009=>1172,65010=>1159,65011=>1356,65012=>2111,65013=>2258,65014=>2130, + 65015=>1552,65016=>2046,65017=>1856,65018=>1930,65019=>1070,65056=>450,65057=>450,65058=>450,65059=>450,65072=>1000,65073=>1000,65074=>1000,65075=>1000,65076=>1000,65077=>1000,65078=>1000, + 65079=>1000,65080=>1000,65081=>1000,65082=>1000,65083=>1000,65084=>1000,65085=>1000,65086=>1000,65087=>1000,65088=>1000,65089=>1000,65090=>1000,65091=>1000,65092=>1000,65097=>1000,65098=>1000, + 65099=>1000,65100=>1000,65101=>1000,65102=>1000,65103=>1000,65104=>167,65105=>250,65106=>167,65108=>167,65109=>167,65110=>334,65111=>167,65112=>600,65113=>200,65114=>200,65115=>200, + 65116=>200,65117=>200,65118=>200,65119=>334,65120=>400,65121=>233,65122=>350,65123=>200,65124=>350,65125=>350,65126=>350,65128=>167,65129=>334,65130=>533,65131=>609,65136=>300, + 65137=>298,65138=>296,65140=>298,65142=>300,65143=>298,65144=>300,65145=>302,65146=>298,65147=>296,65148=>306,65149=>306,65150=>154,65151=>154,65152=>529,65153=>243,65154=>273, + 65155=>243,65156=>273,65157=>470,65158=>466,65159=>243,65160=>273,65161=>731,65162=>793,65163=>276,65164=>243,65165=>243,65166=>273,65167=>771,65168=>788,65169=>276,65170=>243, + 65171=>514,65172=>477,65173=>771,65174=>788,65175=>276,65176=>243,65177=>771,65178=>788,65179=>276,65180=>243,65181=>544,65182=>658,65183=>646,65184=>637,65185=>544,65186=>658, + 65187=>646,65188=>637,65189=>544,65190=>658,65191=>646,65192=>637,65193=>430,65194=>458,65195=>430,65196=>458,65197=>421,65198=>436,65199=>421,65200=>436,65201=>1194,65202=>1194, + 65203=>770,65204=>770,65205=>1194,65206=>1194,65207=>770,65208=>770,65209=>1291,65210=>1291,65211=>817,65212=>817,65213=>1291,65214=>1291,65215=>817,65216=>817,65217=>843,65218=>843, + 65219=>733,65220=>733,65221=>843,65222=>843,65223=>733,65224=>733,65225=>594,65226=>556,65227=>586,65228=>554,65229=>594,65230=>556,65231=>586,65232=>554,65233=>957,65234=>903, + 65235=>466,65236=>480,65237=>800,65238=>823,65239=>466,65240=>480,65241=>757,65242=>733,65243=>432,65244=>549,65245=>662,65246=>673,65247=>273,65248=>243,65249=>589,65250=>640, + 65251=>481,65252=>532,65253=>692,65254=>723,65255=>276,65256=>243,65257=>514,65258=>477,65259=>686,65260=>405,65261=>470,65262=>466,65263=>731,65264=>793,65265=>731,65266=>803, + 65267=>276,65268=>243,65269=>551,65270=>603,65271=>551,65272=>603,65273=>551,65274=>603,65275=>551,65276=>603,65281=>1000,65282=>1000,65283=>1000,65284=>1000,65285=>1000,65286=>1000, + 65287=>1000,65288=>1000,65289=>1000,65290=>1000,65291=>1000,65292=>1000,65293=>1000,65294=>1000,65295=>1000,65296=>1000,65297=>1000,65298=>1000,65299=>1000,65300=>1000,65301=>1000,65302=>1000, + 65303=>1000,65304=>1000,65305=>1000,65306=>1000,65307=>1000,65308=>1000,65309=>1000,65310=>1000,65311=>1000,65312=>1000,65313=>1000,65314=>1000,65315=>1000,65316=>1000,65317=>1000,65318=>1000, + 65319=>1000,65320=>1000,65321=>1000,65322=>1000,65323=>1000,65324=>1000,65325=>1000,65326=>1000,65327=>1000,65328=>1000,65329=>1000,65330=>1000,65331=>1000,65332=>1000,65333=>1000,65334=>1000, + 65335=>1000,65336=>1000,65337=>1000,65338=>1000,65339=>1000,65340=>1000,65341=>1000,65342=>1000,65343=>1000,65344=>1000,65345=>1000,65346=>1000,65347=>1000,65348=>1000,65349=>1000,65350=>1000, + 65351=>1000,65352=>1000,65353=>1000,65354=>1000,65355=>1000,65356=>1000,65357=>1000,65358=>1000,65359=>1000,65360=>1000,65361=>1000,65362=>1000,65363=>1000,65364=>1000,65365=>1000,65366=>1000, + 65367=>1000,65368=>1000,65369=>1000,65370=>1000,65371=>1000,65372=>1000,65373=>1000,65374=>1000,65377=>500,65378=>500,65379=>500,65380=>500,65381=>500,65382=>500,65383=>500,65384=>500, + 65385=>500,65386=>500,65387=>500,65388=>500,65389=>500,65390=>500,65391=>500,65392=>500,65393=>500,65394=>500,65395=>500,65396=>500,65397=>500,65398=>500,65399=>500,65400=>500, + 65401=>500,65402=>500,65403=>500,65404=>500,65405=>500,65406=>500,65407=>500,65408=>500,65409=>500,65410=>500,65411=>500,65412=>500,65413=>500,65414=>500,65415=>500,65416=>500, + 65417=>500,65418=>500,65419=>500,65420=>500,65421=>500,65422=>500,65423=>500,65424=>500,65425=>500,65426=>500,65427=>500,65428=>500,65429=>500,65430=>500,65431=>500,65432=>500, + 65433=>500,65434=>500,65435=>500,65436=>500,65437=>500,65438=>500,65439=>500,65440=>500,65441=>500,65442=>500,65443=>500,65444=>500,65445=>500,65446=>500,65447=>500,65448=>500, + 65449=>500,65450=>500,65451=>500,65452=>500,65453=>500,65454=>500,65455=>500,65456=>500,65457=>500,65458=>500,65459=>500,65460=>500,65461=>500,65462=>500,65463=>500,65464=>500, + 65465=>500,65466=>500,65467=>500,65468=>500,65469=>500,65470=>500,65474=>500,65475=>500,65476=>500,65477=>500,65478=>500,65479=>500,65482=>500,65483=>500,65484=>500,65485=>500, + 65486=>500,65487=>500,65490=>500,65491=>500,65492=>500,65493=>500,65494=>500,65495=>500,65498=>500,65499=>500,65500=>500,65504=>1000,65505=>1000,65506=>1000,65507=>1000,65508=>1000, + 65509=>1000,65510=>1000,65512=>500,65513=>500,65514=>500,65515=>500,65516=>500,65517=>500,65518=>500,65532=>1000,65533=>1000,19968=>1000,19969=>1000,19970=>1000,19971=>1000,19972=>1000, + 19973=>1000,19974=>1000,19975=>1000,19976=>1000,19977=>1000,19978=>1000,19979=>1000,19980=>1000,19981=>1000,19982=>1000,19983=>1000,19984=>1000,19985=>1000,19986=>1000,19987=>1000,19988=>1000, + 19989=>1000,19990=>1000,19991=>1000,19992=>1000,19993=>1000,19994=>1000,19995=>1000,19996=>1000,19997=>1000,19998=>1000,19999=>1000,20000=>1000,20001=>1000,20002=>1000,20003=>1000,20004=>1000, + 20005=>1000,20006=>1000,20007=>1000,20008=>1000,20009=>1000,20010=>1000,20011=>1000,20012=>1000,20013=>1000,20014=>1000,20015=>1000,20016=>1000,20017=>1000,20018=>1000,20019=>1000,20020=>1000, + 20021=>1000,20022=>1000,20023=>1000,20024=>1000,20025=>1000,20026=>1000,20027=>1000,20028=>1000,20029=>1000,20030=>1000,20031=>1000,20032=>1000,20033=>1000,20034=>1000,20035=>1000,20036=>1000, + 20037=>1000,20038=>1000,20039=>1000,20040=>1000,20041=>1000,20042=>1000,20043=>1000,20044=>1000,20045=>1000,20046=>1000,20047=>1000,20048=>1000,20049=>1000,20050=>1000,20051=>1000,20052=>1000, + 20053=>1000,20054=>1000,20055=>1000,20056=>1000,20057=>1000,20058=>1000,20059=>1000,20060=>1000,20061=>1000,20062=>1000,20063=>1000,20064=>1000,20065=>1000,20066=>1000,20067=>1000,20068=>1000, + 20069=>1000,20070=>1000,20071=>1000,20072=>1000,20073=>1000,20074=>1000,20075=>1000,20076=>1000,20077=>1000,20078=>1000,20079=>1000,20080=>1000,20081=>1000,20082=>1000,20083=>1000,20084=>1000, + 20085=>1000,20086=>1000,20087=>1000,20088=>1000,20089=>1000,20090=>1000,20091=>1000,20092=>1000,20093=>1000,20094=>1000,20095=>1000,20096=>1000,20097=>1000,20098=>1000,20099=>1000,20100=>1000, + 20101=>1000,20102=>1000,20103=>1000,20104=>1000,20105=>1000,20106=>1000,20107=>1000,20108=>1000,20109=>1000,20110=>1000,20111=>1000,20112=>1000,20113=>1000,20114=>1000,20115=>1000,20116=>1000, + 20117=>1000,20118=>1000,20119=>1000,20120=>1000,20121=>1000,20122=>1000,20123=>1000,20124=>1000,20125=>1000,20126=>1000,20127=>1000,20128=>1000,20129=>1000,20130=>1000,20131=>1000,20132=>1000, + 20133=>1000,20134=>1000,20135=>1000,20136=>1000,20137=>1000,20138=>1000,20139=>1000,20140=>1000,20141=>1000,20142=>1000,20143=>1000,20144=>1000,20145=>1000,20146=>1000,20147=>1000,20148=>1000, + 20149=>1000,20150=>1000,20151=>1000,20152=>1000,20153=>1000,20154=>1000,20155=>1000,20156=>1000,20157=>1000,20158=>1000,20159=>1000,20160=>1000,20161=>1000,20162=>1000,20163=>1000,20164=>1000, + 20165=>1000,20166=>1000,20167=>1000,20168=>1000,20169=>1000,20170=>1000,20171=>1000,20172=>1000,20173=>1000,20174=>1000,20175=>1000,20176=>1000,20177=>1000,20178=>1000,20179=>1000,20180=>1000, + 20181=>1000,20182=>1000,20183=>1000,20184=>1000,20185=>1000,20186=>1000,20187=>1000,20188=>1000,20189=>1000,20190=>1000,20191=>1000,20192=>1000,20193=>1000,20194=>1000,20195=>1000,20196=>1000, + 20197=>1000,20198=>1000,20199=>1000,20200=>1000,20201=>1000,20202=>1000,20203=>1000,20204=>1000,20205=>1000,20206=>1000,20207=>1000,20208=>1000,20209=>1000,20210=>1000,20211=>1000,20212=>1000, + 20213=>1000,20214=>1000,20215=>1000,20216=>1000,20217=>1000,20218=>1000,20219=>1000,20220=>1000,20221=>1000,20222=>1000,20223=>1000,20224=>1000,20225=>1000,20226=>1000,20227=>1000,20228=>1000, + 20229=>1000,20230=>1000,20231=>1000,20232=>1000,20233=>1000,20234=>1000,20235=>1000,20236=>1000,20237=>1000,20238=>1000,20239=>1000,20240=>1000,20241=>1000,20242=>1000,20243=>1000,20244=>1000, + 20245=>1000,20246=>1000,20247=>1000,20248=>1000,20249=>1000,20250=>1000,20251=>1000,20252=>1000,20253=>1000,20254=>1000,20255=>1000,20256=>1000,20257=>1000,20258=>1000,20259=>1000,20260=>1000, + 20261=>1000,20262=>1000,20263=>1000,20264=>1000,20265=>1000,20266=>1000,20267=>1000,20268=>1000,20269=>1000,20270=>1000,20271=>1000,20272=>1000,20273=>1000,20274=>1000,20275=>1000,20276=>1000, + 20277=>1000,20278=>1000,20279=>1000,20280=>1000,20281=>1000,20282=>1000,20283=>1000,20284=>1000,20285=>1000,20286=>1000,20287=>1000,20288=>1000,20289=>1000,20290=>1000,20291=>1000,20292=>1000, + 20293=>1000,20294=>1000,20295=>1000,20296=>1000,20297=>1000,20298=>1000,20299=>1000,20300=>1000,20301=>1000,20302=>1000,20303=>1000,20304=>1000,20305=>1000,20306=>1000,20307=>1000,20308=>1000, + 20309=>1000,20310=>1000,20311=>1000,20312=>1000,20313=>1000,20314=>1000,20315=>1000,20316=>1000,20317=>1000,20318=>1000,20319=>1000,20320=>1000,20321=>1000,20322=>1000,20323=>1000,20324=>1000, + 20325=>1000,20326=>1000,20327=>1000,20328=>1000,20329=>1000,20330=>1000,20331=>1000,20332=>1000,20333=>1000,20334=>1000,20335=>1000,20336=>1000,20337=>1000,20338=>1000,20339=>1000,20340=>1000, + 20341=>1000,20342=>1000,20343=>1000,20344=>1000,20345=>1000,20346=>1000,20347=>1000,20348=>1000,20349=>1000,20350=>1000,20351=>1000,20352=>1000,20353=>1000,20354=>1000,20355=>1000,20356=>1000, + 20357=>1000,20358=>1000,20359=>1000,20360=>1000,20361=>1000,20362=>1000,20363=>1000,20364=>1000,20365=>1000,20366=>1000,20367=>1000,20368=>1000,20369=>1000,20370=>1000,20371=>1000,20372=>1000, + 20373=>1000,20374=>1000,20375=>1000,20376=>1000,20377=>1000,20378=>1000,20379=>1000,20380=>1000,20381=>1000,20382=>1000,20383=>1000,20384=>1000,20385=>1000,20386=>1000,20387=>1000,20388=>1000, + 20389=>1000,20390=>1000,20391=>1000,20392=>1000,20393=>1000,20394=>1000,20395=>1000,20396=>1000,20397=>1000,20398=>1000,20399=>1000,20400=>1000,20401=>1000,20402=>1000,20403=>1000,20404=>1000, + 20405=>1000,20406=>1000,20407=>1000,20408=>1000,20409=>1000,20410=>1000,20411=>1000,20412=>1000,20413=>1000,20414=>1000,20415=>1000,20416=>1000,20417=>1000,20418=>1000,20419=>1000,20420=>1000, + 20421=>1000,20422=>1000,20423=>1000,20424=>1000,20425=>1000,20426=>1000,20427=>1000,20428=>1000,20429=>1000,20430=>1000,20431=>1000,20432=>1000,20433=>1000,20434=>1000,20435=>1000,20436=>1000, + 20437=>1000,20438=>1000,20439=>1000,20440=>1000,20441=>1000,20442=>1000,20443=>1000,20444=>1000,20445=>1000,20446=>1000,20447=>1000,20448=>1000,20449=>1000,20450=>1000,20451=>1000,20452=>1000, + 20453=>1000,20454=>1000,20455=>1000,20456=>1000,20457=>1000,20458=>1000,20459=>1000,20460=>1000,20461=>1000,20462=>1000,20463=>1000,20464=>1000,20465=>1000,20466=>1000,20467=>1000,20468=>1000, + 20469=>1000,20470=>1000,20471=>1000,20472=>1000,20473=>1000,20474=>1000,20475=>1000,20476=>1000,20477=>1000,20478=>1000,20479=>1000,20480=>1000,20481=>1000,20482=>1000,20483=>1000,20484=>1000, + 20485=>1000,20486=>1000,20487=>1000,20488=>1000,20489=>1000,20490=>1000,20491=>1000,20492=>1000,20493=>1000,20494=>1000,20495=>1000,20496=>1000,20497=>1000,20498=>1000,20499=>1000,20500=>1000, + 20501=>1000,20502=>1000,20503=>1000,20504=>1000,20505=>1000,20506=>1000,20507=>1000,20508=>1000,20509=>1000,20510=>1000,20511=>1000,20512=>1000,20513=>1000,20514=>1000,20515=>1000,20516=>1000, + 20517=>1000,20518=>1000,20519=>1000,20520=>1000,20521=>1000,20522=>1000,20523=>1000,20524=>1000,20525=>1000,20526=>1000,20527=>1000,20528=>1000,20529=>1000,20530=>1000,20531=>1000,20532=>1000, + 20533=>1000,20534=>1000,20535=>1000,20536=>1000,20537=>1000,20538=>1000,20539=>1000,20540=>1000,20541=>1000,20542=>1000,20543=>1000,20544=>1000,20545=>1000,20546=>1000,20547=>1000,20548=>1000, + 20549=>1000,20550=>1000,20551=>1000,20552=>1000,20553=>1000,20554=>1000,20555=>1000,20556=>1000,20557=>1000,20558=>1000,20559=>1000,20560=>1000,20561=>1000,20562=>1000,20563=>1000,20564=>1000, + 20565=>1000,20566=>1000,20567=>1000,20568=>1000,20569=>1000,20570=>1000,20571=>1000,20572=>1000,20573=>1000,20574=>1000,20575=>1000,20576=>1000,20577=>1000,20578=>1000,20579=>1000,20580=>1000, + 20581=>1000,20582=>1000,20583=>1000,20584=>1000,20585=>1000,20586=>1000,20587=>1000,20588=>1000,20589=>1000,20590=>1000,20591=>1000,20592=>1000,20593=>1000,20594=>1000,20595=>1000,20596=>1000, + 20597=>1000,20598=>1000,20599=>1000,20600=>1000,20601=>1000,20602=>1000,20603=>1000,20604=>1000,20605=>1000,20606=>1000,20607=>1000,20608=>1000,20609=>1000,20610=>1000,20611=>1000,20612=>1000, + 20613=>1000,20614=>1000,20615=>1000,20616=>1000,20617=>1000,20618=>1000,20619=>1000,20620=>1000,20621=>1000,20622=>1000,20623=>1000,20624=>1000,20625=>1000,20626=>1000,20627=>1000,20628=>1000, + 20629=>1000,20630=>1000,20631=>1000,20632=>1000,20633=>1000,20634=>1000,20635=>1000,20636=>1000,20637=>1000,20638=>1000,20639=>1000,20640=>1000,20641=>1000,20642=>1000,20643=>1000,20644=>1000, + 20645=>1000,20646=>1000,20647=>1000,20648=>1000,20649=>1000,20650=>1000,20651=>1000,20652=>1000,20653=>1000,20654=>1000,20655=>1000,20656=>1000,20657=>1000,20658=>1000,20659=>1000,20660=>1000, + 20661=>1000,20662=>1000,20663=>1000,20664=>1000,20665=>1000,20666=>1000,20667=>1000,20668=>1000,20669=>1000,20670=>1000,20671=>1000,20672=>1000,20673=>1000,20674=>1000,20675=>1000,20676=>1000, + 20677=>1000,20678=>1000,20679=>1000,20680=>1000,20681=>1000,20682=>1000,20683=>1000,20684=>1000,20685=>1000,20686=>1000,20687=>1000,20688=>1000,20689=>1000,20690=>1000,20691=>1000,20692=>1000, + 20693=>1000,20694=>1000,20695=>1000,20696=>1000,20697=>1000,20698=>1000,20699=>1000,20700=>1000,20701=>1000,20702=>1000,20703=>1000,20704=>1000,20705=>1000,20706=>1000,20707=>1000,20708=>1000, + 20709=>1000,20710=>1000,20711=>1000,20712=>1000,20713=>1000,20714=>1000,20715=>1000,20716=>1000,20717=>1000,20718=>1000,20719=>1000,20720=>1000,20721=>1000,20722=>1000,20723=>1000,20724=>1000, + 20725=>1000,20726=>1000,20727=>1000,20728=>1000,20729=>1000,20730=>1000,20731=>1000,20732=>1000,20733=>1000,20734=>1000,20735=>1000,20736=>1000,20737=>1000,20738=>1000,20739=>1000,20740=>1000, + 20741=>1000,20742=>1000,20743=>1000,20744=>1000,20745=>1000,20746=>1000,20747=>1000,20748=>1000,20749=>1000,20750=>1000,20751=>1000,20752=>1000,20753=>1000,20754=>1000,20755=>1000,20756=>1000, + 20757=>1000,20758=>1000,20759=>1000,20760=>1000,20761=>1000,20762=>1000,20763=>1000,20764=>1000,20765=>1000,20766=>1000,20767=>1000,20768=>1000,20769=>1000,20770=>1000,20771=>1000,20772=>1000, + 20773=>1000,20774=>1000,20775=>1000,20776=>1000,20777=>1000,20778=>1000,20779=>1000,20780=>1000,20781=>1000,20782=>1000,20783=>1000,20784=>1000,20785=>1000,20786=>1000,20787=>1000,20788=>1000, + 20789=>1000,20790=>1000,20791=>1000,20792=>1000,20793=>1000,20794=>1000,20795=>1000,20796=>1000,20797=>1000,20798=>1000,20799=>1000,20800=>1000,20801=>1000,20802=>1000,20803=>1000,20804=>1000, + 20805=>1000,20806=>1000,20807=>1000,20808=>1000,20809=>1000,20810=>1000,20811=>1000,20812=>1000,20813=>1000,20814=>1000,20815=>1000,20816=>1000,20817=>1000,20818=>1000,20819=>1000,20820=>1000, + 20821=>1000,20822=>1000,20823=>1000,20824=>1000,20825=>1000,20826=>1000,20827=>1000,20828=>1000,20829=>1000,20830=>1000,20831=>1000,20832=>1000,20833=>1000,20834=>1000,20835=>1000,20836=>1000, + 20837=>1000,20838=>1000,20839=>1000,20840=>1000,20841=>1000,20842=>1000,20843=>1000,20844=>1000,20845=>1000,20846=>1000,20847=>1000,20848=>1000,20849=>1000,20850=>1000,20851=>1000,20852=>1000, + 20853=>1000,20854=>1000,20855=>1000,20856=>1000,20857=>1000,20858=>1000,20859=>1000,20860=>1000,20861=>1000,20862=>1000,20863=>1000,20864=>1000,20865=>1000,20866=>1000,20867=>1000,20868=>1000, + 20869=>1000,20870=>1000,20871=>1000,20872=>1000,20873=>1000,20874=>1000,20875=>1000,20876=>1000,20877=>1000,20878=>1000,20879=>1000,20880=>1000,20881=>1000,20882=>1000,20883=>1000,20884=>1000, + 20885=>1000,20886=>1000,20887=>1000,20888=>1000,20889=>1000,20890=>1000,20891=>1000,20892=>1000,20893=>1000,20894=>1000,20895=>1000,20896=>1000,20897=>1000,20898=>1000,20899=>1000,20900=>1000, + 20901=>1000,20902=>1000,20903=>1000,20904=>1000,20905=>1000,20906=>1000,20907=>1000,20908=>1000,20909=>1000,20910=>1000,20911=>1000,20912=>1000,20913=>1000,20914=>1000,20915=>1000,20916=>1000, + 20917=>1000,20918=>1000,20919=>1000,20920=>1000,20921=>1000,20922=>1000,20923=>1000,20924=>1000,20925=>1000,20926=>1000,20927=>1000,20928=>1000,20929=>1000,20930=>1000,20931=>1000,20932=>1000, + 20933=>1000,20934=>1000,20935=>1000,20936=>1000,20937=>1000,20938=>1000,20939=>1000,20940=>1000,20941=>1000,20942=>1000,20943=>1000,20944=>1000,20945=>1000,20946=>1000,20947=>1000,20948=>1000, + 20949=>1000,20950=>1000,20951=>1000,20952=>1000,20953=>1000,20954=>1000,20955=>1000,20956=>1000,20957=>1000,20958=>1000,20959=>1000,20960=>1000,20961=>1000,20962=>1000,20963=>1000,20964=>1000, + 20965=>1000,20966=>1000,20967=>1000,20968=>1000,20969=>1000,20970=>1000,20971=>1000,20972=>1000,20973=>1000,20974=>1000,20975=>1000,20976=>1000,20977=>1000,20978=>1000,20979=>1000,20980=>1000, + 20981=>1000,20982=>1000,20983=>1000,20984=>1000,20985=>1000,20986=>1000,20987=>1000,20988=>1000,20989=>1000,20990=>1000,20991=>1000,20992=>1000,20993=>1000,20994=>1000,20995=>1000,20996=>1000, + 20997=>1000,20998=>1000,20999=>1000,21000=>1000,21001=>1000,21002=>1000,21003=>1000,21004=>1000,21005=>1000,21006=>1000,21007=>1000,21008=>1000,21009=>1000,21010=>1000,21011=>1000,21012=>1000, + 21013=>1000,21014=>1000,21015=>1000,21016=>1000,21017=>1000,21018=>1000,21019=>1000,21020=>1000,21021=>1000,21022=>1000,21023=>1000,21024=>1000,21025=>1000,21026=>1000,21027=>1000,21028=>1000, + 21029=>1000,21030=>1000,21031=>1000,21032=>1000,21033=>1000,21034=>1000,21035=>1000,21036=>1000,21037=>1000,21038=>1000,21039=>1000,21040=>1000,21041=>1000,21042=>1000,21043=>1000,21044=>1000, + 21045=>1000,21046=>1000,21047=>1000,21048=>1000,21049=>1000,21050=>1000,21051=>1000,21052=>1000,21053=>1000,21054=>1000,21055=>1000,21056=>1000,21057=>1000,21058=>1000,21059=>1000,21060=>1000, + 21061=>1000,21062=>1000,21063=>1000,21064=>1000,21065=>1000,21066=>1000,21067=>1000,21068=>1000,21069=>1000,21070=>1000,21071=>1000,21072=>1000,21073=>1000,21074=>1000,21075=>1000,21076=>1000, + 21077=>1000,21078=>1000,21079=>1000,21080=>1000,21081=>1000,21082=>1000,21083=>1000,21084=>1000,21085=>1000,21086=>1000,21087=>1000,21088=>1000,21089=>1000,21090=>1000,21091=>1000,21092=>1000, + 21093=>1000,21094=>1000,21095=>1000,21096=>1000,21097=>1000,21098=>1000,21099=>1000,21100=>1000,21101=>1000,21102=>1000,21103=>1000,21104=>1000,21105=>1000,21106=>1000,21107=>1000,21108=>1000, + 21109=>1000,21110=>1000,21111=>1000,21112=>1000,21113=>1000,21114=>1000,21115=>1000,21116=>1000,21117=>1000,21118=>1000,21119=>1000,21120=>1000,21121=>1000,21122=>1000,21123=>1000,21124=>1000, + 21125=>1000,21126=>1000,21127=>1000,21128=>1000,21129=>1000,21130=>1000,21131=>1000,21132=>1000,21133=>1000,21134=>1000,21135=>1000,21136=>1000,21137=>1000,21138=>1000,21139=>1000,21140=>1000, + 21141=>1000,21142=>1000,21143=>1000,21144=>1000,21145=>1000,21146=>1000,21147=>1000,21148=>1000,21149=>1000,21150=>1000,21151=>1000,21152=>1000,21153=>1000,21154=>1000,21155=>1000,21156=>1000, + 21157=>1000,21158=>1000,21159=>1000,21160=>1000,21161=>1000,21162=>1000,21163=>1000,21164=>1000,21165=>1000,21166=>1000,21167=>1000,21168=>1000,21169=>1000,21170=>1000,21171=>1000,21172=>1000, + 21173=>1000,21174=>1000,21175=>1000,21176=>1000,21177=>1000,21178=>1000,21179=>1000,21180=>1000,21181=>1000,21182=>1000,21183=>1000,21184=>1000,21185=>1000,21186=>1000,21187=>1000,21188=>1000, + 21189=>1000,21190=>1000,21191=>1000,21192=>1000,21193=>1000,21194=>1000,21195=>1000,21196=>1000,21197=>1000,21198=>1000,21199=>1000,21200=>1000,21201=>1000,21202=>1000,21203=>1000,21204=>1000, + 21205=>1000,21206=>1000,21207=>1000,21208=>1000,21209=>1000,21210=>1000,21211=>1000,21212=>1000,21213=>1000,21214=>1000,21215=>1000,21216=>1000,21217=>1000,21218=>1000,21219=>1000,21220=>1000, + 21221=>1000,21222=>1000,21223=>1000,21224=>1000,21225=>1000,21226=>1000,21227=>1000,21228=>1000,21229=>1000,21230=>1000,21231=>1000,21232=>1000,21233=>1000,21234=>1000,21235=>1000,21236=>1000, + 21237=>1000,21238=>1000,21239=>1000,21240=>1000,21241=>1000,21242=>1000,21243=>1000,21244=>1000,21245=>1000,21246=>1000,21247=>1000,21248=>1000,21249=>1000,21250=>1000,21251=>1000,21252=>1000, + 21253=>1000,21254=>1000,21255=>1000,21256=>1000,21257=>1000,21258=>1000,21259=>1000,21260=>1000,21261=>1000,21262=>1000,21263=>1000,21264=>1000,21265=>1000,21266=>1000,21267=>1000,21268=>1000, + 21269=>1000,21270=>1000,21271=>1000,21272=>1000,21273=>1000,21274=>1000,21275=>1000,21276=>1000,21277=>1000,21278=>1000,21279=>1000,21280=>1000,21281=>1000,21282=>1000,21283=>1000,21284=>1000, + 21285=>1000,21286=>1000,21287=>1000,21288=>1000,21289=>1000,21290=>1000,21291=>1000,21292=>1000,21293=>994,21294=>1000,21295=>1000,21296=>1000,21297=>1000,21298=>1000,21299=>1000,21300=>1000, + 21301=>1000,21302=>1000,21303=>1000,21304=>1000,21305=>1000,21306=>1000,21307=>1000,21308=>1000,21309=>1000,21310=>1000,21311=>1000,21312=>1000,21313=>1000,21314=>1000,21315=>1000,21316=>1000, + 21317=>1000,21318=>1000,21319=>1000,21320=>1000,21321=>1000,21322=>1000,21323=>1000,21324=>1000,21325=>1000,21326=>1000,21327=>1000,21328=>1000,21329=>1000,21330=>1000,21331=>1000,21332=>1000, + 21333=>1000,21334=>1000,21335=>1000,21336=>1000,21337=>1000,21338=>1000,21339=>1000,21340=>1000,21341=>1000,21342=>1000,21343=>1000,21344=>1000,21345=>1000,21346=>1000,21347=>1000,21348=>1000, + 21349=>1000,21350=>1000,21351=>1000,21352=>1000,21353=>1000,21354=>1000,21355=>1000,21356=>1000,21357=>1000,21358=>1000,21359=>1000,21360=>1000,21361=>1000,21362=>1000,21363=>1000,21364=>1000, + 21365=>1000,21366=>1000,21367=>1000,21368=>1000,21369=>1000,21370=>1000,21371=>1000,21372=>1000,21373=>1000,21374=>1000,21375=>1000,21376=>1000,21377=>1000,21378=>1000,21379=>1000,21380=>1000, + 21381=>1000,21382=>1000,21383=>1000,21384=>1000,21385=>1000,21386=>1000,21387=>1000,21388=>1000,21389=>1000,21390=>1000,21391=>1000,21392=>1000,21393=>1000,21394=>1000,21395=>1000,21396=>1000, + 21397=>1000,21398=>1000,21399=>1000,21400=>1000,21401=>1000,21402=>1000,21403=>1000,21404=>1000,21405=>1000,21406=>1000,21407=>1000,21408=>1000,21409=>1000,21410=>1000,21411=>1000,21412=>1000, + 21413=>1000,21414=>1000,21415=>1000,21416=>1000,21417=>1000,21418=>1000,21419=>1000,21420=>1000,21421=>1000,21422=>1000,21423=>1000,21424=>1000,21425=>1000,21426=>1000,21427=>1000,21428=>1000, + 21429=>1000,21430=>1000,21431=>1000,21432=>1000,21433=>1000,21434=>1000,21435=>1000,21436=>1000,21437=>1000,21438=>1000,21439=>1000,21440=>1000,21441=>1000,21442=>1000,21443=>1000,21444=>1000, + 21445=>1000,21446=>1000,21447=>1000,21448=>1000,21449=>1000,21450=>1000,21451=>1000,21452=>1000,21453=>1000,21454=>1000,21455=>1000,21456=>1000,21457=>1000,21458=>1000,21459=>1000,21460=>1000, + 21461=>1000,21462=>1000,21463=>1000,21464=>1000,21465=>1000,21466=>1000,21467=>1000,21468=>1000,21469=>1000,21470=>1000,21471=>1000,21472=>1000,21473=>1000,21474=>1000,21475=>1000,21476=>1000, + 21477=>1000,21478=>1000,21479=>1000,21480=>1000,21481=>1000,21482=>1000,21483=>1000,21484=>1000,21485=>1000,21486=>1000,21487=>1000,21488=>1000,21489=>1000,21490=>1000,21491=>1000,21492=>1000, + 21493=>1000,21494=>1000,21495=>1000,21496=>1000,21497=>1000,21498=>1000,21499=>1000,21500=>1000,21501=>1000,21502=>1000,21503=>1000,21504=>1000,21505=>1000,21506=>1000,21507=>1000,21508=>1000, + 21509=>1000,21510=>1000,21511=>1000,21512=>1000,21513=>1000,21514=>1000,21515=>1000,21516=>1000,21517=>1000,21518=>1000,21519=>1000,21520=>1000,21521=>1000,21522=>1000,21523=>1000,21524=>1000, + 21525=>1000,21526=>1000,21527=>1000,21528=>1000,21529=>1000,21530=>1000,21531=>1000,21532=>1000,21533=>1000,21534=>1000,21535=>1000,21536=>1000,21537=>1000,21538=>1000,21539=>1000,21540=>1000, + 21541=>1000,21542=>1000,21543=>1000,21544=>1000,21545=>1000,21546=>1000,21547=>1000,21548=>1000,21549=>1000,21550=>1000,21551=>1000,21552=>1000,21553=>1000,21554=>1000,21555=>1000,21556=>1000, + 21557=>1000,21558=>1000,21559=>1000,21560=>1000,21561=>1000,21562=>1000,21563=>1000,21564=>1000,21565=>1000,21566=>1000,21567=>1000,21568=>1000,21569=>1000,21570=>1000,21571=>1000,21572=>1000, + 21573=>1000,21574=>1000,21575=>1000,21576=>1000,21577=>1000,21578=>1000,21579=>1000,21580=>1000,21581=>1000,21582=>1000,21583=>1000,21584=>1000,21585=>1000,21586=>1000,21587=>1000,21588=>1000, + 21589=>1000,21590=>1000,21591=>1000,21592=>1000,21593=>1000,21594=>1000,21595=>1000,21596=>1000,21597=>1000,21598=>1000,21599=>1000,21600=>1000,21601=>1000,21602=>1000,21603=>1000,21604=>1000, + 21605=>1000,21606=>1000,21607=>1000,21608=>1000,21609=>1000,21610=>1000,21611=>1000,21612=>1000,21613=>1000,21614=>1000,21615=>1000,21616=>1000,21617=>1000,21618=>1000,21619=>1000,21620=>1000, + 21621=>1000,21622=>1000,21623=>1000,21624=>1000,21625=>1000,21626=>1000,21627=>1000,21628=>1000,21629=>1000,21630=>1000,21631=>1000,21632=>1000,21633=>1000,21634=>1000,21635=>1000,21636=>1000, + 21637=>1000,21638=>1000,21639=>1000,21640=>1000,21641=>1000,21642=>1000,21643=>1000,21644=>1000,21645=>1000,21646=>1000,21647=>1000,21648=>1000,21649=>1000,21650=>1000,21651=>1000,21652=>1000, + 21653=>1000,21654=>1000,21655=>1000,21656=>1000,21657=>1000,21658=>1000,21659=>1000,21660=>1000,21661=>1000,21662=>1000,21663=>1000,21664=>1000,21665=>1000,21666=>1000,21667=>1000,21668=>1000, + 21669=>1000,21670=>1000,21671=>1000,21672=>1000,21673=>1000,21674=>1000,21675=>1000,21676=>1000,21677=>1000,21678=>1000,21679=>1000,21680=>1000,21681=>1000,21682=>1000,21683=>1000,21684=>1000, + 21685=>1000,21686=>1000,21687=>1000,21688=>1000,21689=>1000,21690=>1000,21691=>1000,21692=>1000,21693=>1000,21694=>1000,21695=>1000,21696=>1000,21697=>1000,21698=>1000,21699=>1000,21700=>1000, + 21701=>1000,21702=>1000,21703=>1000,21704=>1000,21705=>1000,21706=>1000,21707=>1000,21708=>1000,21709=>1000,21710=>1000,21711=>1000,21712=>1000,21713=>1000,21714=>1000,21715=>1000,21716=>1000, + 21717=>1000,21718=>1000,21719=>1000,21720=>1000,21721=>1000,21722=>1000,21723=>1000,21724=>1000,21725=>1000,21726=>1000,21727=>1000,21728=>1000,21729=>1000,21730=>1000,21731=>1000,21732=>1000, + 21733=>1000,21734=>1000,21735=>1000,21736=>1000,21737=>1000,21738=>1000,21739=>1000,21740=>1000,21741=>1000,21742=>1000,21743=>1000,21744=>1000,21745=>1000,21746=>1000,21747=>1000,21748=>1000, + 21749=>1000,21750=>1000,21751=>1000,21752=>1000,21753=>1000,21754=>1000,21755=>1000,21756=>1000,21757=>1000,21758=>1000,21759=>1000,21760=>1000,21761=>1000,21762=>1000,21763=>1000,21764=>1000, + 21765=>1000,21766=>1000,21767=>1000,21768=>1000,21769=>1000,21770=>1000,21771=>1000,21772=>1000,21773=>1000,21774=>1000,21775=>1000,21776=>1000,21777=>1000,21778=>1000,21779=>1000,21780=>1000, + 21781=>1000,21782=>1000,21783=>1000,21784=>1000,21785=>1000,21786=>1000,21787=>1000,21788=>1000,21789=>1000,21790=>1000,21791=>1000,21792=>1000,21793=>1000,21794=>1000,21795=>1000,21796=>1000, + 21797=>1000,21798=>1000,21799=>1000,21800=>1000,21801=>1000,21802=>1000,21803=>1000,21804=>1000,21805=>1000,21806=>1000,21807=>1000,21808=>1000,21809=>1000,21810=>1000,21811=>1000,21812=>1000, + 21813=>1000,21814=>1000,21815=>1000,21816=>1000,21817=>1000,21818=>1000,21819=>1000,21820=>1000,21821=>1000,21822=>1000,21823=>1000,21824=>1000,21825=>1000,21826=>1000,21827=>1000,21828=>1000, + 21829=>1000,21830=>1000,21831=>1000,21832=>1000,21833=>1000,21834=>1000,21835=>1000,21836=>1000,21837=>1000,21838=>1000,21839=>1000,21840=>1000,21841=>1000,21842=>1000,21843=>1000,21844=>1000, + 21845=>1000,21846=>1000,21847=>1000,21848=>1000,21849=>1000,21850=>1000,21851=>1000,21852=>1000,21853=>1000,21854=>1000,21855=>1000,21856=>1000,21857=>1000,21858=>1000,21859=>1000,21860=>1000, + 21861=>1000,21862=>1000,21863=>1000,21864=>1000,21865=>1000,21866=>1000,21867=>1000,21868=>1000,21869=>1000,21870=>1000,21871=>1000,21872=>1000,21873=>1000,21874=>1000,21875=>1000,21876=>1000, + 21877=>1000,21878=>1000,21879=>1000,21880=>1000,21881=>1000,21882=>1000,21883=>1000,21884=>1000,21885=>1000,21886=>1000,21887=>1000,21888=>1000,21889=>1000,21890=>1000,21891=>1000,21892=>1000, + 21893=>1000,21894=>1000,21895=>1000,21896=>1000,21897=>1000,21898=>1000,21899=>1000,21900=>1000,21901=>1000,21902=>1000,21903=>1000,21904=>1000,21905=>1000,21906=>1000,21907=>1000,21908=>1000, + 21909=>1000,21910=>1000,21911=>1000,21912=>1000,21913=>1000,21914=>1000,21915=>1000,21916=>1000,21917=>1000,21918=>1000,21919=>1000,21920=>1000,21921=>1000,21922=>1000,21923=>1000,21924=>1000, + 21925=>1000,21926=>1000,21927=>1000,21928=>1000,21929=>1000,21930=>1000,21931=>1000,21932=>1000,21933=>1000,21934=>1000,21935=>1000,21936=>1000,21937=>1000,21938=>1000,21939=>1000,21940=>1000, + 21941=>1000,21942=>1000,21943=>1000,21944=>1000,21945=>1000,21946=>1000,21947=>1000,21948=>1000,21949=>1000,21950=>1000,21951=>1000,21952=>1000,21953=>1000,21954=>1000,21955=>1000,21956=>1000, + 21957=>1000,21958=>1000,21959=>1000,21960=>1000,21961=>1000,21962=>1000,21963=>1000,21964=>1000,21965=>1000,21966=>1000,21967=>1000,21968=>1000,21969=>1000,21970=>1000,21971=>1000,21972=>1000, + 21973=>1000,21974=>1000,21975=>1000,21976=>1000,21977=>1000,21978=>1000,21979=>1000,21980=>1000,21981=>1000,21982=>1000,21983=>1000,21984=>1000,21985=>1000,21986=>1000,21987=>1000,21988=>1000, + 21989=>1000,21990=>1000,21991=>1000,21992=>1000,21993=>1000,21994=>1000,21995=>1000,21996=>1000,21997=>1000,21998=>1000,21999=>1000,22000=>1000,22001=>1000,22002=>1000,22003=>1000,22004=>1000, + 22005=>1000,22006=>1000,22007=>1000,22008=>1000,22009=>1000,22010=>1000,22011=>1000,22012=>1000,22013=>1000,22014=>1000,22015=>1000,22016=>1000,22017=>1000,22018=>1000,22019=>1000,22020=>1000, + 22021=>1000,22022=>1000,22023=>1000,22024=>1000,22025=>1000,22026=>1000,22027=>1000,22028=>1000,22029=>1000,22030=>1000,22031=>1000,22032=>1000,22033=>1000,22034=>1000,22035=>1000,22036=>1000, + 22037=>1000,22038=>1000,22039=>1000,22040=>1000,22041=>1000,22042=>1000,22043=>1000,22044=>1000,22045=>1000,22046=>1000,22047=>1000,22048=>1000,22049=>1000,22050=>1000,22051=>1000,22052=>1000, + 22053=>1000,22054=>1000,22055=>1000,22056=>1000,22057=>1000,22058=>1000,22059=>1000,22060=>1000,22061=>1000,22062=>1000,22063=>1000,22064=>1000,22065=>1000,22066=>1000,22067=>1000,22068=>1000, + 22069=>1000,22070=>1000,22071=>1000,22072=>1000,22073=>1000,22074=>1000,22075=>1000,22076=>1000,22077=>1000,22078=>1000,22079=>1000,22080=>1000,22081=>1000,22082=>1000,22083=>1000,22084=>1000, + 22085=>1000,22086=>1000,22087=>1000,22088=>1000,22089=>1000,22090=>1000,22091=>1000,22092=>1000,22093=>1000,22094=>1000,22095=>1000,22096=>1000,22097=>1000,22098=>1000,22099=>1000,22100=>1000, + 22101=>1000,22102=>1000,22103=>1000,22104=>1000,22105=>1000,22106=>1000,22107=>1000,22108=>1000,22109=>1000,22110=>1000,22111=>1000,22112=>1000,22113=>1000,22114=>1000,22115=>1000,22116=>1000, + 22117=>1000,22118=>1000,22119=>1000,22120=>1000,22121=>1000,22122=>1000,22123=>1000,22124=>1000,22125=>1000,22126=>1000,22127=>1000,22128=>1000,22129=>1000,22130=>1000,22131=>1000,22132=>1000, + 22133=>1000,22134=>1000,22135=>1000,22136=>1000,22137=>1000,22138=>1000,22139=>1000,22140=>1000,22141=>1000,22142=>1000,22143=>1000,22144=>1000,22145=>1000,22146=>1000,22147=>1000,22148=>1000, + 22149=>1000,22150=>1000,22151=>1000,22152=>1000,22153=>1000,22154=>1000,22155=>1000,22156=>1000,22157=>1000,22158=>1000,22159=>1000,22160=>1000,22161=>1000,22162=>1000,22163=>1000,22164=>1000, + 22165=>1000,22166=>1000,22167=>1000,22168=>1000,22169=>1000,22170=>1000,22171=>1000,22172=>1000,22173=>1000,22174=>1000,22175=>1000,22176=>1000,22177=>1000,22178=>1000,22179=>1000,22180=>1000, + 22181=>1000,22182=>1000,22183=>1000,22184=>1000,22185=>1000,22186=>1000,22187=>1000,22188=>1000,22189=>1000,22190=>1000,22191=>1000,22192=>1000,22193=>1000,22194=>1000,22195=>1000,22196=>1000, + 22197=>1000,22198=>1000,22199=>1000,22200=>1000,22201=>1000,22202=>1000,22203=>1000,22204=>1000,22205=>1000,22206=>1000,22207=>1000,22208=>1000,22209=>1000,22210=>1000,22211=>1000,22212=>1000, + 22213=>1000,22214=>1000,22215=>1000,22216=>1000,22217=>1000,22218=>1000,22219=>1000,22220=>1000,22221=>1000,22222=>1000,22223=>1000,22224=>1000,22225=>1000,22226=>1000,22227=>1000,22228=>1000, + 22229=>1000,22230=>1000,22231=>1000,22232=>1000,22233=>1000,22234=>1000,22235=>1000,22236=>1000,22237=>1000,22238=>1000,22239=>1000,22240=>1000,22241=>1000,22242=>1000,22243=>1000,22244=>1000, + 22245=>1000,22246=>1000,22247=>1000,22248=>1000,22249=>1000,22250=>1000,22251=>1000,22252=>1000,22253=>1000,22254=>1000,22255=>1000,22256=>1000,22257=>1000,22258=>1000,22259=>1000,22260=>1000, + 22261=>1000,22262=>1000,22263=>1000,22264=>1000,22265=>1000,22266=>1000,22267=>1000,22268=>1000,22269=>1000,22270=>1000,22271=>1000,22272=>1000,22273=>1000,22274=>1000,22275=>1000,22276=>1000, + 22277=>1000,22278=>1000,22279=>1000,22280=>1000,22281=>1000,22282=>1000,22283=>1000,22284=>1000,22285=>1000,22286=>1000,22287=>1000,22288=>1000,22289=>1000,22290=>1000,22291=>1000,22292=>1000, + 22293=>1000,22294=>1000,22295=>1000,22296=>1000,22297=>1000,22298=>1000,22299=>1000,22300=>1000,22301=>1000,22302=>1000,22303=>1000,22304=>1000,22305=>1000,22306=>1000,22307=>1000,22308=>1000, + 22309=>1000,22310=>1000,22311=>1000,22312=>1000,22313=>1000,22314=>1000,22315=>1000,22316=>1000,22317=>1000,22318=>1000,22319=>1000,22320=>1000,22321=>1000,22322=>1000,22323=>1000,22324=>1000, + 22325=>1000,22326=>1000,22327=>1000,22328=>1000,22329=>1000,22330=>1000,22331=>1000,22332=>1000,22333=>1000,22334=>1000,22335=>1000,22336=>1000,22337=>1000,22338=>1000,22339=>1000,22340=>1000, + 22341=>1000,22342=>1000,22343=>1000,22344=>1000,22345=>1000,22346=>1000,22347=>1000,22348=>1000,22349=>1000,22350=>1000,22351=>1000,22352=>1000,22353=>1000,22354=>1000,22355=>1000,22356=>1000, + 22357=>1000,22358=>1000,22359=>1000,22360=>1000,22361=>1000,22362=>1000,22363=>1000,22364=>1000,22365=>1000,22366=>1000,22367=>1000,22368=>1000,22369=>1000,22370=>1000,22371=>1000,22372=>1000, + 22373=>1000,22374=>1000,22375=>1000,22376=>1000,22377=>1000,22378=>1000,22379=>1000,22380=>1000,22381=>1000,22382=>1000,22383=>1000,22384=>1000,22385=>1000,22386=>1000,22387=>1000,22388=>1000, + 22389=>1000,22390=>1000,22391=>1000,22392=>1000,22393=>1000,22394=>1000,22395=>1000,22396=>1000,22397=>1000,22398=>1000,22399=>1000,22400=>1000,22401=>1000,22402=>1000,22403=>1000,22404=>1000, + 22405=>1000,22406=>1000,22407=>1000,22408=>1000,22409=>1000,22410=>1000,22411=>1000,22412=>1000,22413=>1000,22414=>1000,22415=>1000,22416=>1000,22417=>1000,22418=>1000,22419=>1000,22420=>1000, + 22421=>1000,22422=>1000,22423=>1000,22424=>1000,22425=>1000,22426=>1000,22427=>1000,22428=>1000,22429=>1000,22430=>1000,22431=>1000,22432=>1000,22433=>1000,22434=>1000,22435=>1000,22436=>1000, + 22437=>1000,22438=>1000,22439=>1000,22440=>1000,22441=>1000,22442=>1000,22443=>1000,22444=>1000,22445=>1000,22446=>1000,22447=>1000,22448=>1000,22449=>1000,22450=>1000,22451=>1000,22452=>1000, + 22453=>1000,22454=>1000,22455=>1000,22456=>1000,22457=>1000,22458=>1000,22459=>1000,22460=>1000,22461=>1000,22462=>1000,22463=>1000,22464=>1000,22465=>1000,22466=>1000,22467=>1000,22468=>1000, + 22469=>1000,22470=>1000,22471=>1000,22472=>1000,22473=>1000,22474=>1000,22475=>1000,22476=>1000,22477=>1000,22478=>1000,22479=>1000,22480=>1000,22481=>1000,22482=>1000,22483=>1000,22484=>1000, + 22485=>1000,22486=>1000,22487=>1000,22488=>1000,22489=>1000,22490=>1000,22491=>1000,22492=>1000,22493=>1000,22494=>1000,22495=>1000,22496=>1000,22497=>1000,22498=>1000,22499=>1000,22500=>1000, + 22501=>1000,22502=>1000,22503=>1000,22504=>1000,22505=>1000,22506=>1000,22507=>1000,22508=>1000,22509=>1000,22510=>1000,22511=>1000,22512=>1000,22513=>1000,22514=>1000,22515=>1000,22516=>1000, + 22517=>1000,22518=>1000,22519=>1000,22520=>1000,22521=>1000,22522=>1000,22523=>1000,22524=>1000,22525=>1000,22526=>1000,22527=>1000,22528=>1000,22529=>1000,22530=>1000,22531=>1000,22532=>1000, + 22533=>1000,22534=>1000,22535=>1000,22536=>1000,22537=>1000,22538=>1000,22539=>1000,22540=>1000,22541=>1000,22542=>1000,22543=>1000,22544=>1000,22545=>1000,22546=>1000,22547=>1000,22548=>1000, + 22549=>1000,22550=>1000,22551=>1000,22552=>1000,22553=>1000,22554=>1000,22555=>1000,22556=>1000,22557=>1000,22558=>1000,22559=>1000,22560=>1000,22561=>1000,22562=>1000,22563=>1000,22564=>1000, + 22565=>1000,22566=>1000,22567=>1000,22568=>1000,22569=>1000,22570=>1000,22571=>1000,22572=>1000,22573=>1000,22574=>1000,22575=>1000,22576=>1000,22577=>1000,22578=>1000,22579=>1000,22580=>1000, + 22581=>1000,22582=>1000,22583=>1000,22584=>1000,22585=>1000,22586=>1000,22587=>1000,22588=>1000,22589=>1000,22590=>1000,22591=>1000,22592=>1000,22593=>1000,22594=>1000,22595=>1000,22596=>1000, + 22597=>1000,22598=>1000,22599=>1000,22600=>1000,22601=>1000,22602=>1000,22603=>1000,22604=>1000,22605=>1000,22606=>1000,22607=>1000,22608=>1000,22609=>1000,22610=>1000,22611=>1000,22612=>1000, + 22613=>1000,22614=>1000,22615=>1000,22616=>1000,22617=>1000,22618=>1000,22619=>1000,22620=>1000,22621=>1000,22622=>1000,22623=>1000,22624=>1000,22625=>1000,22626=>1000,22627=>1000,22628=>1000, + 22629=>1000,22630=>1000,22631=>1000,22632=>1000,22633=>1000,22634=>1000,22635=>1000,22636=>1000,22637=>1000,22638=>1000,22639=>1000,22640=>1000,22641=>1000,22642=>1000,22643=>1000,22644=>1000, + 22645=>1000,22646=>1000,22647=>1000,22648=>1000,22649=>1000,22650=>1000,22651=>1000,22652=>1000,22653=>1000,22654=>1000,22655=>1000,22656=>1000,22657=>1000,22658=>1000,22659=>1000,22660=>1000, + 22661=>1000,22662=>1000,22663=>1000,22664=>1000,22665=>1000,22666=>1000,22667=>1000,22668=>1000,22669=>1000,22670=>1000,22671=>1000,22672=>1000,22673=>1000,22674=>1000,22675=>1000,22676=>1000, + 22677=>1000,22678=>1000,22679=>1000,22680=>1000,22681=>1000,22682=>1000,22683=>1000,22684=>1000,22685=>1000,22686=>1000,22687=>1000,22688=>1000,22689=>1000,22690=>1000,22691=>1000,22692=>1000, + 22693=>1000,22694=>1000,22695=>1000,22696=>1000,22697=>1000,22698=>1000,22699=>1000,22700=>1000,22701=>1000,22702=>1000,22703=>1000,22704=>1000,22705=>1000,22706=>1000,22707=>1000,22708=>1000, + 22709=>1000,22710=>1000,22711=>1000,22712=>1000,22713=>1000,22714=>1000,22715=>1000,22716=>1000,22717=>1000,22718=>1000,22719=>1000,22720=>1000,22721=>1000,22722=>1000,22723=>1000,22724=>1000, + 22725=>1000,22726=>1000,22727=>1000,22728=>1000,22729=>1000,22730=>1000,22731=>1000,22732=>1000,22733=>1000,22734=>1000,22735=>1000,22736=>1000,22737=>1000,22738=>1000,22739=>1000,22740=>1000, + 22741=>1000,22742=>1000,22743=>1000,22744=>1000,22745=>1000,22746=>1000,22747=>1000,22748=>1000,22749=>1000,22750=>1000,22751=>1000,22752=>1000,22753=>1000,22754=>1000,22755=>1000,22756=>1000, + 22757=>1000,22758=>1000,22759=>1000,22760=>1000,22761=>1000,22762=>1000,22763=>1000,22764=>1000,22765=>1000,22766=>1000,22767=>1000,22768=>1000,22769=>1000,22770=>1000,22771=>1000,22772=>1000, + 22773=>1000,22774=>1000,22775=>1000,22776=>1000,22777=>1000,22778=>1000,22779=>1000,22780=>1000,22781=>1000,22782=>1000,22783=>1000,22784=>1000,22785=>1000,22786=>1000,22787=>1000,22788=>1000, + 22789=>1000,22790=>1000,22791=>1000,22792=>1000,22793=>1000,22794=>1000,22795=>1000,22796=>1000,22797=>1000,22798=>1000,22799=>1000,22800=>1000,22801=>1000,22802=>1000,22803=>1000,22804=>1000, + 22805=>1000,22806=>1000,22807=>1000,22808=>1000,22809=>1000,22810=>1000,22811=>1000,22812=>1000,22813=>1000,22814=>1000,22815=>1000,22816=>1000,22817=>1000,22818=>1000,22819=>1000,22820=>1000, + 22821=>1000,22822=>1000,22823=>1000,22824=>1000,22825=>1000,22826=>1000,22827=>1000,22828=>1000,22829=>1000,22830=>1000,22831=>1000,22832=>1000,22833=>1000,22834=>1000,22835=>1000,22836=>1000, + 22837=>1000,22838=>1000,22839=>1000,22840=>1000,22841=>1000,22842=>1000,22843=>1000,22844=>1000,22845=>1000,22846=>1000,22847=>1000,22848=>1000,22849=>1000,22850=>1000,22851=>1000,22852=>1000, + 22853=>1000,22854=>1000,22855=>1000,22856=>1000,22857=>1000,22858=>1000,22859=>1000,22860=>1000,22861=>1000,22862=>1000,22863=>1000,22864=>1000,22865=>1000,22866=>1000,22867=>1000,22868=>1000, + 22869=>1000,22870=>1000,22871=>1000,22872=>1000,22873=>1000,22874=>1000,22875=>1000,22876=>1000,22877=>1000,22878=>1000,22879=>1000,22880=>1000,22881=>1000,22882=>1000,22883=>1000,22884=>1000, + 22885=>1000,22886=>1000,22887=>1000,22888=>1000,22889=>1000,22890=>1000,22891=>1000,22892=>1000,22893=>1000,22894=>1000,22895=>1000,22896=>1000,22897=>1000,22898=>1000,22899=>1000,22900=>1000, + 22901=>1000,22902=>1000,22903=>1000,22904=>1000,22905=>1000,22906=>1000,22907=>1000,22908=>1000,22909=>1000,22910=>1000,22911=>1000,22912=>1000,22913=>1000,22914=>1000,22915=>1000,22916=>1000, + 22917=>1000,22918=>1000,22919=>1000,22920=>1000,22921=>1000,22922=>1000,22923=>1000,22924=>1000,22925=>1000,22926=>1000,22927=>1000,22928=>1000,22929=>1000,22930=>1000,22931=>1000,22932=>1000, + 22933=>1000,22934=>1000,22935=>1000,22936=>1000,22937=>1000,22938=>1000,22939=>1000,22940=>1000,22941=>1000,22942=>1000,22943=>1000,22944=>1000,22945=>1000,22946=>1000,22947=>1000,22948=>1000, + 22949=>1000,22950=>1000,22951=>1000,22952=>1000,22953=>1000,22954=>1000,22955=>1000,22956=>1000,22957=>1000,22958=>1000,22959=>1000,22960=>1000,22961=>1000,22962=>1000,22963=>1000,22964=>1000, + 22965=>1000,22966=>1000,22967=>1000,22968=>1000,22969=>1000,22970=>1000,22971=>1000,22972=>1000,22973=>1000,22974=>1000,22975=>1000,22976=>1000,22977=>1000,22978=>1000,22979=>1000,22980=>1000, + 22981=>1000,22982=>1000,22983=>1000,22984=>1000,22985=>1000,22986=>1000,22987=>1000,22988=>1000,22989=>1000,22990=>1000,22991=>1000,22992=>1000,22993=>1000,22994=>1000,22995=>1000,22996=>1000, + 22997=>1000,22998=>1000,22999=>1000,23000=>1000,23001=>1000,23002=>1000,23003=>1000,23004=>1000,23005=>1000,23006=>1000,23007=>1000,23008=>1000,23009=>1000,23010=>1000,23011=>1000,23012=>1000, + 23013=>1000,23014=>1000,23015=>1000,23016=>1000,23017=>1000,23018=>1000,23019=>1000,23020=>1000,23021=>1000,23022=>1000,23023=>1000,23024=>1000,23025=>1000,23026=>1000,23027=>1000,23028=>1000, + 23029=>1000,23030=>1000,23031=>1000,23032=>1000,23033=>1000,23034=>1000,23035=>1000,23036=>1000,23037=>1000,23038=>1000,23039=>1000,23040=>1000,23041=>1000,23042=>1000,23043=>1000,23044=>1000, + 23045=>1000,23046=>1000,23047=>1000,23048=>1000,23049=>1000,23050=>1000,23051=>1000,23052=>1000,23053=>1000,23054=>1000,23055=>1000,23056=>1000,23057=>1000,23058=>1000,23059=>1000,23060=>1000, + 23061=>1000,23062=>1000,23063=>1000,23064=>1000,23065=>1000,23066=>1000,23067=>1000,23068=>1000,23069=>1000,23070=>1000,23071=>1000,23072=>1000,23073=>1000,23074=>1000,23075=>1000,23076=>1000, + 23077=>1000,23078=>1000,23079=>1000,23080=>1000,23081=>1000,23082=>1000,23083=>1000,23084=>1000,23085=>1000,23086=>1000,23087=>1000,23088=>1000,23089=>1000,23090=>1000,23091=>1000,23092=>1000, + 23093=>1000,23094=>1000,23095=>1000,23096=>1000,23097=>1000,23098=>1000,23099=>1000,23100=>1000,23101=>1000,23102=>1000,23103=>1000,23104=>1000,23105=>1000,23106=>1000,23107=>1000,23108=>1000, + 23109=>1000,23110=>1000,23111=>1000,23112=>1000,23113=>1000,23114=>1000,23115=>1000,23116=>1000,23117=>1000,23118=>1000,23119=>1000,23120=>1000,23121=>1000,23122=>1000,23123=>1000,23124=>1000, + 23125=>1000,23126=>1000,23127=>1000,23128=>1000,23129=>1000,23130=>1000,23131=>1000,23132=>1000,23133=>1000,23134=>1000,23135=>1000,23136=>1000,23137=>1000,23138=>1000,23139=>1000,23140=>1000, + 23141=>1000,23142=>1000,23143=>1000,23144=>1000,23145=>1000,23146=>1000,23147=>1000,23148=>1000,23149=>1000,23150=>1000,23151=>1000,23152=>1000,23153=>1000,23154=>1000,23155=>1000,23156=>1000, + 23157=>1000,23158=>1000,23159=>1000,23160=>1000,23161=>1000,23162=>1000,23163=>1000,23164=>1000,23165=>1000,23166=>1000,23167=>1000,23168=>1000,23169=>1000,23170=>1000,23171=>1000,23172=>1000, + 23173=>1000,23174=>1000,23175=>1000,23176=>1000,23177=>1000,23178=>1000,23179=>1000,23180=>1000,23181=>1000,23182=>1000,23183=>1000,23184=>1000,23185=>1000,23186=>1000,23187=>1000,23188=>1000, + 23189=>1000,23190=>1000,23191=>1000,23192=>1000,23193=>1000,23194=>1000,23195=>1000,23196=>1000,23197=>1000,23198=>1000,23199=>1000,23200=>1000,23201=>1000,23202=>1000,23203=>1000,23204=>1000, + 23205=>1000,23206=>1000,23207=>1000,23208=>1000,23209=>1000,23210=>1000,23211=>1000,23212=>1000,23213=>1000,23214=>1000,23215=>1000,23216=>1000,23217=>1000,23218=>1000,23219=>1000,23220=>1000, + 23221=>1000,23222=>1000,23223=>1000,23224=>1000,23225=>1000,23226=>1000,23227=>1000,23228=>1000,23229=>1000,23230=>1000,23231=>1000,23232=>1000,23233=>1000,23234=>1000,23235=>1000,23236=>1000, + 23237=>1000,23238=>1000,23239=>1000,23240=>1000,23241=>1000,23242=>1000,23243=>1000,23244=>1000,23245=>1000,23246=>1000,23247=>1000,23248=>1000,23249=>1000,23250=>1000,23251=>1000,23252=>1000, + 23253=>1000,23254=>1000,23255=>1000,23256=>1000,23257=>1000,23258=>1000,23259=>1000,23260=>1000,23261=>1000,23262=>1000,23263=>1000,23264=>1000,23265=>1000,23266=>1000,23267=>1000,23268=>1000, + 23269=>1000,23270=>1000,23271=>1000,23272=>1000,23273=>1000,23274=>1000,23275=>1000,23276=>1000,23277=>1000,23278=>1000,23279=>1000,23280=>1000,23281=>1000,23282=>1000,23283=>1000,23284=>1000, + 23285=>1000,23286=>1000,23287=>1000,23288=>1000,23289=>1000,23290=>1000,23291=>1000,23292=>1000,23293=>1000,23294=>1000,23295=>1000,23296=>1000,23297=>1000,23298=>1000,23299=>1000,23300=>1000, + 23301=>1000,23302=>1000,23303=>1000,23304=>1000,23305=>1000,23306=>1000,23307=>1000,23308=>1000,23309=>1000,23310=>1000,23311=>1000,23312=>1000,23313=>1000,23314=>1000,23315=>1000,23316=>1000, + 23317=>1000,23318=>1000,23319=>1000,23320=>1000,23321=>1000,23322=>1000,23323=>1000,23324=>1000,23325=>1000,23326=>1000,23327=>1000,23328=>1000,23329=>1000,23330=>1000,23331=>1000,23332=>1000, + 23333=>1000,23334=>1000,23335=>1000,23336=>1000,23337=>1000,23338=>1000,23339=>1000,23340=>1000,23341=>1000,23342=>1000,23343=>1000,23344=>1000,23345=>1000,23346=>1000,23347=>1000,23348=>1000, + 23349=>1000,23350=>1000,23351=>1000,23352=>1000,23353=>1000,23354=>1000,23355=>1000,23356=>1000,23357=>1000,23358=>1000,23359=>1000,23360=>1000,23361=>1000,23362=>1000,23363=>1000,23364=>1000, + 23365=>1000,23366=>1000,23367=>1000,23368=>1000,23369=>1000,23370=>1000,23371=>1000,23372=>1000,23373=>1000,23374=>1000,23375=>1000,23376=>1000,23377=>1000,23378=>1000,23379=>1000,23380=>1000, + 23381=>1000,23382=>1000,23383=>1000,23384=>1000,23385=>1000,23386=>1000,23387=>1000,23388=>1000,23389=>1000,23390=>1000,23391=>1000,23392=>1000,23393=>1000,23394=>1000,23395=>1000,23396=>1000, + 23397=>1000,23398=>1000,23399=>1000,23400=>1000,23401=>1000,23402=>1000,23403=>1000,23404=>1000,23405=>1000,23406=>1000,23407=>1000,23408=>1000,23409=>1000,23410=>1000,23411=>1000,23412=>1000, + 23413=>1000,23414=>1000,23415=>1000,23416=>1000,23417=>1000,23418=>1000,23419=>1000,23420=>1000,23421=>1000,23422=>1000,23423=>1000,23424=>1000,23425=>1000,23426=>1000,23427=>1000,23428=>1000, + 23429=>1000,23430=>1000,23431=>1000,23432=>1000,23433=>1000,23434=>1000,23435=>1000,23436=>1000,23437=>1000,23438=>1000,23439=>1000,23440=>1000,23441=>1000,23442=>1000,23443=>1000,23444=>1000, + 23445=>1000,23446=>1000,23447=>1000,23448=>1000,23449=>1000,23450=>1000,23451=>1000,23452=>1000,23453=>1000,23454=>1000,23455=>1000,23456=>1000,23457=>1000,23458=>1000,23459=>1000,23460=>1000, + 23461=>1000,23462=>1000,23463=>1000,23464=>1000,23465=>1000,23466=>1000,23467=>1000,23468=>1000,23469=>1000,23470=>1000,23471=>1000,23472=>1000,23473=>1000,23474=>1000,23475=>1000,23476=>1000, + 23477=>1000,23478=>1000,23479=>1000,23480=>1000,23481=>1000,23482=>1000,23483=>1000,23484=>1000,23485=>1000,23486=>1000,23487=>1000,23488=>1000,23489=>1000,23490=>1000,23491=>1000,23492=>1000, + 23493=>1000,23494=>1000,23495=>1000,23496=>1000,23497=>1000,23498=>1000,23499=>1000,23500=>1000,23501=>1000,23502=>1000,23503=>1000,23504=>1000,23505=>1000,23506=>1000,23507=>1000,23508=>1000, + 23509=>1000,23510=>1000,23511=>1000,23512=>1000,23513=>1000,23514=>1000,23515=>1000,23516=>1000,23517=>1000,23518=>1000,23519=>1000,23520=>1000,23521=>1000,23522=>1000,23523=>1000,23524=>1000, + 23525=>1000,23526=>1000,23527=>1000,23528=>1000,23529=>1000,23530=>1000,23531=>1000,23532=>1000,23533=>1000,23534=>1000,23535=>1000,23536=>1000,23537=>1000,23538=>1000,23539=>1000,23540=>1000, + 23541=>1000,23542=>1000,23543=>1000,23544=>1000,23545=>1000,23546=>1000,23547=>1000,23548=>1000,23549=>1000,23550=>1000,23551=>1000,23552=>1000,23553=>1000,23554=>1000,23555=>1000,23556=>1000, + 23557=>1000,23558=>1000,23559=>1000,23560=>1000,23561=>1000,23562=>1000,23563=>1000,23564=>1000,23565=>1000,23566=>1000,23567=>1000,23568=>1000,23569=>1000,23570=>1000,23571=>1000,23572=>1000, + 23573=>1000,23574=>1000,23575=>1000,23576=>1000,23577=>1000,23578=>1000,23579=>1000,23580=>1000,23581=>1000,23582=>1000,23583=>1000,23584=>1000,23585=>1000,23586=>1000,23587=>1000,23588=>1000, + 23589=>1000,23590=>1000,23591=>1000,23592=>1000,23593=>1000,23594=>1000,23595=>1000,23596=>1000,23597=>1000,23598=>1000,23599=>1000,23600=>1000,23601=>1000,23602=>1000,23603=>1000,23604=>1000, + 23605=>1000,23606=>1000,23607=>1000,23608=>1000,23609=>1000,23610=>1000,23611=>1000,23612=>1000,23613=>1000,23614=>1000,23615=>1000,23616=>1000,23617=>1000,23618=>1000,23619=>1000,23620=>1000, + 23621=>1000,23622=>1000,23623=>1000,23624=>1000,23625=>1000,23626=>1000,23627=>1000,23628=>1000,23629=>1000,23630=>1000,23631=>1000,23632=>1000,23633=>1000,23634=>1000,23635=>1000,23636=>1000, + 23637=>1000,23638=>1000,23639=>1000,23640=>1000,23641=>1000,23642=>1000,23643=>1000,23644=>1000,23645=>1000,23646=>1000,23647=>1000,23648=>1000,23649=>1000,23650=>1000,23651=>1000,23652=>1000, + 23653=>1000,23654=>1000,23655=>1000,23656=>1000,23657=>1000,23658=>1000,23659=>1000,23660=>1000,23661=>1000,23662=>1000,23663=>1000,23664=>1000,23665=>1000,23666=>1000,23667=>1000,23668=>1000, + 23669=>1000,23670=>1000,23671=>1000,23672=>1000,23673=>1000,23674=>1000,23675=>1000,23676=>1000,23677=>1000,23678=>1000,23679=>1000,23680=>1000,23681=>1000,23682=>1000,23683=>1000,23684=>1000, + 23685=>1000,23686=>1000,23687=>1000,23688=>1000,23689=>1000,23690=>1000,23691=>1000,23692=>1000,23693=>1000,23694=>1000,23695=>1000,23696=>1000,23697=>1000,23698=>1000,23699=>1000,23700=>1000, + 23701=>1000,23702=>1000,23703=>1000,23704=>1000,23705=>1000,23706=>1000,23707=>1000,23708=>1000,23709=>1000,23710=>1000,23711=>1000,23712=>1000,23713=>1000,23714=>1000,23715=>1000,23716=>1000, + 23717=>1000,23718=>1000,23719=>1000,23720=>1000,23721=>1000,23722=>1000,23723=>1000,23724=>1000,23725=>1000,23726=>1000,23727=>1000,23728=>1000,23729=>1000,23730=>1000,23731=>1000,23732=>1000, + 23733=>1000,23734=>1000,23735=>1000,23736=>1000,23737=>1000,23738=>1000,23739=>1000,23740=>1000,23741=>1000,23742=>1000,23743=>1000,23744=>1000,23745=>1000,23746=>1000,23747=>1000,23748=>1000, + 23749=>1000,23750=>1000,23751=>1000,23752=>1000,23753=>1000,23754=>1000,23755=>1000,23756=>1000,23757=>1000,23758=>1000,23759=>1000,23760=>1000,23761=>1000,23762=>1000,23763=>1000,23764=>1000, + 23765=>1000,23766=>1000,23767=>1000,23768=>1000,23769=>1000,23770=>1000,23771=>1000,23772=>1000,23773=>1000,23774=>1000,23775=>1000,23776=>1000,23777=>1000,23778=>1000,23779=>1000,23780=>1000, + 23781=>1000,23782=>1000,23783=>1000,23784=>1000,23785=>1000,23786=>1000,23787=>1000,23788=>1000,23789=>1000,23790=>1000,23791=>1000,23792=>1000,23793=>1000,23794=>1000,23795=>1000,23796=>1000, + 23797=>1000,23798=>1000,23799=>1000,23800=>1000,23801=>1000,23802=>1000,23803=>1000,23804=>1000,23805=>1000,23806=>1000,23807=>1000,23808=>1000,23809=>1000,23810=>1000,23811=>1000,23812=>1000, + 23813=>1000,23814=>1000,23815=>1000,23816=>1000,23817=>1000,23818=>1000,23819=>1000,23820=>1000,23821=>1000,23822=>1000,23823=>1000,23824=>1000,23825=>1000,23826=>1000,23827=>1000,23828=>1000, + 23829=>1000,23830=>1000,23831=>1000,23832=>1000,23833=>1000,23834=>1000,23835=>1000,23836=>1000,23837=>1000,23838=>1000,23839=>1000,23840=>1000,23841=>1000,23842=>1000,23843=>1000,23844=>1000, + 23845=>1000,23846=>1000,23847=>1000,23848=>1000,23849=>1000,23850=>1000,23851=>1000,23852=>1000,23853=>1000,23854=>1000,23855=>1000,23856=>1000,23857=>1000,23858=>1000,23859=>1000,23860=>1000, + 23861=>1000,23862=>1000,23863=>1000,23864=>1000,23865=>1000,23866=>1000,23867=>1000,23868=>1000,23869=>1000,23870=>1000,23871=>1000,23872=>1000,23873=>1000,23874=>1000,23875=>1000,23876=>1000, + 23877=>1000,23878=>1000,23879=>1000,23880=>1000,23881=>1000,23882=>1000,23883=>1000,23884=>1000,23885=>1000,23886=>1000,23887=>1000,23888=>1000,23889=>1000,23890=>1000,23891=>1000,23892=>1000, + 23893=>1000,23894=>1000,23895=>1000,23896=>1000,23897=>1000,23898=>1000,23899=>1000,23900=>1000,23901=>1000,23902=>1000,23903=>1000,23904=>1000,23905=>1000,23906=>1000,23907=>1000,23908=>1000, + 23909=>1000,23910=>1000,23911=>1000,23912=>1000,23913=>1000,23914=>1000,23915=>1000,23916=>1000,23917=>1000,23918=>1000,23919=>1000,23920=>1000,23921=>1000,23922=>1000,23923=>1000,23924=>1000, + 23925=>1000,23926=>1000,23927=>1000,23928=>1000,23929=>1000,23930=>1000,23931=>1000,23932=>1000,23933=>1000,23934=>1000,23935=>1000,23936=>1000,23937=>1000,23938=>1000,23939=>1000,23940=>1000, + 23941=>1000,23942=>1000,23943=>1000,23944=>1000,23945=>1000,23946=>1000,23947=>1000,23948=>1000,23949=>1000,23950=>1000,23951=>1000,23952=>1000,23953=>1000,23954=>1000,23955=>1000,23956=>1000, + 23957=>1000,23958=>1000,23959=>1000,23960=>1000,23961=>1000,23962=>1000,23963=>1000,23964=>1000,23965=>1000,23966=>1000,23967=>1000,23968=>1000,23969=>1000,23970=>1000,23971=>1000,23972=>1000, + 23973=>1000,23974=>1000,23975=>1000,23976=>1000,23977=>1000,23978=>1000,23979=>1000,23980=>1000,23981=>1000,23982=>1000,23983=>1000,23984=>1000,23985=>1000,23986=>1000,23987=>1000,23988=>1000, + 23989=>1000,23990=>1000,23991=>1000,23992=>1000,23993=>1000,23994=>1000,23995=>1000,23996=>1000,23997=>1000,23998=>1000,23999=>1000,24000=>1000,24001=>1000,24002=>1000,24003=>1000,24004=>1000, + 24005=>1000,24006=>1000,24007=>1000,24008=>1000,24009=>1000,24010=>1000,24011=>1000,24012=>1000,24013=>1000,24014=>1000,24015=>1000,24016=>1000,24017=>1000,24018=>1000,24019=>1000,24020=>1000, + 24021=>1000,24022=>1000,24023=>1000,24024=>1000,24025=>1000,24026=>1000,24027=>1000,24028=>1000,24029=>1000,24030=>1000,24031=>1000,24032=>1000,24033=>1000,24034=>1000,24035=>1000,24036=>1000, + 24037=>1000,24038=>1000,24039=>1000,24040=>1000,24041=>1000,24042=>1000,24043=>1000,24044=>1000,24045=>1000,24046=>1000,24047=>1000,24048=>1000,24049=>1000,24050=>1000,24051=>1000,24052=>1000, + 24053=>1000,24054=>1000,24055=>1000,24056=>1000,24057=>1000,24058=>1000,24059=>1000,24060=>1000,24061=>1000,24062=>1000,24063=>1000,24064=>1000,24065=>1000,24066=>1000,24067=>1000,24068=>1000, + 24069=>1000,24070=>1000,24071=>1000,24072=>1000,24073=>1000,24074=>1000,24075=>1000,24076=>1000,24077=>1000,24078=>1000,24079=>1000,24080=>1000,24081=>1000,24082=>1000,24083=>1000,24084=>1000, + 24085=>1000,24086=>1000,24087=>1000,24088=>1000,24089=>1000,24090=>1000,24091=>1000,24092=>1000,24093=>1000,24094=>1000,24095=>1000,24096=>1000,24097=>1000,24098=>1000,24099=>1000,24100=>1000, + 24101=>1000,24102=>1000,24103=>1000,24104=>1000,24105=>1000,24106=>1000,24107=>1000,24108=>1000,24109=>1000,24110=>1000,24111=>1000,24112=>1000,24113=>1000,24114=>1000,24115=>1000,24116=>1000, + 24117=>1000,24118=>1000,24119=>1000,24120=>1000,24121=>1000,24122=>1000,24123=>1000,24124=>1000,24125=>1000,24126=>1000,24127=>1000,24128=>1000,24129=>1000,24130=>1000,24131=>1000,24132=>1000, + 24133=>1000,24134=>1000,24135=>1000,24136=>1000,24137=>1000,24138=>1000,24139=>1000,24140=>1000,24141=>1000,24142=>1000,24143=>1000,24144=>1000,24145=>1000,24146=>1000,24147=>1000,24148=>1000, + 24149=>1000,24150=>1000,24151=>1000,24152=>1000,24153=>1000,24154=>1000,24155=>1000,24156=>1000,24157=>1000,24158=>1000,24159=>1000,24160=>1000,24161=>1000,24162=>1000,24163=>1000,24164=>1000, + 24165=>1000,24166=>1000,24167=>1000,24168=>1000,24169=>1000,24170=>1000,24171=>1000,24172=>1000,24173=>1000,24174=>1000,24175=>1000,24176=>1000,24177=>1000,24178=>1000,24179=>1000,24180=>1000, + 24181=>1000,24182=>1000,24183=>1000,24184=>1000,24185=>1000,24186=>1000,24187=>1000,24188=>1000,24189=>1000,24190=>1000,24191=>1000,24192=>1000,24193=>1000,24194=>1000,24195=>1000,24196=>1000, + 24197=>1000,24198=>1000,24199=>1000,24200=>1000,24201=>1000,24202=>1000,24203=>1000,24204=>1000,24205=>1000,24206=>1000,24207=>1000,24208=>1000,24209=>1000,24210=>1000,24211=>1000,24212=>1000, + 24213=>1000,24214=>1000,24215=>1000,24216=>1000,24217=>1000,24218=>1000,24219=>1000,24220=>1000,24221=>1000,24222=>1000,24223=>1000,24224=>1000,24225=>1000,24226=>1000,24227=>1000,24228=>1000, + 24229=>1000,24230=>1000,24231=>1000,24232=>1000,24233=>1000,24234=>1000,24235=>1000,24236=>1000,24237=>1000,24238=>1000,24239=>1000,24240=>1000,24241=>1000,24242=>1000,24243=>1000,24244=>1000, + 24245=>1000,24246=>1000,24247=>1000,24248=>1000,24249=>1000,24250=>1000,24251=>1000,24252=>1000,24253=>1000,24254=>1000,24255=>1000,24256=>1000,24257=>1000,24258=>1000,24259=>1000,24260=>1000, + 24261=>1000,24262=>1000,24263=>1000,24264=>1000,24265=>1000,24266=>1000,24267=>1000,24268=>1000,24269=>1000,24270=>1000,24271=>1000,24272=>1000,24273=>1000,24274=>1000,24275=>1000,24276=>1000, + 24277=>1000,24278=>1000,24279=>1000,24280=>1000,24281=>1000,24282=>1000,24283=>1000,24284=>1000,24285=>1000,24286=>1000,24287=>1000,24288=>1000,24289=>1000,24290=>1000,24291=>1000,24292=>1000, + 24293=>1000,24294=>1000,24295=>1000,24296=>1000,24297=>1000,24298=>1000,24299=>1000,24300=>1000,24301=>1000,24302=>1000,24303=>1000,24304=>1000,24305=>1000,24306=>1000,24307=>1000,24308=>1000, + 24309=>1000,24310=>1000,24311=>1000,24312=>1000,24313=>1000,24314=>1000,24315=>1000,24316=>1000,24317=>1000,24318=>1000,24319=>1000,24320=>1000,24321=>1000,24322=>1000,24323=>1000,24324=>1000, + 24325=>1000,24326=>1000,24327=>1000,24328=>1000,24329=>1000,24330=>1000,24331=>1000,24332=>1000,24333=>1000,24334=>1000,24335=>1000,24336=>1000,24337=>1000,24338=>1000,24339=>1000,24340=>1000, + 24341=>1000,24342=>1000,24343=>1000,24344=>1000,24345=>1000,24346=>1000,24347=>1000,24348=>1000,24349=>1000,24350=>1000,24351=>1000,24352=>1000,24353=>1000,24354=>1000,24355=>1000,24356=>1000, + 24357=>1000,24358=>1000,24359=>1000,24360=>1000,24361=>1000,24362=>1000,24363=>1000,24364=>1000,24365=>1000,24366=>1000,24367=>1000,24368=>1000,24369=>1000,24370=>1000,24371=>1000,24372=>1000, + 24373=>1000,24374=>1000,24375=>1000,24376=>1000,24377=>1000,24378=>1000,24379=>1000,24380=>1000,24381=>1000,24382=>1000,24383=>1000,24384=>1000,24385=>1000,24386=>1000,24387=>1000,24388=>1000, + 24389=>1000,24390=>1000,24391=>1000,24392=>1000,24393=>1000,24394=>1000,24395=>1000,24396=>1000,24397=>1000,24398=>1000,24399=>1000,24400=>1000,24401=>1000,24402=>1000,24403=>1000,24404=>1000, + 24405=>1000,24406=>1000,24407=>1000,24408=>1000,24409=>1000,24410=>1000,24411=>1000,24412=>1000,24413=>1000,24414=>1000,24415=>1000,24416=>1000,24417=>1000,24418=>1000,24419=>1000,24420=>1000, + 24421=>1000,24422=>1000,24423=>1000,24424=>1000,24425=>1000,24426=>1000,24427=>1000,24428=>1000,24429=>1000,24430=>1000,24431=>1000,24432=>1000,24433=>1000,24434=>1000,24435=>1000,24436=>1000, + 24437=>1000,24438=>1000,24439=>1000,24440=>1000,24441=>1000,24442=>1000,24443=>1000,24444=>1000,24445=>1000,24446=>1000,24447=>1000,24448=>1000,24449=>1000,24450=>1000,24451=>1000,24452=>1000, + 24453=>1000,24454=>1000,24455=>1000,24456=>1000,24457=>1000,24458=>1000,24459=>1000,24460=>1000,24461=>1000,24462=>1000,24463=>1000,24464=>1000,24465=>1000,24466=>1000,24467=>1000,24468=>1000, + 24469=>1000,24470=>1000,24471=>1000,24472=>1000,24473=>1000,24474=>1000,24475=>1000,24476=>1000,24477=>1000,24478=>1000,24479=>1000,24480=>1000,24481=>1000,24482=>1000,24483=>1000,24484=>1000, + 24485=>1000,24486=>1000,24487=>1000,24488=>1000,24489=>1000,24490=>1000,24491=>1000,24492=>1000,24493=>1000,24494=>1000,24495=>1000,24496=>1000,24497=>1000,24498=>1000,24499=>1000,24500=>1000, + 24501=>1000,24502=>1000,24503=>1000,24504=>1000,24505=>1000,24506=>1000,24507=>1000,24508=>1000,24509=>1000,24510=>1000,24511=>1000,24512=>1000,24513=>1000,24514=>1000,24515=>1000,24516=>1000, + 24517=>1000,24518=>1000,24519=>1000,24520=>1000,24521=>1000,24522=>1000,24523=>1000,24524=>1000,24525=>1000,24526=>1000,24527=>1000,24528=>1000,24529=>1000,24530=>1000,24531=>1000,24532=>1000, + 24533=>1000,24534=>1000,24535=>1000,24536=>1000,24537=>1000,24538=>1000,24539=>1000,24540=>1000,24541=>1000,24542=>1000,24543=>1000,24544=>1000,24545=>1000,24546=>1000,24547=>1000,24548=>1000, + 24549=>1000,24550=>1000,24551=>1000,24552=>1000,24553=>1000,24554=>1000,24555=>1000,24556=>1000,24557=>1000,24558=>1000,24559=>1000,24560=>1000,24561=>1000,24562=>1000,24563=>1000,24564=>1000, + 24565=>1000,24566=>1000,24567=>1000,24568=>1000,24569=>1000,24570=>1000,24571=>1000,24572=>1000,24573=>1000,24574=>1000,24575=>1000,24576=>1000,24577=>1000,24578=>1000,24579=>1000,24580=>1000, + 24581=>1000,24582=>1000,24583=>1000,24584=>1000,24585=>1000,24586=>1000,24587=>1000,24588=>1000,24589=>1000,24590=>1000,24591=>1000,24592=>1000,24593=>1000,24594=>1000,24595=>1000,24596=>1000, + 24597=>1000,24598=>1000,24599=>1000,24600=>1000,24601=>1000,24602=>1000,24603=>1000,24604=>1000,24605=>1000,24606=>1000,24607=>1000,24608=>1000,24609=>1000,24610=>1000,24611=>1000,24612=>1000, + 24613=>1000,24614=>1000,24615=>1000,24616=>1000,24617=>1000,24618=>1000,24619=>1000,24620=>1000,24621=>1000,24622=>1000,24623=>1000,24624=>1000,24625=>1000,24626=>1000,24627=>1000,24628=>1000, + 24629=>1000,24630=>1000,24631=>1000,24632=>1000,24633=>1000,24634=>1000,24635=>1000,24636=>1000,24637=>1000,24638=>1000,24639=>1000,24640=>1000,24641=>1000,24642=>1000,24643=>1000,24644=>1000, + 24645=>1000,24646=>1000,24647=>1000,24648=>1000,24649=>1000,24650=>1000,24651=>1000,24652=>1000,24653=>1000,24654=>1000,24655=>1000,24656=>1000,24657=>1000,24658=>1000,24659=>1000,24660=>1000, + 24661=>1000,24662=>1000,24663=>1000,24664=>1000,24665=>1000,24666=>1000,24667=>1000,24668=>1000,24669=>1000,24670=>1000,24671=>1000,24672=>1000,24673=>1000,24674=>1000,24675=>1000,24676=>1000, + 24677=>1000,24678=>1000,24679=>1000,24680=>1000,24681=>1000,24682=>1000,24683=>1000,24684=>1000,24685=>1000,24686=>1000,24687=>1000,24688=>1000,24689=>1000,24690=>1000,24691=>1000,24692=>1000, + 24693=>1000,24694=>1000,24695=>1000,24696=>1000,24697=>1000,24698=>1000,24699=>1000,24700=>1000,24701=>1000,24702=>1000,24703=>1000,24704=>1000,24705=>1000,24706=>1000,24707=>1000,24708=>1000, + 24709=>1000,24710=>1000,24711=>1000,24712=>1000,24713=>1000,24714=>1000,24715=>1000,24716=>1000,24717=>1000,24718=>1000,24719=>1000,24720=>1000,24721=>1000,24722=>1000,24723=>1000,24724=>1000, + 24725=>1000,24726=>1000,24727=>1000,24728=>1000,24729=>1000,24730=>1000,24731=>1000,24732=>1000,24733=>1000,24734=>1000,24735=>1000,24736=>1000,24737=>1000,24738=>1000,24739=>1000,24740=>1000, + 24741=>1000,24742=>1000,24743=>1000,24744=>1000,24745=>1000,24746=>1000,24747=>1000,24748=>1000,24749=>1000,24750=>1000,24751=>1000,24752=>1000,24753=>1000,24754=>1000,24755=>1000,24756=>1000, + 24757=>1000,24758=>1000,24759=>1000,24760=>1000,24761=>1000,24762=>1000,24763=>1000,24764=>1000,24765=>1000,24766=>1000,24767=>1000,24768=>1000,24769=>1000,24770=>1000,24771=>1000,24772=>1000, + 24773=>1000,24774=>1000,24775=>1000,24776=>1000,24777=>1000,24778=>1000,24779=>1000,24780=>1000,24781=>1000,24782=>1000,24783=>1000,24784=>1000,24785=>1000,24786=>1000,24787=>1000,24788=>1000, + 24789=>1000,24790=>1000,24791=>1000,24792=>1000,24793=>1000,24794=>1000,24795=>1000,24796=>1000,24797=>1000,24798=>1000,24799=>1000,24800=>1000,24801=>1000,24802=>1000,24803=>1000,24804=>1000, + 24805=>1000,24806=>1000,24807=>1000,24808=>1000,24809=>1000,24810=>1000,24811=>1000,24812=>1000,24813=>1000,24814=>1000,24815=>1000,24816=>1000,24817=>1000,24818=>1000,24819=>1000,24820=>1000, + 24821=>1000,24822=>1000,24823=>1000,24824=>1000,24825=>1000,24826=>1000,24827=>1000,24828=>1000,24829=>1000,24830=>1000,24831=>1000,24832=>1000,24833=>1000,24834=>1000,24835=>1000,24836=>1000, + 24837=>1000,24838=>1000,24839=>1000,24840=>1000,24841=>1000,24842=>1000,24843=>1000,24844=>1000,24845=>1000,24846=>1000,24847=>1000,24848=>1000,24849=>1000,24850=>1000,24851=>1000,24852=>1000, + 24853=>1000,24854=>1000,24855=>1000,24856=>1000,24857=>1000,24858=>1000,24859=>1000,24860=>1000,24861=>1000,24862=>1000,24863=>1000,24864=>1000,24865=>1000,24866=>1000,24867=>1000,24868=>1000, + 24869=>1000,24870=>1000,24871=>1000,24872=>1000,24873=>1000,24874=>1000,24875=>1000,24876=>1000,24877=>1000,24878=>1000,24879=>1000,24880=>1000,24881=>1000,24882=>1000,24883=>1000,24884=>1000, + 24885=>1000,24886=>1000,24887=>1000,24888=>1000,24889=>1000,24890=>1000,24891=>1000,24892=>1000,24893=>1000,24894=>1000,24895=>1000,24896=>1000,24897=>1000,24898=>1000,24899=>1000,24900=>1000, + 24901=>1000,24902=>1000,24903=>1000,24904=>1000,24905=>1000,24906=>1000,24907=>1000,24908=>1000,24909=>1000,24910=>1000,24911=>1000,24912=>1000,24913=>1000,24914=>1000,24915=>1000,24916=>1000, + 24917=>1000,24918=>1000,24919=>1000,24920=>1000,24921=>1000,24922=>1000,24923=>1000,24924=>1000,24925=>1000,24926=>1000,24927=>1000,24928=>1000,24929=>1000,24930=>1000,24931=>1000,24932=>1000, + 24933=>1000,24934=>1000,24935=>1000,24936=>1000,24937=>1000,24938=>1000,24939=>1000,24940=>1000,24941=>1000,24942=>1000,24943=>1000,24944=>1000,24945=>1000,24946=>1000,24947=>1000,24948=>1000, + 24949=>1000,24950=>1000,24951=>1000,24952=>1000,24953=>1000,24954=>1000,24955=>1000,24956=>1000,24957=>1000,24958=>1000,24959=>1000,24960=>1000,24961=>1001,24962=>1000,24963=>1000,24964=>1000, + 24965=>1000,24966=>1000,24967=>1000,24968=>1000,24969=>1000,24970=>1000,24971=>1000,24972=>1000,24973=>1000,24974=>1000,24975=>1000,24976=>1000,24977=>1000,24978=>1000,24979=>1000,24980=>1000, + 24981=>1000,24982=>1000,24983=>1000,24984=>1000,24985=>1000,24986=>1000,24987=>1000,24988=>1000,24989=>1000,24990=>1000,24991=>1000,24992=>1000,24993=>1000,24994=>1000,24995=>1000,24996=>1000, + 24997=>1000,24998=>1000,24999=>1000,25000=>1000,25001=>1000,25002=>1000,25003=>1000,25004=>1000,25005=>1000,25006=>1000,25007=>1000,25008=>1000,25009=>1000,25010=>1000,25011=>1000,25012=>1000, + 25013=>1000,25014=>1000,25015=>1000,25016=>1000,25017=>1000,25018=>1000,25019=>1000,25020=>1000,25021=>1000,25022=>1000,25023=>1000,25024=>1000,25025=>1000,25026=>1000,25027=>1000,25028=>1000, + 25029=>1000,25030=>1000,25031=>1000,25032=>1000,25033=>1000,25034=>1000,25035=>1000,25036=>1000,25037=>1000,25038=>1000,25039=>1000,25040=>1000,25041=>1000,25042=>1000,25043=>1000,25044=>1000, + 25045=>1000,25046=>1000,25047=>1000,25048=>1000,25049=>1000,25050=>1000,25051=>1000,25052=>1000,25053=>1000,25054=>1000,25055=>1000,25056=>1000,25057=>1000,25058=>1000,25059=>1000,25060=>1000, + 25061=>1000,25062=>1000,25063=>1000,25064=>1000,25065=>1000,25066=>1000,25067=>1000,25068=>1000,25069=>1000,25070=>1000,25071=>1000,25072=>1000,25073=>1000,25074=>1000,25075=>1000,25076=>1000, + 25077=>1000,25078=>1000,25079=>1000,25080=>1000,25081=>1000,25082=>1000,25083=>1000,25084=>1000,25085=>1000,25086=>1000,25087=>1000,25088=>1000,25089=>1000,25090=>1000,25091=>1000,25092=>1000, + 25093=>1000,25094=>1000,25095=>1000,25096=>1000,25097=>1000,25098=>1000,25099=>1000,25100=>1000,25101=>1000,25102=>1000,25103=>1000,25104=>1000,25105=>1000,25106=>1000,25107=>1000,25108=>1000, + 25109=>1000,25110=>1000,25111=>1000,25112=>1000,25113=>1000,25114=>1000,25115=>1000,25116=>1000,25117=>1000,25118=>1000,25119=>1000,25120=>1000,25121=>1000,25122=>1000,25123=>1000,25124=>1000, + 25125=>1000,25126=>1000,25127=>1000,25128=>1000,25129=>1000,25130=>1000,25131=>1000,25132=>1000,25133=>1000,25134=>1000,25135=>1000,25136=>1000,25137=>1000,25138=>1000,25139=>1000,25140=>1000, + 25141=>1000,25142=>1000,25143=>1000,25144=>1000,25145=>1000,25146=>1000,25147=>1000,25148=>1000,25149=>1000,25150=>1000,25151=>1000,25152=>1000,25153=>1000,25154=>1000,25155=>1000,25156=>1000, + 25157=>1000,25158=>1000,25159=>1000,25160=>1000,25161=>1000,25162=>1000,25163=>1000,25164=>1000,25165=>1000,25166=>1000,25167=>1000,25168=>1000,25169=>1000,25170=>1000,25171=>1000,25172=>1000, + 25173=>1000,25174=>1000,25175=>1000,25176=>1000,25177=>1000,25178=>1000,25179=>1000,25180=>1000,25181=>1000,25182=>1000,25183=>1000,25184=>1000,25185=>1000,25186=>1000,25187=>1000,25188=>1000, + 25189=>1000,25190=>1000,25191=>1000,25192=>1000,25193=>1000,25194=>1000,25195=>1000,25196=>1000,25197=>1000,25198=>1000,25199=>1000,25200=>1000,25201=>1000,25202=>1000,25203=>1000,25204=>1000, + 25205=>1000,25206=>1000,25207=>1000,25208=>1000,25209=>1000,25210=>1000,25211=>1000,25212=>1000,25213=>1000,25214=>1000,25215=>1000,25216=>1000,25217=>1000,25218=>1000,25219=>1000,25220=>1000, + 25221=>1000,25222=>1000,25223=>1000,25224=>1000,25225=>1000,25226=>1000,25227=>1000,25228=>1000,25229=>1000,25230=>1000,25231=>1000,25232=>1000,25233=>1000,25234=>1000,25235=>1000,25236=>1000, + 25237=>1000,25238=>1000,25239=>1000,25240=>1000,25241=>1000,25242=>1000,25243=>1000,25244=>1000,25245=>1000,25246=>1000,25247=>1000,25248=>1000,25249=>1000,25250=>1000,25251=>1000,25252=>1000, + 25253=>1000,25254=>1000,25255=>1000,25256=>1000,25257=>1000,25258=>1000,25259=>1000,25260=>1000,25261=>1000,25262=>1000,25263=>1000,25264=>1000,25265=>1000,25266=>1000,25267=>1000,25268=>1000, + 25269=>1000,25270=>1000,25271=>1000,25272=>1000,25273=>1000,25274=>1000,25275=>1000,25276=>1000,25277=>1000,25278=>1000,25279=>1000,25280=>1000,25281=>1000,25282=>1000,25283=>1000,25284=>1000, + 25285=>1000,25286=>1000,25287=>1000,25288=>1000,25289=>1000,25290=>1000,25291=>1000,25292=>1000,25293=>1000,25294=>1000,25295=>1000,25296=>1000,25297=>1000,25298=>1000,25299=>1000,25300=>1000, + 25301=>1000,25302=>1000,25303=>1000,25304=>1000,25305=>1000,25306=>1000,25307=>1000,25308=>1000,25309=>1000,25310=>1000,25311=>1000,25312=>1000,25313=>1000,25314=>1000,25315=>1000,25316=>1000, + 25317=>1000,25318=>1000,25319=>1000,25320=>1000,25321=>1000,25322=>1000,25323=>1000,25324=>1000,25325=>1000,25326=>1000,25327=>1000,25328=>1000,25329=>1000,25330=>1000,25331=>1000,25332=>1000, + 25333=>1000,25334=>1000,25335=>1000,25336=>1000,25337=>1000,25338=>1000,25339=>1000,25340=>1000,25341=>1000,25342=>1000,25343=>1000,25344=>1000,25345=>1000,25346=>1000,25347=>1000,25348=>1000, + 25349=>1000,25350=>1000,25351=>1000,25352=>1000,25353=>1000,25354=>1000,25355=>1000,25356=>1000,25357=>1000,25358=>1000,25359=>1000,25360=>1000,25361=>1000,25362=>1000,25363=>1000,25364=>1000, + 25365=>1000,25366=>1000,25367=>1000,25368=>1000,25369=>1000,25370=>1000,25371=>1000,25372=>1000,25373=>1000,25374=>1000,25375=>1000,25376=>1000,25377=>1000,25378=>1000,25379=>1000,25380=>1000, + 25381=>1000,25382=>1000,25383=>1000,25384=>1000,25385=>1000,25386=>1000,25387=>1000,25388=>1000,25389=>1000,25390=>1000,25391=>1000,25392=>1000,25393=>1000,25394=>1000,25395=>1000,25396=>1000, + 25397=>1000,25398=>1000,25399=>1000,25400=>1000,25401=>1000,25402=>1000,25403=>1000,25404=>1000,25405=>1000,25406=>1000,25407=>1000,25408=>1000,25409=>1000,25410=>1000,25411=>1000,25412=>1000, + 25413=>1000,25414=>1000,25415=>1000,25416=>1000,25417=>1000,25418=>1000,25419=>1000,25420=>1000,25421=>1000,25422=>1000,25423=>1000,25424=>1000,25425=>1000,25426=>1000,25427=>1000,25428=>1000, + 25429=>1000,25430=>1000,25431=>1000,25432=>1000,25433=>1000,25434=>1000,25435=>1000,25436=>1000,25437=>1000,25438=>1000,25439=>1000,25440=>1000,25441=>1000,25442=>1000,25443=>1000,25444=>1000, + 25445=>1000,25446=>1000,25447=>1000,25448=>1000,25449=>1000,25450=>1000,25451=>1000,25452=>1000,25453=>1000,25454=>1000,25455=>1000,25456=>1000,25457=>1000,25458=>1000,25459=>1000,25460=>1000, + 25461=>1000,25462=>1000,25463=>1000,25464=>1000,25465=>1000,25466=>1000,25467=>1000,25468=>1000,25469=>1000,25470=>1000,25471=>1000,25472=>1000,25473=>1000,25474=>1000,25475=>1000,25476=>1000, + 25477=>1000,25478=>1000,25479=>1000,25480=>1000,25481=>1000,25482=>1000,25483=>1000,25484=>1000,25485=>1000,25486=>1000,25487=>1000,25488=>1000,25489=>1000,25490=>1000,25491=>1000,25492=>1000, + 25493=>1000,25494=>1000,25495=>1000,25496=>1000,25497=>1000,25498=>1000,25499=>1000,25500=>1000,25501=>1000,25502=>1000,25503=>1000,25504=>1000,25505=>1000,25506=>1000,25507=>1000,25508=>1000, + 25509=>1000,25510=>1000,25511=>1000,25512=>1000,25513=>1000,25514=>1000,25515=>1000,25516=>1000,25517=>1000,25518=>1000,25519=>1000,25520=>1000,25521=>1000,25522=>1000,25523=>1000,25524=>1000, + 25525=>1000,25526=>1000,25527=>1000,25528=>1000,25529=>1000,25530=>1000,25531=>1000,25532=>1000,25533=>1000,25534=>1000,25535=>1000,25536=>1000,25537=>1000,25538=>1000,25539=>1000,25540=>1000, + 25541=>1000,25542=>1000,25543=>1000,25544=>1000,25545=>1000,25546=>1000,25547=>1000,25548=>1000,25549=>1000,25550=>1000,25551=>1000,25552=>1000,25553=>1000,25554=>1000,25555=>1000,25556=>1000, + 25557=>1000,25558=>1000,25559=>1000,25560=>1000,25561=>1000,25562=>1000,25563=>1000,25564=>1000,25565=>1000,25566=>1000,25567=>1000,25568=>1000,25569=>1000,25570=>1000,25571=>1000,25572=>1000, + 25573=>1000,25574=>1000,25575=>1000,25576=>1000,25577=>1000,25578=>1000,25579=>1000,25580=>1000,25581=>1000,25582=>1000,25583=>1000,25584=>1000,25585=>1000,25586=>1000,25587=>1000,25588=>1000, + 25589=>1000,25590=>1000,25591=>1000,25592=>1000,25593=>1000,25594=>1000,25595=>1000,25596=>1000,25597=>1000,25598=>1000,25599=>1000,25600=>1000,25601=>1000,25602=>1000,25603=>1000,25604=>1000, + 25605=>1000,25606=>1000,25607=>1000,25608=>1000,25609=>1000,25610=>1000,25611=>1000,25612=>1000,25613=>1000,25614=>1000,25615=>1000,25616=>1000,25617=>1000,25618=>1000,25619=>1000,25620=>1000, + 25621=>1000,25622=>1000,25623=>1000,25624=>1000,25625=>1000,25626=>1000,25627=>1000,25628=>1000,25629=>1000,25630=>1000,25631=>1000,25632=>1000,25633=>1000,25634=>1000,25635=>1000,25636=>1000, + 25637=>1000,25638=>1000,25639=>1000,25640=>1000,25641=>1000,25642=>1000,25643=>1000,25644=>1000,25645=>1000,25646=>1000,25647=>1000,25648=>1000,25649=>1000,25650=>1000,25651=>1000,25652=>1000, + 25653=>1000,25654=>1000,25655=>1000,25656=>1000,25657=>1000,25658=>1000,25659=>1000,25660=>1000,25661=>1000,25662=>1000,25663=>1000,25664=>1000,25665=>1000,25666=>1000,25667=>1000,25668=>1000, + 25669=>1000,25670=>1000,25671=>1000,25672=>1000,25673=>1000,25674=>1000,25675=>1000,25676=>1000,25677=>1000,25678=>1000,25679=>1000,25680=>1000,25681=>1000,25682=>1000,25683=>1000,25684=>1000, + 25685=>1000,25686=>1000,25687=>1000,25688=>1000,25689=>1000,25690=>1000,25691=>1000,25692=>1000,25693=>1000,25694=>1000,25695=>1000,25696=>1000,25697=>1000,25698=>1000,25699=>1000,25700=>1000, + 25701=>1000,25702=>1000,25703=>1000,25704=>1000,25705=>1000,25706=>1000,25707=>1000,25708=>1000,25709=>1000,25710=>1000,25711=>1000,25712=>1000,25713=>1000,25714=>1000,25715=>1000,25716=>1000, + 25717=>1000,25718=>1000,25719=>1000,25720=>1000,25721=>1000,25722=>1000,25723=>1000,25724=>1000,25725=>1000,25726=>1000,25727=>1000,25728=>1000,25729=>1000,25730=>1000,25731=>1000,25732=>1000, + 25733=>1000,25734=>1000,25735=>1000,25736=>1000,25737=>1000,25738=>1000,25739=>1000,25740=>1000,25741=>1000,25742=>1000,25743=>1000,25744=>1000,25745=>1000,25746=>1000,25747=>1000,25748=>1000, + 25749=>1000,25750=>1000,25751=>1000,25752=>1000,25753=>1000,25754=>1000,25755=>1000,25756=>1000,25757=>1000,25758=>1000,25759=>1000,25760=>1000,25761=>1000,25762=>1000,25763=>1000,25764=>1000, + 25765=>1000,25766=>1000,25767=>1000,25768=>1000,25769=>1000,25770=>1000,25771=>1000,25772=>1000,25773=>1000,25774=>1000,25775=>1000,25776=>1000,25777=>1000,25778=>1000,25779=>1000,25780=>1000, + 25781=>1000,25782=>1000,25783=>1000,25784=>1000,25785=>1000,25786=>1000,25787=>1000,25788=>1000,25789=>1000,25790=>1000,25791=>1000,25792=>1000,25793=>1000,25794=>1000,25795=>1000,25796=>1000, + 25797=>1000,25798=>1000,25799=>1000,25800=>1000,25801=>1000,25802=>1000,25803=>1000,25804=>1000,25805=>1000,25806=>1000,25807=>1000,25808=>1000,25809=>1000,25810=>1000,25811=>1000,25812=>1000, + 25813=>1000,25814=>1000,25815=>1000,25816=>1000,25817=>1000,25818=>1000,25819=>1000,25820=>1000,25821=>1000,25822=>1000,25823=>1000,25824=>1000,25825=>1000,25826=>1000,25827=>1000,25828=>1000, + 25829=>1000,25830=>1000,25831=>1000,25832=>1000,25833=>1000,25834=>1000,25835=>1000,25836=>1000,25837=>1000,25838=>1000,25839=>1000,25840=>1000,25841=>1000,25842=>1000,25843=>1000,25844=>1000, + 25845=>1000,25846=>1000,25847=>1000,25848=>1000,25849=>1000,25850=>1000,25851=>1000,25852=>1000,25853=>1000,25854=>1000,25855=>1000,25856=>1000,25857=>1000,25858=>1000,25859=>1000,25860=>1000, + 25861=>1000,25862=>1000,25863=>1000,25864=>1000,25865=>1000,25866=>1000,25867=>1000,25868=>1000,25869=>1000,25870=>1000,25871=>1000,25872=>1000,25873=>1000,25874=>1000,25875=>1000,25876=>1000, + 25877=>1000,25878=>1000,25879=>1000,25880=>1000,25881=>1000,25882=>1000,25883=>1000,25884=>1000,25885=>1000,25886=>1000,25887=>1000,25888=>1000,25889=>1000,25890=>1000,25891=>1000,25892=>1000, + 25893=>1000,25894=>1000,25895=>1000,25896=>1000,25897=>1000,25898=>1000,25899=>1000,25900=>1000,25901=>1000,25902=>1000,25903=>1000,25904=>1000,25905=>1000,25906=>1000,25907=>1000,25908=>1000, + 25909=>1000,25910=>1000,25911=>1000,25912=>1000,25913=>1000,25914=>1000,25915=>1000,25916=>1000,25917=>1000,25918=>1000,25919=>1000,25920=>1000,25921=>1000,25922=>1000,25923=>1000,25924=>1000, + 25925=>1000,25926=>1000,25927=>1000,25928=>1000,25929=>1000,25930=>1000,25931=>1000,25932=>1000,25933=>1000,25934=>1000,25935=>1000,25936=>1000,25937=>1000,25938=>1000,25939=>1000,25940=>1000, + 25941=>1000,25942=>1000,25943=>1000,25944=>1000,25945=>1000,25946=>1000,25947=>1000,25948=>1000,25949=>1000,25950=>1000,25951=>1000,25952=>1000,25953=>1000,25954=>1000,25955=>1000,25956=>1000, + 25957=>1000,25958=>1000,25959=>1000,25960=>1000,25961=>1000,25962=>1000,25963=>1000,25964=>1000,25965=>1000,25966=>1000,25967=>1000,25968=>1000,25969=>1000,25970=>1000,25971=>1000,25972=>1000, + 25973=>1000,25974=>1000,25975=>1000,25976=>1000,25977=>1000,25978=>1000,25979=>1000,25980=>1000,25981=>1000,25982=>1000,25983=>1000,25984=>1000,25985=>1000,25986=>1000,25987=>1000,25988=>1000, + 25989=>1000,25990=>1000,25991=>1000,25992=>1000,25993=>1000,25994=>1000,25995=>1000,25996=>1000,25997=>1000,25998=>1000,25999=>1000,26000=>1000,26001=>1000,26002=>1000,26003=>1000,26004=>1000, + 26005=>1000,26006=>1000,26007=>1000,26008=>1000,26009=>1000,26010=>1000,26011=>1000,26012=>1000,26013=>1000,26014=>1000,26015=>1000,26016=>1000,26017=>1000,26018=>1000,26019=>1000,26020=>1000, + 26021=>1000,26022=>1000,26023=>1000,26024=>1000,26025=>1000,26026=>1000,26027=>1000,26028=>1000,26029=>1000,26030=>1000,26031=>1000,26032=>1000,26033=>1000,26034=>1000,26035=>1000,26036=>1000, + 26037=>1000,26038=>1000,26039=>1000,26040=>1000,26041=>1000,26042=>1000,26043=>1000,26044=>1000,26045=>1000,26046=>1000,26047=>1000,26048=>1000,26049=>1000,26050=>1000,26051=>1000,26052=>1000, + 26053=>1000,26054=>1000,26055=>1000,26056=>1000,26057=>1000,26058=>1000,26059=>1000,26060=>1000,26061=>1000,26062=>1000,26063=>1000,26064=>1000,26065=>1000,26066=>1000,26067=>1000,26068=>1000, + 26069=>1000,26070=>1000,26071=>1000,26072=>1000,26073=>1000,26074=>1000,26075=>1000,26076=>1000,26077=>1000,26078=>1000,26079=>1000,26080=>1000,26081=>1000,26082=>1000,26083=>1000,26084=>1000, + 26085=>1000,26086=>1000,26087=>1000,26088=>1000,26089=>1000,26090=>1000,26091=>1000,26092=>1000,26093=>1000,26094=>1000,26095=>1000,26096=>1000,26097=>1000,26098=>1000,26099=>1000,26100=>1000, + 26101=>1000,26102=>1000,26103=>1000,26104=>1000,26105=>1000,26106=>1000,26107=>1000,26108=>1000,26109=>1000,26110=>1000,26111=>1000,26112=>1000,26113=>1000,26114=>1000,26115=>1000,26116=>1000, + 26117=>1000,26118=>1000,26119=>1000,26120=>1000,26121=>1000,26122=>1000,26123=>1000,26124=>1000,26125=>1000,26126=>1000,26127=>1000,26128=>1000,26129=>1000,26130=>1000,26131=>1000,26132=>1000, + 26133=>1000,26134=>1000,26135=>1000,26136=>1000,26137=>1000,26138=>1000,26139=>1000,26140=>1000,26141=>1000,26142=>1000,26143=>1000,26144=>1000,26145=>1000,26146=>1000,26147=>1000,26148=>1000, + 26149=>1000,26150=>1000,26151=>1000,26152=>1000,26153=>1000,26154=>1000,26155=>1000,26156=>1000,26157=>1000,26158=>1000,26159=>1000,26160=>1000,26161=>1000,26162=>1000,26163=>1000,26164=>1000, + 26165=>1000,26166=>1000,26167=>1000,26168=>1000,26169=>1000,26170=>1000,26171=>1000,26172=>1000,26173=>1000,26174=>1000,26175=>1000,26176=>1000,26177=>1000,26178=>1000,26179=>1000,26180=>1000, + 26181=>1000,26182=>1000,26183=>1000,26184=>1000,26185=>1000,26186=>1000,26187=>1000,26188=>1000,26189=>1000,26190=>1000,26191=>1000,26192=>1000,26193=>1000,26194=>1000,26195=>1000,26196=>1000, + 26197=>1000,26198=>1000,26199=>1000,26200=>1000,26201=>1000,26202=>1000,26203=>1000,26204=>1000,26205=>1000,26206=>1000,26207=>1000,26208=>1000,26209=>1000,26210=>1000,26211=>1000,26212=>1000, + 26213=>1000,26214=>1000,26215=>1000,26216=>1000,26217=>1000,26218=>1000,26219=>1000,26220=>1000,26221=>1000,26222=>1000,26223=>1000,26224=>1000,26225=>1000,26226=>1000,26227=>1000,26228=>1000, + 26229=>1000,26230=>1000,26231=>1000,26232=>1000,26233=>1000,26234=>1000,26235=>1000,26236=>1000,26237=>1000,26238=>1000,26239=>1000,26240=>1000,26241=>1000,26242=>1000,26243=>1000,26244=>1000, + 26245=>1000,26246=>1000,26247=>1000,26248=>1000,26249=>1000,26250=>1000,26251=>1000,26252=>1000,26253=>1000,26254=>1000,26255=>1000,26256=>1000,26257=>1000,26258=>1000,26259=>1000,26260=>1000, + 26261=>1000,26262=>1000,26263=>1000,26264=>1000,26265=>1000,26266=>1000,26267=>1000,26268=>1000,26269=>1000,26270=>1000,26271=>1000,26272=>1000,26273=>1000,26274=>1000,26275=>1000,26276=>1000, + 26277=>1000,26278=>1000,26279=>1000,26280=>1000,26281=>1000,26282=>1000,26283=>1000,26284=>1000,26285=>1000,26286=>1000,26287=>1000,26288=>1000,26289=>1000,26290=>1000,26291=>1000,26292=>1000, + 26293=>1000,26294=>1000,26295=>1000,26296=>1000,26297=>1000,26298=>1000,26299=>1000,26300=>1000,26301=>1000,26302=>1000,26303=>1000,26304=>1000,26305=>1000,26306=>1000,26307=>1000,26308=>1000, + 26309=>1000,26310=>1000,26311=>1000,26312=>1000,26313=>1000,26314=>1000,26315=>1000,26316=>1000,26317=>1000,26318=>1000,26319=>1000,26320=>1000,26321=>1000,26322=>1000,26323=>1000,26324=>1000, + 26325=>1000,26326=>1000,26327=>1000,26328=>1000,26329=>1000,26330=>1000,26331=>1000,26332=>1000,26333=>1000,26334=>1000,26335=>1000,26336=>1000,26337=>1000,26338=>1000,26339=>1000,26340=>1000, + 26341=>1000,26342=>1000,26343=>1000,26344=>1000,26345=>1000,26346=>1000,26347=>1000,26348=>1000,26349=>1000,26350=>1000,26351=>1000,26352=>1000,26353=>1000,26354=>1000,26355=>1000,26356=>1000, + 26357=>1000,26358=>1000,26359=>1000,26360=>1000,26361=>1000,26362=>1000,26363=>1000,26364=>1000,26365=>1000,26366=>1000,26367=>1000,26368=>1000,26369=>1000,26370=>1000,26371=>1000,26372=>1000, + 26373=>1000,26374=>1000,26375=>1000,26376=>1000,26377=>1000,26378=>1000,26379=>1000,26380=>1000,26381=>1000,26382=>1000,26383=>1000,26384=>1000,26385=>1000,26386=>1000,26387=>1000,26388=>1000, + 26389=>1000,26390=>1000,26391=>1000,26392=>1000,26393=>1000,26394=>1000,26395=>1000,26396=>1000,26397=>1000,26398=>1000,26399=>1000,26400=>1000,26401=>1000,26402=>1000,26403=>1000,26404=>1000, + 26405=>1000,26406=>1000,26407=>1000,26408=>1000,26409=>1000,26410=>1000,26411=>1000,26412=>1000,26413=>1000,26414=>1000,26415=>1000,26416=>1000,26417=>1000,26418=>1000,26419=>1000,26420=>1000, + 26421=>1000,26422=>1000,26423=>1000,26424=>1000,26425=>1000,26426=>1000,26427=>1000,26428=>1000,26429=>1000,26430=>1000,26431=>1000,26432=>1000,26433=>1000,26434=>1000,26435=>1000,26436=>1000, + 26437=>1000,26438=>1000,26439=>1000,26440=>1000,26441=>1000,26442=>1000,26443=>1000,26444=>1000,26445=>1000,26446=>1000,26447=>1000,26448=>1000,26449=>1000,26450=>1000,26451=>1000,26452=>1000, + 26453=>1000,26454=>1000,26455=>1000,26456=>1000,26457=>1000,26458=>1000,26459=>1000,26460=>1000,26461=>1000,26462=>1000,26463=>1000,26464=>1000,26465=>1000,26466=>1000,26467=>1000,26468=>1000, + 26469=>1000,26470=>1000,26471=>1000,26472=>1000,26473=>1000,26474=>1000,26475=>1000,26476=>1000,26477=>1000,26478=>1000,26479=>1000,26480=>1000,26481=>1000,26482=>1000,26483=>1000,26484=>1000, + 26485=>1000,26486=>1000,26487=>1000,26488=>1000,26489=>1000,26490=>1000,26491=>1000,26492=>1000,26493=>1000,26494=>1000,26495=>1000,26496=>1000,26497=>1000,26498=>1000,26499=>1000,26500=>1000, + 26501=>1000,26502=>1000,26503=>1000,26504=>1000,26505=>1000,26506=>1000,26507=>1000,26508=>1000,26509=>1000,26510=>1000,26511=>1000,26512=>1000,26513=>1000,26514=>1000,26515=>1000,26516=>1000, + 26517=>1000,26518=>1000,26519=>1000,26520=>1000,26521=>1000,26522=>1000,26523=>1000,26524=>1000,26525=>1000,26526=>1000,26527=>1000,26528=>1000,26529=>1000,26530=>1000,26531=>1000,26532=>1000, + 26533=>1000,26534=>1000,26535=>1000,26536=>1000,26537=>1000,26538=>1000,26539=>1000,26540=>1000,26541=>1000,26542=>1000,26543=>1000,26544=>1000,26545=>1000,26546=>1000,26547=>1000,26548=>1000, + 26549=>1000,26550=>1000,26551=>1000,26552=>1000,26553=>1000,26554=>1000,26555=>1000,26556=>1000,26557=>1000,26558=>1000,26559=>1000,26560=>1000,26561=>1000,26562=>1000,26563=>1000,26564=>1000, + 26565=>1000,26566=>1000,26567=>1000,26568=>1000,26569=>1000,26570=>1000,26571=>1000,26572=>1000,26573=>1000,26574=>1000,26575=>1000,26576=>1000,26577=>1000,26578=>1000,26579=>1000,26580=>1000, + 26581=>1000,26582=>1000,26583=>1000,26584=>1000,26585=>1000,26586=>1000,26587=>1000,26588=>1000,26589=>1000,26590=>1000,26591=>1000,26592=>1000,26593=>1000,26594=>1000,26595=>1000,26596=>1000, + 26597=>1000,26598=>1000,26599=>1000,26600=>1000,26601=>1000,26602=>1000,26603=>1000,26604=>1000,26605=>1000,26606=>1000,26607=>1000,26608=>1000,26609=>1000,26610=>1000,26611=>1000,26612=>1000, + 26613=>1000,26614=>1000,26615=>1000,26616=>1000,26617=>1000,26618=>1000,26619=>1000,26620=>1000,26621=>1000,26622=>1000,26623=>1000,26624=>1000,26625=>1000,26626=>1000,26627=>1000,26628=>1000, + 26629=>1000,26630=>1000,26631=>1000,26632=>1000,26633=>1000,26634=>1000,26635=>1000,26636=>1000,26637=>1000,26638=>1000,26639=>1000,26640=>1000,26641=>1000,26642=>1000,26643=>1000,26644=>1000, + 26645=>1000,26646=>1000,26647=>1000,26648=>1000,26649=>1000,26650=>1000,26651=>1000,26652=>1000,26653=>1000,26654=>1000,26655=>1000,26656=>1000,26657=>1000,26658=>1000,26659=>1000,26660=>1000, + 26661=>1000,26662=>1000,26663=>1000,26664=>1000,26665=>1000,26666=>1000,26667=>1000,26668=>1000,26669=>1000,26670=>1000,26671=>1000,26672=>1000,26673=>1000,26674=>1000,26675=>1000,26676=>1000, + 26677=>1000,26678=>1000,26679=>1000,26680=>1000,26681=>1000,26682=>1000,26683=>1000,26684=>1000,26685=>1000,26686=>1000,26687=>1000,26688=>1000,26689=>1000,26690=>1000,26691=>1000,26692=>1000, + 26693=>1000,26694=>1000,26695=>1000,26696=>1000,26697=>1000,26698=>1000,26699=>1000,26700=>1000,26701=>1000,26702=>1000,26703=>1000,26704=>1000,26705=>1000,26706=>1000,26707=>1000,26708=>1000, + 26709=>1000,26710=>1000,26711=>1000,26712=>1000,26713=>1000,26714=>1000,26715=>1000,26716=>1000,26717=>1000,26718=>1000,26719=>1000,26720=>1000,26721=>1000,26722=>1000,26723=>1000,26724=>1000, + 26725=>1000,26726=>1000,26727=>1000,26728=>1000,26729=>1000,26730=>1000,26731=>1000,26732=>1000,26733=>1000,26734=>1000,26735=>1000,26736=>1000,26737=>1000,26738=>1000,26739=>1000,26740=>1000, + 26741=>1000,26742=>1000,26743=>1000,26744=>1000,26745=>1000,26746=>1000,26747=>1000,26748=>1000,26749=>1000,26750=>1000,26751=>1000,26752=>1000,26753=>1000,26754=>1000,26755=>1000,26756=>1000, + 26757=>1000,26758=>1000,26759=>1000,26760=>1000,26761=>1000,26762=>1000,26763=>1000,26764=>1000,26765=>1000,26766=>1000,26767=>1000,26768=>1000,26769=>1000,26770=>1000,26771=>1000,26772=>1000, + 26773=>1000,26774=>1000,26775=>1000,26776=>1000,26777=>1000,26778=>1000,26779=>1000,26780=>1000,26781=>1000,26782=>1000,26783=>1000,26784=>1000,26785=>1000,26786=>1000,26787=>1000,26788=>1000, + 26789=>1000,26790=>1000,26791=>1000,26792=>1000,26793=>1000,26794=>1000,26795=>1000,26796=>1000,26797=>1000,26798=>1000,26799=>1000,26800=>1000,26801=>1000,26802=>1000,26803=>1000,26804=>1000, + 26805=>1000,26806=>1000,26807=>1000,26808=>1000,26809=>1000,26810=>1000,26811=>1000,26812=>1000,26813=>1000,26814=>1000,26815=>1000,26816=>1000,26817=>1000,26818=>1000,26819=>1000,26820=>1000, + 26821=>1000,26822=>1000,26823=>1000,26824=>1000,26825=>1000,26826=>1000,26827=>1000,26828=>1000,26829=>1000,26830=>1000,26831=>1000,26832=>1000,26833=>1000,26834=>1000,26835=>1000,26836=>1000, + 26837=>1000,26838=>1000,26839=>1000,26840=>1000,26841=>1000,26842=>1000,26843=>1000,26844=>1000,26845=>1000,26846=>1000,26847=>1000,26848=>1000,26849=>1000,26850=>1000,26851=>1000,26852=>1000, + 26853=>1000,26854=>1000,26855=>1000,26856=>1000,26857=>1000,26858=>1000,26859=>1000,26860=>1000,26861=>1000,26862=>1000,26863=>1000,26864=>1000,26865=>1000,26866=>1000,26867=>1000,26868=>1000, + 26869=>1000,26870=>1000,26871=>1000,26872=>1000,26873=>1000,26874=>1000,26875=>1000,26876=>1000,26877=>1000,26878=>1000,26879=>1000,26880=>1000,26881=>1000,26882=>1000,26883=>1000,26884=>1000, + 26885=>1000,26886=>1000,26887=>1000,26888=>1000,26889=>1000,26890=>1000,26891=>1000,26892=>1000,26893=>1000,26894=>1000,26895=>1000,26896=>1000,26897=>1000,26898=>1000,26899=>1000,26900=>1000, + 26901=>1000,26902=>1000,26903=>1000,26904=>1000,26905=>1000,26906=>1000,26907=>1000,26908=>1000,26909=>1000,26910=>1000,26911=>1000,26912=>1000,26913=>1000,26914=>1000,26915=>1000,26916=>1000, + 26917=>1000,26918=>1000,26919=>1000,26920=>1000,26921=>1000,26922=>1000,26923=>1000,26924=>1000,26925=>1000,26926=>1000,26927=>1000,26928=>1000,26929=>1000,26930=>1000,26931=>1000,26932=>1000, + 26933=>1000,26934=>1000,26935=>1000,26936=>1000,26937=>1000,26938=>1000,26939=>1000,26940=>1000,26941=>1000,26942=>1000,26943=>1000,26944=>1000,26945=>1000,26946=>1000,26947=>1000,26948=>1000, + 26949=>1000,26950=>1000,26951=>1000,26952=>1000,26953=>1000,26954=>1000,26955=>1000,26956=>1000,26957=>1000,26958=>1000,26959=>1000,26960=>1000,26961=>1000,26962=>1000,26963=>1000,26964=>1000, + 26965=>1000,26966=>1000,26967=>1000,26968=>1000,26969=>1000,26970=>1000,26971=>1000,26972=>1000,26973=>1000,26974=>1000,26975=>1000,26976=>1000,26977=>1000,26978=>1000,26979=>1000,26980=>1000, + 26981=>1000,26982=>1000,26983=>1000,26984=>1000,26985=>1000,26986=>1000,26987=>1000,26988=>1000,26989=>1000,26990=>1000,26991=>1000,26992=>1000,26993=>1000,26994=>1000,26995=>1000,26996=>1000, + 26997=>1000,26998=>1000,26999=>1000,27000=>1000,27001=>1000,27002=>1000,27003=>1000,27004=>1000,27005=>1000,27006=>1000,27007=>1000,27008=>1000,27009=>1000,27010=>1000,27011=>1000,27012=>1000, + 27013=>1000,27014=>1000,27015=>1000,27016=>1000,27017=>1000,27018=>1000,27019=>1000,27020=>1000,27021=>1000,27022=>1000,27023=>1000,27024=>1000,27025=>1000,27026=>1000,27027=>1000,27028=>1000, + 27029=>1000,27030=>1000,27031=>1000,27032=>1000,27033=>1000,27034=>1000,27035=>1000,27036=>1000,27037=>1000,27038=>1000,27039=>1000,27040=>1000,27041=>1000,27042=>1000,27043=>1000,27044=>1000, + 27045=>1000,27046=>1000,27047=>1000,27048=>1000,27049=>1000,27050=>1000,27051=>1000,27052=>1000,27053=>1000,27054=>1000,27055=>1000,27056=>1000,27057=>1000,27058=>1000,27059=>1000,27060=>1000, + 27061=>1000,27062=>1000,27063=>1000,27064=>1000,27065=>1000,27066=>1000,27067=>1000,27068=>1000,27069=>1000,27070=>1000,27071=>1000,27072=>1000,27073=>1000,27074=>1000,27075=>1000,27076=>1000, + 27077=>1000,27078=>1000,27079=>1000,27080=>1000,27081=>1000,27082=>1000,27083=>1000,27084=>1000,27085=>1000,27086=>1000,27087=>1000,27088=>1000,27089=>1000,27090=>1000,27091=>1000,27092=>1000, + 27093=>1000,27094=>1000,27095=>1000,27096=>1000,27097=>1000,27098=>1000,27099=>1000,27100=>1000,27101=>1000,27102=>1000,27103=>1000,27104=>1000,27105=>1000,27106=>1000,27107=>1000,27108=>1000, + 27109=>1000,27110=>1000,27111=>1000,27112=>1000,27113=>1000,27114=>1000,27115=>1000,27116=>1000,27117=>1000,27118=>1000,27119=>1000,27120=>1000,27121=>1000,27122=>1000,27123=>1000,27124=>1000, + 27125=>1000,27126=>1000,27127=>1000,27128=>1000,27129=>1000,27130=>1000,27131=>1000,27132=>1000,27133=>1000,27134=>1000,27135=>1000,27136=>1000,27137=>1000,27138=>1000,27139=>1000,27140=>1000, + 27141=>1000,27142=>1000,27143=>1000,27144=>1000,27145=>1000,27146=>1000,27147=>1000,27148=>1000,27149=>1000,27150=>1000,27151=>1000,27152=>1000,27153=>1000,27154=>1000,27155=>1000,27156=>1000, + 27157=>1000,27158=>1000,27159=>1000,27160=>1000,27161=>1000,27162=>1000,27163=>1000,27164=>1000,27165=>1000,27166=>1000,27167=>1000,27168=>1000,27169=>1000,27170=>1000,27171=>1000,27172=>1000, + 27173=>1000,27174=>1000,27175=>1000,27176=>1000,27177=>1000,27178=>1000,27179=>1000,27180=>1000,27181=>1000,27182=>1000,27183=>1000,27184=>1000,27185=>1000,27186=>1000,27187=>1000,27188=>1000, + 27189=>1000,27190=>1000,27191=>1000,27192=>1000,27193=>1000,27194=>1000,27195=>1000,27196=>1000,27197=>1000,27198=>1000,27199=>1000,27200=>1000,27201=>1000,27202=>1000,27203=>1000,27204=>1000, + 27205=>1000,27206=>1000,27207=>1000,27208=>1000,27209=>1000,27210=>1000,27211=>1000,27212=>1000,27213=>1000,27214=>1000,27215=>1000,27216=>1000,27217=>1000,27218=>1000,27219=>1000,27220=>1000, + 27221=>1000,27222=>1000,27223=>1000,27224=>1000,27225=>1000,27226=>1000,27227=>1000,27228=>1000,27229=>1000,27230=>1000,27231=>1000,27232=>1000,27233=>1000,27234=>1000,27235=>1000,27236=>1000, + 27237=>1000,27238=>1000,27239=>1000,27240=>1000,27241=>1000,27242=>1000,27243=>1000,27244=>1000,27245=>1000,27246=>1000,27247=>1000,27248=>1000,27249=>1000,27250=>1000,27251=>1000,27252=>1000, + 27253=>1000,27254=>1000,27255=>1000,27256=>1000,27257=>1000,27258=>1000,27259=>1000,27260=>1000,27261=>1000,27262=>1000,27263=>1000,27264=>1000,27265=>1000,27266=>1000,27267=>1000,27268=>1000, + 27269=>1000,27270=>1000,27271=>1000,27272=>1000,27273=>1000,27274=>1000,27275=>1000,27276=>1000,27277=>1000,27278=>1000,27279=>1000,27280=>1000,27281=>1000,27282=>1000,27283=>1000,27284=>1000, + 27285=>1000,27286=>1000,27287=>1000,27288=>1000,27289=>1000,27290=>1000,27291=>1000,27292=>1000,27293=>1000,27294=>1000,27295=>1000,27296=>1000,27297=>1000,27298=>1000,27299=>1000,27300=>1000, + 27301=>1000,27302=>1000,27303=>1000,27304=>1000,27305=>1000,27306=>1000,27307=>1000,27308=>1000,27309=>1000,27310=>1000,27311=>1000,27312=>1000,27313=>1000,27314=>1000,27315=>1000,27316=>1000, + 27317=>1000,27318=>1000,27319=>1000,27320=>1000,27321=>1000,27322=>1000,27323=>1000,27324=>1000,27325=>1000,27326=>1000,27327=>1000,27328=>1000,27329=>1000,27330=>1000,27331=>1000,27332=>1000, + 27333=>1000,27334=>1000,27335=>1000,27336=>1000,27337=>1000,27338=>1000,27339=>1000,27340=>1000,27341=>1000,27342=>1000,27343=>1000,27344=>1000,27345=>1000,27346=>1000,27347=>1000,27348=>1000, + 27349=>1000,27350=>1000,27351=>1000,27352=>1000,27353=>1000,27354=>1000,27355=>1000,27356=>1000,27357=>1000,27358=>1000,27359=>1000,27360=>1000,27361=>1000,27362=>1000,27363=>1000,27364=>1000, + 27365=>1000,27366=>1000,27367=>1000,27368=>1000,27369=>1000,27370=>1000,27371=>1000,27372=>1000,27373=>1000,27374=>1000,27375=>1000,27376=>1000,27377=>1000,27378=>1000,27379=>1000,27380=>1000, + 27381=>1000,27382=>1000,27383=>1000,27384=>1000,27385=>1000,27386=>1000,27387=>1000,27388=>1000,27389=>1000,27390=>1000,27391=>1000,27392=>1000,27393=>1000,27394=>1000,27395=>1000,27396=>1000, + 27397=>1000,27398=>1000,27399=>1000,27400=>1000,27401=>1000,27402=>1000,27403=>1000,27404=>1000,27405=>1000,27406=>1000,27407=>1000,27408=>1000,27409=>1000,27410=>1000,27411=>1000,27412=>1000, + 27413=>1000,27414=>1000,27415=>1000,27416=>1000,27417=>1000,27418=>1000,27419=>1000,27420=>1000,27421=>1000,27422=>1000,27423=>1000,27424=>1000,27425=>1000,27426=>1000,27427=>1000,27428=>1000, + 27429=>1000,27430=>1000,27431=>1000,27432=>1000,27433=>1000,27434=>1000,27435=>1000,27436=>1000,27437=>1000,27438=>1000,27439=>1000,27440=>1000,27441=>1000,27442=>1000,27443=>1000,27444=>1000, + 27445=>1000,27446=>1000,27447=>1000,27448=>1000,27449=>1000,27450=>1000,27451=>1000,27452=>1000,27453=>1000,27454=>1000,27455=>1000,27456=>1000,27457=>1000,27458=>1000,27459=>1000,27460=>1000, + 27461=>1000,27462=>1000,27463=>1000,27464=>1000,27465=>1000,27466=>1000,27467=>1000,27468=>1000,27469=>1000,27470=>1000,27471=>1000,27472=>1000,27473=>1000,27474=>1000,27475=>1000,27476=>1000, + 27477=>1000,27478=>1000,27479=>1000,27480=>1000,27481=>1000,27482=>1000,27483=>1000,27484=>1000,27485=>1000,27486=>1000,27487=>1000,27488=>1000,27489=>1000,27490=>1000,27491=>1000,27492=>1000, + 27493=>1000,27494=>1000,27495=>1000,27496=>1000,27497=>1000,27498=>1000,27499=>1000,27500=>1000,27501=>1000,27502=>1000,27503=>1000,27504=>1000,27505=>1000,27506=>1000,27507=>1000,27508=>1000, + 27509=>1000,27510=>1000,27511=>1000,27512=>1000,27513=>1000,27514=>1000,27515=>1000,27516=>1000,27517=>1000,27518=>1000,27519=>1000,27520=>1000,27521=>1000,27522=>1000,27523=>1000,27524=>1000, + 27525=>1000,27526=>1000,27527=>1000,27528=>1000,27529=>1000,27530=>1000,27531=>1000,27532=>1000,27533=>1000,27534=>1000,27535=>1000,27536=>1000,27537=>1000,27538=>1000,27539=>1000,27540=>1000, + 27541=>1000,27542=>1000,27543=>1000,27544=>1000,27545=>1000,27546=>1000,27547=>1000,27548=>1000,27549=>1000,27550=>1000,27551=>1000,27552=>1000,27553=>1000,27554=>1000,27555=>1000,27556=>1000, + 27557=>1000,27558=>1000,27559=>1000,27560=>1000,27561=>1000,27562=>1000,27563=>1000,27564=>1000,27565=>1000,27566=>1000,27567=>1000,27568=>1000,27569=>1000,27570=>1000,27571=>1000,27572=>1000, + 27573=>1000,27574=>1000,27575=>1000,27576=>1000,27577=>1000,27578=>1000,27579=>1000,27580=>1000,27581=>1000,27582=>1000,27583=>1000,27584=>1000,27585=>1000,27586=>1000,27587=>1000,27588=>1000, + 27589=>1000,27590=>1000,27591=>1000,27592=>1000,27593=>1000,27594=>1000,27595=>1000,27596=>1000,27597=>1000,27598=>1000,27599=>1000,27600=>1000,27601=>1000,27602=>1000,27603=>1000,27604=>1000, + 27605=>1000,27606=>1000,27607=>1000,27608=>1000,27609=>1000,27610=>1000,27611=>1000,27612=>1000,27613=>1000,27614=>1000,27615=>1000,27616=>1000,27617=>1000,27618=>1000,27619=>1000,27620=>1000, + 27621=>1000,27622=>1000,27623=>1000,27624=>1000,27625=>1000,27626=>1000,27627=>1000,27628=>1000,27629=>1000,27630=>1000,27631=>1000,27632=>1000,27633=>1000,27634=>1000,27635=>1000,27636=>1000, + 27637=>1000,27638=>1000,27639=>1000,27640=>1000,27641=>1000,27642=>1000,27643=>1000,27644=>1000,27645=>1000,27646=>1000,27647=>1000,27648=>1000,27649=>1000,27650=>1000,27651=>1000,27652=>1000, + 27653=>1000,27654=>1000,27655=>1000,27656=>1000,27657=>1000,27658=>1000,27659=>1000,27660=>1000,27661=>1000,27662=>1000,27663=>1000,27664=>1000,27665=>1000,27666=>1000,27667=>1000,27668=>1000, + 27669=>1000,27670=>1000,27671=>1000,27672=>1000,27673=>1000,27674=>1000,27675=>1000,27676=>1000,27677=>1000,27678=>1000,27679=>1000,27680=>1000,27681=>1000,27682=>1000,27683=>1000,27684=>1000, + 27685=>1000,27686=>1000,27687=>1000,27688=>1000,27689=>1000,27690=>1000,27691=>1000,27692=>1000,27693=>1000,27694=>1000,27695=>1000,27696=>1000,27697=>1000,27698=>1000,27699=>1000,27700=>1000, + 27701=>1000,27702=>1000,27703=>1000,27704=>1000,27705=>1000,27706=>1000,27707=>1000,27708=>1000,27709=>1000,27710=>1000,27711=>1000,27712=>1000,27713=>1000,27714=>1000,27715=>1000,27716=>1000, + 27717=>1000,27718=>1000,27719=>1000,27720=>1000,27721=>1000,27722=>1000,27723=>1000,27724=>1000,27725=>1000,27726=>1000,27727=>1000,27728=>1000,27729=>1000,27730=>1000,27731=>1000,27732=>1000, + 27733=>1000,27734=>1000,27735=>1000,27736=>1000,27737=>1000,27738=>1000,27739=>1000,27740=>1000,27741=>1000,27742=>1000,27743=>1000,27744=>1000,27745=>1000,27746=>1000,27747=>1000,27748=>1000, + 27749=>1000,27750=>1000,27751=>1000,27752=>1000,27753=>1000,27754=>1000,27755=>1000,27756=>1000,27757=>1000,27758=>1000,27759=>1000,27760=>1000,27761=>1000,27762=>1000,27763=>1000,27764=>1000, + 27765=>1000,27766=>1000,27767=>1000,27768=>1000,27769=>1000,27770=>1000,27771=>1000,27772=>1000,27773=>1000,27774=>1000,27775=>1000,27776=>1000,27777=>1000,27778=>1000,27779=>1000,27780=>1000, + 27781=>1000,27782=>1000,27783=>1000,27784=>1000,27785=>1000,27786=>1000,27787=>1000,27788=>1000,27789=>1000,27790=>1000,27791=>1000,27792=>1000,27793=>1000,27794=>1000,27795=>1000,27796=>1000, + 27797=>1000,27798=>1000,27799=>1000,27800=>1000,27801=>1000,27802=>1000,27803=>1000,27804=>1000,27805=>1000,27806=>1000,27807=>1000,27808=>1000,27809=>1000,27810=>1000,27811=>1000,27812=>1000, + 27813=>1000,27814=>1000,27815=>1000,27816=>1000,27817=>1000,27818=>1000,27819=>1000,27820=>1000,27821=>1000,27822=>1000,27823=>1000,27824=>1000,27825=>1000,27826=>1000,27827=>1000,27828=>1000, + 27829=>1000,27830=>1000,27831=>1000,27832=>1000,27833=>1000,27834=>1000,27835=>1000,27836=>1000,27837=>1000,27838=>1000,27839=>1000,27840=>1000,27841=>1000,27842=>1000,27843=>1000,27844=>1000, + 27845=>1000,27846=>1000,27847=>1000,27848=>1000,27849=>1000,27850=>1000,27851=>1000,27852=>1000,27853=>1000,27854=>1000,27855=>1000,27856=>1000,27857=>1000,27858=>1000,27859=>1000,27860=>1000, + 27861=>1000,27862=>1000,27863=>1000,27864=>1000,27865=>1000,27866=>1000,27867=>1000,27868=>1000,27869=>1000,27870=>1000,27871=>1000,27872=>1000,27873=>1000,27874=>1000,27875=>1000,27876=>1000, + 27877=>1000,27878=>1000,27879=>1000,27880=>1000,27881=>1000,27882=>1000,27883=>1000,27884=>1000,27885=>1000,27886=>1000,27887=>1000,27888=>1000,27889=>1000,27890=>1000,27891=>1000,27892=>1000, + 27893=>1000,27894=>1000,27895=>1000,27896=>1000,27897=>1000,27898=>1000,27899=>1000,27900=>1000,27901=>1000,27902=>1000,27903=>1000,27904=>1000,27905=>1000,27906=>1000,27907=>1000,27908=>1000, + 27909=>1000,27910=>1000,27911=>1000,27912=>1000,27913=>1000,27914=>1000,27915=>1000,27916=>1000,27917=>1000,27918=>1000,27919=>1000,27920=>1000,27921=>1000,27922=>1000,27923=>1000,27924=>1000, + 27925=>1000,27926=>1000,27927=>1000,27928=>1000,27929=>1000,27930=>1000,27931=>1000,27932=>1000,27933=>1000,27934=>1000,27935=>1000,27936=>1000,27937=>1000,27938=>1000,27939=>1000,27940=>1000, + 27941=>1000,27942=>1000,27943=>1000,27944=>1000,27945=>1000,27946=>1000,27947=>1000,27948=>1000,27949=>1000,27950=>1000,27951=>1000,27952=>1000,27953=>1000,27954=>1000,27955=>1000,27956=>1000, + 27957=>1000,27958=>1000,27959=>1000,27960=>1000,27961=>1000,27962=>1000,27963=>1000,27964=>1000,27965=>1000,27966=>1000,27967=>1000,27968=>1000,27969=>1000,27970=>1000,27971=>1000,27972=>1000, + 27973=>1000,27974=>1000,27975=>1000,27976=>1000,27977=>1000,27978=>1000,27979=>1000,27980=>1000,27981=>1000,27982=>1000,27983=>1000,27984=>1000,27985=>1000,27986=>1000,27987=>1000,27988=>1000, + 27989=>1000,27990=>1000,27991=>1000,27992=>1000,27993=>1000,27994=>1000,27995=>1000,27996=>1000,27997=>1000,27998=>1000,27999=>1000,28000=>1000,28001=>1000,28002=>1000,28003=>1000,28004=>1000, + 28005=>1000,28006=>1000,28007=>1000,28008=>1000,28009=>1000,28010=>1000,28011=>1000,28012=>1000,28013=>1000,28014=>1000,28015=>1000,28016=>1000,28017=>1000,28018=>1000,28019=>1000,28020=>1000, + 28021=>1000,28022=>1000,28023=>1000,28024=>1000,28025=>1000,28026=>1000,28027=>1000,28028=>1000,28029=>1000,28030=>1000,28031=>1000,28032=>1000,28033=>1000,28034=>1000,28035=>1000,28036=>1000, + 28037=>1000,28038=>1000,28039=>1000,28040=>1000,28041=>1000,28042=>1000,28043=>1000,28044=>1000,28045=>1000,28046=>1000,28047=>1000,28048=>1000,28049=>1000,28050=>1000,28051=>1000,28052=>1000, + 28053=>1000,28054=>1000,28055=>1000,28056=>1000,28057=>1000,28058=>1000,28059=>1000,28060=>1000,28061=>1000,28062=>1000,28063=>1000,28064=>1000,28065=>1000,28066=>1000,28067=>1000,28068=>1000, + 28069=>1000,28070=>1000,28071=>1000,28072=>1000,28073=>1000,28074=>1000,28075=>1000,28076=>1000,28077=>1000,28078=>1000,28079=>1000,28080=>1000,28081=>1000,28082=>1000,28083=>1000,28084=>1000, + 28085=>1000,28086=>1000,28087=>1000,28088=>1000,28089=>1000,28090=>1000,28091=>1000,28092=>1000,28093=>1000,28094=>1000,28095=>1000,28096=>1000,28097=>1000,28098=>1000,28099=>1000,28100=>1000, + 28101=>1000,28102=>1000,28103=>1000,28104=>1000,28105=>1000,28106=>1000,28107=>1000,28108=>1000,28109=>1000,28110=>1000,28111=>1000,28112=>1000,28113=>1000,28114=>1000,28115=>1000,28116=>1000, + 28117=>1000,28118=>1000,28119=>1000,28120=>1000,28121=>1000,28122=>1000,28123=>1000,28124=>1000,28125=>1000,28126=>1000,28127=>1000,28128=>1000,28129=>1000,28130=>1000,28131=>1000,28132=>1000, + 28133=>1000,28134=>1000,28135=>1000,28136=>1000,28137=>1000,28138=>1000,28139=>1000,28140=>1000,28141=>1000,28142=>1000,28143=>1000,28144=>1000,28145=>1000,28146=>1000,28147=>1000,28148=>1000, + 28149=>1000,28150=>1000,28151=>1000,28152=>1000,28153=>1000,28154=>1000,28155=>1000,28156=>1000,28157=>1000,28158=>1000,28159=>1000,28160=>1000,28161=>1000,28162=>1000,28163=>1000,28164=>1000, + 28165=>1000,28166=>1000,28167=>1000,28168=>1000,28169=>1000,28170=>1000,28171=>1000,28172=>1000,28173=>1000,28174=>1000,28175=>1000,28176=>1000,28177=>1000,28178=>1000,28179=>1000,28180=>1000, + 28181=>1000,28182=>1000,28183=>1000,28184=>1000,28185=>1000,28186=>1000,28187=>1000,28188=>1000,28189=>1000,28190=>1000,28191=>1000,28192=>1000,28193=>1000,28194=>1000,28195=>1000,28196=>1000, + 28197=>1000,28198=>1000,28199=>1000,28200=>1000,28201=>1000,28202=>1000,28203=>1000,28204=>1000,28205=>1000,28206=>1000,28207=>1000,28208=>1000,28209=>1000,28210=>1000,28211=>1000,28212=>1000, + 28213=>1000,28214=>1000,28215=>1000,28216=>1000,28217=>1000,28218=>1000,28219=>1000,28220=>1000,28221=>1000,28222=>1000,28223=>1000,28224=>1000,28225=>1000,28226=>1000,28227=>1000,28228=>1000, + 28229=>1000,28230=>1000,28231=>1000,28232=>1000,28233=>1000,28234=>1000,28235=>1000,28236=>1000,28237=>1000,28238=>1000,28239=>1000,28240=>1000,28241=>1000,28242=>1000,28243=>1000,28244=>1000, + 28245=>1000,28246=>1000,28247=>1000,28248=>1000,28249=>1000,28250=>1000,28251=>1000,28252=>1000,28253=>1000,28254=>1000,28255=>1000,28256=>1000,28257=>1000,28258=>1000,28259=>1000,28260=>1000, + 28261=>1000,28262=>1000,28263=>1000,28264=>1000,28265=>1000,28266=>1000,28267=>1000,28268=>1000,28269=>1000,28270=>1000,28271=>1000,28272=>1000,28273=>1000,28274=>1000,28275=>1000,28276=>1000, + 28277=>1000,28278=>1000,28279=>1000,28280=>1000,28281=>1000,28282=>1000,28283=>1000,28284=>1000,28285=>1000,28286=>1000,28287=>1000,28288=>1000,28289=>1000,28290=>1000,28291=>1000,28292=>1000, + 28293=>1000,28294=>1000,28295=>1000,28296=>1000,28297=>1000,28298=>1000,28299=>1000,28300=>1000,28301=>1000,28302=>1000,28303=>1000,28304=>1000,28305=>1000,28306=>1000,28307=>1000,28308=>1000, + 28309=>1000,28310=>1000,28311=>1000,28312=>1000,28313=>1000,28314=>1000,28315=>1000,28316=>1000,28317=>1000,28318=>1000,28319=>1000,28320=>1000,28321=>1000,28322=>1000,28323=>1000,28324=>1000, + 28325=>1000,28326=>1000,28327=>1000,28328=>1000,28329=>1000,28330=>1000,28331=>1000,28332=>1000,28333=>1000,28334=>1000,28335=>1000,28336=>1000,28337=>1000,28338=>1000,28339=>1000,28340=>1000, + 28341=>1000,28342=>1000,28343=>1000,28344=>1000,28345=>1000,28346=>1000,28347=>1000,28348=>1000,28349=>1000,28350=>1000,28351=>1000,28352=>1000,28353=>1000,28354=>1000,28355=>1000,28356=>1000, + 28357=>1000,28358=>1000,28359=>1000,28360=>1000,28361=>1000,28362=>1000,28363=>1000,28364=>1000,28365=>1000,28366=>1000,28367=>1000,28368=>1000,28369=>1000,28370=>1000,28371=>1000,28372=>1000, + 28373=>1000,28374=>1000,28375=>1000,28376=>1000,28377=>1000,28378=>1000,28379=>1000,28380=>1000,28381=>1000,28382=>1000,28383=>1000,28384=>1000,28385=>1000,28386=>1000,28387=>1000,28388=>1000, + 28389=>1000,28390=>1000,28391=>1000,28392=>1000,28393=>1000,28394=>1000,28395=>1000,28396=>1000,28397=>1000,28398=>1000,28399=>1000,28400=>1000,28401=>1000,28402=>1000,28403=>1000,28404=>1000, + 28405=>1000,28406=>1000,28407=>1000,28408=>1000,28409=>1000,28410=>1000,28411=>1000,28412=>1000,28413=>1000,28414=>1000,28415=>1000,28416=>1000,28417=>1000,28418=>1000,28419=>1000,28420=>1000, + 28421=>1000,28422=>1000,28423=>1000,28424=>1000,28425=>1000,28426=>1000,28427=>1000,28428=>1000,28429=>1000,28430=>1000,28431=>1000,28432=>1000,28433=>1000,28434=>1000,28435=>1000,28436=>1000, + 28437=>1000,28438=>1000,28439=>1000,28440=>1000,28441=>1000,28442=>1000,28443=>1000,28444=>1000,28445=>1000,28446=>1000,28447=>1000,28448=>1000,28449=>1000,28450=>1000,28451=>1000,28452=>1000, + 28453=>1000,28454=>1000,28455=>1000,28456=>1000,28457=>1000,28458=>1000,28459=>1000,28460=>1000,28461=>1000,28462=>1000,28463=>1000,28464=>1000,28465=>1000,28466=>1000,28467=>1000,28468=>1000, + 28469=>1000,28470=>1000,28471=>1000,28472=>1000,28473=>1000,28474=>1000,28475=>1000,28476=>1000,28477=>1000,28478=>1000,28479=>1000,28480=>1000,28481=>1000,28482=>1000,28483=>1000,28484=>1000, + 28485=>1000,28486=>1000,28487=>1000,28488=>1000,28489=>1000,28490=>1000,28491=>1000,28492=>1000,28493=>1000,28494=>1000,28495=>1000,28496=>1000,28497=>1000,28498=>1000,28499=>1000,28500=>1000, + 28501=>1000,28502=>1000,28503=>1000,28504=>1000,28505=>1000,28506=>1000,28507=>1000,28508=>1000,28509=>1000,28510=>1000,28511=>1000,28512=>1000,28513=>1000,28514=>1000,28515=>1000,28516=>1000, + 28517=>1000,28518=>1000,28519=>1000,28520=>1000,28521=>1000,28522=>1000,28523=>1000,28524=>1000,28525=>1000,28526=>1000,28527=>1000,28528=>1000,28529=>1000,28530=>1000,28531=>1000,28532=>1000, + 28533=>1000,28534=>1000,28535=>1000,28536=>1000,28537=>1000,28538=>1000,28539=>1000,28540=>1000,28541=>1000,28542=>1000,28543=>1000,28544=>1000,28545=>1000,28546=>1000,28547=>1000,28548=>1000, + 28549=>1000,28550=>1000,28551=>1000,28552=>1000,28553=>1000,28554=>1000,28555=>1000,28556=>1000,28557=>1000,28558=>1000,28559=>1000,28560=>1000,28561=>1000,28562=>1000,28563=>1000,28564=>1000, + 28565=>1000,28566=>1000,28567=>1000,28568=>1000,28569=>1000,28570=>1000,28571=>1000,28572=>1000,28573=>1000,28574=>1000,28575=>1000,28576=>1000,28577=>1000,28578=>1000,28579=>1000,28580=>1000, + 28581=>1000,28582=>1000,28583=>1000,28584=>1000,28585=>1000,28586=>1000,28587=>1000,28588=>1000,28589=>1000,28590=>1000,28591=>1000,28592=>1000,28593=>1000,28594=>1000,28595=>1000,28596=>1000, + 28597=>1000,28598=>1000,28599=>1000,28600=>1000,28601=>1000,28602=>1000,28603=>1000,28604=>1000,28605=>1000,28606=>1000,28607=>1000,28608=>1000,28609=>1000,28610=>1000,28611=>1000,28612=>1000, + 28613=>1000,28614=>1000,28615=>1000,28616=>1000,28617=>1000,28618=>1000,28619=>1000,28620=>1000,28621=>1000,28622=>1000,28623=>1000,28624=>1000,28625=>1000,28626=>1000,28627=>1000,28628=>1000, + 28629=>1000,28630=>1000,28631=>1000,28632=>1000,28633=>1000,28634=>1000,28635=>1000,28636=>1000,28637=>1000,28638=>1000,28639=>1000,28640=>1000,28641=>1000,28642=>1000,28643=>1000,28644=>1000, + 28645=>1000,28646=>1000,28647=>1000,28648=>1000,28649=>1000,28650=>1000,28651=>1000,28652=>1000,28653=>1000,28654=>1000,28655=>1000,28656=>1000,28657=>1000,28658=>1000,28659=>1000,28660=>1000, + 28661=>1000,28662=>1000,28663=>1000,28664=>1000,28665=>1000,28666=>1000,28667=>1000,28668=>1000,28669=>1000,28670=>1000,28671=>1000,28672=>1000,28673=>1000,28674=>1000,28675=>1000,28676=>1000, + 28677=>1000,28678=>1000,28679=>1000,28680=>1000,28681=>1000,28682=>1000,28683=>1000,28684=>1000,28685=>1000,28686=>1000,28687=>1000,28688=>1000,28689=>1000,28690=>1000,28691=>1000,28692=>1000, + 28693=>1000,28694=>1000,28695=>1000,28696=>1000,28697=>1000,28698=>1000,28699=>1000,28700=>1000,28701=>1000,28702=>1000,28703=>1000,28704=>1000,28705=>1000,28706=>1000,28707=>1000,28708=>1000, + 28709=>1000,28710=>1000,28711=>1000,28712=>1000,28713=>1000,28714=>1000,28715=>1000,28716=>1000,28717=>1000,28718=>1000,28719=>1000,28720=>1000,28721=>1000,28722=>1000,28723=>1000,28724=>1000, + 28725=>1000,28726=>1000,28727=>1000,28728=>1000,28729=>1000,28730=>1000,28731=>1000,28732=>1000,28733=>1000,28734=>1000,28735=>1000,28736=>1000,28737=>1000,28738=>1000,28739=>1000,28740=>1000, + 28741=>1000,28742=>1000,28743=>1000,28744=>1000,28745=>1000,28746=>1000,28747=>1000,28748=>1000,28749=>1000,28750=>1000,28751=>1000,28752=>1000,28753=>1000,28754=>1000,28755=>1000,28756=>1000, + 28757=>1000,28758=>1000,28759=>1000,28760=>1000,28761=>1000,28762=>1000,28763=>1000,28764=>1000,28765=>1000,28766=>1000,28767=>1000,28768=>1000,28769=>1000,28770=>1000,28771=>1000,28772=>1000, + 28773=>1000,28774=>1000,28775=>1000,28776=>1000,28777=>1000,28778=>1000,28779=>1000,28780=>1000,28781=>1000,28782=>1000,28783=>1000,28784=>1000,28785=>1000,28786=>1000,28787=>1000,28788=>1000, + 28789=>1000,28790=>1000,28791=>1000,28792=>1000,28793=>1000,28794=>1000,28795=>1000,28796=>1000,28797=>1000,28798=>1000,28799=>1000,28800=>1000,28801=>1000,28802=>1000,28803=>1000,28804=>1000, + 28805=>1000,28806=>1000,28807=>1000,28808=>1000,28809=>1000,28810=>1000,28811=>1000,28812=>1000,28813=>1000,28814=>1000,28815=>1000,28816=>1000,28817=>1000,28818=>1000,28819=>1000,28820=>1000, + 28821=>1000,28822=>1000,28823=>1000,28824=>1000,28825=>1000,28826=>1000,28827=>1000,28828=>1000,28829=>1000,28830=>1000,28831=>1000,28832=>1000,28833=>1000,28834=>1000,28835=>1000,28836=>1000, + 28837=>1000,28838=>1000,28839=>1000,28840=>1000,28841=>1000,28842=>1000,28843=>1000,28844=>1000,28845=>1000,28846=>1000,28847=>1000,28848=>1000,28849=>1000,28850=>1000,28851=>1000,28852=>1000, + 28853=>1000,28854=>1000,28855=>1000,28856=>1000,28857=>1000,28858=>1000,28859=>1000,28860=>1000,28861=>1000,28862=>1000,28863=>1000,28864=>1000,28865=>1000,28866=>1000,28867=>1000,28868=>1000, + 28869=>1000,28870=>1000,28871=>1000,28872=>1000,28873=>1000,28874=>1000,28875=>1000,28876=>1000,28877=>1000,28878=>1000,28879=>1000,28880=>1000,28881=>1000,28882=>1000,28883=>1000,28884=>1000, + 28885=>1000,28886=>1000,28887=>1000,28888=>1000,28889=>1000,28890=>1000,28891=>1000,28892=>1000,28893=>1000,28894=>1000,28895=>1000,28896=>1000,28897=>1000,28898=>1000,28899=>1000,28900=>1000, + 28901=>1000,28902=>1000,28903=>1000,28904=>1000,28905=>1000,28906=>1000,28907=>1000,28908=>1000,28909=>1000,28910=>1000,28911=>1000,28912=>1000,28913=>1000,28914=>1000,28915=>1000,28916=>1000, + 28917=>1000,28918=>1000,28919=>1000,28920=>1000,28921=>1000,28922=>1000,28923=>1000,28924=>1000,28925=>1000,28926=>1000,28927=>1000,28928=>1000,28929=>1000,28930=>1000,28931=>1000,28932=>1000, + 28933=>1000,28934=>1000,28935=>1000,28936=>1000,28937=>1000,28938=>1000,28939=>1000,28940=>1000,28941=>1000,28942=>1000,28943=>1000,28944=>1000,28945=>1000,28946=>1000,28947=>1000,28948=>1000, + 28949=>1000,28950=>1000,28951=>1000,28952=>1000,28953=>1000,28954=>1000,28955=>1000,28956=>1000,28957=>1000,28958=>1000,28959=>1000,28960=>1000,28961=>1000,28962=>1000,28963=>1000,28964=>1000, + 28965=>1000,28966=>1000,28967=>1000,28968=>1000,28969=>1000,28970=>1000,28971=>1000,28972=>1000,28973=>1000,28974=>1000,28975=>1000,28976=>1000,28977=>1000,28978=>1000,28979=>1000,28980=>1000, + 28981=>1000,28982=>1000,28983=>1000,28984=>1000,28985=>1000,28986=>1000,28987=>1000,28988=>1000,28989=>1000,28990=>1000,28991=>1000,28992=>1000,28993=>1000,28994=>1000,28995=>1000,28996=>1000, + 28997=>1000,28998=>1000,28999=>1000,29000=>1000,29001=>1000,29002=>1000,29003=>1000,29004=>1000,29005=>1000,29006=>1000,29007=>1000,29008=>1000,29009=>1000,29010=>1000,29011=>1000,29012=>1000, + 29013=>1000,29014=>1000,29015=>1000,29016=>1000,29017=>1000,29018=>1000,29019=>1000,29020=>1000,29021=>1000,29022=>1000,29023=>1000,29024=>1000,29025=>1000,29026=>1000,29027=>1000,29028=>1000, + 29029=>1000,29030=>1000,29031=>1000,29032=>1000,29033=>1000,29034=>1000,29035=>1000,29036=>1000,29037=>1000,29038=>1000,29039=>1000,29040=>1000,29041=>1000,29042=>1000,29043=>1000,29044=>1000, + 29045=>1000,29046=>1000,29047=>1000,29048=>1000,29049=>1000,29050=>1000,29051=>1000,29052=>1000,29053=>1000,29054=>1000,29055=>1000,29056=>1000,29057=>1000,29058=>1000,29059=>1000,29060=>1000, + 29061=>1000,29062=>1000,29063=>1000,29064=>1000,29065=>1000,29066=>1000,29067=>1000,29068=>1000,29069=>1000,29070=>1000,29071=>1000,29072=>1000,29073=>1000,29074=>1000,29075=>1000,29076=>1000, + 29077=>1000,29078=>1000,29079=>1000,29080=>1000,29081=>1000,29082=>1000,29083=>1000,29084=>1000,29085=>1000,29086=>1000,29087=>1000,29088=>1000,29089=>1000,29090=>1000,29091=>1000,29092=>1000, + 29093=>1000,29094=>1000,29095=>1000,29096=>1000,29097=>1000,29098=>1000,29099=>1000,29100=>1000,29101=>1000,29102=>1000,29103=>1000,29104=>1000,29105=>1000,29106=>1000,29107=>1000,29108=>1000, + 29109=>1000,29110=>1000,29111=>1000,29112=>1000,29113=>1000,29114=>1000,29115=>1000,29116=>1000,29117=>1000,29118=>1000,29119=>1000,29120=>1000,29121=>1000,29122=>1000,29123=>1000,29124=>1000, + 29125=>1000,29126=>1000,29127=>1000,29128=>1000,29129=>1000,29130=>1000,29131=>1000,29132=>1000,29133=>1000,29134=>1000,29135=>1000,29136=>1000,29137=>1000,29138=>1000,29139=>1000,29140=>1000, + 29141=>1000,29142=>1000,29143=>1000,29144=>1000,29145=>1000,29146=>1000,29147=>1000,29148=>1000,29149=>1000,29150=>1000,29151=>1000,29152=>1000,29153=>1000,29154=>1000,29155=>1000,29156=>1000, + 29157=>1000,29158=>1000,29159=>1000,29160=>1000,29161=>1000,29162=>1000,29163=>1000,29164=>1000,29165=>1000,29166=>1000,29167=>1000,29168=>1000,29169=>1000,29170=>1000,29171=>1000,29172=>1000, + 29173=>1000,29174=>1000,29175=>1000,29176=>1000,29177=>1000,29178=>1000,29179=>1000,29180=>1000,29181=>1000,29182=>1000,29183=>1000,29184=>1000,29185=>1000,29186=>1000,29187=>1000,29188=>1000, + 29189=>1000,29190=>1000,29191=>1000,29192=>1000,29193=>1000,29194=>1000,29195=>1000,29196=>1000,29197=>1000,29198=>1000,29199=>1000,29200=>1000,29201=>1000,29202=>1000,29203=>1000,29204=>1000, + 29205=>1000,29206=>1000,29207=>1000,29208=>1000,29209=>1000,29210=>1000,29211=>1000,29212=>1000,29213=>1000,29214=>1000,29215=>1000,29216=>1000,29217=>1000,29218=>1000,29219=>1000,29220=>1000, + 29221=>1000,29222=>1000,29223=>1000,29224=>1000,29225=>1000,29226=>1000,29227=>1000,29228=>1000,29229=>1000,29230=>1000,29231=>1000,29232=>1000,29233=>1000,29234=>1000,29235=>1000,29236=>1000, + 29237=>1000,29238=>1000,29239=>1000,29240=>1000,29241=>1000,29242=>1000,29243=>1000,29244=>1000,29245=>1000,29246=>1000,29247=>1000,29248=>1000,29249=>1000,29250=>1000,29251=>1000,29252=>1000, + 29253=>1000,29254=>1000,29255=>1000,29256=>1000,29257=>1000,29258=>1000,29259=>1000,29260=>1000,29261=>1000,29262=>1000,29263=>1000,29264=>1000,29265=>1000,29266=>1000,29267=>1000,29268=>1000, + 29269=>1000,29270=>1000,29271=>1000,29272=>1000,29273=>1000,29274=>1000,29275=>1000,29276=>1000,29277=>1000,29278=>1000,29279=>1000,29280=>1000,29281=>1000,29282=>1000,29283=>1000,29284=>1000, + 29285=>1000,29286=>1000,29287=>1000,29288=>1000,29289=>1000,29290=>1000,29291=>1000,29292=>1000,29293=>1000,29294=>1000,29295=>1000,29296=>1000,29297=>1000,29298=>1000,29299=>1000,29300=>1000, + 29301=>1000,29302=>1000,29303=>1000,29304=>1000,29305=>1000,29306=>1000,29307=>1000,29308=>1000,29309=>1000,29310=>1000,29311=>1000,29312=>1000,29313=>1000,29314=>1000,29315=>1000,29316=>1000, + 29317=>1000,29318=>1000,29319=>1000,29320=>1000,29321=>1000,29322=>1000,29323=>1000,29324=>1000,29325=>1000,29326=>1000,29327=>1000,29328=>1000,29329=>1000,29330=>1000,29331=>1000,29332=>1000, + 29333=>1000,29334=>1000,29335=>1000,29336=>1000,29337=>1000,29338=>1000,29339=>1000,29340=>1000,29341=>1000,29342=>1000,29343=>1000,29344=>1000,29345=>1000,29346=>1000,29347=>1000,29348=>1000, + 29349=>1000,29350=>1000,29351=>1000,29352=>1000,29353=>1000,29354=>1000,29355=>1000,29356=>1000,29357=>1000,29358=>1000,29359=>1000,29360=>1000,29361=>1000,29362=>1000,29363=>1000,29364=>1000, + 29365=>1000,29366=>1000,29367=>1000,29368=>1000,29369=>1000,29370=>1000,29371=>1000,29372=>1000,29373=>1000,29374=>1000,29375=>1000,29376=>1000,29377=>1000,29378=>1000,29379=>1000,29380=>1000, + 29381=>1000,29382=>1000,29383=>1000,29384=>1000,29385=>1000,29386=>1000,29387=>1000,29388=>1000,29389=>1000,29390=>1000,29391=>1000,29392=>1000,29393=>1000,29394=>1000,29395=>1000,29396=>1000, + 29397=>1000,29398=>1000,29399=>1000,29400=>1000,29401=>1000,29402=>1000,29403=>1000,29404=>1000,29405=>1000,29406=>1000,29407=>1000,29408=>1000,29409=>1000,29410=>1000,29411=>1000,29412=>1000, + 29413=>1000,29414=>1000,29415=>1000,29416=>1000,29417=>1000,29418=>1000,29419=>1000,29420=>1000,29421=>1000,29422=>1000,29423=>1000,29424=>1000,29425=>1000,29426=>1000,29427=>1000,29428=>1000, + 29429=>1000,29430=>1000,29431=>1000,29432=>1000,29433=>1000,29434=>1000,29435=>1000,29436=>1000,29437=>1000,29438=>1000,29439=>1000,29440=>1000,29441=>1000,29442=>1000,29443=>1000,29444=>1000, + 29445=>1000,29446=>1000,29447=>1000,29448=>1000,29449=>1000,29450=>1000,29451=>1000,29452=>1000,29453=>1000,29454=>1000,29455=>1000,29456=>1000,29457=>1000,29458=>1000,29459=>1000,29460=>1000, + 29461=>1000,29462=>1000,29463=>1000,29464=>1000,29465=>1000,29466=>1000,29467=>1000,29468=>1000,29469=>1000,29470=>1000,29471=>1000,29472=>1000,29473=>1000,29474=>1000,29475=>1000,29476=>1000, + 29477=>1000,29478=>1000,29479=>1000,29480=>1000,29481=>1000,29482=>1000,29483=>1000,29484=>1000,29485=>1000,29486=>1000,29487=>1000,29488=>1000,29489=>1000,29490=>1000,29491=>1000,29492=>1000, + 29493=>1000,29494=>1000,29495=>1000,29496=>1000,29497=>1000,29498=>1000,29499=>1000,29500=>1000,29501=>1000,29502=>1000,29503=>1000,29504=>1000,29505=>1000,29506=>1000,29507=>1000,29508=>1000, + 29509=>1000,29510=>1000,29511=>1000,29512=>1000,29513=>1000,29514=>1000,29515=>1000,29516=>1000,29517=>1000,29518=>1000,29519=>1000,29520=>1000,29521=>1000,29522=>1000,29523=>1000,29524=>1000, + 29525=>1000,29526=>1000,29527=>1000,29528=>1000,29529=>1000,29530=>1000,29531=>1000,29532=>1000,29533=>1000,29534=>1000,29535=>1000,29536=>1000,29537=>1000,29538=>1000,29539=>1000,29540=>1000, + 29541=>1000,29542=>1000,29543=>1000,29544=>1000,29545=>1000,29546=>1000,29547=>1000,29548=>1000,29549=>1000,29550=>1000,29551=>1000,29552=>1000,29553=>1000,29554=>1000,29555=>1000,29556=>1000, + 29557=>1000,29558=>1000,29559=>1000,29560=>1000,29561=>1000,29562=>1000,29563=>1000,29564=>1000,29565=>1000,29566=>1000,29567=>1000,29568=>1000,29569=>1000,29570=>1000,29571=>1000,29572=>1000, + 29573=>1000,29574=>1000,29575=>1000,29576=>1000,29577=>1000,29578=>1000,29579=>1000,29580=>1000,29581=>1000,29582=>1000,29583=>1000,29584=>1000,29585=>1000,29586=>1000,29587=>1000,29588=>1000, + 29589=>1000,29590=>1000,29591=>1000,29592=>1000,29593=>1000,29594=>1000,29595=>1000,29596=>1000,29597=>1000,29598=>1000,29599=>1000,29600=>1000,29601=>1000,29602=>1000,29603=>1000,29604=>1000, + 29605=>1000,29606=>1000,29607=>1000,29608=>1000,29609=>1000,29610=>1000,29611=>1000,29612=>1000,29613=>1000,29614=>1000,29615=>1000,29616=>1000,29617=>1000,29618=>1000,29619=>1000,29620=>1000, + 29621=>1000,29622=>1000,29623=>1000,29624=>1000,29625=>1000,29626=>1000,29627=>1000,29628=>1000,29629=>1000,29630=>1000,29631=>1000,29632=>1000,29633=>1000,29634=>1000,29635=>1000,29636=>1000, + 29637=>1000,29638=>1000,29639=>1000,29640=>1000,29641=>1000,29642=>1000,29643=>1000,29644=>1000,29645=>1000,29646=>1000,29647=>1000,29648=>1000,29649=>1000,29650=>1000,29651=>1000,29652=>1000, + 29653=>1000,29654=>1000,29655=>1000,29656=>1000,29657=>1000,29658=>1000,29659=>1000,29660=>1000,29661=>1000,29662=>1000,29663=>1000,29664=>1000,29665=>1000,29666=>1000,29667=>1000,29668=>1000, + 29669=>1000,29670=>1000,29671=>1000,29672=>1000,29673=>1000,29674=>1000,29675=>1000,29676=>1000,29677=>1000,29678=>1000,29679=>1000,29680=>1000,29681=>1000,29682=>1000,29683=>1000,29684=>1000, + 29685=>1000,29686=>1000,29687=>1000,29688=>1000,29689=>1000,29690=>1000,29691=>1000,29692=>1000,29693=>1000,29694=>1000,29695=>1000,29696=>1000,29697=>1000,29698=>1000,29699=>1000,29700=>1000, + 29701=>1000,29702=>1000,29703=>1000,29704=>1000,29705=>1000,29706=>1000,29707=>1000,29708=>1000,29709=>1000,29710=>1000,29711=>1000,29712=>1000,29713=>1000,29714=>1000,29715=>1000,29716=>1000, + 29717=>1000,29718=>1000,29719=>1000,29720=>1000,29721=>1000,29722=>1000,29723=>1000,29724=>1000,29725=>1000,29726=>1000,29727=>1000,29728=>1000,29729=>1000,29730=>1000,29731=>1000,29732=>1000, + 29733=>1000,29734=>1000,29735=>1000,29736=>1000,29737=>1000,29738=>1000,29739=>1000,29740=>1000,29741=>1000,29742=>1000,29743=>1000,29744=>1000,29745=>1000,29746=>1000,29747=>1000,29748=>1000, + 29749=>1000,29750=>1000,29751=>1000,29752=>1000,29753=>1000,29754=>1000,29755=>1000,29756=>1000,29757=>1000,29758=>1000,29759=>1000,29760=>1000,29761=>1000,29762=>1000,29763=>1000,29764=>1000, + 29765=>1000,29766=>1000,29767=>1000,29768=>1000,29769=>1000,29770=>1000,29771=>1000,29772=>1000,29773=>1000,29774=>1000,29775=>1000,29776=>1000,29777=>1000,29778=>1000,29779=>1000,29780=>1000, + 29781=>1000,29782=>1000,29783=>1000,29784=>1000,29785=>1000,29786=>1000,29787=>1000,29788=>1000,29789=>1000,29790=>1000,29791=>1000,29792=>1000,29793=>1000,29794=>1000,29795=>1000,29796=>1000, + 29797=>1000,29798=>1000,29799=>1000,29800=>1000,29801=>1000,29802=>1000,29803=>1000,29804=>1000,29805=>1000,29806=>1000,29807=>1000,29808=>1000,29809=>1000,29810=>1000,29811=>1000,29812=>1000, + 29813=>1000,29814=>1000,29815=>1000,29816=>1000,29817=>1000,29818=>1000,29819=>1000,29820=>1000,29821=>1000,29822=>1000,29823=>1000,29824=>1000,29825=>1000,29826=>1000,29827=>1000,29828=>1000, + 29829=>1000,29830=>1000,29831=>1000,29832=>1000,29833=>1000,29834=>1000,29835=>1000,29836=>1000,29837=>1000,29838=>1000,29839=>1000,29840=>1000,29841=>1000,29842=>1000,29843=>1000,29844=>1000, + 29845=>1000,29846=>1000,29847=>1000,29848=>1000,29849=>1000,29850=>1000,29851=>1000,29852=>1000,29853=>1000,29854=>1000,29855=>1000,29856=>1000,29857=>1000,29858=>1000,29859=>1000,29860=>1000, + 29861=>1000,29862=>1000,29863=>1000,29864=>1000,29865=>1000,29866=>1000,29867=>1000,29868=>1000,29869=>1000,29870=>1000,29871=>1000,29872=>1000,29873=>1000,29874=>1000,29875=>1000,29876=>1000, + 29877=>1000,29878=>1000,29879=>1000,29880=>1000,29881=>1000,29882=>1000,29883=>1000,29884=>1000,29885=>1000,29886=>1000,29887=>1000,29888=>1000,29889=>1000,29890=>1000,29891=>1000,29892=>1000, + 29893=>1000,29894=>1000,29895=>1000,29896=>1000,29897=>1000,29898=>1000,29899=>1000,29900=>1000,29901=>1000,29902=>1000,29903=>1000,29904=>1000,29905=>1000,29906=>1000,29907=>1000,29908=>1000, + 29909=>1000,29910=>1000,29911=>1000,29912=>1000,29913=>1000,29914=>1000,29915=>1000,29916=>1000,29917=>1000,29918=>1000,29919=>1000,29920=>1000,29921=>1000,29922=>1000,29923=>1000,29924=>1000, + 29925=>1000,29926=>1000,29927=>1000,29928=>1000,29929=>1000,29930=>1000,29931=>1000,29932=>1000,29933=>1000,29934=>1000,29935=>1000,29936=>1000,29937=>1000,29938=>1000,29939=>1000,29940=>1000, + 29941=>1000,29942=>1000,29943=>1000,29944=>1000,29945=>1000,29946=>1000,29947=>1000,29948=>1000,29949=>1000,29950=>1000,29951=>1000,29952=>1000,29953=>1000,29954=>1000,29955=>1000,29956=>1000, + 29957=>1000,29958=>1000,29959=>1000,29960=>1000,29961=>1000,29962=>1000,29963=>1000,29964=>1000,29965=>1000,29966=>1000,29967=>1000,29968=>1000,29969=>1000,29970=>1000,29971=>1000,29972=>1000, + 29973=>1000,29974=>1000,29975=>1000,29976=>1000,29977=>1000,29978=>1000,29979=>1000,29980=>1000,29981=>1000,29982=>1000,29983=>1000,29984=>1000,29985=>1000,29986=>1000,29987=>1000,29988=>1000, + 29989=>1000,29990=>1000,29991=>1000,29992=>1000,29993=>1000,29994=>1000,29995=>1000,29996=>1000,29997=>1000,29998=>1000,29999=>1000,30000=>1000,30001=>1000,30002=>1000,30003=>1000,30004=>1000, + 30005=>1000,30006=>1000,30007=>1000,30008=>1000,30009=>1000,30010=>1000,30011=>1000,30012=>1000,30013=>1000,30014=>1000,30015=>1000,30016=>1000,30017=>1000,30018=>1000,30019=>1000,30020=>1000, + 30021=>1000,30022=>1000,30023=>1000,30024=>1000,30025=>1000,30026=>1000,30027=>1000,30028=>1000,30029=>1000,30030=>1000,30031=>1000,30032=>1000,30033=>1000,30034=>1000,30035=>1000,30036=>1000, + 30037=>1000,30038=>1000,30039=>1000,30040=>1000,30041=>1000,30042=>1000,30043=>1000,30044=>1000,30045=>1000,30046=>1000,30047=>1000,30048=>1000,30049=>1000,30050=>1000,30051=>1000,30052=>1000, + 30053=>1000,30054=>1000,30055=>1000,30056=>1000,30057=>1000,30058=>1000,30059=>1000,30060=>1000,30061=>1000,30062=>1000,30063=>1000,30064=>1000,30065=>1000,30066=>1000,30067=>1000,30068=>1000, + 30069=>1000,30070=>1000,30071=>1000,30072=>1000,30073=>1000,30074=>1000,30075=>1000,30076=>1000,30077=>1000,30078=>1000,30079=>1000,30080=>1000,30081=>1000,30082=>1000,30083=>1000,30084=>1000, + 30085=>1000,30086=>1000,30087=>1000,30088=>1000,30089=>1000,30090=>1000,30091=>1000,30092=>1000,30093=>1000,30094=>1000,30095=>1000,30096=>1000,30097=>1000,30098=>1000,30099=>1000,30100=>1000, + 30101=>1000,30102=>1000,30103=>1000,30104=>1000,30105=>1000,30106=>1000,30107=>1000,30108=>1000,30109=>1000,30110=>1000,30111=>1000,30112=>1000,30113=>1000,30114=>1000,30115=>1000,30116=>1000, + 30117=>1000,30118=>1000,30119=>1000,30120=>1000,30121=>1000,30122=>1000,30123=>1000,30124=>1000,30125=>1000,30126=>1000,30127=>1000,30128=>1000,30129=>1000,30130=>1000,30131=>1000,30132=>1000, + 30133=>1000,30134=>1000,30135=>1000,30136=>1000,30137=>1000,30138=>1000,30139=>1000,30140=>1000,30141=>1000,30142=>1000,30143=>1000,30144=>1000,30145=>1000,30146=>1000,30147=>1000,30148=>1000, + 30149=>1000,30150=>1000,30151=>1000,30152=>1000,30153=>1000,30154=>1000,30155=>1000,30156=>1000,30157=>1000,30158=>1000,30159=>1000,30160=>1000,30161=>1000,30162=>1000,30163=>1000,30164=>1000, + 30165=>1000,30166=>1000,30167=>1000,30168=>1000,30169=>1000,30170=>1000,30171=>1000,30172=>1000,30173=>1000,30174=>1000,30175=>1000,30176=>1000,30177=>1000,30178=>1000,30179=>1000,30180=>1000, + 30181=>1000,30182=>1000,30183=>1000,30184=>1000,30185=>1000,30186=>1000,30187=>1000,30188=>1000,30189=>1000,30190=>1000,30191=>1000,30192=>1000,30193=>1000,30194=>1000,30195=>1000,30196=>1000, + 30197=>1000,30198=>1000,30199=>1000,30200=>1000,30201=>1000,30202=>1000,30203=>1000,30204=>1000,30205=>1000,30206=>1000,30207=>1000,30208=>1000,30209=>1000,30210=>1000,30211=>1000,30212=>1000, + 30213=>1000,30214=>1000,30215=>1000,30216=>1000,30217=>1000,30218=>1000,30219=>1000,30220=>1000,30221=>1000,30222=>1000,30223=>1000,30224=>1000,30225=>1000,30226=>1000,30227=>1000,30228=>1000, + 30229=>1000,30230=>1000,30231=>1000,30232=>1000,30233=>1000,30234=>1000,30235=>1000,30236=>1000,30237=>1000,30238=>1000,30239=>1000,30240=>1000,30241=>1000,30242=>1000,30243=>1000,30244=>1000, + 30245=>1000,30246=>1000,30247=>1000,30248=>1000,30249=>1000,30250=>1000,30251=>1000,30252=>1000,30253=>1000,30254=>1000,30255=>1000,30256=>1000,30257=>1000,30258=>1000,30259=>1000,30260=>1000, + 30261=>1000,30262=>1000,30263=>1000,30264=>1000,30265=>1000,30266=>1000,30267=>1000,30268=>1000,30269=>1000,30270=>1000,30271=>1000,30272=>1000,30273=>1000,30274=>1000,30275=>1000,30276=>1000, + 30277=>1000,30278=>1000,30279=>1000,30280=>1000,30281=>1000,30282=>1000,30283=>1000,30284=>1000,30285=>1000,30286=>1000,30287=>1000,30288=>1000,30289=>1000,30290=>1000,30291=>1000,30292=>1000, + 30293=>1000,30294=>1000,30295=>1000,30296=>1000,30297=>1000,30298=>1000,30299=>1000,30300=>1000,30301=>1000,30302=>1000,30303=>1000,30304=>1000,30305=>1000,30306=>1000,30307=>1000,30308=>1000, + 30309=>1000,30310=>1000,30311=>1000,30312=>1000,30313=>1000,30314=>1000,30315=>1000,30316=>1000,30317=>1000,30318=>1000,30319=>1000,30320=>1000,30321=>1000,30322=>1000,30323=>1000,30324=>1000, + 30325=>1000,30326=>1000,30327=>1000,30328=>1000,30329=>1000,30330=>1000,30331=>1000,30332=>1000,30333=>1000,30334=>1000,30335=>1000,30336=>1000,30337=>1000,30338=>1000,30339=>1000,30340=>1000, + 30341=>1000,30342=>1000,30343=>1000,30344=>1000,30345=>1000,30346=>1000,30347=>1000,30348=>1000,30349=>1000,30350=>1000,30351=>1000,30352=>1000,30353=>1000,30354=>1000,30355=>1000,30356=>1000, + 30357=>1000,30358=>1000,30359=>1000,30360=>1000,30361=>1000,30362=>1000,30363=>1000,30364=>1000,30365=>1000,30366=>1000,30367=>1000,30368=>1000,30369=>1000,30370=>1000,30371=>1000,30372=>1000, + 30373=>1000,30374=>1000,30375=>1000,30376=>1000,30377=>1000,30378=>1000,30379=>1000,30380=>1000,30381=>1000,30382=>1000,30383=>1000,30384=>1000,30385=>1000,30386=>1000,30387=>1000,30388=>1000, + 30389=>1000,30390=>1000,30391=>1000,30392=>1000,30393=>1000,30394=>1000,30395=>1000,30396=>1000,30397=>1000,30398=>1000,30399=>1000,30400=>1000,30401=>1000,30402=>1000,30403=>1000,30404=>1000, + 30405=>1000,30406=>1000,30407=>1000,30408=>1000,30409=>1000,30410=>1000,30411=>1000,30412=>1000,30413=>1000,30414=>1000,30415=>1000,30416=>1000,30417=>1000,30418=>1000,30419=>1000,30420=>1000, + 30421=>1000,30422=>1000,30423=>1000,30424=>1000,30425=>1000,30426=>1000,30427=>1000,30428=>1000,30429=>1000,30430=>1000,30431=>1000,30432=>1000,30433=>1000,30434=>1000,30435=>1000,30436=>1000, + 30437=>1000,30438=>1000,30439=>1000,30440=>1000,30441=>1000,30442=>1000,30443=>1000,30444=>1000,30445=>1000,30446=>1000,30447=>1000,30448=>1000,30449=>1000,30450=>1000,30451=>1000,30452=>1000, + 30453=>1000,30454=>1000,30455=>1000,30456=>1000,30457=>1000,30458=>1000,30459=>1000,30460=>1000,30461=>1000,30462=>1000,30463=>1000,30464=>1000,30465=>1000,30466=>1000,30467=>1000,30468=>1000, + 30469=>1000,30470=>1000,30471=>1000,30472=>1000,30473=>1000,30474=>1000,30475=>1000,30476=>1000,30477=>1000,30478=>1000,30479=>1000,30480=>1000,30481=>1000,30482=>1000,30483=>1000,30484=>1000, + 30485=>1000,30486=>1000,30487=>1000,30488=>1000,30489=>1000,30490=>1000,30491=>1000,30492=>1000,30493=>1000,30494=>1000,30495=>1000,30496=>1000,30497=>1000,30498=>1000,30499=>1000,30500=>1000, + 30501=>1000,30502=>1000,30503=>1000,30504=>1000,30505=>1000,30506=>1000,30507=>1000,30508=>1000,30509=>1000,30510=>1000,30511=>1000,30512=>1000,30513=>1000,30514=>1000,30515=>1000,30516=>1000, + 30517=>1000,30518=>1000,30519=>1000,30520=>1000,30521=>1000,30522=>1000,30523=>1000,30524=>1000,30525=>1000,30526=>1000,30527=>1000,30528=>1000,30529=>1000,30530=>1000,30531=>1000,30532=>1000, + 30533=>1000,30534=>1000,30535=>1000,30536=>1000,30537=>1000,30538=>1000,30539=>1000,30540=>1000,30541=>1000,30542=>1000,30543=>1000,30544=>1000,30545=>1000,30546=>1000,30547=>1000,30548=>1000, + 30549=>1000,30550=>1000,30551=>1000,30552=>1000,30553=>1000,30554=>1000,30555=>1000,30556=>1000,30557=>1000,30558=>1000,30559=>1000,30560=>1000,30561=>1000,30562=>1000,30563=>1000,30564=>1000, + 30565=>1000,30566=>1000,30567=>1000,30568=>1000,30569=>1000,30570=>1000,30571=>1000,30572=>1000,30573=>1000,30574=>1000,30575=>1000,30576=>1000,30577=>1000,30578=>1000,30579=>1000,30580=>1000, + 30581=>1000,30582=>1000,30583=>1000,30584=>1000,30585=>1000,30586=>1000,30587=>1000,30588=>1000,30589=>1000,30590=>1000,30591=>1000,30592=>1000,30593=>1000,30594=>1000,30595=>1000,30596=>1000, + 30597=>1000,30598=>1000,30599=>1000,30600=>1000,30601=>1000,30602=>1000,30603=>1000,30604=>1000,30605=>1000,30606=>1000,30607=>1000,30608=>1000,30609=>1000,30610=>1000,30611=>1000,30612=>1000, + 30613=>1000,30614=>1000,30615=>1000,30616=>1000,30617=>1000,30618=>1000,30619=>1000,30620=>1000,30621=>1000,30622=>1000,30623=>1000,30624=>1000,30625=>1000,30626=>1000,30627=>1000,30628=>1000, + 30629=>1000,30630=>1000,30631=>1000,30632=>1000,30633=>1000,30634=>1000,30635=>1000,30636=>1000,30637=>1000,30638=>1000,30639=>1000,30640=>1000,30641=>1000,30642=>1000,30643=>1000,30644=>1000, + 30645=>1000,30646=>1000,30647=>1000,30648=>1000,30649=>1000,30650=>1000,30651=>1000,30652=>1000,30653=>1000,30654=>1000,30655=>1000,30656=>1000,30657=>1000,30658=>1000,30659=>1000,30660=>1000, + 30661=>1000,30662=>1000,30663=>1000,30664=>1000,30665=>1000,30666=>1000,30667=>1000,30668=>1000,30669=>1000,30670=>1000,30671=>1000,30672=>1000,30673=>1000,30674=>1000,30675=>1000,30676=>1000, + 30677=>1000,30678=>1000,30679=>1000,30680=>1000,30681=>1000,30682=>1000,30683=>1000,30684=>1000,30685=>1000,30686=>1000,30687=>1000,30688=>1000,30689=>1000,30690=>1000,30691=>1000,30692=>1000, + 30693=>1000,30694=>1000,30695=>1000,30696=>1000,30697=>1000,30698=>1000,30699=>1000,30700=>1000,30701=>1000,30702=>1000,30703=>1000,30704=>1000,30705=>1000,30706=>1000,30707=>1000,30708=>1000, + 30709=>1000,30710=>1000,30711=>1000,30712=>1000,30713=>1000,30714=>1000,30715=>1000,30716=>1000,30717=>1000,30718=>1000,30719=>1000,30720=>1000,30721=>1000,30722=>1000,30723=>1000,30724=>1000, + 30725=>1000,30726=>1000,30727=>1000,30728=>1000,30729=>1000,30730=>1000,30731=>1000,30732=>1000,30733=>1000,30734=>1000,30735=>1000,30736=>1000,30737=>1000,30738=>1000,30739=>1000,30740=>1000, + 30741=>1000,30742=>1000,30743=>1000,30744=>1000,30745=>1000,30746=>1000,30747=>1000,30748=>1000,30749=>1000,30750=>1000,30751=>1000,30752=>1000,30753=>1000,30754=>1000,30755=>1000,30756=>1000, + 30757=>1000,30758=>1000,30759=>1000,30760=>1000,30761=>1000,30762=>1000,30763=>1000,30764=>1000,30765=>1000,30766=>1000,30767=>1000,30768=>1000,30769=>1000,30770=>1000,30771=>1000,30772=>1000, + 30773=>1000,30774=>1000,30775=>1000,30776=>1000,30777=>1000,30778=>1000,30779=>1000,30780=>1000,30781=>1000,30782=>1000,30783=>1000,30784=>1000,30785=>1000,30786=>1000,30787=>1000,30788=>1000, + 30789=>1000,30790=>1000,30791=>1000,30792=>1000,30793=>1000,30794=>1000,30795=>1000,30796=>1000,30797=>1000,30798=>1000,30799=>1000,30800=>1000,30801=>1000,30802=>1000,30803=>1000,30804=>1000, + 30805=>1000,30806=>1000,30807=>1000,30808=>1000,30809=>1000,30810=>1000,30811=>1000,30812=>1000,30813=>1000,30814=>1000,30815=>1000,30816=>1000,30817=>1000,30818=>1000,30819=>1000,30820=>1000, + 30821=>1000,30822=>1000,30823=>1000,30824=>1000,30825=>1000,30826=>1000,30827=>1000,30828=>1000,30829=>1000,30830=>1000,30831=>1000,30832=>1000,30833=>1000,30834=>1000,30835=>1000,30836=>1000, + 30837=>1000,30838=>1000,30839=>1000,30840=>1000,30841=>1000,30842=>1000,30843=>1000,30844=>1000,30845=>1000,30846=>1000,30847=>1000,30848=>1000,30849=>1000,30850=>1000,30851=>1000,30852=>1000, + 30853=>1000,30854=>1000,30855=>1000,30856=>1000,30857=>1000,30858=>1000,30859=>1000,30860=>1000,30861=>1000,30862=>1000,30863=>1000,30864=>1000,30865=>1000,30866=>1000,30867=>1000,30868=>1000, + 30869=>1000,30870=>1000,30871=>1000,30872=>1000,30873=>1000,30874=>1000,30875=>1000,30876=>1000,30877=>1000,30878=>1000,30879=>1000,30880=>1000,30881=>1000,30882=>1000,30883=>1000,30884=>1000, + 30885=>1000,30886=>1000,30887=>1000,30888=>1000,30889=>1000,30890=>1000,30891=>1000,30892=>1000,30893=>1000,30894=>1000,30895=>1000,30896=>1000,30897=>1000,30898=>1000,30899=>1000,30900=>1000, + 30901=>1000,30902=>1000,30903=>1000,30904=>1000,30905=>1000,30906=>1000,30907=>1000,30908=>1000,30909=>1000,30910=>1000,30911=>1000,30912=>1000,30913=>1000,30914=>1000,30915=>1000,30916=>1000, + 30917=>1000,30918=>1000,30919=>1000,30920=>1000,30921=>1000,30922=>1000,30923=>1000,30924=>1000,30925=>1000,30926=>1000,30927=>1000,30928=>1000,30929=>1000,30930=>1000,30931=>1000,30932=>1000, + 30933=>1000,30934=>1000,30935=>1000,30936=>1000,30937=>1000,30938=>1000,30939=>1000,30940=>1000,30941=>1000,30942=>1000,30943=>1000,30944=>1000,30945=>1000,30946=>1000,30947=>1000,30948=>1000, + 30949=>1000,30950=>1000,30951=>1000,30952=>1000,30953=>1000,30954=>1000,30955=>1000,30956=>1000,30957=>1000,30958=>1000,30959=>1000,30960=>1000,30961=>1000,30962=>1000,30963=>1000,30964=>1000, + 30965=>1000,30966=>1000,30967=>1000,30968=>1000,30969=>1000,30970=>1000,30971=>1000,30972=>1000,30973=>1000,30974=>1000,30975=>1000,30976=>1000,30977=>1000,30978=>1000,30979=>1000,30980=>1000, + 30981=>1000,30982=>1000,30983=>1000,30984=>1000,30985=>1000,30986=>1000,30987=>1000,30988=>1000,30989=>1000,30990=>1000,30991=>1000,30992=>1000,30993=>1000,30994=>1000,30995=>1000,30996=>1000, + 30997=>1000,30998=>1000,30999=>1000,31000=>1000,31001=>1000,31002=>1000,31003=>1000,31004=>1000,31005=>1000,31006=>1000,31007=>1000,31008=>1000,31009=>1000,31010=>1000,31011=>1000,31012=>1000, + 31013=>1000,31014=>1000,31015=>1000,31016=>1000,31017=>1000,31018=>1000,31019=>1000,31020=>1000,31021=>1000,31022=>1000,31023=>1000,31024=>1000,31025=>1000,31026=>1000,31027=>1000,31028=>1000, + 31029=>1000,31030=>1000,31031=>1000,31032=>1000,31033=>1000,31034=>1000,31035=>1000,31036=>1000,31037=>1000,31038=>1000,31039=>1000,31040=>1000,31041=>1000,31042=>1000,31043=>1000,31044=>1000, + 31045=>1000,31046=>1000,31047=>1000,31048=>1000,31049=>1000,31050=>1000,31051=>1000,31052=>1000,31053=>1000,31054=>1000,31055=>1000,31056=>1000,31057=>1000,31058=>1000,31059=>1000,31060=>1000, + 31061=>1000,31062=>1000,31063=>1000,31064=>1000,31065=>1000,31066=>1000,31067=>1000,31068=>1000,31069=>1000,31070=>1000,31071=>1000,31072=>1000,31073=>1000,31074=>1000,31075=>1000,31076=>1000, + 31077=>1000,31078=>1000,31079=>1000,31080=>1000,31081=>1000,31082=>1000,31083=>1000,31084=>1000,31085=>1000,31086=>1000,31087=>1000,31088=>1000,31089=>1000,31090=>1000,31091=>1000,31092=>1000, + 31093=>1000,31094=>1000,31095=>1000,31096=>1000,31097=>1000,31098=>1000,31099=>1000,31100=>1000,31101=>1000,31102=>1000,31103=>1000,31104=>1000,31105=>1000,31106=>1000,31107=>1000,31108=>1000, + 31109=>1000,31110=>1000,31111=>1000,31112=>1000,31113=>1000,31114=>1000,31115=>1000,31116=>1000,31117=>1000,31118=>1000,31119=>1000,31120=>1000,31121=>1000,31122=>1000,31123=>1000,31124=>1000, + 31125=>1000,31126=>1000,31127=>1000,31128=>1000,31129=>1000,31130=>1000,31131=>1000,31132=>1000,31133=>1000,31134=>1000,31135=>1000,31136=>1000,31137=>1000,31138=>1000,31139=>1000,31140=>1000, + 31141=>1000,31142=>1000,31143=>1000,31144=>1000,31145=>1000,31146=>1000,31147=>1000,31148=>1000,31149=>1000,31150=>1000,31151=>1000,31152=>1000,31153=>1000,31154=>1000,31155=>1000,31156=>1000, + 31157=>1000,31158=>1000,31159=>1000,31160=>1000,31161=>1000,31162=>1000,31163=>1000,31164=>1000,31165=>1000,31166=>1000,31167=>1000,31168=>1000,31169=>1000,31170=>1000,31171=>1000,31172=>1000, + 31173=>1000,31174=>1000,31175=>1000,31176=>1000,31177=>1000,31178=>1000,31179=>1000,31180=>1000,31181=>1000,31182=>1000,31183=>1000,31184=>1000,31185=>1000,31186=>1000,31187=>1000,31188=>1000, + 31189=>1000,31190=>1000,31191=>1000,31192=>1000,31193=>1000,31194=>1000,31195=>1000,31196=>1000,31197=>1000,31198=>1000,31199=>1000,31200=>1000,31201=>1000,31202=>1000,31203=>1000,31204=>1000, + 31205=>1000,31206=>1000,31207=>1000,31208=>1000,31209=>1000,31210=>1000,31211=>1000,31212=>1000,31213=>1000,31214=>1000,31215=>1000,31216=>1000,31217=>1000,31218=>1000,31219=>1000,31220=>1000, + 31221=>1000,31222=>1000,31223=>1000,31224=>1000,31225=>1000,31226=>1000,31227=>1000,31228=>1000,31229=>1000,31230=>1000,31231=>1000,31232=>1000,31233=>1000,31234=>1000,31235=>1000,31236=>1000, + 31237=>1000,31238=>1000,31239=>1000,31240=>1000,31241=>1000,31242=>1000,31243=>1000,31244=>1000,31245=>1000,31246=>1000,31247=>1000,31248=>1000,31249=>1000,31250=>1000,31251=>1000,31252=>1000, + 31253=>1000,31254=>1000,31255=>1000,31256=>1000,31257=>1000,31258=>1000,31259=>1000,31260=>1000,31261=>1000,31262=>1000,31263=>1000,31264=>1000,31265=>1000,31266=>1000,31267=>1000,31268=>1000, + 31269=>1000,31270=>1000,31271=>1000,31272=>1000,31273=>1000,31274=>1000,31275=>1000,31276=>1000,31277=>1000,31278=>1000,31279=>1000,31280=>1000,31281=>1000,31282=>1000,31283=>1000,31284=>1000, + 31285=>1000,31286=>1000,31287=>1000,31288=>1000,31289=>1000,31290=>1000,31291=>1000,31292=>1000,31293=>1000,31294=>1000,31295=>1000,31296=>1000,31297=>1000,31298=>1000,31299=>1000,31300=>1000, + 31301=>1000,31302=>1000,31303=>1000,31304=>1000,31305=>1000,31306=>1000,31307=>1000,31308=>1000,31309=>1000,31310=>1000,31311=>1000,31312=>1000,31313=>1000,31314=>1000,31315=>1000,31316=>1000, + 31317=>1000,31318=>1000,31319=>1000,31320=>1000,31321=>1000,31322=>1000,31323=>1000,31324=>1000,31325=>1000,31326=>1000,31327=>1000,31328=>1000,31329=>1000,31330=>1000,31331=>1000,31332=>1000, + 31333=>1000,31334=>1000,31335=>1000,31336=>1000,31337=>1000,31338=>1000,31339=>1000,31340=>1000,31341=>1000,31342=>1000,31343=>1000,31344=>1000,31345=>1000,31346=>1000,31347=>1000,31348=>1000, + 31349=>1000,31350=>1000,31351=>1000,31352=>1000,31353=>1000,31354=>1000,31355=>1000,31356=>1000,31357=>1000,31358=>1000,31359=>1000,31360=>1000,31361=>1000,31362=>1000,31363=>1000,31364=>1000, + 31365=>1000,31366=>1000,31367=>1000,31368=>1000,31369=>1000,31370=>1000,31371=>1000,31372=>1000,31373=>1000,31374=>1000,31375=>1000,31376=>1000,31377=>1000,31378=>1000,31379=>1000,31380=>1000, + 31381=>1000,31382=>1000,31383=>1000,31384=>1000,31385=>1000,31386=>1000,31387=>1000,31388=>1000,31389=>1000,31390=>1000,31391=>1000,31392=>1000,31393=>1000,31394=>1000,31395=>1000,31396=>1000, + 31397=>1000,31398=>1000,31399=>1000,31400=>1000,31401=>1000,31402=>1000,31403=>1000,31404=>1000,31405=>1000,31406=>1000,31407=>1000,31408=>1000,31409=>1000,31410=>1000,31411=>1000,31412=>1000, + 31413=>1000,31414=>1000,31415=>1000,31416=>1000,31417=>1000,31418=>1000,31419=>1000,31420=>1000,31421=>1000,31422=>1000,31423=>1000,31424=>1000,31425=>1000,31426=>1000,31427=>1000,31428=>1000, + 31429=>1000,31430=>1000,31431=>1000,31432=>1000,31433=>1000,31434=>1000,31435=>1000,31436=>1000,31437=>1000,31438=>1000,31439=>1000,31440=>1000,31441=>1000,31442=>1000,31443=>1000,31444=>1000, + 31445=>1000,31446=>1000,31447=>1000,31448=>1000,31449=>1000,31450=>1000,31451=>1000,31452=>1000,31453=>1000,31454=>1000,31455=>1000,31456=>1000,31457=>1000,31458=>1000,31459=>1000,31460=>1000, + 31461=>1000,31462=>1000,31463=>1000,31464=>1000,31465=>1000,31466=>1000,31467=>1000,31468=>1000,31469=>1000,31470=>1000,31471=>1000,31472=>1000,31473=>1000,31474=>1000,31475=>1000,31476=>1000, + 31477=>1000,31478=>1000,31479=>1000,31480=>1000,31481=>1000,31482=>1000,31483=>1000,31484=>1000,31485=>1000,31486=>1000,31487=>1000,31488=>1000,31489=>1000,31490=>1000,31491=>1000,31492=>1000, + 31493=>1000,31494=>1000,31495=>1000,31496=>1000,31497=>1000,31498=>1000,31499=>1000,31500=>1000,31501=>1000,31502=>1000,31503=>1000,31504=>1000,31505=>1000,31506=>1000,31507=>1000,31508=>1000, + 31509=>1000,31510=>1000,31511=>1000,31512=>1000,31513=>1000,31514=>1000,31515=>1000,31516=>1000,31517=>1000,31518=>1000,31519=>1000,31520=>1000,31521=>1000,31522=>1000,31523=>1000,31524=>1000, + 31525=>1000,31526=>1000,31527=>1000,31528=>1000,31529=>1000,31530=>1000,31531=>1000,31532=>1000,31533=>1000,31534=>1000,31535=>1000,31536=>1000,31537=>1000,31538=>1000,31539=>1000,31540=>1000, + 31541=>1000,31542=>1000,31543=>1000,31544=>1000,31545=>1000,31546=>1000,31547=>1000,31548=>1000,31549=>1000,31550=>1000,31551=>1000,31552=>1000,31553=>1000,31554=>1000,31555=>1000,31556=>1000, + 31557=>1000,31558=>1000,31559=>1000,31560=>1000,31561=>1000,31562=>1000,31563=>1000,31564=>1000,31565=>1000,31566=>1000,31567=>1000,31568=>1000,31569=>1000,31570=>1000,31571=>1000,31572=>1000, + 31573=>1000,31574=>1000,31575=>1000,31576=>1000,31577=>1000,31578=>1000,31579=>1000,31580=>1000,31581=>1000,31582=>1000,31583=>1000,31584=>1000,31585=>1000,31586=>1000,31587=>1000,31588=>1000, + 31589=>1000,31590=>1000,31591=>1000,31592=>1000,31593=>1000,31594=>1000,31595=>1000,31596=>1000,31597=>1000,31598=>1000,31599=>1000,31600=>1000,31601=>1000,31602=>1000,31603=>1000,31604=>1000, + 31605=>1000,31606=>1000,31607=>1000,31608=>1000,31609=>1000,31610=>1000,31611=>1000,31612=>1000,31613=>1000,31614=>1000,31615=>1000,31616=>1000,31617=>1000,31618=>1000,31619=>1000,31620=>1000, + 31621=>1000,31622=>1000,31623=>1000,31624=>1000,31625=>1000,31626=>1000,31627=>1000,31628=>1000,31629=>1000,31630=>1000,31631=>1000,31632=>1000,31633=>1000,31634=>1000,31635=>1000,31636=>1000, + 31637=>1000,31638=>1000,31639=>1000,31640=>1000,31641=>1000,31642=>1000,31643=>1000,31644=>1000,31645=>1000,31646=>1000,31647=>1000,31648=>1000,31649=>1000,31650=>1000,31651=>1000,31652=>1000, + 31653=>1000,31654=>1000,31655=>1000,31656=>1000,31657=>1000,31658=>1000,31659=>1000,31660=>1000,31661=>1000,31662=>1000,31663=>1000,31664=>1000,31665=>1000,31666=>1000,31667=>1000,31668=>1000, + 31669=>1000,31670=>1000,31671=>1000,31672=>1000,31673=>1000,31674=>1000,31675=>1000,31676=>1000,31677=>1000,31678=>1000,31679=>1000,31680=>1000,31681=>1000,31682=>1000,31683=>1000,31684=>1000, + 31685=>1000,31686=>1000,31687=>1000,31688=>1000,31689=>1000,31690=>1000,31691=>1000,31692=>1000,31693=>1000,31694=>1000,31695=>1000,31696=>1000,31697=>1000,31698=>1000,31699=>1000,31700=>1000, + 31701=>1000,31702=>1000,31703=>1000,31704=>1000,31705=>1000,31706=>1000,31707=>1000,31708=>1000,31709=>1000,31710=>1000,31711=>1000,31712=>1000,31713=>1000,31714=>1000,31715=>1000,31716=>1000, + 31717=>1000,31718=>1000,31719=>1000,31720=>1000,31721=>1000,31722=>1000,31723=>1000,31724=>1000,31725=>1000,31726=>1000,31727=>1000,31728=>1000,31729=>1000,31730=>1000,31731=>1000,31732=>1000, + 31733=>1000,31734=>1000,31735=>1000,31736=>1000,31737=>1000,31738=>1000,31739=>1000,31740=>1000,31741=>1000,31742=>1000,31743=>1000,31744=>1000,31745=>1000,31746=>1000,31747=>1000,31748=>1000, + 31749=>1000,31750=>1000,31751=>1000,31752=>1000,31753=>1000,31754=>1000,31755=>1000,31756=>1000,31757=>1000,31758=>1000,31759=>1000,31760=>1000,31761=>1000,31762=>1000,31763=>1000,31764=>1000, + 31765=>1000,31766=>1000,31767=>1000,31768=>1000,31769=>1000,31770=>1000,31771=>1000,31772=>1000,31773=>1000,31774=>1000,31775=>1000,31776=>1000,31777=>1000,31778=>1000,31779=>1000,31780=>1000, + 31781=>1000,31782=>1000,31783=>1000,31784=>1000,31785=>1000,31786=>1000,31787=>1000,31788=>1000,31789=>1000,31790=>1000,31791=>1000,31792=>1000,31793=>1000,31794=>1000,31795=>1000,31796=>1000, + 31797=>1000,31798=>1000,31799=>1000,31800=>1000,31801=>1000,31802=>1000,31803=>1000,31804=>1000,31805=>1000,31806=>1000,31807=>1000,31808=>1000,31809=>1000,31810=>1000,31811=>1000,31812=>1000, + 31813=>1000,31814=>1000,31815=>1000,31816=>1000,31817=>1000,31818=>1000,31819=>1000,31820=>1000,31821=>1000,31822=>1000,31823=>1000,31824=>1000,31825=>1000,31826=>1000,31827=>1000,31828=>1000, + 31829=>1000,31830=>1000,31831=>1000,31832=>1000,31833=>1000,31834=>1000,31835=>1000,31836=>1000,31837=>1000,31838=>1000,31839=>1000,31840=>1000,31841=>1000,31842=>1000,31843=>1000,31844=>1000, + 31845=>1000,31846=>1000,31847=>1000,31848=>1000,31849=>1000,31850=>1000,31851=>1000,31852=>1000,31853=>1000,31854=>1000,31855=>1000,31856=>1000,31857=>1000,31858=>1000,31859=>1000,31860=>1000, + 31861=>1000,31862=>1000,31863=>1000,31864=>1000,31865=>1000,31866=>1000,31867=>1000,31868=>1000,31869=>1000,31870=>1000,31871=>1000,31872=>1000,31873=>1000,31874=>1000,31875=>1000,31876=>1000, + 31877=>1000,31878=>1000,31879=>1000,31880=>1000,31881=>1000,31882=>1000,31883=>1000,31884=>1000,31885=>1000,31886=>1000,31887=>1000,31888=>1000,31889=>1000,31890=>1000,31891=>1000,31892=>1000, + 31893=>1000,31894=>1000,31895=>1000,31896=>1000,31897=>1000,31898=>1000,31899=>1000,31900=>1000,31901=>1000,31902=>1000,31903=>1000,31904=>1000,31905=>1000,31906=>1000,31907=>1000,31908=>1000, + 31909=>1000,31910=>1000,31911=>1000,31912=>1000,31913=>1000,31914=>1000,31915=>1000,31916=>1000,31917=>1000,31918=>1000,31919=>1000,31920=>1000,31921=>1000,31922=>1000,31923=>1000,31924=>1000, + 31925=>1000,31926=>1000,31927=>1000,31928=>1000,31929=>1000,31930=>1000,31931=>1000,31932=>1000,31933=>1000,31934=>1000,31935=>1000,31936=>1000,31937=>1000,31938=>1000,31939=>1000,31940=>1000, + 31941=>1000,31942=>1000,31943=>1000,31944=>1000,31945=>1000,31946=>1000,31947=>1000,31948=>1000,31949=>1000,31950=>1000,31951=>1000,31952=>1000,31953=>1000,31954=>1000,31955=>1000,31956=>1000, + 31957=>1000,31958=>1000,31959=>1000,31960=>1000,31961=>1000,31962=>1000,31963=>1000,31964=>1000,31965=>1000,31966=>1000,31967=>1000,31968=>1000,31969=>1000,31970=>1000,31971=>1000,31972=>1000, + 31973=>1000,31974=>1000,31975=>1000,31976=>1000,31977=>1000,31978=>1000,31979=>1000,31980=>1000,31981=>1000,31982=>1000,31983=>1000,31984=>1000,31985=>1000,31986=>1000,31987=>1000,31988=>1000, + 31989=>1000,31990=>1000,31991=>1000,31992=>1000,31993=>1000,31994=>1000,31995=>1000,31996=>1000,31997=>1000,31998=>1000,31999=>1000,32000=>1000,32001=>1000,32002=>1000,32003=>1000,32004=>1000, + 32005=>1000,32006=>1000,32007=>1000,32008=>1000,32009=>1000,32010=>1000,32011=>1000,32012=>1000,32013=>1000,32014=>1000,32015=>1000,32016=>1000,32017=>1000,32018=>1000,32019=>1000,32020=>1000, + 32021=>1000,32022=>1000,32023=>1000,32024=>1000,32025=>1000,32026=>1000,32027=>1000,32028=>1000,32029=>1000,32030=>1000,32031=>1000,32032=>1000,32033=>1000,32034=>1000,32035=>1000,32036=>1000, + 32037=>1000,32038=>1000,32039=>1000,32040=>1000,32041=>1000,32042=>1000,32043=>1000,32044=>1000,32045=>1000,32046=>1000,32047=>1000,32048=>1000,32049=>1000,32050=>1000,32051=>1000,32052=>1000, + 32053=>1000,32054=>1000,32055=>1000,32056=>1000,32057=>1000,32058=>1000,32059=>1000,32060=>1000,32061=>1000,32062=>1000,32063=>1000,32064=>1000,32065=>1000,32066=>1000,32067=>1000,32068=>1000, + 32069=>1000,32070=>1000,32071=>1000,32072=>1000,32073=>1000,32074=>1000,32075=>1000,32076=>1000,32077=>1000,32078=>1000,32079=>1000,32080=>1000,32081=>1000,32082=>1000,32083=>1000,32084=>1000, + 32085=>1000,32086=>1000,32087=>1000,32088=>1000,32089=>1000,32090=>1000,32091=>1000,32092=>1000,32093=>1000,32094=>1000,32095=>1000,32096=>1000,32097=>1000,32098=>1000,32099=>1000,32100=>1000, + 32101=>1000,32102=>1000,32103=>1000,32104=>1000,32105=>1000,32106=>1000,32107=>1000,32108=>1000,32109=>1000,32110=>1000,32111=>1000,32112=>1000,32113=>1000,32114=>1000,32115=>1000,32116=>1000, + 32117=>1000,32118=>1000,32119=>1000,32120=>1000,32121=>1000,32122=>1000,32123=>1000,32124=>1000,32125=>1000,32126=>1000,32127=>1000,32128=>1000,32129=>1000,32130=>1000,32131=>1000,32132=>1000, + 32133=>1000,32134=>1000,32135=>1000,32136=>1000,32137=>1000,32138=>1000,32139=>1000,32140=>1000,32141=>1000,32142=>1000,32143=>1000,32144=>1000,32145=>1000,32146=>1000,32147=>1000,32148=>1000, + 32149=>1000,32150=>1000,32151=>1000,32152=>1000,32153=>1000,32154=>1000,32155=>1000,32156=>1000,32157=>1000,32158=>1000,32159=>1000,32160=>1000,32161=>1000,32162=>1000,32163=>1000,32164=>1000, + 32165=>1000,32166=>1000,32167=>1000,32168=>1000,32169=>1000,32170=>1000,32171=>1000,32172=>1000,32173=>1000,32174=>1000,32175=>1000,32176=>1000,32177=>1000,32178=>1000,32179=>1000,32180=>1000, + 32181=>1000,32182=>1000,32183=>1000,32184=>1000,32185=>1000,32186=>1000,32187=>1000,32188=>1000,32189=>1000,32190=>1000,32191=>1000,32192=>1000,32193=>1000,32194=>1000,32195=>1000,32196=>1000, + 32197=>1000,32198=>1000,32199=>1000,32200=>1000,32201=>1000,32202=>1000,32203=>1000,32204=>1000,32205=>1000,32206=>1000,32207=>1000,32208=>1000,32209=>1000,32210=>1000,32211=>1000,32212=>1000, + 32213=>1000,32214=>1000,32215=>1000,32216=>1000,32217=>1000,32218=>1000,32219=>1000,32220=>1000,32221=>1000,32222=>1000,32223=>1000,32224=>1000,32225=>1000,32226=>1000,32227=>1000,32228=>1000, + 32229=>1000,32230=>1000,32231=>1000,32232=>1000,32233=>1000,32234=>1000,32235=>1000,32236=>1000,32237=>1000,32238=>1000,32239=>1000,32240=>1000,32241=>1000,32242=>1000,32243=>1000,32244=>1000, + 32245=>1000,32246=>1000,32247=>1000,32248=>1000,32249=>1000,32250=>1000,32251=>1000,32252=>1000,32253=>1000,32254=>1000,32255=>1000,32256=>1000,32257=>1000,32258=>1000,32259=>1000,32260=>1000, + 32261=>1000,32262=>1000,32263=>1000,32264=>1000,32265=>1000,32266=>1000,32267=>1000,32268=>1000,32269=>1000,32270=>1000,32271=>1000,32272=>1000,32273=>1000,32274=>1000,32275=>1000,32276=>1000, + 32277=>1000,32278=>1000,32279=>1000,32280=>1000,32281=>1000,32282=>1000,32283=>1000,32284=>1000,32285=>1000,32286=>1000,32287=>1000,32288=>1000,32289=>1000,32290=>1000,32291=>1000,32292=>1000, + 32293=>1000,32294=>1000,32295=>1000,32296=>1000,32297=>1000,32298=>1000,32299=>1000,32300=>1000,32301=>1000,32302=>1000,32303=>1000,32304=>1000,32305=>1000,32306=>1000,32307=>1000,32308=>1000, + 32309=>1000,32310=>1000,32311=>1000,32312=>1000,32313=>1000,32314=>1000,32315=>1000,32316=>1000,32317=>1000,32318=>1000,32319=>1000,32320=>1000,32321=>1000,32322=>1000,32323=>1000,32324=>1000, + 32325=>1000,32326=>1000,32327=>1000,32328=>1000,32329=>1000,32330=>1000,32331=>1000,32332=>1000,32333=>1000,32334=>1000,32335=>1000,32336=>1000,32337=>1000,32338=>1000,32339=>1000,32340=>1000, + 32341=>1000,32342=>1000,32343=>1000,32344=>1000,32345=>1000,32346=>1000,32347=>1000,32348=>1000,32349=>1000,32350=>1000,32351=>1000,32352=>1000,32353=>1000,32354=>1000,32355=>1000,32356=>1000, + 32357=>1000,32358=>1000,32359=>1000,32360=>1000,32361=>1000,32362=>1000,32363=>1000,32364=>1000,32365=>1000,32366=>1000,32367=>1000,32368=>1000,32369=>1000,32370=>1000,32371=>1000,32372=>1000, + 32373=>1000,32374=>1000,32375=>1000,32376=>1000,32377=>1000,32378=>1000,32379=>1000,32380=>1000,32381=>1000,32382=>1000,32383=>1000,32384=>1000,32385=>1000,32386=>1000,32387=>1000,32388=>1000, + 32389=>1000,32390=>1000,32391=>1000,32392=>1000,32393=>1000,32394=>1000,32395=>1000,32396=>1000,32397=>1000,32398=>1000,32399=>1000,32400=>1000,32401=>1000,32402=>1000,32403=>1000,32404=>1000, + 32405=>1000,32406=>1000,32407=>1000,32408=>1000,32409=>1000,32410=>1000,32411=>1000,32412=>1000,32413=>1000,32414=>1000,32415=>1000,32416=>1000,32417=>1000,32418=>1000,32419=>1000,32420=>1000, + 32421=>1000,32422=>1000,32423=>1000,32424=>1000,32425=>1000,32426=>1000,32427=>1000,32428=>1000,32429=>1000,32430=>1000,32431=>1000,32432=>1000,32433=>1000,32434=>1000,32435=>1000,32436=>1000, + 32437=>1000,32438=>1000,32439=>1000,32440=>1000,32441=>1000,32442=>1000,32443=>1000,32444=>1000,32445=>1000,32446=>1000,32447=>1000,32448=>1000,32449=>1000,32450=>1000,32451=>1000,32452=>1000, + 32453=>1000,32454=>1000,32455=>1000,32456=>1000,32457=>1000,32458=>1000,32459=>1000,32460=>1000,32461=>1000,32462=>1000,32463=>1000,32464=>1000,32465=>1000,32466=>1000,32467=>1000,32468=>1000, + 32469=>1000,32470=>1000,32471=>1000,32472=>1000,32473=>1000,32474=>1000,32475=>1000,32476=>1000,32477=>1000,32478=>1000,32479=>1000,32480=>1000,32481=>1000,32482=>1000,32483=>1000,32484=>1000, + 32485=>1000,32486=>1000,32487=>1000,32488=>1000,32489=>1000,32490=>1000,32491=>1000,32492=>1000,32493=>1000,32494=>1000,32495=>1000,32496=>1000,32497=>1000,32498=>1000,32499=>1000,32500=>1000, + 32501=>1000,32502=>1000,32503=>1000,32504=>1000,32505=>1000,32506=>1000,32507=>1000,32508=>1000,32509=>1000,32510=>1000,32511=>1000,32512=>1000,32513=>1000,32514=>1000,32515=>1000,32516=>1000, + 32517=>1000,32518=>1000,32519=>1000,32520=>1000,32521=>1000,32522=>1000,32523=>1000,32524=>1000,32525=>1000,32526=>1000,32527=>1000,32528=>1000,32529=>1000,32530=>1000,32531=>1000,32532=>1000, + 32533=>1000,32534=>1000,32535=>1000,32536=>1000,32537=>1000,32538=>1000,32539=>1000,32540=>1000,32541=>1000,32542=>1000,32543=>1000,32544=>1000,32545=>1000,32546=>1000,32547=>1000,32548=>1000, + 32549=>1000,32550=>1000,32551=>1000,32552=>1000,32553=>1000,32554=>1000,32555=>1000,32556=>1000,32557=>1000,32558=>1000,32559=>1000,32560=>1000,32561=>1000,32562=>1000,32563=>1000,32564=>1000, + 32565=>1000,32566=>1000,32567=>1000,32568=>1000,32569=>1000,32570=>1000,32571=>1000,32572=>1000,32573=>1000,32574=>1000,32575=>1000,32576=>1000,32577=>1000,32578=>1000,32579=>1000,32580=>1000, + 32581=>1000,32582=>1000,32583=>1000,32584=>1000,32585=>1000,32586=>1000,32587=>1000,32588=>1000,32589=>1000,32590=>1000,32591=>1000,32592=>1000,32593=>1000,32594=>1000,32595=>1000,32596=>1000, + 32597=>1000,32598=>1000,32599=>1000,32600=>1000,32601=>1000,32602=>1000,32603=>1000,32604=>1000,32605=>1000,32606=>1000,32607=>1000,32608=>1000,32609=>1000,32610=>1000,32611=>1000,32612=>1000, + 32613=>1000,32614=>1000,32615=>1000,32616=>1000,32617=>1000,32618=>1000,32619=>1000,32620=>1000,32621=>1000,32622=>1000,32623=>1000,32624=>1000,32625=>1000,32626=>1000,32627=>1000,32628=>1000, + 32629=>1000,32630=>1000,32631=>1000,32632=>1000,32633=>1000,32634=>1000,32635=>1000,32636=>1000,32637=>1000,32638=>1000,32639=>1000,32640=>1000,32641=>1000,32642=>1000,32643=>1000,32644=>1000, + 32645=>1000,32646=>1000,32647=>1000,32648=>1000,32649=>1000,32650=>1000,32651=>1000,32652=>1000,32653=>1000,32654=>1000,32655=>1000,32656=>1000,32657=>1000,32658=>1000,32659=>1000,32660=>1000, + 32661=>1000,32662=>1000,32663=>1000,32664=>1000,32665=>1000,32666=>1000,32667=>1000,32668=>1000,32669=>1000,32670=>1000,32671=>1000,32672=>1000,32673=>1000,32674=>1000,32675=>1000,32676=>1000, + 32677=>1000,32678=>1000,32679=>1000,32680=>1000,32681=>1000,32682=>1000,32683=>1000,32684=>1000,32685=>1000,32686=>1000,32687=>1000,32688=>1000,32689=>1000,32690=>1000,32691=>1000,32692=>1000, + 32693=>1000,32694=>1000,32695=>1000,32696=>1000,32697=>1000,32698=>1000,32699=>1000,32700=>1000,32701=>1000,32702=>1000,32703=>1000,32704=>1000,32705=>1000,32706=>1000,32707=>1000,32708=>1000, + 32709=>1000,32710=>1000,32711=>1000,32712=>1000,32713=>1000,32714=>1000,32715=>1000,32716=>1000,32717=>1000,32718=>1000,32719=>1000,32720=>1000,32721=>1000,32722=>1000,32723=>1000,32724=>1000, + 32725=>1000,32726=>1000,32727=>1000,32728=>1000,32729=>1000,32730=>1000,32731=>1000,32732=>1000,32733=>1000,32734=>1000,32735=>1000,32736=>1000,32737=>1000,32738=>1000,32739=>1000,32740=>1000, + 32741=>1000,32742=>1000,32743=>1000,32744=>1000,32745=>1000,32746=>1000,32747=>1000,32748=>1000,32749=>1000,32750=>1000,32751=>1000,32752=>1000,32753=>1000,32754=>1000,32755=>1000,32756=>1000, + 32757=>1000,32758=>1000,32759=>1000,32760=>1000,32761=>1000,32762=>1000,32763=>1000,32764=>1000,32765=>1000,32766=>1000,32767=>1000,32768=>1000,32769=>1000,32770=>1000,32771=>1000,32772=>1000, + 32773=>1000,32774=>1000,32775=>1000,32776=>1000,32777=>1000,32778=>1000,32779=>1000,32780=>1000,32781=>1000,32782=>1000,32783=>1000,32784=>1000,32785=>1000,32786=>1000,32787=>1000,32788=>1000, + 32789=>1000,32790=>1000,32791=>1000,32792=>1000,32793=>1000,32794=>1000,32795=>1000,32796=>1000,32797=>1000,32798=>1000,32799=>1000,32800=>1000,32801=>1000,32802=>1000,32803=>1000,32804=>1000, + 32805=>1000,32806=>1000,32807=>1000,32808=>1000,32809=>1000,32810=>1000,32811=>1000,32812=>1000,32813=>1000,32814=>1000,32815=>1000,32816=>1000,32817=>1000,32818=>1000,32819=>1000,32820=>1000, + 32821=>1000,32822=>1000,32823=>1000,32824=>1000,32825=>1000,32826=>1000,32827=>1000,32828=>1000,32829=>1000,32830=>1000,32831=>1000,32832=>1000,32833=>1000,32834=>1000,32835=>1000,32836=>1000, + 32837=>1000,32838=>1000,32839=>1000,32840=>1000,32841=>1000,32842=>1000,32843=>1000,32844=>1000,32845=>1000,32846=>1000,32847=>1000,32848=>1000,32849=>1000,32850=>1000,32851=>1000,32852=>1000, + 32853=>1000,32854=>1000,32855=>1000,32856=>1000,32857=>1000,32858=>1000,32859=>1000,32860=>1000,32861=>1000,32862=>1000,32863=>1000,32864=>1000,32865=>1000,32866=>1000,32867=>1000,32868=>1000, + 32869=>1000,32870=>1000,32871=>1000,32872=>1000,32873=>1000,32874=>1000,32875=>1000,32876=>1000,32877=>1000,32878=>1000,32879=>1000,32880=>1000,32881=>1000,32882=>1000,32883=>1000,32884=>1000, + 32885=>1000,32886=>1000,32887=>1000,32888=>1000,32889=>1000,32890=>1000,32891=>1000,32892=>1000,32893=>1000,32894=>1000,32895=>1000,32896=>1000,32897=>1000,32898=>1000,32899=>1000,32900=>1000, + 32901=>1000,32902=>1000,32903=>1000,32904=>1000,32905=>1000,32906=>1000,32907=>1000,32908=>1000,32909=>1000,32910=>1000,32911=>1000,32912=>1000,32913=>1000,32914=>1000,32915=>1000,32916=>1000, + 32917=>1000,32918=>1000,32919=>1000,32920=>1000,32921=>1000,32922=>1000,32923=>1000,32924=>1000,32925=>1000,32926=>1000,32927=>1000,32928=>1000,32929=>1000,32930=>1000,32931=>1000,32932=>1000, + 32933=>1000,32934=>1000,32935=>1000,32936=>1000,32937=>1000,32938=>1000,32939=>1000,32940=>1000,32941=>1000,32942=>1000,32943=>1000,32944=>1000,32945=>1000,32946=>1000,32947=>1000,32948=>1000, + 32949=>1000,32950=>1000,32951=>1000,32952=>1000,32953=>1000,32954=>1000,32955=>1000,32956=>1000,32957=>1000,32958=>1000,32959=>1000,32960=>1000,32961=>1000,32962=>1000,32963=>1000,32964=>1000, + 32965=>1000,32966=>1000,32967=>1000,32968=>1000,32969=>1000,32970=>1000,32971=>1000,32972=>1000,32973=>1000,32974=>1000,32975=>1000,32976=>1000,32977=>1000,32978=>1000,32979=>1000,32980=>1000, + 32981=>1000,32982=>1000,32983=>1000,32984=>1000,32985=>1000,32986=>1000,32987=>1000,32988=>1000,32989=>1000,32990=>1000,32991=>1000,32992=>1000,32993=>1000,32994=>1000,32995=>1000,32996=>1000, + 32997=>1000,32998=>1000,32999=>1000,33000=>1000,33001=>1000,33002=>1000,33003=>1000,33004=>1000,33005=>1000,33006=>1000,33007=>1000,33008=>1000,33009=>1000,33010=>1000,33011=>1000,33012=>1000, + 33013=>1000,33014=>1000,33015=>1000,33016=>1000,33017=>1000,33018=>1000,33019=>1000,33020=>1000,33021=>1000,33022=>1000,33023=>1000,33024=>1000,33025=>1000,33026=>1000,33027=>1000,33028=>1000, + 33029=>1000,33030=>1000,33031=>1000,33032=>1000,33033=>1000,33034=>1000,33035=>1000,33036=>1000,33037=>1000,33038=>1000,33039=>1000,33040=>1000,33041=>1000,33042=>1000,33043=>1000,33044=>1000, + 33045=>1000,33046=>1000,33047=>1000,33048=>1000,33049=>1000,33050=>1000,33051=>1000,33052=>1000,33053=>1000,33054=>1000,33055=>1000,33056=>1000,33057=>1000,33058=>1000,33059=>1000,33060=>1000, + 33061=>1000,33062=>1000,33063=>1000,33064=>1000,33065=>1000,33066=>1000,33067=>1000,33068=>1000,33069=>1000,33070=>1000,33071=>1000,33072=>1000,33073=>1000,33074=>1000,33075=>1000,33076=>1000, + 33077=>1000,33078=>1000,33079=>1000,33080=>1000,33081=>1000,33082=>1000,33083=>1000,33084=>1000,33085=>1000,33086=>1000,33087=>1000,33088=>1000,33089=>1000,33090=>1000,33091=>1000,33092=>1000, + 33093=>1000,33094=>1000,33095=>1000,33096=>1000,33097=>1000,33098=>1000,33099=>1000,33100=>1000,33101=>1000,33102=>1000,33103=>1000,33104=>1000,33105=>1000,33106=>1000,33107=>1000,33108=>1000, + 33109=>1000,33110=>1000,33111=>1000,33112=>1000,33113=>1000,33114=>1000,33115=>1000,33116=>1000,33117=>1000,33118=>1000,33119=>1000,33120=>1000,33121=>1000,33122=>1000,33123=>1000,33124=>1000, + 33125=>1000,33126=>1000,33127=>1000,33128=>1000,33129=>1000,33130=>1000,33131=>1000,33132=>1000,33133=>1000,33134=>1000,33135=>1000,33136=>1000,33137=>1000,33138=>1000,33139=>1000,33140=>1000, + 33141=>1000,33142=>1000,33143=>1000,33144=>1000,33145=>1000,33146=>1000,33147=>1000,33148=>1000,33149=>1000,33150=>1000,33151=>1000,33152=>1000,33153=>1000,33154=>1000,33155=>1000,33156=>1000, + 33157=>1000,33158=>1000,33159=>1000,33160=>1000,33161=>1000,33162=>1000,33163=>1000,33164=>1000,33165=>1000,33166=>1000,33167=>1000,33168=>1000,33169=>1000,33170=>1000,33171=>1000,33172=>1000, + 33173=>1000,33174=>1000,33175=>1000,33176=>1000,33177=>1000,33178=>1000,33179=>1000,33180=>1000,33181=>1000,33182=>1000,33183=>1000,33184=>1000,33185=>1000,33186=>1000,33187=>1000,33188=>1000, + 33189=>1000,33190=>1000,33191=>1000,33192=>1000,33193=>1000,33194=>1000,33195=>1000,33196=>1000,33197=>1000,33198=>1000,33199=>1000,33200=>1000,33201=>1000,33202=>1000,33203=>1000,33204=>1000, + 33205=>1000,33206=>1000,33207=>1000,33208=>1000,33209=>1000,33210=>1000,33211=>1000,33212=>1000,33213=>1000,33214=>1000,33215=>1000,33216=>1000,33217=>1000,33218=>1000,33219=>1000,33220=>1000, + 33221=>1000,33222=>1000,33223=>1000,33224=>1000,33225=>1000,33226=>1000,33227=>1000,33228=>1000,33229=>1000,33230=>1000,33231=>1000,33232=>1000,33233=>1000,33234=>1000,33235=>1000,33236=>1000, + 33237=>1000,33238=>1000,33239=>1000,33240=>1000,33241=>1000,33242=>1000,33243=>1000,33244=>1000,33245=>1000,33246=>1000,33247=>1000,33248=>1000,33249=>1000,33250=>1000,33251=>1000,33252=>1000, + 33253=>1000,33254=>1000,33255=>1000,33256=>1000,33257=>1000,33258=>1000,33259=>1000,33260=>1000,33261=>1000,33262=>1000,33263=>1000,33264=>1000,33265=>1000,33266=>1000,33267=>1000,33268=>1000, + 33269=>1000,33270=>1000,33271=>1000,33272=>1000,33273=>1000,33274=>1000,33275=>1000,33276=>1000,33277=>1000,33278=>1000,33279=>1000,33280=>1000,33281=>1000,33282=>1000,33283=>1000,33284=>1000, + 33285=>1000,33286=>1000,33287=>1000,33288=>1000,33289=>1000,33290=>1000,33291=>1000,33292=>1000,33293=>1000,33294=>1000,33295=>1000,33296=>1000,33297=>1000,33298=>1000,33299=>1000,33300=>1000, + 33301=>1000,33302=>1000,33303=>1000,33304=>1000,33305=>1000,33306=>1000,33307=>1000,33308=>1000,33309=>1000,33310=>1000,33311=>1000,33312=>1000,33313=>1000,33314=>1000,33315=>1000,33316=>1000, + 33317=>1000,33318=>1000,33319=>1000,33320=>1000,33321=>1000,33322=>1000,33323=>1000,33324=>1000,33325=>1000,33326=>1000,33327=>1000,33328=>1000,33329=>1000,33330=>1000,33331=>1000,33332=>1000, + 33333=>1000,33334=>1000,33335=>1000,33336=>1000,33337=>1000,33338=>1000,33339=>1000,33340=>1000,33341=>1000,33342=>1000,33343=>1000,33344=>1000,33345=>1000,33346=>1000,33347=>1000,33348=>1000, + 33349=>1000,33350=>1000,33351=>1000,33352=>1000,33353=>1000,33354=>1000,33355=>1000,33356=>1000,33357=>1000,33358=>1000,33359=>1000,33360=>1000,33361=>1000,33362=>1000,33363=>1000,33364=>1000, + 33365=>1000,33366=>1000,33367=>1000,33368=>1000,33369=>1000,33370=>1000,33371=>1000,33372=>1000,33373=>1000,33374=>1000,33375=>1000,33376=>1000,33377=>1000,33378=>1000,33379=>1000,33380=>1000, + 33381=>1000,33382=>1000,33383=>1000,33384=>1000,33385=>1000,33386=>1000,33387=>1000,33388=>1000,33389=>1000,33390=>1000,33391=>1000,33392=>1000,33393=>1000,33394=>1000,33395=>1000,33396=>1000, + 33397=>1000,33398=>1000,33399=>1000,33400=>1000,33401=>1000,33402=>1000,33403=>1000,33404=>1000,33405=>1000,33406=>1000,33407=>1000,33408=>1000,33409=>1000,33410=>1000,33411=>1000,33412=>1000, + 33413=>1000,33414=>1000,33415=>1000,33416=>1000,33417=>1000,33418=>1000,33419=>1000,33420=>1000,33421=>1000,33422=>1000,33423=>1000,33424=>1000,33425=>1000,33426=>1000,33427=>1000,33428=>1000, + 33429=>1000,33430=>1000,33431=>1000,33432=>1000,33433=>1000,33434=>1000,33435=>1000,33436=>1000,33437=>1000,33438=>1000,33439=>1000,33440=>1000,33441=>1000,33442=>1000,33443=>1000,33444=>1000, + 33445=>1000,33446=>1000,33447=>1000,33448=>1000,33449=>1000,33450=>1000,33451=>1000,33452=>1000,33453=>1000,33454=>1000,33455=>1000,33456=>1000,33457=>1000,33458=>1000,33459=>1000,33460=>1000, + 33461=>1000,33462=>1000,33463=>1000,33464=>1000,33465=>1000,33466=>1000,33467=>1000,33468=>1000,33469=>1000,33470=>1000,33471=>1000,33472=>1000,33473=>1000,33474=>1000,33475=>1000,33476=>1000, + 33477=>1000,33478=>1000,33479=>1000,33480=>1000,33481=>1000,33482=>1000,33483=>1000,33484=>1000,33485=>1000,33486=>1000,33487=>1000,33488=>1000,33489=>1000,33490=>1000,33491=>1000,33492=>1000, + 33493=>1000,33494=>1000,33495=>1000,33496=>1000,33497=>1000,33498=>1000,33499=>1000,33500=>1000,33501=>1000,33502=>1000,33503=>1000,33504=>1000,33505=>1000,33506=>1000,33507=>1000,33508=>1000, + 33509=>1000,33510=>1000,33511=>1000,33512=>1000,33513=>1000,33514=>1000,33515=>1000,33516=>1000,33517=>1000,33518=>1000,33519=>1000,33520=>1000,33521=>1000,33522=>1000,33523=>1000,33524=>1000, + 33525=>1000,33526=>1000,33527=>1000,33528=>1000,33529=>1000,33530=>1000,33531=>1000,33532=>1000,33533=>1000,33534=>1000,33535=>1000,33536=>1000,33537=>1000,33538=>1000,33539=>1000,33540=>1000, + 33541=>1000,33542=>1000,33543=>1000,33544=>1000,33545=>1000,33546=>1000,33547=>1000,33548=>1000,33549=>1000,33550=>1000,33551=>1000,33552=>1000,33553=>1000,33554=>1000,33555=>1000,33556=>1000, + 33557=>1000,33558=>1000,33559=>1000,33560=>1000,33561=>1000,33562=>1000,33563=>1000,33564=>1000,33565=>1000,33566=>1000,33567=>1000,33568=>1000,33569=>1000,33570=>1000,33571=>1000,33572=>1000, + 33573=>1000,33574=>1000,33575=>1000,33576=>1000,33577=>1000,33578=>1000,33579=>1000,33580=>1000,33581=>1000,33582=>1000,33583=>1000,33584=>1000,33585=>1000,33586=>1000,33587=>1000,33588=>1000, + 33589=>1000,33590=>1000,33591=>1000,33592=>1000,33593=>1000,33594=>1000,33595=>1000,33596=>1000,33597=>1000,33598=>1000,33599=>1000,33600=>1000,33601=>1000,33602=>1000,33603=>1000,33604=>1000, + 33605=>1000,33606=>1000,33607=>1000,33608=>1000,33609=>1000,33610=>1000,33611=>1000,33612=>1000,33613=>1000,33614=>1000,33615=>1000,33616=>1000,33617=>1000,33618=>1000,33619=>1000,33620=>1000, + 33621=>1000,33622=>1000,33623=>1000,33624=>1000,33625=>1000,33626=>1000,33627=>1000,33628=>1000,33629=>1000,33630=>1000,33631=>1000,33632=>1000,33633=>1000,33634=>1000,33635=>1000,33636=>1000, + 33637=>1000,33638=>1000,33639=>1000,33640=>1000,33641=>1000,33642=>1000,33643=>1000,33644=>1000,33645=>1000,33646=>1000,33647=>1000,33648=>1000,33649=>1000,33650=>1000,33651=>1000,33652=>1000, + 33653=>1000,33654=>1000,33655=>1000,33656=>1000,33657=>1000,33658=>1000,33659=>1000,33660=>1000,33661=>1000,33662=>1000,33663=>1000,33664=>1000,33665=>1000,33666=>1000,33667=>1000,33668=>1000, + 33669=>1000,33670=>1000,33671=>1000,33672=>1000,33673=>1000,33674=>1000,33675=>1000,33676=>1000,33677=>1000,33678=>1000,33679=>1000,33680=>1000,33681=>1000,33682=>1000,33683=>1000,33684=>1000, + 33685=>1000,33686=>1000,33687=>1000,33688=>1000,33689=>1000,33690=>1000,33691=>1000,33692=>1000,33693=>1000,33694=>1000,33695=>1000,33696=>1000,33697=>1000,33698=>1000,33699=>1000,33700=>1000, + 33701=>1000,33702=>1000,33703=>1000,33704=>1000,33705=>1000,33706=>1000,33707=>1000,33708=>1000,33709=>1000,33710=>1000,33711=>1000,33712=>1000,33713=>1000,33714=>1000,33715=>1000,33716=>1000, + 33717=>1000,33718=>1000,33719=>1000,33720=>1000,33721=>1000,33722=>1000,33723=>1000,33724=>1000,33725=>1000,33726=>1000,33727=>1000,33728=>1000,33729=>1000,33730=>1000,33731=>1000,33732=>1000, + 33733=>1000,33734=>1000,33735=>1000,33736=>1000,33737=>1000,33738=>1000,33739=>1000,33740=>1000,33741=>1000,33742=>1000,33743=>1000,33744=>1000,33745=>1000,33746=>1000,33747=>1000,33748=>1000, + 33749=>1000,33750=>1000,33751=>1000,33752=>1000,33753=>1000,33754=>1000,33755=>1000,33756=>1000,33757=>1000,33758=>1000,33759=>1000,33760=>1000,33761=>1000,33762=>1000,33763=>1000,33764=>1000, + 33765=>1000,33766=>1000,33767=>1000,33768=>1000,33769=>1000,33770=>1000,33771=>1000,33772=>1000,33773=>1000,33774=>1000,33775=>1000,33776=>1000,33777=>1000,33778=>1000,33779=>1000,33780=>1000, + 33781=>1000,33782=>1000,33783=>1000,33784=>1000,33785=>1000,33786=>1000,33787=>1000,33788=>1000,33789=>1000,33790=>1000,33791=>1000,33792=>1000,33793=>1000,33794=>1000,33795=>1000,33796=>1000, + 33797=>1000,33798=>1000,33799=>1000,33800=>1000,33801=>1000,33802=>1000,33803=>1000,33804=>1000,33805=>1000,33806=>1000,33807=>1000,33808=>1000,33809=>1000,33810=>1000,33811=>1000,33812=>1000, + 33813=>1000,33814=>1000,33815=>1000,33816=>1000,33817=>1000,33818=>1000,33819=>1000,33820=>1000,33821=>1000,33822=>1000,33823=>1000,33824=>1000,33825=>1000,33826=>1000,33827=>1000,33828=>1000, + 33829=>1000,33830=>1000,33831=>1000,33832=>1000,33833=>1000,33834=>1000,33835=>1000,33836=>1000,33837=>1000,33838=>1000,33839=>1000,33840=>1000,33841=>1000,33842=>1000,33843=>1000,33844=>1000, + 33845=>1000,33846=>1000,33847=>1000,33848=>1000,33849=>1000,33850=>1000,33851=>1000,33852=>1000,33853=>1000,33854=>1000,33855=>1000,33856=>1000,33857=>1000,33858=>1000,33859=>1000,33860=>1000, + 33861=>1000,33862=>1000,33863=>1000,33864=>1000,33865=>1000,33866=>1000,33867=>1000,33868=>1000,33869=>1000,33870=>1000,33871=>1000,33872=>1000,33873=>1000,33874=>1000,33875=>1000,33876=>1000, + 33877=>1000,33878=>1000,33879=>1000,33880=>1000,33881=>1000,33882=>1000,33883=>1000,33884=>1000,33885=>1000,33886=>1000,33887=>1000,33888=>1000,33889=>1000,33890=>1000,33891=>1000,33892=>1000, + 33893=>1000,33894=>1000,33895=>1000,33896=>1000,33897=>1000,33898=>1000,33899=>1000,33900=>1000,33901=>1000,33902=>1000,33903=>1000,33904=>1000,33905=>1000,33906=>1000,33907=>1000,33908=>1000, + 33909=>1000,33910=>1000,33911=>1000,33912=>1000,33913=>1000,33914=>1000,33915=>1000,33916=>1000,33917=>1000,33918=>1000,33919=>1000,33920=>1000,33921=>1000,33922=>1000,33923=>1000,33924=>1000, + 33925=>1000,33926=>1000,33927=>1000,33928=>1000,33929=>1000,33930=>1000,33931=>1000,33932=>1000,33933=>1000,33934=>1000,33935=>1000,33936=>1000,33937=>1000,33938=>1000,33939=>1000,33940=>1000, + 33941=>1000,33942=>1000,33943=>1000,33944=>1000,33945=>1000,33946=>1000,33947=>1000,33948=>1000,33949=>1000,33950=>1000,33951=>1000,33952=>1000,33953=>1000,33954=>1000,33955=>1000,33956=>1000, + 33957=>1000,33958=>1000,33959=>1000,33960=>1000,33961=>1000,33962=>1000,33963=>1000,33964=>1000,33965=>1000,33966=>1000,33967=>1000,33968=>1000,33969=>1000,33970=>1000,33971=>1000,33972=>1000, + 33973=>1000,33974=>1000,33975=>1000,33976=>1000,33977=>1000,33978=>1000,33979=>1000,33980=>1000,33981=>1000,33982=>1000,33983=>1000,33984=>1000,33985=>1000,33986=>1000,33987=>1000,33988=>1000, + 33989=>1000,33990=>1000,33991=>1000,33992=>1000,33993=>1000,33994=>1000,33995=>1000,33996=>1000,33997=>1000,33998=>1000,33999=>1000,34000=>1000,34001=>1000,34002=>1000,34003=>1000,34004=>1000, + 34005=>1000,34006=>1000,34007=>1000,34008=>1000,34009=>1000,34010=>1000,34011=>1000,34012=>1000,34013=>1000,34014=>1000,34015=>1000,34016=>1000,34017=>1000,34018=>1000,34019=>1000,34020=>1000, + 34021=>1000,34022=>1000,34023=>1000,34024=>1000,34025=>1000,34026=>1000,34027=>1000,34028=>1000,34029=>1000,34030=>1000,34031=>1000,34032=>1000,34033=>1000,34034=>1000,34035=>1000,34036=>1000, + 34037=>1000,34038=>1000,34039=>1000,34040=>1000,34041=>1000,34042=>1000,34043=>1000,34044=>1000,34045=>1000,34046=>1000,34047=>1000,34048=>1000,34049=>1000,34050=>1000,34051=>1000,34052=>1000, + 34053=>1000,34054=>1000,34055=>1000,34056=>1000,34057=>1000,34058=>1000,34059=>1000,34060=>1000,34061=>1000,34062=>1000,34063=>1000,34064=>1000,34065=>1000,34066=>1000,34067=>1000,34068=>1000, + 34069=>1000,34070=>1000,34071=>1000,34072=>1000,34073=>1000,34074=>1000,34075=>1000,34076=>1000,34077=>1000,34078=>1000,34079=>1000,34080=>1000,34081=>1000,34082=>1000,34083=>1000,34084=>1000, + 34085=>1000,34086=>1000,34087=>1000,34088=>1000,34089=>1000,34090=>1000,34091=>1000,34092=>1000,34093=>1000,34094=>1000,34095=>1000,34096=>1000,34097=>1000,34098=>1000,34099=>1000,34100=>1000, + 34101=>1000,34102=>1000,34103=>1000,34104=>1000,34105=>1000,34106=>1000,34107=>1000,34108=>1000,34109=>1000,34110=>1000,34111=>1000,34112=>1000,34113=>1000,34114=>1000,34115=>1000,34116=>1000, + 34117=>1000,34118=>1000,34119=>1000,34120=>1000,34121=>1000,34122=>1000,34123=>1000,34124=>1000,34125=>1000,34126=>1000,34127=>1000,34128=>1000,34129=>1000,34130=>1000,34131=>1000,34132=>1000, + 34133=>1000,34134=>1000,34135=>1000,34136=>1000,34137=>1000,34138=>1000,34139=>1000,34140=>1000,34141=>1000,34142=>1000,34143=>1000,34144=>1000,34145=>1000,34146=>1000,34147=>1000,34148=>1000, + 34149=>1000,34150=>1000,34151=>1000,34152=>1000,34153=>1000,34154=>1000,34155=>1000,34156=>1000,34157=>1000,34158=>1000,34159=>1000,34160=>1000,34161=>1000,34162=>1000,34163=>1000,34164=>1000, + 34165=>1000,34166=>1000,34167=>1000,34168=>1000,34169=>1000,34170=>1000,34171=>1000,34172=>1000,34173=>1000,34174=>1000,34175=>1000,34176=>1000,34177=>1000,34178=>1000,34179=>1000,34180=>1000, + 34181=>1000,34182=>1000,34183=>1000,34184=>1000,34185=>1000,34186=>1000,34187=>1000,34188=>1000,34189=>1000,34190=>1000,34191=>1000,34192=>1000,34193=>1000,34194=>1000,34195=>1000,34196=>1000, + 34197=>1000,34198=>1000,34199=>1000,34200=>1000,34201=>1000,34202=>1000,34203=>1000,34204=>1000,34205=>1000,34206=>1000,34207=>1000,34208=>1000,34209=>1000,34210=>1000,34211=>1000,34212=>1000, + 34213=>1000,34214=>1000,34215=>1000,34216=>1000,34217=>1000,34218=>1000,34219=>1000,34220=>1000,34221=>1000,34222=>1000,34223=>1000,34224=>1000,34225=>1000,34226=>1000,34227=>1000,34228=>1000, + 34229=>1000,34230=>1000,34231=>1000,34232=>1000,34233=>1000,34234=>1000,34235=>1000,34236=>1000,34237=>1000,34238=>1000,34239=>1000,34240=>1000,34241=>1000,34242=>1000,34243=>1000,34244=>1000, + 34245=>1000,34246=>1000,34247=>1000,34248=>1000,34249=>1000,34250=>1000,34251=>1000,34252=>1000,34253=>1000,34254=>1000,34255=>1000,34256=>1000,34257=>1000,34258=>1000,34259=>1000,34260=>1000, + 34261=>1000,34262=>1000,34263=>1000,34264=>1000,34265=>1000,34266=>1000,34267=>1000,34268=>1000,34269=>1000,34270=>1000,34271=>1000,34272=>1000,34273=>1000,34274=>1000,34275=>1000,34276=>1000, + 34277=>1000,34278=>1000,34279=>1000,34280=>1000,34281=>1000,34282=>1000,34283=>1000,34284=>1000,34285=>1000,34286=>1000,34287=>1000,34288=>1000,34289=>1000,34290=>1000,34291=>1000,34292=>1000, + 34293=>1000,34294=>1000,34295=>1000,34296=>1000,34297=>1000,34298=>1000,34299=>1000,34300=>1000,34301=>1000,34302=>1000,34303=>1000,34304=>1000,34305=>1000,34306=>1000,34307=>1000,34308=>1000, + 34309=>1000,34310=>1000,34311=>1000,34312=>1000,34313=>1000,34314=>1000,34315=>1000,34316=>1000,34317=>1000,34318=>1000,34319=>1000,34320=>1000,34321=>1000,34322=>1000,34323=>1000,34324=>1000, + 34325=>1000,34326=>1000,34327=>1000,34328=>1000,34329=>1000,34330=>1000,34331=>1000,34332=>1000,34333=>1000,34334=>1000,34335=>1000,34336=>1000,34337=>1000,34338=>1000,34339=>1000,34340=>1000, + 34341=>1000,34342=>1000,34343=>1000,34344=>1000,34345=>1000,34346=>1000,34347=>1000,34348=>1000,34349=>1000,34350=>1000,34351=>1000,34352=>1000,34353=>1000,34354=>1000,34355=>1000,34356=>1000, + 34357=>1000,34358=>1000,34359=>1000,34360=>1000,34361=>1000,34362=>1000,34363=>1000,34364=>1000,34365=>1000,34366=>1000,34367=>1000,34368=>1000,34369=>1000,34370=>1000,34371=>1000,34372=>1000, + 34373=>1000,34374=>1000,34375=>1000,34376=>1000,34377=>1000,34378=>1000,34379=>1000,34380=>1000,34381=>1000,34382=>1000,34383=>1000,34384=>1000,34385=>1000,34386=>1000,34387=>1000,34388=>1000, + 34389=>1000,34390=>1000,34391=>1000,34392=>1000,34393=>1000,34394=>1000,34395=>1000,34396=>1000,34397=>1000,34398=>1000,34399=>1000,34400=>1000,34401=>1000,34402=>1000,34403=>1000,34404=>1000, + 34405=>1000,34406=>1000,34407=>1000,34408=>1000,34409=>1000,34410=>1000,34411=>1000,34412=>1000,34413=>1000,34414=>1000,34415=>1000,34416=>1000,34417=>1000,34418=>1000,34419=>1000,34420=>1000, + 34421=>1000,34422=>1000,34423=>1000,34424=>1000,34425=>1000,34426=>1000,34427=>1000,34428=>1000,34429=>1000,34430=>1000,34431=>1000,34432=>1000,34433=>1000,34434=>1000,34435=>1000,34436=>1000, + 34437=>1000,34438=>1000,34439=>1000,34440=>1000,34441=>1000,34442=>1000,34443=>1000,34444=>1000,34445=>1000,34446=>1000,34447=>1000,34448=>1000,34449=>1000,34450=>1000,34451=>1000,34452=>1000, + 34453=>1000,34454=>1000,34455=>1000,34456=>1000,34457=>1000,34458=>1000,34459=>1000,34460=>1000,34461=>1000,34462=>1000,34463=>1000,34464=>1000,34465=>1000,34466=>1000,34467=>1000,34468=>1000, + 34469=>1000,34470=>1000,34471=>1000,34472=>1000,34473=>1000,34474=>1000,34475=>1000,34476=>1000,34477=>1000,34478=>1000,34479=>1000,34480=>1000,34481=>1000,34482=>1000,34483=>1000,34484=>1000, + 34485=>1000,34486=>1000,34487=>1000,34488=>1000,34489=>1000,34490=>1000,34491=>1000,34492=>1000,34493=>1000,34494=>1000,34495=>1000,34496=>1000,34497=>1000,34498=>1000,34499=>1000,34500=>1000, + 34501=>1000,34502=>1000,34503=>1000,34504=>1000,34505=>1000,34506=>1000,34507=>1000,34508=>1000,34509=>1000,34510=>1000,34511=>1000,34512=>1000,34513=>1000,34514=>1000,34515=>1000,34516=>1000, + 34517=>1000,34518=>1000,34519=>1000,34520=>1000,34521=>1000,34522=>1000,34523=>1000,34524=>1000,34525=>1000,34526=>1000,34527=>1000,34528=>1000,34529=>1000,34530=>1000,34531=>1000,34532=>1000, + 34533=>1000,34534=>1000,34535=>1000,34536=>1000,34537=>1000,34538=>1000,34539=>1000,34540=>1000,34541=>1000,34542=>1000,34543=>1000,34544=>1000,34545=>1000,34546=>1000,34547=>1000,34548=>1000, + 34549=>1000,34550=>1000,34551=>1000,34552=>1000,34553=>1000,34554=>1000,34555=>1000,34556=>1000,34557=>1000,34558=>1000,34559=>1000,34560=>1000,34561=>1000,34562=>1000,34563=>1000,34564=>1000, + 34565=>1000,34566=>1000,34567=>1000,34568=>1000,34569=>1000,34570=>1000,34571=>1000,34572=>1000,34573=>1000,34574=>1000,34575=>1000,34576=>1000,34577=>1000,34578=>1000,34579=>1000,34580=>1000, + 34581=>1000,34582=>1000,34583=>1000,34584=>1000,34585=>1000,34586=>1000,34587=>1000,34588=>1000,34589=>1000,34590=>1000,34591=>1000,34592=>1000,34593=>1000,34594=>1000,34595=>1000,34596=>1000, + 34597=>1000,34598=>1000,34599=>1000,34600=>1000,34601=>1000,34602=>1000,34603=>1000,34604=>1000,34605=>1000,34606=>1000,34607=>1000,34608=>1000,34609=>1000,34610=>1000,34611=>1000,34612=>1000, + 34613=>1000,34614=>1000,34615=>1000,34616=>1000,34617=>1000,34618=>1000,34619=>1000,34620=>1000,34621=>1000,34622=>1000,34623=>1000,34624=>1000,34625=>1000,34626=>1000,34627=>1000,34628=>1000, + 34629=>1000,34630=>1000,34631=>1000,34632=>1000,34633=>1000,34634=>1000,34635=>1000,34636=>1000,34637=>1000,34638=>1000,34639=>1000,34640=>1000,34641=>1000,34642=>1000,34643=>1000,34644=>1000, + 34645=>1000,34646=>1000,34647=>1000,34648=>1000,34649=>1000,34650=>1000,34651=>1000,34652=>1000,34653=>1000,34654=>1000,34655=>1000,34656=>1000,34657=>1000,34658=>1000,34659=>1000,34660=>1000, + 34661=>1000,34662=>1000,34663=>1000,34664=>1000,34665=>1000,34666=>1000,34667=>1000,34668=>1000,34669=>1000,34670=>1000,34671=>1000,34672=>1000,34673=>1000,34674=>1000,34675=>1000,34676=>1000, + 34677=>1000,34678=>1000,34679=>1000,34680=>1000,34681=>1000,34682=>1000,34683=>1000,34684=>1000,34685=>1000,34686=>1000,34687=>1000,34688=>1000,34689=>1000,34690=>1000,34691=>1000,34692=>1000, + 34693=>1000,34694=>1000,34695=>1000,34696=>1000,34697=>1000,34698=>1000,34699=>1000,34700=>1000,34701=>1000,34702=>1000,34703=>1000,34704=>1000,34705=>1000,34706=>1000,34707=>1000,34708=>1000, + 34709=>1000,34710=>1000,34711=>1000,34712=>1000,34713=>1000,34714=>1000,34715=>1000,34716=>1000,34717=>1000,34718=>1000,34719=>1000,34720=>1000,34721=>1000,34722=>1000,34723=>1000,34724=>1000, + 34725=>1000,34726=>1000,34727=>1000,34728=>1000,34729=>1000,34730=>1000,34731=>1000,34732=>1000,34733=>1000,34734=>1000,34735=>1000,34736=>1000,34737=>1000,34738=>1000,34739=>1000,34740=>1000, + 34741=>1000,34742=>1000,34743=>1000,34744=>1000,34745=>1000,34746=>1000,34747=>1000,34748=>1000,34749=>1000,34750=>1000,34751=>1000,34752=>1000,34753=>1000,34754=>1000,34755=>1000,34756=>1000, + 34757=>1000,34758=>1000,34759=>1000,34760=>1000,34761=>1000,34762=>1000,34763=>1000,34764=>1000,34765=>1000,34766=>1000,34767=>1000,34768=>1000,34769=>1000,34770=>1000,34771=>1000,34772=>1000, + 34773=>1000,34774=>1000,34775=>1000,34776=>1000,34777=>1000,34778=>1000,34779=>1000,34780=>1000,34781=>1000,34782=>1000,34783=>1000,34784=>1000,34785=>1000,34786=>1000,34787=>1000,34788=>1000, + 34789=>1000,34790=>1000,34791=>1000,34792=>1000,34793=>1000,34794=>1000,34795=>1000,34796=>1000,34797=>1000,34798=>1000,34799=>1000,34800=>1000,34801=>1000,34802=>1000,34803=>1000,34804=>1000, + 34805=>1000,34806=>1000,34807=>1000,34808=>1000,34809=>1000,34810=>1000,34811=>1000,34812=>1000,34813=>1000,34814=>1000,34815=>1000,34816=>1000,34817=>1000,34818=>1000,34819=>1000,34820=>1000, + 34821=>1000,34822=>1000,34823=>1000,34824=>1000,34825=>1000,34826=>1000,34827=>1000,34828=>1000,34829=>1000,34830=>1000,34831=>1000,34832=>1000,34833=>1000,34834=>1000,34835=>1000,34836=>1000, + 34837=>1000,34838=>1000,34839=>1000,34840=>1000,34841=>1000,34842=>1000,34843=>1000,34844=>1000,34845=>1000,34846=>1000,34847=>1000,34848=>1000,34849=>1000,34850=>1000,34851=>1000,34852=>1000, + 34853=>1000,34854=>1000,34855=>1000,34856=>1000,34857=>1000,34858=>1000,34859=>1000,34860=>1000,34861=>1000,34862=>1000,34863=>1000,34864=>1000,34865=>1000,34866=>1000,34867=>1000,34868=>1000, + 34869=>1000,34870=>1000,34871=>1000,34872=>1000,34873=>1000,34874=>1000,34875=>1000,34876=>1000,34877=>1000,34878=>1000,34879=>1000,34880=>1000,34881=>1000,34882=>1000,34883=>1000,34884=>1000, + 34885=>1000,34886=>1000,34887=>1000,34888=>1000,34889=>1000,34890=>1000,34891=>1000,34892=>1000,34893=>1000,34894=>1000,34895=>1000,34896=>1000,34897=>1000,34898=>1000,34899=>1000,34900=>1000, + 34901=>1000,34902=>1000,34903=>1000,34904=>1000,34905=>1000,34906=>1000,34907=>1000,34908=>1000,34909=>1000,34910=>1000,34911=>1000,34912=>1000,34913=>1000,34914=>1000,34915=>1000,34916=>1000, + 34917=>1000,34918=>1000,34919=>1000,34920=>1000,34921=>1000,34922=>1000,34923=>1000,34924=>1000,34925=>1000,34926=>1000,34927=>1000,34928=>1000,34929=>1000,34930=>1000,34931=>1000,34932=>1000, + 34933=>1000,34934=>1000,34935=>1000,34936=>1000,34937=>1000,34938=>1000,34939=>1000,34940=>1000,34941=>1000,34942=>1000,34943=>1000,34944=>1000,34945=>1000,34946=>1000,34947=>1000,34948=>1000, + 34949=>1000,34950=>1000,34951=>1000,34952=>1000,34953=>1000,34954=>1000,34955=>1000,34956=>1000,34957=>1000,34958=>1000,34959=>1000,34960=>1000,34961=>1000,34962=>1000,34963=>1000,34964=>1000, + 34965=>1000,34966=>1000,34967=>1000,34968=>1000,34969=>1000,34970=>1000,34971=>1000,34972=>1000,34973=>1000,34974=>1000,34975=>1000,34976=>1000,34977=>1000,34978=>1000,34979=>1000,34980=>1000, + 34981=>1000,34982=>1000,34983=>1000,34984=>1000,34985=>1000,34986=>1000,34987=>1000,34988=>1000,34989=>1000,34990=>1000,34991=>1000,34992=>1000,34993=>1000,34994=>1000,34995=>1000,34996=>1000, + 34997=>1000,34998=>1000,34999=>1000,35000=>1000,35001=>1000,35002=>1000,35003=>1000,35004=>1000,35005=>1000,35006=>1000,35007=>1000,35008=>1000,35009=>1000,35010=>1000,35011=>1000,35012=>1000, + 35013=>1000,35014=>1000,35015=>1000,35016=>1000,35017=>1000,35018=>1000,35019=>1000,35020=>1000,35021=>1000,35022=>1000,35023=>1000,35024=>1000,35025=>1000,35026=>1000,35027=>1000,35028=>1000, + 35029=>1000,35030=>1000,35031=>1000,35032=>1000,35033=>1000,35034=>1000,35035=>1000,35036=>1000,35037=>1000,35038=>1000,35039=>1000,35040=>1000,35041=>1000,35042=>1000,35043=>1000,35044=>1000, + 35045=>1000,35046=>1000,35047=>1000,35048=>1000,35049=>1000,35050=>1000,35051=>1000,35052=>1000,35053=>1000,35054=>1000,35055=>1000,35056=>1000,35057=>1000,35058=>1000,35059=>1000,35060=>1000, + 35061=>1000,35062=>1000,35063=>1000,35064=>1000,35065=>1000,35066=>1000,35067=>1000,35068=>1000,35069=>1000,35070=>1000,35071=>1000,35072=>1000,35073=>1000,35074=>1000,35075=>1000,35076=>1000, + 35077=>1000,35078=>1000,35079=>1000,35080=>1000,35081=>1000,35082=>1000,35083=>1000,35084=>1000,35085=>1000,35086=>1000,35087=>1000,35088=>1000,35089=>1000,35090=>1000,35091=>1000,35092=>1000, + 35093=>1000,35094=>1000,35095=>1000,35096=>1000,35097=>1000,35098=>1000,35099=>1000,35100=>1000,35101=>1000,35102=>1000,35103=>1000,35104=>1000,35105=>1000,35106=>1000,35107=>1000,35108=>1000, + 35109=>1000,35110=>1000,35111=>1000,35112=>1000,35113=>1000,35114=>1000,35115=>1000,35116=>1000,35117=>1000,35118=>1000,35119=>1000,35120=>1000,35121=>1000,35122=>1000,35123=>1000,35124=>1000, + 35125=>1000,35126=>1000,35127=>1000,35128=>1000,35129=>1000,35130=>1000,35131=>1000,35132=>1000,35133=>1000,35134=>1000,35135=>1000,35136=>1000,35137=>1000,35138=>1000,35139=>1000,35140=>1000, + 35141=>1000,35142=>1000,35143=>1000,35144=>1000,35145=>1000,35146=>1000,35147=>1000,35148=>1000,35149=>1000,35150=>1000,35151=>1000,35152=>1000,35153=>1000,35154=>1000,35155=>1000,35156=>1000, + 35157=>1000,35158=>1000,35159=>1000,35160=>1000,35161=>1000,35162=>1000,35163=>1000,35164=>1000,35165=>1000,35166=>1000,35167=>1000,35168=>1000,35169=>1000,35170=>1000,35171=>1000,35172=>1000, + 35173=>1000,35174=>1000,35175=>1000,35176=>1000,35177=>1000,35178=>1000,35179=>1000,35180=>1000,35181=>1000,35182=>1000,35183=>1000,35184=>1000,35185=>1000,35186=>1000,35187=>1000,35188=>1000, + 35189=>1000,35190=>1000,35191=>1000,35192=>1000,35193=>1000,35194=>1000,35195=>1000,35196=>1000,35197=>1000,35198=>1000,35199=>1000,35200=>1000,35201=>1000,35202=>1000,35203=>1000,35204=>1000, + 35205=>1000,35206=>1000,35207=>1000,35208=>1000,35209=>1000,35210=>1000,35211=>1000,35212=>1000,35213=>1000,35214=>1000,35215=>1000,35216=>1000,35217=>1000,35218=>1000,35219=>1000,35220=>1000, + 35221=>1000,35222=>1000,35223=>1000,35224=>1000,35225=>1000,35226=>1000,35227=>1000,35228=>1000,35229=>1000,35230=>1000,35231=>1000,35232=>1000,35233=>1000,35234=>1000,35235=>1000,35236=>1000, + 35237=>1000,35238=>1000,35239=>1000,35240=>1000,35241=>1000,35242=>1000,35243=>1000,35244=>1000,35245=>1000,35246=>1000,35247=>1000,35248=>1000,35249=>1000,35250=>1000,35251=>1000,35252=>1000, + 35253=>1000,35254=>1000,35255=>1000,35256=>1000,35257=>1000,35258=>1000,35259=>1000,35260=>1000,35261=>1000,35262=>1000,35263=>1000,35264=>1000,35265=>1000,35266=>1000,35267=>1000,35268=>1000, + 35269=>1000,35270=>1000,35271=>1000,35272=>1000,35273=>1000,35274=>1000,35275=>1000,35276=>1000,35277=>1000,35278=>1000,35279=>1000,35280=>1000,35281=>1000,35282=>1000,35283=>1000,35284=>1000, + 35285=>1000,35286=>1000,35287=>1000,35288=>1000,35289=>1000,35290=>1000,35291=>1000,35292=>1000,35293=>1000,35294=>1000,35295=>1000,35296=>1000,35297=>1000,35298=>1000,35299=>1000,35300=>1000, + 35301=>1000,35302=>1000,35303=>1000,35304=>1000,35305=>1000,35306=>1000,35307=>1000,35308=>1000,35309=>1000,35310=>1000,35311=>1000,35312=>1000,35313=>1000,35314=>1000,35315=>1000,35316=>1000, + 35317=>1000,35318=>1000,35319=>1000,35320=>1000,35321=>1000,35322=>1000,35323=>1000,35324=>1000,35325=>1000,35326=>1000,35327=>1000,35328=>1000,35329=>1000,35330=>1000,35331=>1000,35332=>1000, + 35333=>1000,35334=>1000,35335=>1000,35336=>1000,35337=>1000,35338=>1000,35339=>1000,35340=>1000,35341=>1000,35342=>1000,35343=>1000,35344=>1000,35345=>1000,35346=>1000,35347=>1000,35348=>1000, + 35349=>1000,35350=>1000,35351=>1000,35352=>1000,35353=>1000,35354=>1000,35355=>1000,35356=>1000,35357=>1000,35358=>1000,35359=>1000,35360=>1000,35361=>1000,35362=>1000,35363=>1000,35364=>1000, + 35365=>1000,35366=>1000,35367=>1000,35368=>1000,35369=>1000,35370=>1000,35371=>1000,35372=>1000,35373=>1000,35374=>1000,35375=>1000,35376=>1000,35377=>1000,35378=>1000,35379=>1000,35380=>1000, + 35381=>1000,35382=>1000,35383=>1000,35384=>1000,35385=>1000,35386=>1000,35387=>1000,35388=>1000,35389=>1000,35390=>1000,35391=>1000,35392=>1000,35393=>1000,35394=>1000,35395=>1000,35396=>1000, + 35397=>1000,35398=>1000,35399=>1000,35400=>1000,35401=>1000,35402=>1000,35403=>1000,35404=>1000,35405=>1000,35406=>1000,35407=>1000,35408=>1000,35409=>1000,35410=>1000,35411=>1000,35412=>1000, + 35413=>1000,35414=>1000,35415=>1000,35416=>1000,35417=>1000,35418=>1000,35419=>1000,35420=>1000,35421=>1000,35422=>1000,35423=>1000,35424=>1000,35425=>1000,35426=>1000,35427=>1000,35428=>1000, + 35429=>1000,35430=>1000,35431=>1000,35432=>1000,35433=>1000,35434=>1000,35435=>1000,35436=>1000,35437=>1000,35438=>1000,35439=>1000,35440=>1000,35441=>1000,35442=>1000,35443=>1000,35444=>1000, + 35445=>1000,35446=>1000,35447=>1000,35448=>1000,35449=>1000,35450=>1000,35451=>1000,35452=>1000,35453=>1000,35454=>1000,35455=>1000,35456=>1000,35457=>1000,35458=>1000,35459=>1000,35460=>1000, + 35461=>1000,35462=>1000,35463=>1000,35464=>1000,35465=>1000,35466=>1000,35467=>1000,35468=>1000,35469=>1000,35470=>1000,35471=>1000,35472=>1000,35473=>1000,35474=>1000,35475=>1000,35476=>1000, + 35477=>1000,35478=>1000,35479=>1000,35480=>1000,35481=>1000,35482=>1000,35483=>1000,35484=>1000,35485=>1000,35486=>1000,35487=>1000,35488=>1000,35489=>1000,35490=>1000,35491=>1000,35492=>1000, + 35493=>1000,35494=>1000,35495=>1000,35496=>1000,35497=>1000,35498=>1000,35499=>1000,35500=>1000,35501=>1000,35502=>1000,35503=>1000,35504=>1000,35505=>1000,35506=>1000,35507=>1000,35508=>1000, + 35509=>1000,35510=>1000,35511=>1000,35512=>1000,35513=>1000,35514=>1000,35515=>1000,35516=>1000,35517=>1000,35518=>1000,35519=>1000,35520=>1000,35521=>1000,35522=>1000,35523=>1000,35524=>1000, + 35525=>1000,35526=>1000,35527=>1000,35528=>1000,35529=>1000,35530=>1000,35531=>1000,35532=>1000,35533=>1000,35534=>1000,35535=>1000,35536=>1000,35537=>1000,35538=>1000,35539=>1000,35540=>1000, + 35541=>1000,35542=>1000,35543=>1000,35544=>1000,35545=>1000,35546=>1000,35547=>1000,35548=>1000,35549=>1000,35550=>1000,35551=>1000,35552=>1000,35553=>1000,35554=>1000,35555=>1000,35556=>1000, + 35557=>1000,35558=>1000,35559=>1000,35560=>1000,35561=>1000,35562=>1000,35563=>1000,35564=>1000,35565=>1000,35566=>1000,35567=>1000,35568=>1000,35569=>1000,35570=>1000,35571=>1000,35572=>1000, + 35573=>1000,35574=>1000,35575=>1000,35576=>1000,35577=>1000,35578=>1000,35579=>1000,35580=>1000,35581=>1000,35582=>1000,35583=>1000,35584=>1000,35585=>1000,35586=>1000,35587=>1000,35588=>1000, + 35589=>1000,35590=>1000,35591=>1000,35592=>1000,35593=>1000,35594=>1000,35595=>1000,35596=>1000,35597=>1000,35598=>1000,35599=>1000,35600=>1000,35601=>1000,35602=>1000,35603=>1000,35604=>1000, + 35605=>1000,35606=>1000,35607=>1000,35608=>1000,35609=>1000,35610=>1000,35611=>1000,35612=>1000,35613=>1000,35614=>1000,35615=>1000,35616=>1000,35617=>1000,35618=>1000,35619=>1000,35620=>1000, + 35621=>1000,35622=>1000,35623=>1000,35624=>1000,35625=>1000,35626=>1000,35627=>1000,35628=>1000,35629=>1000,35630=>1000,35631=>1000,35632=>1000,35633=>1000,35634=>1000,35635=>1000,35636=>1000, + 35637=>1000,35638=>1000,35639=>1000,35640=>1000,35641=>1000,35642=>1000,35643=>1000,35644=>1000,35645=>1000,35646=>1000,35647=>1000,35648=>1000,35649=>1000,35650=>1000,35651=>1000,35652=>1000, + 35653=>1000,35654=>1000,35655=>1000,35656=>1000,35657=>1000,35658=>1000,35659=>1000,35660=>1000,35661=>1000,35662=>1000,35663=>1000,35664=>1000,35665=>1000,35666=>1000,35667=>1000,35668=>1000, + 35669=>1000,35670=>1000,35671=>1000,35672=>1000,35673=>1000,35674=>1000,35675=>1000,35676=>1000,35677=>1000,35678=>1000,35679=>1000,35680=>1000,35681=>1000,35682=>1000,35683=>1000,35684=>1000, + 35685=>1000,35686=>1000,35687=>1000,35688=>1000,35689=>1000,35690=>1000,35691=>1000,35692=>1000,35693=>1000,35694=>1000,35695=>1000,35696=>1000,35697=>1000,35698=>1000,35699=>1000,35700=>1000, + 35701=>1000,35702=>1000,35703=>1000,35704=>1000,35705=>1000,35706=>1000,35707=>1000,35708=>1000,35709=>1000,35710=>1000,35711=>1000,35712=>1000,35713=>1000,35714=>1000,35715=>1000,35716=>1000, + 35717=>1000,35718=>1000,35719=>1000,35720=>1000,35721=>1000,35722=>1000,35723=>1000,35724=>1000,35725=>1000,35726=>1000,35727=>1000,35728=>1000,35729=>1000,35730=>1000,35731=>1000,35732=>1000, + 35733=>1000,35734=>1000,35735=>1000,35736=>1000,35737=>1000,35738=>1000,35739=>1000,35740=>1000,35741=>1000,35742=>1000,35743=>1000,35744=>1000,35745=>1000,35746=>1000,35747=>1000,35748=>1000, + 35749=>1000,35750=>1000,35751=>1000,35752=>1000,35753=>1000,35754=>1000,35755=>1000,35756=>1000,35757=>1000,35758=>1000,35759=>1000,35760=>1000,35761=>1000,35762=>1000,35763=>1000,35764=>1000, + 35765=>1000,35766=>1000,35767=>1000,35768=>1000,35769=>1000,35770=>1000,35771=>1000,35772=>1000,35773=>1000,35774=>1000,35775=>1000,35776=>1000,35777=>1000,35778=>1000,35779=>1000,35780=>1000, + 35781=>1000,35782=>1000,35783=>1000,35784=>1000,35785=>1000,35786=>1000,35787=>1000,35788=>1000,35789=>1000,35790=>1000,35791=>1000,35792=>1000,35793=>1000,35794=>1000,35795=>1000,35796=>1000, + 35797=>1000,35798=>1000,35799=>1000,35800=>1000,35801=>1000,35802=>1000,35803=>1000,35804=>1000,35805=>1000,35806=>1000,35807=>1000,35808=>1000,35809=>1000,35810=>1000,35811=>1000,35812=>1000, + 35813=>1000,35814=>1000,35815=>1000,35816=>1000,35817=>1000,35818=>1000,35819=>1000,35820=>1000,35821=>1000,35822=>1000,35823=>1000,35824=>1000,35825=>1000,35826=>1000,35827=>1000,35828=>1000, + 35829=>1000,35830=>1000,35831=>1000,35832=>1000,35833=>1000,35834=>1000,35835=>1000,35836=>1000,35837=>1000,35838=>1000,35839=>1000,35840=>1000,35841=>1000,35842=>1000,35843=>1000,35844=>1000, + 35845=>1000,35846=>1000,35847=>1000,35848=>1000,35849=>1000,35850=>1000,35851=>1000,35852=>1000,35853=>1000,35854=>1000,35855=>1000,35856=>1000,35857=>1000,35858=>1000,35859=>1000,35860=>1000, + 35861=>1000,35862=>1000,35863=>1000,35864=>1000,35865=>1000,35866=>1000,35867=>1000,35868=>1000,35869=>1000,35870=>1000,35871=>1000,35872=>1000,35873=>1000,35874=>1000,35875=>1000,35876=>1000, + 35877=>1000,35878=>1000,35879=>1000,35880=>1000,35881=>1000,35882=>1000,35883=>1000,35884=>1000,35885=>1000,35886=>1000,35887=>1000,35888=>1000,35889=>1000,35890=>1000,35891=>1000,35892=>1000, + 35893=>1000,35894=>1000,35895=>1000,35896=>1000,35897=>1000,35898=>1000,35899=>1000,35900=>1000,35901=>1000,35902=>1000,35903=>1000,35904=>1000,35905=>1000,35906=>1000,35907=>1000,35908=>1000, + 35909=>1000,35910=>1000,35911=>1000,35912=>1000,35913=>1000,35914=>1000,35915=>1000,35916=>1000,35917=>1000,35918=>1000,35919=>1000,35920=>1000,35921=>1000,35922=>1000,35923=>1000,35924=>1000, + 35925=>1000,35926=>1000,35927=>1000,35928=>1000,35929=>1000,35930=>1000,35931=>1000,35932=>1000,35933=>1000,35934=>1000,35935=>1000,35936=>1000,35937=>1000,35938=>1000,35939=>1000,35940=>1000, + 35941=>1000,35942=>1000,35943=>1000,35944=>1000,35945=>1000,35946=>1000,35947=>1000,35948=>1000,35949=>1000,35950=>1000,35951=>1000,35952=>1000,35953=>1000,35954=>1000,35955=>1000,35956=>1000, + 35957=>1000,35958=>1000,35959=>1000,35960=>1000,35961=>1000,35962=>1000,35963=>1000,35964=>1000,35965=>1000,35966=>1000,35967=>1000,35968=>1000,35969=>1000,35970=>1000,35971=>1000,35972=>1000, + 35973=>1000,35974=>1000,35975=>1000,35976=>1000,35977=>1000,35978=>1000,35979=>1000,35980=>1000,35981=>1000,35982=>1000,35983=>1000,35984=>1000,35985=>1000,35986=>1000,35987=>1000,35988=>1000, + 35989=>1000,35990=>1000,35991=>1000,35992=>1000,35993=>1000,35994=>1000,35995=>1000,35996=>1000,35997=>1000,35998=>1000,35999=>1000,36000=>1000,36001=>1000,36002=>1000,36003=>1000,36004=>1000, + 36005=>1000,36006=>1000,36007=>1000,36008=>1000,36009=>1000,36010=>1000,36011=>1000,36012=>1000,36013=>1000,36014=>1000,36015=>1000,36016=>1000,36017=>1000,36018=>1000,36019=>1000,36020=>1000, + 36021=>1000,36022=>1000,36023=>1000,36024=>1000,36025=>1000,36026=>1000,36027=>1000,36028=>1000,36029=>1000,36030=>1000,36031=>1000,36032=>1000,36033=>1000,36034=>1000,36035=>1000,36036=>1000, + 36037=>1000,36038=>1000,36039=>1000,36040=>1000,36041=>1000,36042=>1000,36043=>1000,36044=>1000,36045=>1000,36046=>1000,36047=>1000,36048=>1000,36049=>1000,36050=>1000,36051=>1000,36052=>1000, + 36053=>1000,36054=>1000,36055=>1000,36056=>1000,36057=>1000,36058=>1000,36059=>1000,36060=>1000,36061=>1000,36062=>1000,36063=>1000,36064=>1000,36065=>1000,36066=>1000,36067=>1000,36068=>1000, + 36069=>1000,36070=>1000,36071=>1000,36072=>1000,36073=>1000,36074=>1000,36075=>1000,36076=>1000,36077=>1000,36078=>1000,36079=>1000,36080=>1000,36081=>1000,36082=>1000,36083=>1000,36084=>1000, + 36085=>1000,36086=>1000,36087=>1000,36088=>1000,36089=>1000,36090=>1000,36091=>1000,36092=>1000,36093=>1000,36094=>1000,36095=>1000,36096=>1000,36097=>1000,36098=>1000,36099=>1000,36100=>1000, + 36101=>1000,36102=>1000,36103=>1000,36104=>1000,36105=>1000,36106=>1000,36107=>1000,36108=>1000,36109=>1000,36110=>1000,36111=>1000,36112=>1000,36113=>1000,36114=>1000,36115=>1000,36116=>1000, + 36117=>1000,36118=>1000,36119=>1000,36120=>1000,36121=>1000,36122=>1000,36123=>1000,36124=>1000,36125=>1000,36126=>1000,36127=>1000,36128=>1000,36129=>1000,36130=>1000,36131=>1000,36132=>1000, + 36133=>1000,36134=>1000,36135=>1000,36136=>1000,36137=>1000,36138=>1000,36139=>1000,36140=>1000,36141=>1000,36142=>1000,36143=>1000,36144=>1000,36145=>1000,36146=>1000,36147=>1000,36148=>1000, + 36149=>1000,36150=>1000,36151=>1000,36152=>1000,36153=>1000,36154=>1000,36155=>1000,36156=>1000,36157=>1000,36158=>1000,36159=>1000,36160=>1000,36161=>1000,36162=>1000,36163=>1000,36164=>1000, + 36165=>1000,36166=>1000,36167=>1000,36168=>1000,36169=>1000,36170=>1000,36171=>1000,36172=>1000,36173=>1000,36174=>1000,36175=>1000,36176=>1000,36177=>1000,36178=>1000,36179=>1000,36180=>1000, + 36181=>1000,36182=>1000,36183=>1000,36184=>1000,36185=>1000,36186=>1000,36187=>1000,36188=>1000,36189=>1000,36190=>1000,36191=>1000,36192=>1000,36193=>1000,36194=>1000,36195=>1000,36196=>1000, + 36197=>1000,36198=>1000,36199=>1000,36200=>1000,36201=>1000,36202=>1000,36203=>1000,36204=>1000,36205=>1000,36206=>1000,36207=>1000,36208=>1000,36209=>1000,36210=>1000,36211=>1000,36212=>1000, + 36213=>1000,36214=>1000,36215=>1000,36216=>1000,36217=>1000,36218=>1000,36219=>1000,36220=>1000,36221=>1000,36222=>1000,36223=>1000,36224=>1000,36225=>1000,36226=>1000,36227=>1000,36228=>1000, + 36229=>1000,36230=>1000,36231=>1000,36232=>1000,36233=>1000,36234=>1000,36235=>1000,36236=>1000,36237=>1000,36238=>1000,36239=>1000,36240=>1000,36241=>1000,36242=>1000,36243=>1000,36244=>1000, + 36245=>1000,36246=>1000,36247=>1000,36248=>1000,36249=>1000,36250=>1000,36251=>1000,36252=>1000,36253=>1000,36254=>1000,36255=>1000,36256=>1000,36257=>1000,36258=>1000,36259=>1000,36260=>1000, + 36261=>1000,36262=>1000,36263=>1000,36264=>1000,36265=>1000,36266=>1000,36267=>1000,36268=>1000,36269=>1000,36270=>1000,36271=>1000,36272=>1000,36273=>1000,36274=>1000,36275=>1000,36276=>1000, + 36277=>1000,36278=>1000,36279=>1000,36280=>1000,36281=>1000,36282=>1000,36283=>1000,36284=>1000,36285=>1000,36286=>1000,36287=>1000,36288=>1000,36289=>1000,36290=>1000,36291=>1000,36292=>1000, + 36293=>1000,36294=>1000,36295=>1000,36296=>1000,36297=>1000,36298=>1000,36299=>1000,36300=>1000,36301=>1000,36302=>1000,36303=>1000,36304=>1000,36305=>1000,36306=>1000,36307=>1000,36308=>1000, + 36309=>1000,36310=>1000,36311=>1000,36312=>1000,36313=>1000,36314=>1000,36315=>1000,36316=>1000,36317=>1000,36318=>1000,36319=>1000,36320=>1000,36321=>1000,36322=>1000,36323=>1000,36324=>1000, + 36325=>1000,36326=>1000,36327=>1000,36328=>1000,36329=>1000,36330=>1000,36331=>1000,36332=>1000,36333=>1000,36334=>1000,36335=>1000,36336=>1000,36337=>1000,36338=>1000,36339=>1000,36340=>1000, + 36341=>1000,36342=>1000,36343=>1000,36344=>1000,36345=>1000,36346=>1000,36347=>1000,36348=>1000,36349=>1000,36350=>1000,36351=>1000,36352=>1000,36353=>1000,36354=>1000,36355=>1000,36356=>1000, + 36357=>1000,36358=>1000,36359=>1000,36360=>1000,36361=>1000,36362=>1000,36363=>1000,36364=>1000,36365=>1000,36366=>1000,36367=>1000,36368=>1000,36369=>1000,36370=>1000,36371=>1000,36372=>1000, + 36373=>1000,36374=>1000,36375=>1000,36376=>1000,36377=>1000,36378=>1000,36379=>1000,36380=>1000,36381=>1000,36382=>1000,36383=>1000,36384=>1000,36385=>1000,36386=>1000,36387=>1000,36388=>1000, + 36389=>1000,36390=>1000,36391=>1000,36392=>1000,36393=>1000,36394=>1000,36395=>1000,36396=>1000,36397=>1000,36398=>1000,36399=>1000,36400=>1000,36401=>1000,36402=>1000,36403=>1000,36404=>1000, + 36405=>1000,36406=>1000,36407=>1000,36408=>1000,36409=>1000,36410=>1000,36411=>1000,36412=>1000,36413=>1000,36414=>1000,36415=>1000,36416=>1000,36417=>1000,36418=>1000,36419=>1000,36420=>1000, + 36421=>1000,36422=>1000,36423=>1000,36424=>1000,36425=>1000,36426=>1000,36427=>1000,36428=>1000,36429=>1000,36430=>1000,36431=>1000,36432=>1000,36433=>1000,36434=>1000,36435=>1000,36436=>1000, + 36437=>1000,36438=>1000,36439=>1000,36440=>1000,36441=>1000,36442=>1000,36443=>1000,36444=>1000,36445=>1000,36446=>1000,36447=>1000,36448=>1000,36449=>1000,36450=>1000,36451=>1000,36452=>1000, + 36453=>1000,36454=>1000,36455=>1000,36456=>1000,36457=>1000,36458=>1000,36459=>1000,36460=>1000,36461=>1000,36462=>1000,36463=>1000,36464=>1000,36465=>1000,36466=>1000,36467=>1000,36468=>1000, + 36469=>1000,36470=>1000,36471=>1000,36472=>1000,36473=>1000,36474=>1000,36475=>1000,36476=>1000,36477=>1000,36478=>1000,36479=>1000,36480=>1000,36481=>1000,36482=>1000,36483=>1000,36484=>1000, + 36485=>1000,36486=>1000,36487=>1000,36488=>1000,36489=>1000,36490=>1000,36491=>1000,36492=>1000,36493=>1000,36494=>1000,36495=>1000,36496=>1000,36497=>1000,36498=>1000,36499=>1000,36500=>1000, + 36501=>1000,36502=>1000,36503=>1000,36504=>1000,36505=>1000,36506=>1000,36507=>1000,36508=>1000,36509=>1000,36510=>1000,36511=>1000,36512=>1000,36513=>1000,36514=>1000,36515=>1000,36516=>1000, + 36517=>1000,36518=>1000,36519=>1000,36520=>1000,36521=>1000,36522=>1000,36523=>1000,36524=>1000,36525=>1000,36526=>1000,36527=>1000,36528=>1000,36529=>1000,36530=>1000,36531=>1000,36532=>1000, + 36533=>1000,36534=>1000,36535=>1000,36536=>1000,36537=>1000,36538=>1000,36539=>1000,36540=>1000,36541=>1000,36542=>1000,36543=>1000,36544=>1000,36545=>1000,36546=>1000,36547=>1000,36548=>1000, + 36549=>1000,36550=>1000,36551=>1000,36552=>1000,36553=>1000,36554=>1000,36555=>1000,36556=>1000,36557=>1000,36558=>1000,36559=>1000,36560=>1000,36561=>1000,36562=>1000,36563=>1000,36564=>1000, + 36565=>1000,36566=>1000,36567=>1000,36568=>1000,36569=>1000,36570=>1000,36571=>1000,36572=>1000,36573=>1000,36574=>1000,36575=>1000,36576=>1000,36577=>1000,36578=>1000,36579=>1000,36580=>1000, + 36581=>1000,36582=>1000,36583=>1000,36584=>1000,36585=>1000,36586=>1000,36587=>1000,36588=>1000,36589=>1000,36590=>1000,36591=>1000,36592=>1000,36593=>1000,36594=>1000,36595=>1000,36596=>1000, + 36597=>1000,36598=>1000,36599=>1000,36600=>1000,36601=>1000,36602=>1000,36603=>1000,36604=>1000,36605=>1000,36606=>1000,36607=>1000,36608=>1000,36609=>1000,36610=>1000,36611=>1000,36612=>1000, + 36613=>1000,36614=>1000,36615=>1000,36616=>1000,36617=>1000,36618=>1000,36619=>1000,36620=>1000,36621=>1000,36622=>1000,36623=>1000,36624=>1000,36625=>1000,36626=>1000,36627=>1000,36628=>1000, + 36629=>1000,36630=>1000,36631=>1000,36632=>1000,36633=>1000,36634=>1000,36635=>1000,36636=>1000,36637=>1000,36638=>1000,36639=>1000,36640=>1000,36641=>1000,36642=>1000,36643=>1000,36644=>1000, + 36645=>1000,36646=>1000,36647=>1000,36648=>1000,36649=>1000,36650=>1000,36651=>1000,36652=>1000,36653=>1000,36654=>1000,36655=>1000,36656=>1000,36657=>1000,36658=>1000,36659=>1000,36660=>1000, + 36661=>1000,36662=>1000,36663=>1000,36664=>1000,36665=>1000,36666=>1000,36667=>1000,36668=>1000,36669=>1000,36670=>1000,36671=>1000,36672=>1000,36673=>1000,36674=>1000,36675=>1000,36676=>1000, + 36677=>1000,36678=>1000,36679=>1000,36680=>1000,36681=>1000,36682=>1000,36683=>1000,36684=>1000,36685=>1000,36686=>1000,36687=>1000,36688=>1000,36689=>1000,36690=>1000,36691=>1000,36692=>1000, + 36693=>1000,36694=>1000,36695=>1000,36696=>1000,36697=>1000,36698=>1000,36699=>1000,36700=>1000,36701=>1000,36702=>1000,36703=>1000,36704=>1000,36705=>1000,36706=>1000,36707=>1000,36708=>1000, + 36709=>1000,36710=>1000,36711=>1000,36712=>1000,36713=>1000,36714=>1000,36715=>1000,36716=>1000,36717=>1000,36718=>1000,36719=>1000,36720=>1000,36721=>1000,36722=>1000,36723=>1000,36724=>1000, + 36725=>1000,36726=>1000,36727=>1000,36728=>1000,36729=>1000,36730=>1000,36731=>1000,36732=>1000,36733=>1000,36734=>1000,36735=>1000,36736=>1000,36737=>1000,36738=>1000,36739=>1000,36740=>1000, + 36741=>1000,36742=>1000,36743=>1000,36744=>1000,36745=>1000,36746=>1000,36747=>1000,36748=>1000,36749=>1000,36750=>1000,36751=>1000,36752=>1000,36753=>1000,36754=>1000,36755=>1000,36756=>1000, + 36757=>1000,36758=>1000,36759=>1000,36760=>1000,36761=>1000,36762=>1000,36763=>1000,36764=>1000,36765=>1000,36766=>1000,36767=>1000,36768=>1000,36769=>1000,36770=>1000,36771=>1000,36772=>1000, + 36773=>1000,36774=>1000,36775=>1000,36776=>1000,36777=>1000,36778=>1000,36779=>1000,36780=>1000,36781=>1000,36782=>1000,36783=>1000,36784=>1000,36785=>1000,36786=>1000,36787=>1000,36788=>1000, + 36789=>1000,36790=>1000,36791=>1000,36792=>1000,36793=>1000,36794=>1000,36795=>1000,36796=>1000,36797=>1000,36798=>1000,36799=>1000,36800=>1000,36801=>1000,36802=>1000,36803=>1000,36804=>1000, + 36805=>1000,36806=>1000,36807=>1000,36808=>1000,36809=>1000,36810=>1000,36811=>1000,36812=>1000,36813=>1000,36814=>1000,36815=>1000,36816=>1000,36817=>1000,36818=>1000,36819=>1000,36820=>1000, + 36821=>1000,36822=>1000,36823=>1000,36824=>1000,36825=>1000,36826=>1000,36827=>1000,36828=>1000,36829=>1000,36830=>1000,36831=>1000,36832=>1000,36833=>1000,36834=>1000,36835=>1000,36836=>1000, + 36837=>1000,36838=>1000,36839=>1000,36840=>1000,36841=>1000,36842=>1000,36843=>1000,36844=>1000,36845=>1000,36846=>1000,36847=>1000,36848=>1000,36849=>1000,36850=>1000,36851=>1000,36852=>1000, + 36853=>1000,36854=>1000,36855=>1000,36856=>1000,36857=>1000,36858=>1000,36859=>1000,36860=>1000,36861=>1000,36862=>1000,36863=>1000,36864=>1000,36865=>1000,36866=>1000,36867=>1000,36868=>1000, + 36869=>1000,36870=>1000,36871=>1000,36872=>1000,36873=>1000,36874=>1000,36875=>1000,36876=>1000,36877=>1000,36878=>1000,36879=>1000,36880=>1000,36881=>1000,36882=>1000,36883=>1000,36884=>1000, + 36885=>1000,36886=>1000,36887=>1000,36888=>1000,36889=>1000,36890=>1000,36891=>1000,36892=>1000,36893=>1000,36894=>1000,36895=>1000,36896=>1000,36897=>1000,36898=>1000,36899=>1000,36900=>1000, + 36901=>1000,36902=>1000,36903=>1000,36904=>1000,36905=>1000,36906=>1000,36907=>1000,36908=>1000,36909=>1000,36910=>1000,36911=>1000,36912=>1000,36913=>1000,36914=>1000,36915=>1000,36916=>1000, + 36917=>1000,36918=>1000,36919=>1000,36920=>1000,36921=>1000,36922=>1000,36923=>1000,36924=>1000,36925=>1000,36926=>1000,36927=>1000,36928=>1000,36929=>1000,36930=>1000,36931=>1000,36932=>1000, + 36933=>1000,36934=>1000,36935=>1000,36936=>1000,36937=>1000,36938=>1000,36939=>1000,36940=>1000,36941=>1000,36942=>1000,36943=>1000,36944=>1000,36945=>1000,36946=>1000,36947=>1000,36948=>1000, + 36949=>1000,36950=>1000,36951=>1000,36952=>1000,36953=>1000,36954=>1000,36955=>1000,36956=>1000,36957=>1000,36958=>1000,36959=>1000,36960=>1000,36961=>1000,36962=>1000,36963=>1000,36964=>1000, + 36965=>1000,36966=>1000,36967=>1000,36968=>1000,36969=>1000,36970=>1000,36971=>1000,36972=>1000,36973=>1000,36974=>1000,36975=>1000,36976=>1000,36977=>1000,36978=>1000,36979=>1000,36980=>1000, + 36981=>1000,36982=>1000,36983=>1000,36984=>1000,36985=>1000,36986=>1000,36987=>1000,36988=>1000,36989=>1000,36990=>1000,36991=>1000,36992=>1000,36993=>1000,36994=>1000,36995=>1000,36996=>1000, + 36997=>1000,36998=>1000,36999=>1000,37000=>1000,37001=>1000,37002=>1000,37003=>1000,37004=>1000,37005=>1000,37006=>1000,37007=>1000,37008=>1000,37009=>1000,37010=>1000,37011=>1000,37012=>1000, + 37013=>1000,37014=>1000,37015=>1000,37016=>1000,37017=>1000,37018=>1000,37019=>1000,37020=>1000,37021=>1000,37022=>1000,37023=>1000,37024=>1000,37025=>1000,37026=>1000,37027=>1000,37028=>1000, + 37029=>1000,37030=>1000,37031=>1000,37032=>1000,37033=>1000,37034=>1000,37035=>1000,37036=>1000,37037=>1000,37038=>1000,37039=>1000,37040=>1000,37041=>1000,37042=>1000,37043=>1000,37044=>1000, + 37045=>1000,37046=>1000,37047=>1000,37048=>1000,37049=>1000,37050=>1000,37051=>1000,37052=>1000,37053=>1000,37054=>1000,37055=>1000,37056=>1000,37057=>1000,37058=>1000,37059=>1000,37060=>1000, + 37061=>1000,37062=>1000,37063=>1000,37064=>1000,37065=>1000,37066=>1000,37067=>1000,37068=>1000,37069=>1000,37070=>1000,37071=>1000,37072=>1000,37073=>1000,37074=>1000,37075=>1000,37076=>1000, + 37077=>1000,37078=>1000,37079=>1000,37080=>1000,37081=>1000,37082=>1000,37083=>1000,37084=>1000,37085=>1000,37086=>1000,37087=>1000,37088=>1000,37089=>1000,37090=>1000,37091=>1000,37092=>1000, + 37093=>1000,37094=>1000,37095=>1000,37096=>1000,37097=>1000,37098=>1000,37099=>1000,37100=>1000,37101=>1000,37102=>1000,37103=>1000,37104=>1000,37105=>1000,37106=>1000,37107=>1000,37108=>1000, + 37109=>1000,37110=>1000,37111=>1000,37112=>1000,37113=>1000,37114=>1000,37115=>1000,37116=>1000,37117=>1000,37118=>1000,37119=>1000,37120=>1000,37121=>1000,37122=>1000,37123=>1000,37124=>1000, + 37125=>1000,37126=>1000,37127=>1000,37128=>1000,37129=>1000,37130=>1000,37131=>1000,37132=>1000,37133=>1000,37134=>1000,37135=>1000,37136=>1000,37137=>1000,37138=>1000,37139=>1000,37140=>1000, + 37141=>1000,37142=>1000,37143=>1000,37144=>1000,37145=>1000,37146=>1000,37147=>1000,37148=>1000,37149=>1000,37150=>1000,37151=>1000,37152=>1000,37153=>1000,37154=>1000,37155=>1000,37156=>1000, + 37157=>1000,37158=>1000,37159=>1000,37160=>1000,37161=>1000,37162=>1000,37163=>1000,37164=>1000,37165=>1000,37166=>1000,37167=>1000,37168=>1000,37169=>1000,37170=>1000,37171=>1000,37172=>1000, + 37173=>1000,37174=>1000,37175=>1000,37176=>1000,37177=>1000,37178=>1000,37179=>1000,37180=>1000,37181=>1000,37182=>1000,37183=>1000,37184=>1000,37185=>1000,37186=>1000,37187=>1000,37188=>1000, + 37189=>1000,37190=>1000,37191=>1000,37192=>1000,37193=>1000,37194=>1000,37195=>1000,37196=>1000,37197=>1000,37198=>1000,37199=>1000,37200=>1000,37201=>1000,37202=>1000,37203=>1000,37204=>1000, + 37205=>1000,37206=>1000,37207=>1000,37208=>1000,37209=>1000,37210=>1000,37211=>1000,37212=>1000,37213=>1000,37214=>1000,37215=>1000,37216=>1000,37217=>1000,37218=>1000,37219=>1000,37220=>1000, + 37221=>1000,37222=>1000,37223=>1000,37224=>1000,37225=>1000,37226=>1000,37227=>1000,37228=>1000,37229=>1000,37230=>1000,37231=>1000,37232=>1000,37233=>1000,37234=>1000,37235=>1000,37236=>1000, + 37237=>1000,37238=>1000,37239=>1000,37240=>1000,37241=>1000,37242=>1000,37243=>1000,37244=>1000,37245=>1000,37246=>1000,37247=>1000,37248=>1000,37249=>1000,37250=>1000,37251=>1000,37252=>1000, + 37253=>1000,37254=>1000,37255=>1000,37256=>1000,37257=>1000,37258=>1000,37259=>1000,37260=>1000,37261=>1000,37262=>1000,37263=>1000,37264=>1000,37265=>1000,37266=>1000,37267=>1000,37268=>1000, + 37269=>1000,37270=>1000,37271=>1000,37272=>1000,37273=>1000,37274=>1000,37275=>1000,37276=>1000,37277=>1000,37278=>1000,37279=>1000,37280=>1000,37281=>1000,37282=>1000,37283=>1000,37284=>1000, + 37285=>1000,37286=>1000,37287=>1000,37288=>1000,37289=>1000,37290=>1000,37291=>1000,37292=>1000,37293=>1000,37294=>1000,37295=>1000,37296=>1000,37297=>1000,37298=>1000,37299=>1000,37300=>1000, + 37301=>1000,37302=>1000,37303=>1000,37304=>1000,37305=>1000,37306=>1000,37307=>1000,37308=>1000,37309=>1000,37310=>1000,37311=>1000,37312=>1000,37313=>1000,37314=>1000,37315=>1000,37316=>1000, + 37317=>1000,37318=>1000,37319=>1000,37320=>1000,37321=>1000,37322=>1000,37323=>1000,37324=>1000,37325=>1000,37326=>1000,37327=>1000,37328=>1000,37329=>1000,37330=>1000,37331=>1000,37332=>1000, + 37333=>1000,37334=>1000,37335=>1000,37336=>1000,37337=>1000,37338=>1000,37339=>1000,37340=>1000,37341=>1000,37342=>1000,37343=>1000,37344=>1000,37345=>1000,37346=>1000,37347=>1000,37348=>1000, + 37349=>1000,37350=>1000,37351=>1000,37352=>1000,37353=>1000,37354=>1000,37355=>1000,37356=>1000,37357=>1000,37358=>1000,37359=>1000,37360=>1000,37361=>1000,37362=>1000,37363=>1000,37364=>1000, + 37365=>1000,37366=>1000,37367=>1000,37368=>1000,37369=>1000,37370=>1000,37371=>1000,37372=>1000,37373=>1000,37374=>1000,37375=>1000,37376=>1000,37377=>1000,37378=>1000,37379=>1000,37380=>1000, + 37381=>1000,37382=>1000,37383=>1000,37384=>1000,37385=>1000,37386=>1000,37387=>1000,37388=>1000,37389=>1000,37390=>1000,37391=>1000,37392=>1000,37393=>1000,37394=>1000,37395=>1000,37396=>1000, + 37397=>1000,37398=>1000,37399=>1000,37400=>1000,37401=>1000,37402=>1000,37403=>1000,37404=>1000,37405=>1000,37406=>1000,37407=>1000,37408=>1000,37409=>1000,37410=>1000,37411=>1000,37412=>1000, + 37413=>1000,37414=>1000,37415=>1000,37416=>1000,37417=>1000,37418=>1000,37419=>1000,37420=>1000,37421=>1000,37422=>1000,37423=>1000,37424=>1000,37425=>1000,37426=>1000,37427=>1000,37428=>1000, + 37429=>1000,37430=>1000,37431=>1000,37432=>1000,37433=>1000,37434=>1000,37435=>1000,37436=>1000,37437=>1000,37438=>1000,37439=>1000,37440=>1000,37441=>1000,37442=>1000,37443=>1000,37444=>1000, + 37445=>1000,37446=>1000,37447=>1000,37448=>1000,37449=>1000,37450=>1000,37451=>1000,37452=>1000,37453=>1000,37454=>1000,37455=>1000,37456=>1000,37457=>1000,37458=>1000,37459=>1000,37460=>1000, + 37461=>1000,37462=>1000,37463=>1000,37464=>1000,37465=>1000,37466=>1000,37467=>1000,37468=>1000,37469=>1000,37470=>1000,37471=>1000,37472=>1000,37473=>1000,37474=>1000,37475=>1000,37476=>1000, + 37477=>1000,37478=>1000,37479=>1000,37480=>1000,37481=>1000,37482=>1000,37483=>1000,37484=>1000,37485=>1000,37486=>1000,37487=>1000,37488=>1000,37489=>1000,37490=>1000,37491=>1000,37492=>1000, + 37493=>1000,37494=>1000,37495=>1000,37496=>1000,37497=>1000,37498=>1000,37499=>1000,37500=>1000,37501=>1000,37502=>1000,37503=>1000,37504=>1000,37505=>1000,37506=>1000,37507=>1000,37508=>1000, + 37509=>1000,37510=>1000,37511=>1000,37512=>1000,37513=>1000,37514=>1000,37515=>1000,37516=>1000,37517=>1000,37518=>1000,37519=>1000,37520=>1000,37521=>1000,37522=>1000,37523=>1000,37524=>1000, + 37525=>1000,37526=>1000,37527=>1000,37528=>1000,37529=>1000,37530=>1000,37531=>1000,37532=>1000,37533=>1000,37534=>1000,37535=>1000,37536=>1000,37537=>1000,37538=>1000,37539=>1000,37540=>1000, + 37541=>1000,37542=>1000,37543=>1000,37544=>1000,37545=>1000,37546=>1000,37547=>1000,37548=>1000,37549=>1000,37550=>1000,37551=>1000,37552=>1000,37553=>1000,37554=>1000,37555=>1000,37556=>1000, + 37557=>1000,37558=>1000,37559=>1000,37560=>1000,37561=>1000,37562=>1000,37563=>1000,37564=>1000,37565=>1000,37566=>1000,37567=>1000,37568=>1000,37569=>1000,37570=>1000,37571=>1000,37572=>1000, + 37573=>1000,37574=>1000,37575=>1000,37576=>1000,37577=>1000,37578=>1000,37579=>1000,37580=>1000,37581=>1000,37582=>1000,37583=>1000,37584=>1000,37585=>1000,37586=>1000,37587=>1000,37588=>1000, + 37589=>1000,37590=>1000,37591=>1000,37592=>1000,37593=>1000,37594=>1000,37595=>1000,37596=>1000,37597=>1000,37598=>1000,37599=>1000,37600=>1000,37601=>1000,37602=>1000,37603=>1000,37604=>1000, + 37605=>1000,37606=>1000,37607=>1000,37608=>1000,37609=>1000,37610=>1000,37611=>1000,37612=>1000,37613=>1000,37614=>1000,37615=>1000,37616=>1000,37617=>1000,37618=>1000,37619=>1000,37620=>1000, + 37621=>1000,37622=>1000,37623=>1000,37624=>1000,37625=>1000,37626=>1000,37627=>1000,37628=>1000,37629=>1000,37630=>1000,37631=>1000,37632=>1000,37633=>1000,37634=>1000,37635=>1000,37636=>1000, + 37637=>1000,37638=>1000,37639=>1000,37640=>1000,37641=>1000,37642=>1000,37643=>1000,37644=>1000,37645=>1000,37646=>1000,37647=>1000,37648=>1000,37649=>1000,37650=>1000,37651=>1000,37652=>1000, + 37653=>1000,37654=>1000,37655=>1000,37656=>1000,37657=>1000,37658=>1000,37659=>1000,37660=>1000,37661=>1000,37662=>1000,37663=>1000,37664=>1000,37665=>1000,37666=>1000,37667=>1000,37668=>1000, + 37669=>1000,37670=>1000,37671=>1000,37672=>1000,37673=>1000,37674=>1000,37675=>1000,37676=>1000,37677=>1000,37678=>1000,37679=>1000,37680=>1000,37681=>1000,37682=>1000,37683=>1000,37684=>1000, + 37685=>1000,37686=>1000,37687=>1000,37688=>1000,37689=>1000,37690=>1000,37691=>1000,37692=>1000,37693=>1000,37694=>1000,37695=>1000,37696=>1000,37697=>1000,37698=>1000,37699=>1000,37700=>1000, + 37701=>1000,37702=>1000,37703=>1000,37704=>1000,37705=>1000,37706=>1000,37707=>1000,37708=>1000,37709=>1000,37710=>1000,37711=>1000,37712=>1000,37713=>1000,37714=>1000,37715=>1000,37716=>1000, + 37717=>1000,37718=>1000,37719=>1000,37720=>1000,37721=>1000,37722=>1000,37723=>1000,37724=>1000,37725=>1000,37726=>1000,37727=>1000,37728=>1000,37729=>1000,37730=>1000,37731=>1000,37732=>1000, + 37733=>1000,37734=>1000,37735=>1000,37736=>1000,37737=>1000,37738=>1000,37739=>1000,37740=>1000,37741=>1000,37742=>1000,37743=>1000,37744=>1000,37745=>1000,37746=>1000,37747=>1000,37748=>1000, + 37749=>1000,37750=>1000,37751=>1000,37752=>1000,37753=>1000,37754=>1000,37755=>1000,37756=>1000,37757=>1000,37758=>1000,37759=>1000,37760=>1000,37761=>1000,37762=>1000,37763=>1000,37764=>1000, + 37765=>1000,37766=>1000,37767=>1000,37768=>1000,37769=>1000,37770=>1000,37771=>1000,37772=>1000,37773=>1000,37774=>1000,37775=>1000,37776=>1000,37777=>1000,37778=>1000,37779=>1000,37780=>1000, + 37781=>1000,37782=>1000,37783=>1000,37784=>1000,37785=>1000,37786=>1000,37787=>1000,37788=>1000,37789=>1000,37790=>1000,37791=>1000,37792=>1000,37793=>1000,37794=>1000,37795=>1000,37796=>1000, + 37797=>1000,37798=>1000,37799=>1000,37800=>1000,37801=>1000,37802=>1000,37803=>1000,37804=>1000,37805=>1000,37806=>1000,37807=>1000,37808=>1000,37809=>1000,37810=>1000,37811=>1000,37812=>1000, + 37813=>1000,37814=>1000,37815=>1000,37816=>1000,37817=>1000,37818=>1000,37819=>1000,37820=>1000,37821=>1000,37822=>1000,37823=>1000,37824=>1000,37825=>1000,37826=>1000,37827=>1000,37828=>1000, + 37829=>1000,37830=>1000,37831=>1000,37832=>1000,37833=>1000,37834=>1000,37835=>1000,37836=>1000,37837=>1000,37838=>1000,37839=>1000,37840=>1000,37841=>1000,37842=>1000,37843=>1000,37844=>1000, + 37845=>1000,37846=>1000,37847=>1000,37848=>1000,37849=>1000,37850=>1000,37851=>1000,37852=>1000,37853=>1000,37854=>1000,37855=>1000,37856=>1000,37857=>1000,37858=>1000,37859=>1000,37860=>1000, + 37861=>1000,37862=>1000,37863=>1000,37864=>1000,37865=>1000,37866=>1000,37867=>1000,37868=>1000,37869=>1000,37870=>1000,37871=>1000,37872=>1000,37873=>1000,37874=>1000,37875=>1000,37876=>1000, + 37877=>1000,37878=>1000,37879=>1000,37880=>1000,37881=>1000,37882=>1000,37883=>1000,37884=>1000,37885=>1000,37886=>1000,37887=>1000,37888=>1000,37889=>1000,37890=>1000,37891=>1000,37892=>1000, + 37893=>1000,37894=>1000,37895=>1000,37896=>1000,37897=>1000,37898=>1000,37899=>1000,37900=>1000,37901=>1000,37902=>1000,37903=>1000,37904=>1000,37905=>1000,37906=>1000,37907=>1000,37908=>1000, + 37909=>1000,37910=>1000,37911=>1000,37912=>1000,37913=>1000,37914=>1000,37915=>1000,37916=>1000,37917=>1000,37918=>1000,37919=>1000,37920=>1000,37921=>1000,37922=>1000,37923=>1000,37924=>1000, + 37925=>1000,37926=>1000,37927=>998,37928=>1000,37929=>1000,37930=>1000,37931=>1000,37932=>1000,37933=>1000,37934=>1000,37935=>1000,37936=>1000,37937=>1000,37938=>1000,37939=>1000,37940=>1000, + 37941=>1000,37942=>1000,37943=>1000,37944=>1000,37945=>1000,37946=>1000,37947=>1000,37948=>1000,37949=>1000,37950=>1000,37951=>1000,37952=>1000,37953=>1000,37954=>1000,37955=>1000,37956=>1000, + 37957=>1000,37958=>1000,37959=>1000,37960=>1000,37961=>1000,37962=>1000,37963=>1000,37964=>1000,37965=>1000,37966=>1000,37967=>1000,37968=>1000,37969=>1000,37970=>1000,37971=>1000,37972=>1000, + 37973=>1000,37974=>1000,37975=>1000,37976=>1000,37977=>1000,37978=>1000,37979=>1000,37980=>1000,37981=>1000,37982=>1000,37983=>1000,37984=>1000,37985=>1000,37986=>1000,37987=>1000,37988=>1000, + 37989=>1000,37990=>1000,37991=>1000,37992=>1000,37993=>1000,37994=>1000,37995=>1000,37996=>1000,37997=>1000,37998=>1000,37999=>1000,38000=>1000,38001=>1000,38002=>1000,38003=>1000,38004=>1000, + 38005=>1000,38006=>1000,38007=>1000,38008=>1000,38009=>1000,38010=>1000,38011=>1000,38012=>1000,38013=>1000,38014=>1000,38015=>1000,38016=>1000,38017=>1000,38018=>1000,38019=>1000,38020=>1000, + 38021=>1000,38022=>1000,38023=>1000,38024=>1000,38025=>1000,38026=>1000,38027=>1000,38028=>1000,38029=>1000,38030=>1000,38031=>1000,38032=>1000,38033=>1000,38034=>1000,38035=>1000,38036=>1000, + 38037=>1000,38038=>1000,38039=>1000,38040=>1000,38041=>1000,38042=>1000,38043=>1000,38044=>1000,38045=>1000,38046=>1000,38047=>1000,38048=>1000,38049=>1000,38050=>1000,38051=>1000,38052=>1000, + 38053=>1000,38054=>1000,38055=>1000,38056=>1000,38057=>1000,38058=>1000,38059=>1000,38060=>1000,38061=>1000,38062=>1000,38063=>1000,38064=>1000,38065=>1000,38066=>1000,38067=>1000,38068=>1000, + 38069=>1000,38070=>1000,38071=>1000,38072=>1000,38073=>1000,38074=>1000,38075=>1000,38076=>1000,38077=>1000,38078=>1000,38079=>1000,38080=>1000,38081=>1000,38082=>1000,38083=>1000,38084=>1000, + 38085=>1000,38086=>1000,38087=>1000,38088=>1000,38089=>1000,38090=>1000,38091=>1000,38092=>1000,38093=>1000,38094=>1000,38095=>1000,38096=>1000,38097=>1000,38098=>1000,38099=>1000,38100=>1000, + 38101=>1000,38102=>1000,38103=>1000,38104=>1000,38105=>1000,38106=>1000,38107=>1000,38108=>1000,38109=>1000,38110=>1000,38111=>1000,38112=>1000,38113=>1000,38114=>1000,38115=>1000,38116=>1000, + 38117=>1000,38118=>1000,38119=>1000,38120=>1000,38121=>1000,38122=>1000,38123=>1000,38124=>1000,38125=>1000,38126=>1000,38127=>1000,38128=>1000,38129=>1000,38130=>1000,38131=>1000,38132=>1000, + 38133=>1000,38134=>1000,38135=>1000,38136=>1000,38137=>1000,38138=>1000,38139=>1000,38140=>1000,38141=>1000,38142=>1000,38143=>1000,38144=>1000,38145=>1000,38146=>1000,38147=>1000,38148=>1000, + 38149=>1000,38150=>1000,38151=>1000,38152=>1000,38153=>1000,38154=>1000,38155=>1000,38156=>1000,38157=>1000,38158=>1000,38159=>1000,38160=>1000,38161=>1000,38162=>1000,38163=>1000,38164=>1000, + 38165=>1000,38166=>1000,38167=>1000,38168=>1000,38169=>1000,38170=>1000,38171=>1000,38172=>1000,38173=>1000,38174=>1000,38175=>1000,38176=>1000,38177=>1000,38178=>1000,38179=>1000,38180=>1000, + 38181=>1000,38182=>1000,38183=>1000,38184=>1000,38185=>1000,38186=>1000,38187=>1000,38188=>1000,38189=>1000,38190=>1000,38191=>1000,38192=>1000,38193=>1000,38194=>1000,38195=>1000,38196=>1000, + 38197=>1000,38198=>1000,38199=>1000,38200=>1000,38201=>1000,38202=>1000,38203=>1000,38204=>1000,38205=>1000,38206=>1000,38207=>1000,38208=>1000,38209=>1000,38210=>1000,38211=>1000,38212=>1000, + 38213=>1000,38214=>1000,38215=>1000,38216=>1000,38217=>1000,38218=>1000,38219=>1000,38220=>1000,38221=>1000,38222=>1000,38223=>1000,38224=>1000,38225=>1000,38226=>1000,38227=>1000,38228=>1000, + 38229=>1000,38230=>1000,38231=>1000,38232=>1000,38233=>1000,38234=>1000,38235=>1000,38236=>1000,38237=>1000,38238=>1000,38239=>1000,38240=>1000,38241=>1000,38242=>1000,38243=>1000,38244=>1000, + 38245=>1000,38246=>1000,38247=>1000,38248=>1000,38249=>1000,38250=>1000,38251=>1000,38252=>1000,38253=>1000,38254=>1000,38255=>1000,38256=>1000,38257=>1000,38258=>1000,38259=>1000,38260=>1000, + 38261=>1000,38262=>1000,38263=>1000,38264=>1000,38265=>1000,38266=>1000,38267=>1000,38268=>1000,38269=>1000,38270=>1000,38271=>1000,38272=>1000,38273=>1000,38274=>1000,38275=>1000,38276=>1000, + 38277=>1000,38278=>1000,38279=>1000,38280=>1000,38281=>1000,38282=>1000,38283=>1000,38284=>1000,38285=>1000,38286=>1000,38287=>1000,38288=>1000,38289=>1000,38290=>1000,38291=>1000,38292=>1000, + 38293=>1000,38294=>1000,38295=>1000,38296=>1000,38297=>1000,38298=>1000,38299=>1000,38300=>1000,38301=>1000,38302=>1000,38303=>1000,38304=>1000,38305=>1000,38306=>1000,38307=>1000,38308=>1000, + 38309=>1000,38310=>1000,38311=>1000,38312=>1000,38313=>1000,38314=>1000,38315=>1000,38316=>1000,38317=>1000,38318=>1000,38319=>1000,38320=>1000,38321=>1000,38322=>1000,38323=>1000,38324=>1000, + 38325=>1000,38326=>1000,38327=>1000,38328=>1000,38329=>1000,38330=>1000,38331=>1000,38332=>1000,38333=>1000,38334=>1000,38335=>1000,38336=>1000,38337=>1000,38338=>1000,38339=>1000,38340=>1000, + 38341=>1000,38342=>1000,38343=>1000,38344=>1000,38345=>1000,38346=>1000,38347=>1000,38348=>1000,38349=>1000,38350=>1000,38351=>1000,38352=>1000,38353=>1000,38354=>1000,38355=>1000,38356=>1000, + 38357=>1000,38358=>1000,38359=>1000,38360=>1000,38361=>1000,38362=>1000,38363=>1000,38364=>1000,38365=>1000,38366=>1000,38367=>1000,38368=>1000,38369=>1000,38370=>1000,38371=>1000,38372=>1000, + 38373=>1000,38374=>1000,38375=>1000,38376=>1000,38377=>1000,38378=>1000,38379=>1000,38380=>1000,38381=>1000,38382=>1000,38383=>1000,38384=>1000,38385=>1000,38386=>1000,38387=>1000,38388=>1000, + 38389=>1000,38390=>1000,38391=>1000,38392=>1000,38393=>1000,38394=>1000,38395=>1000,38396=>1000,38397=>1000,38398=>1000,38399=>1000,38400=>1000,38401=>1000,38402=>1000,38403=>1000,38404=>1000, + 38405=>1000,38406=>1000,38407=>1000,38408=>1000,38409=>1000,38410=>1000,38411=>1000,38412=>1000,38413=>1000,38414=>1000,38415=>1000,38416=>1000,38417=>1000,38418=>1000,38419=>1000,38420=>1000, + 38421=>1000,38422=>1000,38423=>1000,38424=>1000,38425=>1000,38426=>1000,38427=>1000,38428=>1000,38429=>1000,38430=>1000,38431=>1000,38432=>1000,38433=>1000,38434=>1000,38435=>1000,38436=>1000, + 38437=>1000,38438=>1000,38439=>1000,38440=>1000,38441=>1000,38442=>1000,38443=>1000,38444=>1000,38445=>1000,38446=>1000,38447=>1000,38448=>1000,38449=>1000,38450=>1000,38451=>1000,38452=>1000, + 38453=>1000,38454=>1000,38455=>1000,38456=>1000,38457=>1000,38458=>1000,38459=>1000,38460=>1000,38461=>1000,38462=>1000,38463=>1000,38464=>1000,38465=>1000,38466=>1000,38467=>1000,38468=>1000, + 38469=>1000,38470=>1000,38471=>1000,38472=>1000,38473=>1000,38474=>1000,38475=>1000,38476=>1000,38477=>1000,38478=>1000,38479=>1000,38480=>1000,38481=>1000,38482=>1000,38483=>1000,38484=>1000, + 38485=>1000,38486=>1000,38487=>1000,38488=>1000,38489=>1000,38490=>1000,38491=>1000,38492=>1000,38493=>1000,38494=>1000,38495=>1000,38496=>1000,38497=>1000,38498=>1000,38499=>1000,38500=>1000, + 38501=>1000,38502=>1000,38503=>1000,38504=>1000,38505=>1000,38506=>1000,38507=>1000,38508=>1000,38509=>1000,38510=>1000,38511=>1000,38512=>1000,38513=>1000,38514=>1000,38515=>1000,38516=>1000, + 38517=>1000,38518=>1000,38519=>1000,38520=>1000,38521=>1000,38522=>1000,38523=>1000,38524=>1000,38525=>1000,38526=>1000,38527=>1000,38528=>1000,38529=>1000,38530=>1000,38531=>1000,38532=>1000, + 38533=>1000,38534=>1000,38535=>1000,38536=>1000,38537=>1000,38538=>1000,38539=>1000,38540=>1000,38541=>1000,38542=>1000,38543=>1000,38544=>1000,38545=>1000,38546=>1000,38547=>1000,38548=>1000, + 38549=>1000,38550=>1000,38551=>1000,38552=>1000,38553=>1000,38554=>1000,38555=>1000,38556=>1000,38557=>1000,38558=>1000,38559=>1000,38560=>1000,38561=>1000,38562=>1000,38563=>1000,38564=>1000, + 38565=>1000,38566=>1000,38567=>1000,38568=>1000,38569=>1000,38570=>1000,38571=>1000,38572=>1000,38573=>1000,38574=>1000,38575=>1000,38576=>1000,38577=>1000,38578=>1000,38579=>1000,38580=>1000, + 38581=>1000,38582=>1000,38583=>1000,38584=>1000,38585=>1000,38586=>1000,38587=>1000,38588=>1000,38589=>1000,38590=>1000,38591=>1000,38592=>1000,38593=>1000,38594=>1000,38595=>1000,38596=>1000, + 38597=>1000,38598=>1000,38599=>1000,38600=>1000,38601=>1000,38602=>1000,38603=>1000,38604=>1000,38605=>1000,38606=>1000,38607=>1000,38608=>1000,38609=>1000,38610=>1000,38611=>1000,38612=>1000, + 38613=>1000,38614=>1000,38615=>1000,38616=>1000,38617=>1000,38618=>1000,38619=>1000,38620=>1000,38621=>1000,38622=>1000,38623=>1000,38624=>1000,38625=>1000,38626=>1000,38627=>1000,38628=>1000, + 38629=>1000,38630=>1000,38631=>1000,38632=>1000,38633=>1000,38634=>1000,38635=>1000,38636=>1000,38637=>1000,38638=>1000,38639=>1000,38640=>1000,38641=>1000,38642=>1000,38643=>1000,38644=>1000, + 38645=>1000,38646=>1000,38647=>1000,38648=>1000,38649=>1000,38650=>1000,38651=>1000,38652=>1000,38653=>1000,38654=>1000,38655=>1000,38656=>1000,38657=>1000,38658=>1000,38659=>1000,38660=>1000, + 38661=>1000,38662=>1000,38663=>1000,38664=>1000,38665=>1000,38666=>1000,38667=>1000,38668=>1000,38669=>1000,38670=>1000,38671=>1000,38672=>1000,38673=>1000,38674=>1000,38675=>1000,38676=>1000, + 38677=>1000,38678=>1000,38679=>1000,38680=>1000,38681=>1000,38682=>1000,38683=>1000,38684=>1000,38685=>1000,38686=>1000,38687=>1000,38688=>1000,38689=>1000,38690=>1000,38691=>1000,38692=>1000, + 38693=>1000,38694=>1000,38695=>1000,38696=>1000,38697=>1000,38698=>1000,38699=>1000,38700=>1000,38701=>1000,38702=>1000,38703=>1000,38704=>1000,38705=>1000,38706=>1000,38707=>1000,38708=>1000, + 38709=>1000,38710=>1000,38711=>1000,38712=>1000,38713=>1000,38714=>1000,38715=>1000,38716=>1000,38717=>1000,38718=>1000,38719=>1000,38720=>1000,38721=>1000,38722=>1000,38723=>1000,38724=>1000, + 38725=>1000,38726=>1000,38727=>1000,38728=>1000,38729=>1000,38730=>1000,38731=>1000,38732=>1000,38733=>1000,38734=>1000,38735=>1000,38736=>1000,38737=>1000,38738=>1000,38739=>1000,38740=>1000, + 38741=>1000,38742=>1000,38743=>1000,38744=>1000,38745=>1000,38746=>1000,38747=>1000,38748=>1000,38749=>1000,38750=>1000,38751=>1000,38752=>1000,38753=>1000,38754=>1000,38755=>1000,38756=>1000, + 38757=>1000,38758=>1000,38759=>1000,38760=>1000,38761=>1000,38762=>1000,38763=>1000,38764=>1000,38765=>1000,38766=>1000,38767=>1000,38768=>1000,38769=>1000,38770=>1000,38771=>1000,38772=>1000, + 38773=>1000,38774=>1000,38775=>1000,38776=>1000,38777=>1000,38778=>1000,38779=>1000,38780=>1000,38781=>1000,38782=>1000,38783=>1000,38784=>1000,38785=>1000,38786=>1000,38787=>1000,38788=>1000, + 38789=>1000,38790=>1000,38791=>1000,38792=>1000,38793=>1000,38794=>1000,38795=>1000,38796=>1000,38797=>1000,38798=>1000,38799=>1000,38800=>1000,38801=>1000,38802=>1000,38803=>1000,38804=>1000, + 38805=>1000,38806=>1000,38807=>1000,38808=>1000,38809=>1000,38810=>1000,38811=>1000,38812=>1000,38813=>1000,38814=>1000,38815=>1000,38816=>1000,38817=>1000,38818=>1000,38819=>1000,38820=>1000, + 38821=>1000,38822=>1000,38823=>1000,38824=>1000,38825=>1000,38826=>1000,38827=>1000,38828=>1000,38829=>1000,38830=>1000,38831=>1000,38832=>1000,38833=>1000,38834=>1000,38835=>1000,38836=>1000, + 38837=>1000,38838=>1000,38839=>1000,38840=>1000,38841=>1000,38842=>1000,38843=>1000,38844=>1000,38845=>1000,38846=>1000,38847=>1000,38848=>1000,38849=>1000,38850=>1000,38851=>1000,38852=>1000, + 38853=>1000,38854=>1000,38855=>1000,38856=>1000,38857=>1000,38858=>1000,38859=>1000,38860=>1000,38861=>1000,38862=>1000,38863=>1000,38864=>1000,38865=>1000,38866=>1000,38867=>1000,38868=>1000, + 38869=>1000,38870=>1000,38871=>1000,38872=>1000,38873=>1000,38874=>1000,38875=>1000,38876=>1000,38877=>1000,38878=>1000,38879=>1000,38880=>1000,38881=>1000,38882=>1000,38883=>1000,38884=>1000, + 38885=>1000,38886=>1000,38887=>1000,38888=>1000,38889=>1000,38890=>1000,38891=>1000,38892=>1000,38893=>1000,38894=>1000,38895=>1000,38896=>1000,38897=>1000,38898=>1000,38899=>1000,38900=>1000, + 38901=>1000,38902=>1000,38903=>1000,38904=>1000,38905=>1000,38906=>1000,38907=>1000,38908=>1000,38909=>1000,38910=>1000,38911=>1000,38912=>1000,38913=>1000,38914=>1000,38915=>1000,38916=>1000, + 38917=>1000,38918=>1000,38919=>1000,38920=>1000,38921=>1000,38922=>1000,38923=>1000,38924=>1000,38925=>1000,38926=>1000,38927=>1000,38928=>1000,38929=>1000,38930=>1000,38931=>1000,38932=>1000, + 38933=>1000,38934=>1000,38935=>1000,38936=>1000,38937=>1000,38938=>1000,38939=>1000,38940=>1000,38941=>1000,38942=>1000,38943=>1000,38944=>1000,38945=>1000,38946=>1000,38947=>1000,38948=>1000, + 38949=>1000,38950=>1000,38951=>1000,38952=>1000,38953=>1000,38954=>1000,38955=>1000,38956=>1000,38957=>1000,38958=>1000,38959=>1000,38960=>1000,38961=>1000,38962=>1000,38963=>1000,38964=>1000, + 38965=>1000,38966=>1000,38967=>1000,38968=>1000,38969=>1000,38970=>1000,38971=>1000,38972=>1000,38973=>1000,38974=>1000,38975=>1000,38976=>1000,38977=>1000,38978=>1000,38979=>1000,38980=>1000, + 38981=>1000,38982=>1000,38983=>1000,38984=>1000,38985=>1000,38986=>1000,38987=>1000,38988=>1000,38989=>1000,38990=>1000,38991=>1000,38992=>1000,38993=>1000,38994=>1000,38995=>1000,38996=>1000, + 38997=>1000,38998=>1000,38999=>1000,39000=>1000,39001=>1000,39002=>1000,39003=>1000,39004=>1000,39005=>1000,39006=>1000,39007=>1000,39008=>1000,39009=>1000,39010=>1000,39011=>1000,39012=>1000, + 39013=>1000,39014=>1000,39015=>1000,39016=>1000,39017=>1000,39018=>1000,39019=>1000,39020=>1000,39021=>1000,39022=>1000,39023=>1000,39024=>1000,39025=>1000,39026=>1000,39027=>1000,39028=>1000, + 39029=>1000,39030=>1000,39031=>1000,39032=>1000,39033=>1000,39034=>1000,39035=>1000,39036=>1000,39037=>1000,39038=>1000,39039=>1000,39040=>1000,39041=>1000,39042=>1000,39043=>1000,39044=>1000, + 39045=>1000,39046=>1000,39047=>1000,39048=>1000,39049=>1000,39050=>1000,39051=>1000,39052=>1000,39053=>1000,39054=>1000,39055=>1000,39056=>1000,39057=>1000,39058=>1000,39059=>1000,39060=>1000, + 39061=>1000,39062=>1000,39063=>1000,39064=>1000,39065=>1000,39066=>1000,39067=>1000,39068=>1000,39069=>1000,39070=>1000,39071=>1000,39072=>1000,39073=>1000,39074=>1000,39075=>1000,39076=>1000, + 39077=>1000,39078=>1000,39079=>1000,39080=>1000,39081=>1000,39082=>1000,39083=>1000,39084=>1000,39085=>1000,39086=>1000,39087=>1000,39088=>1000,39089=>1000,39090=>1000,39091=>1000,39092=>1000, + 39093=>1000,39094=>1000,39095=>1000,39096=>1000,39097=>1000,39098=>1000,39099=>1000,39100=>1000,39101=>1000,39102=>1000,39103=>1000,39104=>1000,39105=>1000,39106=>1000,39107=>1000,39108=>1000, + 39109=>1000,39110=>1000,39111=>1000,39112=>1000,39113=>1000,39114=>1000,39115=>1000,39116=>1000,39117=>1000,39118=>1000,39119=>1000,39120=>1000,39121=>1000,39122=>1000,39123=>1000,39124=>1000, + 39125=>1000,39126=>1000,39127=>1000,39128=>1000,39129=>1000,39130=>1000,39131=>1000,39132=>1000,39133=>1000,39134=>1000,39135=>1000,39136=>1000,39137=>1000,39138=>1000,39139=>1000,39140=>1000, + 39141=>1000,39142=>1000,39143=>1000,39144=>1000,39145=>1000,39146=>1000,39147=>1000,39148=>1000,39149=>1000,39150=>1000,39151=>1000,39152=>1000,39153=>1000,39154=>1000,39155=>1000,39156=>1000, + 39157=>1000,39158=>1000,39159=>1000,39160=>1000,39161=>1000,39162=>1000,39163=>1000,39164=>1000,39165=>1000,39166=>1000,39167=>1000,39168=>1000,39169=>1000,39170=>1000,39171=>1000,39172=>1000, + 39173=>1000,39174=>1000,39175=>1000,39176=>1000,39177=>1000,39178=>1000,39179=>1000,39180=>1000,39181=>1000,39182=>1000,39183=>1000,39184=>1000,39185=>1000,39186=>1000,39187=>1000,39188=>1000, + 39189=>1000,39190=>1000,39191=>1000,39192=>1000,39193=>1000,39194=>1000,39195=>1000,39196=>1000,39197=>1000,39198=>1000,39199=>1000,39200=>1000,39201=>1000,39202=>1000,39203=>1000,39204=>1000, + 39205=>1000,39206=>1000,39207=>1000,39208=>1000,39209=>1000,39210=>1000,39211=>1000,39212=>1000,39213=>1000,39214=>1000,39215=>1000,39216=>1000,39217=>1000,39218=>1000,39219=>1000,39220=>1000, + 39221=>1000,39222=>1000,39223=>1000,39224=>1000,39225=>1000,39226=>1000,39227=>1000,39228=>1000,39229=>1000,39230=>1000,39231=>1000,39232=>1000,39233=>1000,39234=>1000,39235=>1000,39236=>1000, + 39237=>1000,39238=>1000,39239=>1000,39240=>1000,39241=>1000,39242=>1000,39243=>1000,39244=>1000,39245=>1000,39246=>1000,39247=>1000,39248=>1000,39249=>1000,39250=>1000,39251=>1000,39252=>1000, + 39253=>1000,39254=>1000,39255=>1000,39256=>1000,39257=>1000,39258=>1000,39259=>1000,39260=>1000,39261=>1000,39262=>1000,39263=>1000,39264=>1000,39265=>1000,39266=>1000,39267=>1000,39268=>1000, + 39269=>1000,39270=>1000,39271=>1000,39272=>1000,39273=>1000,39274=>1000,39275=>1000,39276=>1000,39277=>1000,39278=>1000,39279=>1000,39280=>1000,39281=>1000,39282=>1000,39283=>1000,39284=>1000, + 39285=>1000,39286=>1000,39287=>1000,39288=>1000,39289=>1000,39290=>1000,39291=>1000,39292=>1000,39293=>1000,39294=>1000,39295=>1000,39296=>1000,39297=>1000,39298=>1000,39299=>1000,39300=>1000, + 39301=>1000,39302=>1000,39303=>1000,39304=>1000,39305=>1000,39306=>1000,39307=>1000,39308=>1000,39309=>1000,39310=>1000,39311=>1000,39312=>1000,39313=>1000,39314=>1000,39315=>1000,39316=>1000, + 39317=>1000,39318=>1000,39319=>1000,39320=>1000,39321=>1000,39322=>1000,39323=>1000,39324=>1000,39325=>1000,39326=>1000,39327=>1000,39328=>1000,39329=>1000,39330=>1000,39331=>1000,39332=>1000, + 39333=>1000,39334=>1000,39335=>1000,39336=>1000,39337=>1000,39338=>1000,39339=>1000,39340=>1000,39341=>1000,39342=>1000,39343=>1000,39344=>1000,39345=>1000,39346=>1000,39347=>1000,39348=>1000, + 39349=>1000,39350=>1000,39351=>1000,39352=>1000,39353=>1000,39354=>1000,39355=>1000,39356=>1000,39357=>1000,39358=>1000,39359=>1000,39360=>1000,39361=>1000,39362=>1000,39363=>1000,39364=>1000, + 39365=>1000,39366=>1000,39367=>1000,39368=>1000,39369=>1000,39370=>1000,39371=>1000,39372=>1000,39373=>1000,39374=>1000,39375=>1000,39376=>1000,39377=>1000,39378=>1000,39379=>1000,39380=>1000, + 39381=>1000,39382=>1000,39383=>1000,39384=>1000,39385=>1000,39386=>1000,39387=>1000,39388=>1000,39389=>1000,39390=>1000,39391=>1000,39392=>1000,39393=>1000,39394=>1000,39395=>1000,39396=>1000, + 39397=>1000,39398=>1000,39399=>1000,39400=>1000,39401=>1000,39402=>1000,39403=>1000,39404=>1000,39405=>1000,39406=>1000,39407=>1000,39408=>1000,39409=>1000,39410=>1000,39411=>1000,39412=>1000, + 39413=>1000,39414=>1000,39415=>1000,39416=>1000,39417=>1000,39418=>1000,39419=>1000,39420=>1000,39421=>1000,39422=>1000,39423=>1000,39424=>1000,39425=>1000,39426=>1000,39427=>1000,39428=>1000, + 39429=>1000,39430=>1000,39431=>1000,39432=>1000,39433=>1000,39434=>1000,39435=>1000,39436=>1000,39437=>1000,39438=>1000,39439=>1000,39440=>1000,39441=>1000,39442=>1000,39443=>1000,39444=>1000, + 39445=>1000,39446=>1000,39447=>1000,39448=>1000,39449=>1000,39450=>1000,39451=>1000,39452=>1000,39453=>1000,39454=>1000,39455=>1000,39456=>1000,39457=>1000,39458=>1000,39459=>1000,39460=>1000, + 39461=>1000,39462=>1000,39463=>1000,39464=>1000,39465=>1000,39466=>1000,39467=>1000,39468=>1000,39469=>1000,39470=>1000,39471=>1000,39472=>1000,39473=>1000,39474=>1000,39475=>1000,39476=>1000, + 39477=>1000,39478=>1000,39479=>1000,39480=>1000,39481=>1000,39482=>1000,39483=>1000,39484=>1000,39485=>1000,39486=>1000,39487=>1000,39488=>1000,39489=>1000,39490=>1000,39491=>1000,39492=>1000, + 39493=>1000,39494=>1000,39495=>1000,39496=>1000,39497=>1000,39498=>1000,39499=>1000,39500=>1000,39501=>1000,39502=>1000,39503=>1000,39504=>1000,39505=>1000,39506=>1000,39507=>1000,39508=>1000, + 39509=>1000,39510=>1000,39511=>1000,39512=>1000,39513=>1000,39514=>1000,39515=>1000,39516=>1000,39517=>1000,39518=>1000,39519=>1000,39520=>1000,39521=>1000,39522=>1000,39523=>1000,39524=>1000, + 39525=>1000,39526=>1000,39527=>1000,39528=>1000,39529=>1000,39530=>1000,39531=>1000,39532=>1000,39533=>1000,39534=>1000,39535=>1000,39536=>1000,39537=>1000,39538=>1000,39539=>1000,39540=>1000, + 39541=>1000,39542=>1000,39543=>1000,39544=>1000,39545=>1000,39546=>1000,39547=>1000,39548=>1000,39549=>1000,39550=>1000,39551=>1000,39552=>1000,39553=>1000,39554=>1000,39555=>1000,39556=>1000, + 39557=>1000,39558=>1000,39559=>1000,39560=>1000,39561=>1000,39562=>1000,39563=>1000,39564=>1000,39565=>1000,39566=>1000,39567=>1000,39568=>1000,39569=>1000,39570=>1000,39571=>1000,39572=>1000, + 39573=>1000,39574=>1000,39575=>1000,39576=>1000,39577=>1000,39578=>1000,39579=>1000,39580=>1000,39581=>1000,39582=>1000,39583=>1000,39584=>1000,39585=>1000,39586=>1000,39587=>1000,39588=>1000, + 39589=>1000,39590=>1000,39591=>1000,39592=>1000,39593=>1000,39594=>1000,39595=>1000,39596=>1000,39597=>1000,39598=>1000,39599=>1000,39600=>1000,39601=>1000,39602=>1000,39603=>1000,39604=>1000, + 39605=>1000,39606=>1000,39607=>1000,39608=>1000,39609=>1000,39610=>1000,39611=>1000,39612=>1000,39613=>1000,39614=>1000,39615=>1000,39616=>1000,39617=>1000,39618=>1000,39619=>1000,39620=>1000, + 39621=>1000,39622=>1000,39623=>1000,39624=>1000,39625=>1000,39626=>1000,39627=>1000,39628=>1000,39629=>1000,39630=>1000,39631=>1000,39632=>1000,39633=>1000,39634=>1000,39635=>1000,39636=>1000, + 39637=>1000,39638=>1000,39639=>1000,39640=>1000,39641=>1000,39642=>1000,39643=>1000,39644=>1000,39645=>1000,39646=>1000,39647=>1000,39648=>1000,39649=>1000,39650=>1000,39651=>1000,39652=>1000, + 39653=>1000,39654=>1000,39655=>1000,39656=>1000,39657=>1000,39658=>1000,39659=>1000,39660=>1000,39661=>1000,39662=>1000,39663=>1000,39664=>1000,39665=>1000,39666=>1000,39667=>1000,39668=>1000, + 39669=>1000,39670=>1000,39671=>1000,39672=>1000,39673=>1000,39674=>1000,39675=>1000,39676=>1000,39677=>1000,39678=>1000,39679=>1000,39680=>1000,39681=>1000,39682=>1000,39683=>1000,39684=>1000, + 39685=>1000,39686=>1000,39687=>1000,39688=>1000,39689=>1000,39690=>1000,39691=>1000,39692=>1000,39693=>1000,39694=>1000,39695=>1000,39696=>1000,39697=>1000,39698=>1000,39699=>1000,39700=>1000, + 39701=>1000,39702=>1000,39703=>1000,39704=>1000,39705=>1000,39706=>1000,39707=>1000,39708=>1000,39709=>1000,39710=>1000,39711=>1000,39712=>1000,39713=>1000,39714=>1000,39715=>1000,39716=>1000, + 39717=>1000,39718=>1000,39719=>1000,39720=>1000,39721=>1000,39722=>1000,39723=>1000,39724=>1000,39725=>1000,39726=>1000,39727=>1000,39728=>1000,39729=>1000,39730=>1000,39731=>1000,39732=>1000, + 39733=>1000,39734=>1000,39735=>1000,39736=>1000,39737=>1000,39738=>1000,39739=>1000,39740=>1000,39741=>1000,39742=>1000,39743=>1000,39744=>1000,39745=>1000,39746=>1000,39747=>1000,39748=>1000, + 39749=>1000,39750=>1000,39751=>1000,39752=>1000,39753=>1000,39754=>1000,39755=>1000,39756=>1000,39757=>1000,39758=>1000,39759=>1000,39760=>1000,39761=>1000,39762=>1000,39763=>1000,39764=>1000, + 39765=>1000,39766=>1000,39767=>1000,39768=>1000,39769=>1000,39770=>1000,39771=>1000,39772=>1000,39773=>1000,39774=>1000,39775=>1000,39776=>1000,39777=>1000,39778=>1000,39779=>1000,39780=>1000, + 39781=>1000,39782=>1000,39783=>1000,39784=>1000,39785=>1000,39786=>1000,39787=>1000,39788=>1000,39789=>1000,39790=>1000,39791=>1000,39792=>1000,39793=>1000,39794=>1000,39795=>1000,39796=>1000, + 39797=>1000,39798=>1000,39799=>1000,39800=>1000,39801=>1000,39802=>1000,39803=>1000,39804=>1000,39805=>1000,39806=>1000,39807=>1000,39808=>1000,39809=>1000,39810=>1000,39811=>1000,39812=>1000, + 39813=>1000,39814=>1000,39815=>1000,39816=>1000,39817=>1000,39818=>1000,39819=>1000,39820=>1000,39821=>1000,39822=>1000,39823=>1000,39824=>1000,39825=>1000,39826=>1000,39827=>1000,39828=>1000, + 39829=>1000,39830=>1000,39831=>1000,39832=>1000,39833=>1000,39834=>1000,39835=>1000,39836=>1000,39837=>1000,39838=>1000,39839=>1000,39840=>1000,39841=>1000,39842=>1000,39843=>1000,39844=>1000, + 39845=>1000,39846=>1000,39847=>1000,39848=>1000,39849=>1000,39850=>1000,39851=>1000,39852=>1000,39853=>1000,39854=>1000,39855=>1000,39856=>1000,39857=>1000,39858=>1000,39859=>1000,39860=>1000, + 39861=>1000,39862=>1000,39863=>1000,39864=>1000,39865=>1000,39866=>1000,39867=>1000,39868=>1000,39869=>1000,39870=>1000,39871=>1000,39872=>1000,39873=>1000,39874=>1000,39875=>1000,39876=>1000, + 39877=>1000,39878=>1000,39879=>1000,39880=>1000,39881=>1000,39882=>1000,39883=>1000,39884=>1000,39885=>1000,39886=>1000,39887=>1000,39888=>1000,39889=>1000,39890=>1000,39891=>1000,39892=>1000, + 39893=>1000,39894=>1000,39895=>1000,39896=>1000,39897=>1000,39898=>1000,39899=>1000,39900=>1000,39901=>1000,39902=>1000,39903=>1000,39904=>1000,39905=>1000,39906=>1000,39907=>1000,39908=>1000, + 39909=>1000,39910=>1000,39911=>1000,39912=>1000,39913=>1000,39914=>1000,39915=>1000,39916=>1000,39917=>1000,39918=>1000,39919=>1000,39920=>1000,39921=>1000,39922=>1000,39923=>1000,39924=>1000, + 39925=>1000,39926=>1000,39927=>1000,39928=>1000,39929=>1000,39930=>1000,39931=>1000,39932=>1000,39933=>1000,39934=>1000,39935=>1000,39936=>1000,39937=>1000,39938=>1000,39939=>1000,39940=>1000, + 39941=>1000,39942=>1000,39943=>1000,39944=>1000,39945=>1000,39946=>1000,39947=>1000,39948=>1000,39949=>1000,39950=>1000,39951=>1000,39952=>1000,39953=>1000,39954=>1000,39955=>1000,39956=>1000, + 39957=>1000,39958=>1000,39959=>1000,39960=>1000,39961=>1000,39962=>1000,39963=>1000,39964=>1000,39965=>1000,39966=>1000,39967=>1000,39968=>1000,39969=>1000,39970=>1000,39971=>1000,39972=>1000, + 39973=>1000,39974=>1000,39975=>1000,39976=>1000,39977=>1000,39978=>1000,39979=>1000,39980=>1000,39981=>1000,39982=>1000,39983=>1000,39984=>1000,39985=>1000,39986=>1000,39987=>1000,39988=>1000, + 39989=>1000,39990=>1000,39991=>1000,39992=>1000,39993=>1000,39994=>1000,39995=>1000,39996=>1000,39997=>1000,39998=>1000,39999=>1000,40000=>1000,40001=>1000,40002=>1000,40003=>1000,40004=>1000, + 40005=>1000,40006=>1000,40007=>1000,40008=>1000,40009=>1000,40010=>1000,40011=>1000,40012=>1000,40013=>1000,40014=>1000,40015=>1000,40016=>1000,40017=>1000,40018=>1000,40019=>1000,40020=>1000, + 40021=>1000,40022=>1000,40023=>1000,40024=>1000,40025=>1000,40026=>1000,40027=>1000,40028=>1000,40029=>1000,40030=>1000,40031=>1000,40032=>1000,40033=>1000,40034=>1000,40035=>1000,40036=>1000, + 40037=>1000,40038=>1000,40039=>1000,40040=>1000,40041=>1000,40042=>1000,40043=>1000,40044=>1000,40045=>1000,40046=>1000,40047=>1000,40048=>1000,40049=>1000,40050=>1000,40051=>1000,40052=>1000, + 40053=>1000,40054=>1000,40055=>1000,40056=>1000,40057=>1000,40058=>1000,40059=>1000,40060=>1000,40061=>1000,40062=>1000,40063=>1000,40064=>1000,40065=>1000,40066=>1000,40067=>1000,40068=>1000, + 40069=>1000,40070=>1000,40071=>1000,40072=>1000,40073=>1000,40074=>1000,40075=>1000,40076=>1000,40077=>1000,40078=>1000,40079=>1000,40080=>1000,40081=>1000,40082=>1000,40083=>1000,40084=>1000, + 40085=>1000,40086=>1000,40087=>1000,40088=>1000,40089=>1000,40090=>1000,40091=>1000,40092=>1000,40093=>1000,40094=>1000,40095=>1000,40096=>1000,40097=>1000,40098=>1000,40099=>1000,40100=>1000, + 40101=>1000,40102=>1000,40103=>1000,40104=>1000,40105=>1000,40106=>1000,40107=>1000,40108=>1000,40109=>1000,40110=>1000,40111=>1000,40112=>1000,40113=>1000,40114=>1000,40115=>1000,40116=>1000, + 40117=>1000,40118=>1000,40119=>1000,40120=>1000,40121=>1000,40122=>1000,40123=>1000,40124=>1000,40125=>1000,40126=>1000,40127=>1000,40128=>1000,40129=>1000,40130=>1000,40131=>1000,40132=>1000, + 40133=>1000,40134=>1000,40135=>1000,40136=>1000,40137=>1000,40138=>1000,40139=>1000,40140=>1000,40141=>1000,40142=>1000,40143=>1000,40144=>1000,40145=>1000,40146=>1000,40147=>1000,40148=>1000, + 40149=>1000,40150=>1000,40151=>1000,40152=>1000,40153=>1000,40154=>1000,40155=>1000,40156=>1000,40157=>1000,40158=>1000,40159=>1000,40160=>1000,40161=>1000,40162=>1000,40163=>1000,40164=>1000, + 40165=>1000,40166=>1000,40167=>1000,40168=>1000,40169=>1000,40170=>1000,40171=>1000,40172=>1000,40173=>1000,40174=>1000,40175=>1000,40176=>1000,40177=>1000,40178=>1000,40179=>1000,40180=>1000, + 40181=>1000,40182=>1000,40183=>1000,40184=>1000,40185=>1000,40186=>1000,40187=>1000,40188=>1000,40189=>1000,40190=>1000,40191=>1000,40192=>1000,40193=>1000,40194=>1000,40195=>1000,40196=>1000, + 40197=>1000,40198=>1000,40199=>1000,40200=>1000,40201=>1000,40202=>1000,40203=>1000,40204=>1000,40205=>1000,40206=>1000,40207=>1000,40208=>1000,40209=>1000,40210=>1000,40211=>1000,40212=>1000, + 40213=>1000,40214=>1000,40215=>1000,40216=>1000,40217=>1000,40218=>1000,40219=>1000,40220=>1000,40221=>1000,40222=>1000,40223=>1000,40224=>1000,40225=>1000,40226=>1000,40227=>1000,40228=>1000, + 40229=>1000,40230=>1000,40231=>1000,40232=>1000,40233=>1000,40234=>1000,40235=>1000,40236=>1000,40237=>1000,40238=>1000,40239=>1000,40240=>1000,40241=>1000,40242=>1000,40243=>1000,40244=>1000, + 40245=>1000,40246=>1000,40247=>1000,40248=>1000,40249=>1000,40250=>1000,40251=>1000,40252=>1000,40253=>1000,40254=>1000,40255=>1000,40256=>1000,40257=>1000,40258=>1000,40259=>1000,40260=>1000, + 40261=>1000,40262=>1000,40263=>1000,40264=>1000,40265=>1000,40266=>1000,40267=>1000,40268=>1000,40269=>1000,40270=>1000,40271=>1000,40272=>1000,40273=>1000,40274=>1000,40275=>1000,40276=>1000, + 40277=>1000,40278=>1000,40279=>1000,40280=>1000,40281=>1000,40282=>1000,40283=>1000,40284=>1000,40285=>1000,40286=>1000,40287=>1000,40288=>1000,40289=>1000,40290=>1000,40291=>1000,40292=>1000, + 40293=>1000,40294=>1000,40295=>1000,40296=>1000,40297=>1000,40298=>1000,40299=>1000,40300=>1000,40301=>1000,40302=>1000,40303=>1000,40304=>1000,40305=>1000,40306=>1000,40307=>1000,40308=>1000, + 40309=>1000,40310=>1000,40311=>1000,40312=>1000,40313=>1000,40314=>1000,40315=>1000,40316=>1000,40317=>1000,40318=>1000,40319=>1000,40320=>1000,40321=>1000,40322=>1000,40323=>1000,40324=>1000, + 40325=>1000,40326=>1000,40327=>1000,40328=>1000,40329=>1000,40330=>1000,40331=>1000,40332=>1000,40333=>1000,40334=>1000,40335=>1000,40336=>1000,40337=>1000,40338=>1000,40339=>1000,40340=>1000, + 40341=>1000,40342=>1000,40343=>1000,40344=>1000,40345=>1000,40346=>1000,40347=>1000,40348=>1000,40349=>1000,40350=>1000,40351=>1000,40352=>1000,40353=>1000,40354=>1000,40355=>1000,40356=>1000, + 40357=>1000,40358=>1000,40359=>1000,40360=>1000,40361=>1000,40362=>1000,40363=>1000,40364=>1000,40365=>1000,40366=>1000,40367=>1000,40368=>1000,40369=>1000,40370=>1000,40371=>1000,40372=>1000, + 40373=>1000,40374=>1000,40375=>1000,40376=>1000,40377=>1000,40378=>1000,40379=>1000,40380=>1000,40381=>1000,40382=>1000,40383=>1000,40384=>1000,40385=>1000,40386=>1000,40387=>1000,40388=>1000, + 40389=>1000,40390=>1000,40391=>1000,40392=>1000,40393=>1000,40394=>1000,40395=>1000,40396=>1000,40397=>1000,40398=>1000,40399=>1000,40400=>1000,40401=>1000,40402=>1000,40403=>1000,40404=>1000, + 40405=>1000,40406=>1000,40407=>1000,40408=>1000,40409=>1000,40410=>1000,40411=>1000,40412=>1000,40413=>1000,40414=>1000,40415=>1000,40416=>1000,40417=>1000,40418=>1000,40419=>1000,40420=>1000, + 40421=>1000,40422=>1000,40423=>1000,40424=>1000,40425=>1000,40426=>1000,40427=>1000,40428=>1000,40429=>1000,40430=>1000,40431=>1000,40432=>1000,40433=>1000,40434=>1000,40435=>1000,40436=>1000, + 40437=>1000,40438=>1000,40439=>1000,40440=>1000,40441=>1000,40442=>1000,40443=>1000,40444=>1000,40445=>1000,40446=>1000,40447=>1000,40448=>1000,40449=>1000,40450=>1000,40451=>1000,40452=>1000, + 40453=>1000,40454=>1000,40455=>1000,40456=>1000,40457=>1000,40458=>1000,40459=>1000,40460=>1000,40461=>1000,40462=>1000,40463=>1000,40464=>1000,40465=>1000,40466=>1000,40467=>1000,40468=>1000, + 40469=>1000,40470=>1000,40471=>1000,40472=>1000,40473=>1000,40474=>1000,40475=>1000,40476=>1000,40477=>1000,40478=>1000,40479=>1000,40480=>1000,40481=>1000,40482=>1000,40483=>1000,40484=>1000, + 40485=>1000,40486=>1000,40487=>1000,40488=>1000,40489=>1000,40490=>1000,40491=>1000,40492=>1000,40493=>1000,40494=>1000,40495=>1000,40496=>1000,40497=>1000,40498=>1000,40499=>1000,40500=>1000, + 40501=>1000,40502=>1000,40503=>1000,40504=>1000,40505=>1000,40506=>1000,40507=>1000,40508=>1000,40509=>1000,40510=>1000,40511=>1000,40512=>1000,40513=>1000,40514=>1000,40515=>1000,40516=>1000, + 40517=>1000,40518=>1000,40519=>1000,40520=>1000,40521=>1000,40522=>1000,40523=>1000,40524=>1000,40525=>1000,40526=>1000,40527=>1000,40528=>1000,40529=>1000,40530=>1000,40531=>1000,40532=>1000, + 40533=>1000,40534=>1000,40535=>1000,40536=>1000,40537=>1000,40538=>1000,40539=>1000,40540=>1000,40541=>1000,40542=>1000,40543=>1000,40544=>1000,40545=>1000,40546=>1000,40547=>1000,40548=>1000, + 40549=>1000,40550=>1000,40551=>1000,40552=>1000,40553=>1000,40554=>1000,40555=>1000,40556=>1000,40557=>1000,40558=>1000,40559=>1000,40560=>1000,40561=>1000,40562=>1000,40563=>1000,40564=>1000, + 40565=>1000,40566=>1000,40567=>1000,40568=>1000,40569=>1000,40570=>1000,40571=>1000,40572=>1000,40573=>1000,40574=>1000,40575=>1000,40576=>1000,40577=>1000,40578=>1000,40579=>1000,40580=>1000, + 40581=>1000,40582=>1000,40583=>1000,40584=>1000,40585=>1000,40586=>1000,40587=>1000,40588=>1000,40589=>1000,40590=>1000,40591=>1000,40592=>1000,40593=>1000,40594=>1000,40595=>1000,40596=>1000, + 40597=>1000,40598=>1000,40599=>1000,40600=>1000,40601=>1000,40602=>1000,40603=>1000,40604=>1000,40605=>1000,40606=>1000,40607=>1000,40608=>1000,40609=>1000,40610=>1000,40611=>1000,40612=>1000, + 40613=>1000,40614=>1000,40615=>1000,40616=>1000,40617=>1000,40618=>1000,40619=>1000,40620=>1000,40621=>1000,40622=>1000,40623=>1000,40624=>1000,40625=>1000,40626=>1000,40627=>1000,40628=>1000, + 40629=>1000,40630=>1000,40631=>1000,40632=>1000,40633=>1000,40634=>1000,40635=>1000,40636=>1000,40637=>1000,40638=>1000,40639=>1000,40640=>1000,40641=>1000,40642=>1000,40643=>1000,40644=>1000, + 40645=>1000,40646=>1000,40647=>1000,40648=>1000,40649=>1000,40650=>1000,40651=>1000,40652=>1000,40653=>1000,40654=>1000,40655=>1000,40656=>1000,40657=>1000,40658=>1000,40659=>1000,40660=>1000, + 40661=>1000,40662=>1000,40663=>1000,40664=>1000,40665=>1000,40666=>1000,40667=>1000,40668=>1000,40669=>1000,40670=>1000,40671=>1000,40672=>1000,40673=>1000,40674=>1000,40675=>1000,40676=>1000, + 40677=>1000,40678=>1000,40679=>1000,40680=>1000,40681=>1000,40682=>1000,40683=>1000,40684=>1000,40685=>1000,40686=>1000,40687=>1000,40688=>1000,40689=>1000,40690=>1000,40691=>1000,40692=>1000, + 40693=>1000,40694=>1000,40695=>1000,40696=>1000,40697=>1000,40698=>1000,40699=>1000,40700=>1000,40701=>1000,40702=>1000,40703=>1000,40704=>1000,40705=>1000,40706=>1000,40707=>1000,40708=>1000, + 40709=>1000,40710=>1000,40711=>1000,40712=>1000,40713=>1000,40714=>1000,40715=>1000,40716=>1000,40717=>1000,40718=>1000,40719=>1000,40720=>1000,40721=>1000,40722=>1000,40723=>1000,40724=>1000, + 40725=>1000,40726=>1000,40727=>1000,40728=>1000,40729=>1000,40730=>1000,40731=>1000,40732=>1000,40733=>1000,40734=>1000,40735=>1000,40736=>1000,40737=>1000,40738=>1000,40739=>1000,40740=>1000, + 40741=>1000,40742=>1000,40743=>1000,40744=>1000,40745=>1000,40746=>1000,40747=>1000,40748=>1000,40749=>1000,40750=>1000,40751=>1000,40752=>1000,40753=>1000,40754=>1000,40755=>1000,40756=>1000, + 40757=>1000,40758=>1000,40759=>1000,40760=>1000,40761=>1000,40762=>1000,40763=>1000,40764=>1000,40765=>1000,40766=>1000,40767=>1000,40768=>1000,40769=>1000,40770=>1000,40771=>1000,40772=>1000, + 40773=>1000,40774=>1000,40775=>1000,40776=>1000,40777=>1000,40778=>1000,40779=>1000,40780=>1000,40781=>1000,40782=>1000,40783=>1000,40784=>1000,40785=>1000,40786=>1000,40787=>1000,40788=>1000, + 40789=>1000,40790=>1000,40791=>1000,40792=>1000,40793=>1000,40794=>1000,40795=>1000,40796=>1000,40797=>1000,40798=>1000,40799=>1000,40800=>1000,40801=>1000,40802=>1000,40803=>1000,40804=>1000, + 40805=>1000,40806=>1000,40807=>1000,40808=>1000,40809=>1000,40810=>1000,40811=>1000,40812=>1000,40813=>1000,40814=>1000,40815=>1000,40816=>1000,40817=>1000,40818=>1000,40819=>1000,40820=>1000, + 40821=>1000,40822=>1000,40823=>1000,40824=>1000,40825=>1000,40826=>1000,40827=>1000,40828=>1000,40829=>1000,40830=>1000,40831=>1000,40832=>1000,40833=>1000,40834=>1000,40835=>1000,40836=>1000, + 40837=>1000,40838=>1000,40839=>1000,40840=>1000,40841=>1000,40842=>1000,40843=>1000,40844=>1000,40845=>1000,40846=>1000,40847=>1000,40848=>1000,40849=>1000,40850=>1000,40851=>1000,40852=>1000, + 40853=>1000,40854=>1000,40855=>1000,40856=>1000,40857=>1000,40858=>1000,40859=>1000,40860=>1000,40861=>1000,40862=>1000,40863=>1000,40864=>1000,40865=>1000,40866=>1000,40867=>1000,40868=>1000, + 40869=>1000); +$diff=''; $originalsize=23275812; // CID Information @@ -1764,5 +1764,5 @@ $originalsize=23275812; $enc='UniJIS-UTF16-H'; $cidinfo=array('Registry'=>'Adobe','Ordering'=>'Japan1','Supplement'=>5); -include(dirname(__FILE__).'/uni2cid_aj16.php'); +include(dirname(__FILE__).'/uni2cid_aj16.php'); ?> diff --git a/core/vendor/ensepar/tcpdf/fonts/symbol.php b/core/vendor/ensepar/tcpdf/fonts/symbol.php index 9068a79af..ad4e81860 100644 --- a/core/vendor/ensepar/tcpdf/fonts/symbol.php +++ b/core/vendor/ensepar/tcpdf/fonts/symbol.php @@ -1,7 +1,7 @@ -250,1=>250,2=>250,3=>250,4=>250,5=>250,6=>250,7=>250,8=>250,9=>250, 10=>250,11=>250,12=>250,13=>250,14=>250,15=>250,16=>250,17=>250,18=>250,19=>250, 20=>250,21=>250,22=>250,23=>250,24=>250,25=>250,26=>250,27=>250,28=>250,29=>250, @@ -28,5 +28,5 @@ $cw=array(0=>250,1=>250,2=>250,3=>250,4=>250,5=>250,6=>250,7=>250,8=>250,9=>250, 223=>603,224=>494,225=>329,226=>790,227=>790,228=>786,229=>713,230=>384,231=>384, 232=>384,233=>384,234=>384,235=>384,236=>494,237=>494,238=>494,239=>494,240=>0, 241=>329,242=>274,243=>686,244=>686,245=>686,246=>384,247=>384,248=>384,249=>384, -250=>384,251=>384,252=>494,253=>494,254=>494,255=>0); +250=>384,251=>384,252=>494,253=>494,254=>494,255=>0); ?> diff --git a/core/vendor/ensepar/tcpdf/fonts/utils/makeallttffonts.php b/core/vendor/ensepar/tcpdf/fonts/utils/makeallttffonts.php index 0228d976a..16ac969f5 100644 --- a/core/vendor/ensepar/tcpdf/fonts/utils/makeallttffonts.php +++ b/core/vendor/ensepar/tcpdf/fonts/utils/makeallttffonts.php @@ -1,71 +1,71 @@ -. -// -// Additionally, you can't remove the original TCExam logo, copyrights statements -// and links to Tecnick.com and TCExam websites. -// -// See LICENSE.TXT file for more information. -//============================================================+ - -/** - * Process all TTF files on current directory to build TCPDF compatible font files. - * @package com.tecnick.tcpdf - * @author Nicola Asuni - * @copyright Copyright © 2004-2009, Nicola Asuni - Tecnick.com S.r.l. - ITALY - www.tecnick.com - info@tecnick.com - * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License - * @link www.tecnick.com - * @since 2008-12-07 +// build TCPDF compatible font files. +// +// Author: Nicola Asuni +// +// (c) Copyright: +// Nicola Asuni +// Tecnick.com S.r.l. +// Via della Pace, 11 +// 09044 Quartucciu (CA) +// ITALY +// www.tecnick.com +// info@tecnick.com +// +// License: +// Copyright (C) 2004-2009 Nicola Asuni - Tecnick.com S.r.l. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// Additionally, you can't remove the original TCExam logo, copyrights statements +// and links to Tecnick.com and TCExam websites. +// +// See LICENSE.TXT file for more information. +//============================================================+ + +/** + * Process all TTF files on current directory to build TCPDF compatible font files. + * @package com.tecnick.tcpdf + * @author Nicola Asuni + * @copyright Copyright © 2004-2009, Nicola Asuni - Tecnick.com S.r.l. - ITALY - www.tecnick.com - info@tecnick.com + * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License + * @link www.tecnick.com + * @since 2008-12-07 + */ + +/** */ -/** - */ - -// read directory for files (only graphics files). -$handle = opendir('.'); -while($file = readdir($handle)) { - $path_parts = pathinfo($file); - $file_ext = strtolower($path_parts['extension']); +// read directory for files (only graphics files). +$handle = opendir('.'); +while($file = readdir($handle)) { + $path_parts = pathinfo($file); + $file_ext = strtolower($path_parts['extension']); if ($file_ext == 'ttf') { exec('./ttf2ufm -a -F '.$path_parts['basename'].''); - exec('php -q makefont.php '.$path_parts['basename'].' '.$path_parts['filename'].'.ufm'); - } -} + exec('php -q makefont.php '.$path_parts['basename'].' '.$path_parts['filename'].'.ufm'); + } +} closedir($handle); -//============================================================+ -// END OF FILE +//============================================================+ +// END OF FILE //============================================================+ ?> diff --git a/core/vendor/ensepar/tcpdf/fonts/utils/src/readme.txt b/core/vendor/ensepar/tcpdf/fonts/utils/src/readme.txt index f351cd9a4..6e5b40d98 100644 --- a/core/vendor/ensepar/tcpdf/fonts/utils/src/readme.txt +++ b/core/vendor/ensepar/tcpdf/fonts/utils/src/readme.txt @@ -1,17 +1,17 @@ -To embed TrueType and OpenType font files, you need to extract the -font metrics from the font files and build the required tables using -the utility TTF2UFM. - -TTF2UFM is a modified version of Mark Heath's TTF 2 PT1 converter -(http://ttf2pt1.sourceforge.net/) by Steven Wittens -(http://www.acko.net/blog/ufpdf). That version has been further -modified by Ulrich Telle for use with the wxWidgets component -wxPdfDocument. - -Following changes where made: - -1) Generated AFM files contain the glyph number for each character. -2) Generated UFM files contain the bounding box for each character. -3) OpenType support has been activated for the Windows binary, - and the generated AFM/UFM files contain the associated - original Unicode codes for each character. +To embed TrueType and OpenType font files, you need to extract the +font metrics from the font files and build the required tables using +the utility TTF2UFM. + +TTF2UFM is a modified version of Mark Heath's TTF 2 PT1 converter +(http://ttf2pt1.sourceforge.net/) by Steven Wittens +(http://www.acko.net/blog/ufpdf). That version has been further +modified by Ulrich Telle for use with the wxWidgets component +wxPdfDocument. + +Following changes where made: + +1) Generated AFM files contain the glyph number for each character. +2) Generated UFM files contain the bounding box for each character. +3) OpenType support has been activated for the Windows binary, + and the generated AFM/UFM files contain the associated + original Unicode codes for each character. diff --git a/core/vendor/ensepar/tcpdf/fonts/zapfdingbats.php b/core/vendor/ensepar/tcpdf/fonts/zapfdingbats.php index d3b7c56c8..f4c679b19 100644 --- a/core/vendor/ensepar/tcpdf/fonts/zapfdingbats.php +++ b/core/vendor/ensepar/tcpdf/fonts/zapfdingbats.php @@ -1,7 +1,7 @@ -0,1=>0,2=>0,3=>0,4=>0,5=>0,6=>0,7=>0,8=>0,9=>0,10=>0,11=>0,12=>0, 13=>0,14=>0,15=>0,16=>0,17=>0,18=>0,19=>0,20=>0,21=>0,22=>0,23=>0,24=>0,25=>0, 26=>0,27=>0,28=>0,29=>0,30=>0,31=>0,32=>278,33=>974,34=>961,35=>974,36=>980, @@ -28,5 +28,5 @@ $cw=array(0=>0,1=>0,2=>0,3=>0,4=>0,5=>0,6=>0,7=>0,8=>0,9=>0,10=>0,11=>0,12=>0, 227=>924,228=>917,229=>930,230=>931,231=>463,232=>883,233=>836,234=>836,235=>867, 236=>867,237=>696,238=>696,239=>874,240=>0,241=>874,242=>760,243=>946,244=>771, 245=>865,246=>771,247=>888,248=>967,249=>888,250=>831,251=>873,252=>927,253=>970, -254=>918,255=>0); +254=>918,255=>0); ?> diff --git a/core/vendor/ensepar/tcpdf/fonts/zarbold.php b/core/vendor/ensepar/tcpdf/fonts/zarbold.php index 41b9aae1e..c854a4ec2 100644 --- a/core/vendor/ensepar/tcpdf/fonts/zarbold.php +++ b/core/vendor/ensepar/tcpdf/fonts/zarbold.php @@ -1,47 +1,47 @@ -733,'Descent'=>-317,'CapHeight'=>733,'Flags'=>32,'FontBBox'=>'[-126 -535 1164 1046]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600); -$up=-356; +733,'Descent'=>-317,'CapHeight'=>733,'Flags'=>32,'FontBBox'=>'[-126 -535 1164 1046]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>600); +$up=-356; $ut=49; -$dw=600; -$cw=array( - 0=>0,32=>227,33=>235,34=>282,35=>667,36=>458,37=>493,38=>635,39=>156,40=>303,41=>303,42=>489,43=>489,44=>237,45=>489,46=>231,47=>277, - 48=>552,49=>552,50=>552,51=>552,52=>552,53=>552,54=>552,55=>552,56=>552,57=>552,58=>231,59=>237,60=>667,61=>489,62=>667,63=>448, - 64=>917,65=>604,66=>542,67=>615,68=>708,69=>479,70=>427,71=>667,72=>688,73=>302,74=>292,75=>583,76=>469,77=>885,78=>677,79=>729, - 80=>479,81=>729,82=>542,83=>448,84=>521,85=>677,86=>615,87=>969,88=>604,89=>583,90=>594,91=>208,92=>510,93=>208,94=>469,95=>500, - 96=>333,97=>469,98=>510,99=>448,100=>521,101=>438,102=>313,103=>500,104=>552,105=>271,106=>260,107=>500,108=>271,109=>802,110=>552,111=>490, - 112=>531,113=>521,114=>396,115=>365,116=>292,117=>552,118=>479,119=>750,120=>521,121=>469,122=>448,123=>479,124=>510,125=>479,126=>667,8218=>240, - 402=>531,8222=>458,8230=>1000,8224=>438,8225=>438,710=>333,8240=>1010,352=>448,8249=>250,338=>865,8216=>240,8217=>240,8220=>317,8221=>317,8226=>281,8211=>500, - 8212=>1000,8482=>906,353=>365,8250=>250,339=>823,376=>583,160=>244,161=>317,162=>448,163=>583,164=>500,165=>583,166=>200,167=>417,168=>333,169=>765, - 170=>313,171=>417,172=>667,173=>564,174=>765,175=>333,176=>375,177=>462,178=>354,179=>354,180=>333,181=>510,182=>438,183=>198,184=>333,185=>354, - 186=>323,187=>417,188=>854,189=>854,190=>854,191=>448,192=>604,711=>333,215=>462,224=>469,226=>469,231=>448,232=>438,233=>438,234=>438,235=>438, - 238=>271,239=>271,244=>490,305=>271,247=>483,249=>552,251=>552,252=>552,255=>469,9249=>781,1548=>237,1563=>237,1567=>340,1569=>426,1570=>416,1571=>238, - 1572=>429,1573=>260,1574=>817,1575=>238,1576=>853,1577=>439,1578=>853,1579=>853,1580=>720,1581=>720,1582=>720,1583=>485,1584=>485,1585=>423,1586=>423,1587=>1016, - 1588=>1016,1589=>1128,1590=>1128,1591=>794,1592=>794,1593=>685,1594=>685,1600=>371,1601=>840,1602=>696,1603=>1148,1604=>744,1605=>514,1606=>686,1607=>439,1608=>429, - 1609=>817,1610=>817,1611=>0,1612=>0,1613=>0,1614=>0,1615=>0,1616=>0,1617=>0,1618=>0,1632=>479,1633=>479,1634=>479,1635=>479,1636=>479,1637=>479, - 1638=>479,1639=>479,1640=>479,1641=>483,1642=>493,1645=>563,1648=>227,1649=>363,1652=>227,1662=>853,1670=>720,1688=>423,1700=>840,1705=>1148,1711=>1149,1740=>817, - 1749=>439,1764=>227,1776=>479,1777=>479,1778=>479,1779=>479,1780=>479,1781=>479,1782=>479,1783=>479,1784=>479,1785=>483,8204=>22,8205=>22,8206=>22,8207=>22, - 59424=>227,59425=>227,59426=>227,59427=>227,59428=>227,59429=>227,59430=>227,59431=>227,59432=>227,59433=>227,59434=>227,59435=>227,59436=>227,59416=>227,59437=>227,59442=>227, - 59443=>227,59444=>227,59445=>227,59446=>227,64336=>363,64337=>263,64342=>853,64343=>967,64344=>267,64345=>271,64362=>840,64363=>959,64364=>305,64365=>341,64378=>720,64379=>725, - 64380=>630,64381=>652,64394=>423,64395=>450,64398=>1148,64399=>1089,64400=>522,64401=>461,64402=>1149,64403=>1084,64404=>525,64405=>462,64508=>817,64509=>784,64606=>227,64607=>227, - 64608=>227,64609=>227,64610=>227,64754=>371,64755=>371,64756=>371,64828=>331,64829=>276,64830=>303,64831=>303,65010=>866,65136=>227,65137=>371,65138=>227,65140=>227,65142=>227, - 65143=>371,65144=>227,65145=>371,65146=>227,65147=>371,65148=>227,65149=>371,65150=>227,65151=>371,65152=>426,65153=>416,65154=>354,65155=>238,65156=>282,65157=>429,65158=>507, - 65159=>260,65160=>286,65161=>817,65162=>784,65163=>190,65164=>276,65165=>238,65166=>263,65167=>853,65168=>967,65169=>186,65170=>271,65171=>439,65172=>452,65173=>853,65174=>967, - 65175=>256,65176=>271,65177=>853,65178=>967,65179=>267,65180=>271,65181=>720,65182=>725,65183=>630,65184=>652,65185=>720,65186=>725,65187=>630,65188=>652,65189=>720,65190=>725, - 65191=>630,65192=>652,65193=>485,65194=>608,65195=>485,65196=>608,65197=>423,65198=>450,65199=>423,65200=>450,65201=>1016,65202=>1041,65203=>498,65204=>475,65205=>1016,65206=>1041, - 65207=>498,65208=>475,65209=>1128,65210=>1150,65211=>633,65212=>655,65213=>1128,65214=>1150,65215=>633,65216=>655,65217=>794,65218=>814,65219=>566,65220=>588,65221=>794,65222=>814, - 65223=>566,65224=>588,65225=>685,65226=>655,65227=>414,65228=>330,65229=>685,65230=>655,65231=>414,65232=>330,65233=>840,65234=>959,65235=>305,65236=>341,65237=>696,65238=>780, - 65239=>305,65240=>341,65241=>1148,65242=>1089,65243=>522,65244=>461,65245=>744,65246=>741,65247=>202,65248=>259,65249=>514,65250=>585,65251=>345,65252=>477,65253=>686,65254=>764, - 65255=>186,65256=>271,65257=>439,65258=>452,65259=>501,65260=>381,65261=>429,65262=>507,65263=>817,65264=>784,65265=>817,65266=>784,64510=>265,64511=>271,65269=>610,65270=>652, - 65271=>539,65272=>611,65273=>539,65274=>611,65275=>539,65276=>611,65279=>0,64486=>408,64487=>408); -$enc=''; -$diff=''; -$file='zarbold.z'; -$ctg='zarbold.ctg.z'; -$originalsize=73296; +$dw=600; +$cw=array( + 0=>0,32=>227,33=>235,34=>282,35=>667,36=>458,37=>493,38=>635,39=>156,40=>303,41=>303,42=>489,43=>489,44=>237,45=>489,46=>231,47=>277, + 48=>552,49=>552,50=>552,51=>552,52=>552,53=>552,54=>552,55=>552,56=>552,57=>552,58=>231,59=>237,60=>667,61=>489,62=>667,63=>448, + 64=>917,65=>604,66=>542,67=>615,68=>708,69=>479,70=>427,71=>667,72=>688,73=>302,74=>292,75=>583,76=>469,77=>885,78=>677,79=>729, + 80=>479,81=>729,82=>542,83=>448,84=>521,85=>677,86=>615,87=>969,88=>604,89=>583,90=>594,91=>208,92=>510,93=>208,94=>469,95=>500, + 96=>333,97=>469,98=>510,99=>448,100=>521,101=>438,102=>313,103=>500,104=>552,105=>271,106=>260,107=>500,108=>271,109=>802,110=>552,111=>490, + 112=>531,113=>521,114=>396,115=>365,116=>292,117=>552,118=>479,119=>750,120=>521,121=>469,122=>448,123=>479,124=>510,125=>479,126=>667,8218=>240, + 402=>531,8222=>458,8230=>1000,8224=>438,8225=>438,710=>333,8240=>1010,352=>448,8249=>250,338=>865,8216=>240,8217=>240,8220=>317,8221=>317,8226=>281,8211=>500, + 8212=>1000,8482=>906,353=>365,8250=>250,339=>823,376=>583,160=>244,161=>317,162=>448,163=>583,164=>500,165=>583,166=>200,167=>417,168=>333,169=>765, + 170=>313,171=>417,172=>667,173=>564,174=>765,175=>333,176=>375,177=>462,178=>354,179=>354,180=>333,181=>510,182=>438,183=>198,184=>333,185=>354, + 186=>323,187=>417,188=>854,189=>854,190=>854,191=>448,192=>604,711=>333,215=>462,224=>469,226=>469,231=>448,232=>438,233=>438,234=>438,235=>438, + 238=>271,239=>271,244=>490,305=>271,247=>483,249=>552,251=>552,252=>552,255=>469,9249=>781,1548=>237,1563=>237,1567=>340,1569=>426,1570=>416,1571=>238, + 1572=>429,1573=>260,1574=>817,1575=>238,1576=>853,1577=>439,1578=>853,1579=>853,1580=>720,1581=>720,1582=>720,1583=>485,1584=>485,1585=>423,1586=>423,1587=>1016, + 1588=>1016,1589=>1128,1590=>1128,1591=>794,1592=>794,1593=>685,1594=>685,1600=>371,1601=>840,1602=>696,1603=>1148,1604=>744,1605=>514,1606=>686,1607=>439,1608=>429, + 1609=>817,1610=>817,1611=>0,1612=>0,1613=>0,1614=>0,1615=>0,1616=>0,1617=>0,1618=>0,1632=>479,1633=>479,1634=>479,1635=>479,1636=>479,1637=>479, + 1638=>479,1639=>479,1640=>479,1641=>483,1642=>493,1645=>563,1648=>227,1649=>363,1652=>227,1662=>853,1670=>720,1688=>423,1700=>840,1705=>1148,1711=>1149,1740=>817, + 1749=>439,1764=>227,1776=>479,1777=>479,1778=>479,1779=>479,1780=>479,1781=>479,1782=>479,1783=>479,1784=>479,1785=>483,8204=>22,8205=>22,8206=>22,8207=>22, + 59424=>227,59425=>227,59426=>227,59427=>227,59428=>227,59429=>227,59430=>227,59431=>227,59432=>227,59433=>227,59434=>227,59435=>227,59436=>227,59416=>227,59437=>227,59442=>227, + 59443=>227,59444=>227,59445=>227,59446=>227,64336=>363,64337=>263,64342=>853,64343=>967,64344=>267,64345=>271,64362=>840,64363=>959,64364=>305,64365=>341,64378=>720,64379=>725, + 64380=>630,64381=>652,64394=>423,64395=>450,64398=>1148,64399=>1089,64400=>522,64401=>461,64402=>1149,64403=>1084,64404=>525,64405=>462,64508=>817,64509=>784,64606=>227,64607=>227, + 64608=>227,64609=>227,64610=>227,64754=>371,64755=>371,64756=>371,64828=>331,64829=>276,64830=>303,64831=>303,65010=>866,65136=>227,65137=>371,65138=>227,65140=>227,65142=>227, + 65143=>371,65144=>227,65145=>371,65146=>227,65147=>371,65148=>227,65149=>371,65150=>227,65151=>371,65152=>426,65153=>416,65154=>354,65155=>238,65156=>282,65157=>429,65158=>507, + 65159=>260,65160=>286,65161=>817,65162=>784,65163=>190,65164=>276,65165=>238,65166=>263,65167=>853,65168=>967,65169=>186,65170=>271,65171=>439,65172=>452,65173=>853,65174=>967, + 65175=>256,65176=>271,65177=>853,65178=>967,65179=>267,65180=>271,65181=>720,65182=>725,65183=>630,65184=>652,65185=>720,65186=>725,65187=>630,65188=>652,65189=>720,65190=>725, + 65191=>630,65192=>652,65193=>485,65194=>608,65195=>485,65196=>608,65197=>423,65198=>450,65199=>423,65200=>450,65201=>1016,65202=>1041,65203=>498,65204=>475,65205=>1016,65206=>1041, + 65207=>498,65208=>475,65209=>1128,65210=>1150,65211=>633,65212=>655,65213=>1128,65214=>1150,65215=>633,65216=>655,65217=>794,65218=>814,65219=>566,65220=>588,65221=>794,65222=>814, + 65223=>566,65224=>588,65225=>685,65226=>655,65227=>414,65228=>330,65229=>685,65230=>655,65231=>414,65232=>330,65233=>840,65234=>959,65235=>305,65236=>341,65237=>696,65238=>780, + 65239=>305,65240=>341,65241=>1148,65242=>1089,65243=>522,65244=>461,65245=>744,65246=>741,65247=>202,65248=>259,65249=>514,65250=>585,65251=>345,65252=>477,65253=>686,65254=>764, + 65255=>186,65256=>271,65257=>439,65258=>452,65259=>501,65260=>381,65261=>429,65262=>507,65263=>817,65264=>784,65265=>817,65266=>784,64510=>265,64511=>271,65269=>610,65270=>652, + 65271=>539,65272=>611,65273=>539,65274=>611,65275=>539,65276=>611,65279=>0,64486=>408,64487=>408); +$enc=''; +$diff=''; +$file='zarbold.z'; +$ctg='zarbold.ctg.z'; +$originalsize=73296; ?> diff --git a/core/vendor/ensepar/tcpdf/images/read_me.txt b/core/vendor/ensepar/tcpdf/images/read_me.txt index 31cc6a2c5..2ef419bed 100644 --- a/core/vendor/ensepar/tcpdf/images/read_me.txt +++ b/core/vendor/ensepar/tcpdf/images/read_me.txt @@ -1,3 +1,3 @@ -download the TCPDF package to have this resources. - +download the TCPDF package to have this resources. + it has been removed because of the size of the package of HTML2PDF... \ No newline at end of file diff --git a/core/vendor/ensepar/tcpdf/tcpdf.php b/core/vendor/ensepar/tcpdf/tcpdf.php index 48aafcaa3..02c35df93 100644 --- a/core/vendor/ensepar/tcpdf/tcpdf.php +++ b/core/vendor/ensepar/tcpdf/tcpdf.php @@ -12714,9 +12714,9 @@ if (!class_exists('TCPDF', false)) { $lastcols = $num_cols - 1; for ($i = 1; $i < $num_cols; ++$i) { $functions .= ($fc + $i).' 0 R '; - if ($i < $lastcols) { + if ($i < $lastcols) { $bounds .= sprintf('%.3F ', $grad['colors'][$i]['offset']); - } + } $encode .= '0 1 '; } $out .= ' /Functions ['.trim($functions).']'; @@ -18547,22 +18547,22 @@ if (!class_exists('TCPDF', false)) { $e = $ox * $this->k * (1 - $svgscale_x); $f = ($this->h - $oy) * $this->k * (1 - $svgscale_y); $this->_out(sprintf('%.3F %.3F %.3F %.3F %.3F %.3F cm', $svgscale_x, 0, 0, $svgscale_y, $e + $svgoffset_x, $f + $svgoffset_y)); - // creates a new XML parser to be used by the other XML functions - $this->parser = xml_parser_create('UTF-8'); - // the following function allows to use parser inside object - xml_set_object($this->parser, $this); - // disable case-folding for this XML parser - xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); - // sets the element handler functions for the XML parser + // creates a new XML parser to be used by the other XML functions + $this->parser = xml_parser_create('UTF-8'); + // the following function allows to use parser inside object + xml_set_object($this->parser, $this); + // disable case-folding for this XML parser + xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); + // sets the element handler functions for the XML parser xml_set_element_handler($this->parser, 'startSVGElementHandler', 'endSVGElementHandler'); - // sets the character data handler function for the XML parser - xml_set_character_data_handler($this->parser, 'segSVGContentHandler'); - // start parsing an XML document - if(!xml_parse($this->parser, $svgdata)) { + // sets the character data handler function for the XML parser + xml_set_character_data_handler($this->parser, 'segSVGContentHandler'); + // start parsing an XML document + if(!xml_parse($this->parser, $svgdata)) { $error_message = sprintf("SVG Error: %s at line %d", xml_error_string(xml_get_error_code($this->parser)), xml_get_current_line_number($this->parser)); - $this->Error($error_message); - } - // free this XML parser + $this->Error($error_message); + } + // free this XML parser xml_parser_free($this->parser); // restore previous graphic state $this->_out($this->epsmarker.'Q'); @@ -18611,14 +18611,14 @@ if (!class_exists('TCPDF', false)) { $this->endlinex = $this->img_rb_x; } - /** - * Get the tranformation matrix from SVG transform attribute - * @param string transformation - * @return array of transformations + /** + * Get the tranformation matrix from SVG transform attribute + * @param string transformation + * @return array of transformations * @author Nicola Asuni * @since 5.0.000 (2010-05-02) - * @access protected - */ + * @access protected + */ protected function getSVGTransformMatrix($attribute) { // identity matrix $tm = array(1, 0, 0, 1, 0, 0); @@ -18714,15 +18714,15 @@ if (!class_exists('TCPDF', false)) { return $tm; } - /** - * Get the product of two SVG tranformation matrices + /** + * Get the product of two SVG tranformation matrices * @param array $ta first SVG tranformation matrix - * @param array $tb second SVG tranformation matrix - * @return transformation array + * @param array $tb second SVG tranformation matrix + * @return transformation array * @author Nicola Asuni * @since 5.0.000 (2010-05-02) - * @access protected - */ + * @access protected + */ protected function getTransformationMatrixProduct($ta, $tb) { $tm = array(); $tm[0] = ($ta[0] * $tb[0]) + ($ta[2] * $tb[1]); @@ -18765,8 +18765,8 @@ if (!class_exists('TCPDF', false)) { $this->Transform($this->convertSVGtMatrix($tm)); } - /** - * Apply the requested SVG styles (*** TO BE COMPLETED ***) + /** + * Apply the requested SVG styles (*** TO BE COMPLETED ***) * @param array $svgstyle array of SVG styles to apply * @param array $prevsvgstyle array of previous SVG style * @param int $x X origin of the bounding box @@ -18775,11 +18775,11 @@ if (!class_exists('TCPDF', false)) { * @param int $h height of the bounding box * @param string $clip_function clip function * @param array $clip_params array of parameters for clipping function - * @return object style + * @return object style * @author Nicola Asuni * @since 5.0.000 (2010-05-02) - * @access protected - */ + * @access protected + */ protected function setSVGStyles($svgstyle, $prevsvgstyle, $x=0, $y=0, $w=1, $h=1, $clip_function='', $clip_params=array()) { $objstyle = ''; if(!isset($svgstyle['opacity'])) { @@ -19018,8 +19018,8 @@ if (!class_exists('TCPDF', false)) { return $objstyle; } - /** - * Draws an SVG path + /** + * Draws an SVG path * @param string $d attribute d of the path SVG element * @param string $style Style of rendering. Possible values are: *
    @@ -19031,11 +19031,11 @@ if (!class_exists('TCPDF', false)) { *
  • CNZ: Clipping mode (using the even-odd rule to determine which regions lie inside the clipping path).
  • *
  • CEO: Clipping mode (using the nonzero winding number rule to determine which regions lie inside the clipping path).
  • *
- * @return array of container box measures (x, y, w, h) + * @return array of container box measures (x, y, w, h) * @author Nicola Asuni * @since 5.0.000 (2010-05-02) - * @access protected - */ + * @access protected + */ protected function SVGPath($d, $style='') { // set fill/stroke style $op = $this->getPathPaintOperator($style, ''); @@ -19344,16 +19344,16 @@ if (!class_exists('TCPDF', false)) { return array($xmin, $ymin, ($xmax - $xmin), ($ymax - $ymin)); } - /** - * Returns the angle in radiants between two vectors + /** + * Returns the angle in radiants between two vectors * @param int $x1 X coordiante of first vector point * @param int $y1 Y coordiante of first vector point * @param int $x2 X coordiante of second vector point - * @param int $y2 Y coordiante of second vector point + * @param int $y2 Y coordiante of second vector point * @author Nicola Asuni * @since 5.0.000 (2010-05-04) - * @access protected - */ + * @access protected + */ protected function getVectorsAngle($x1, $y1, $x2, $y2) { $dprod = ($x1 * $x2) + ($y1 * $y2); $dist1 = sqrt(($x1 * $x1) + ($y1 * $y1)); @@ -19368,15 +19368,15 @@ if (!class_exists('TCPDF', false)) { return $angle; } - /** - * Sets the opening SVG element handler function for the XML parser. (*** TO BE COMPLETED ***) - * @param resource $parser The first parameter, parser, is a reference to the XML parser calling the handler. - * @param string $name The second parameter, name, contains the name of the element for which this handler is called. If case-folding is in effect for this parser, the element name will be in uppercase letters. - * @param array $attribs The third parameter, attribs, contains an associative array with the element's attributes (if any). The keys of this array are the attribute names, the values are the attribute values. Attribute names are case-folded on the same criteria as element names. Attribute values are not case-folded. The original order of the attributes can be retrieved by walking through attribs the normal way, using each(). The first key in the array was the first attribute, and so on. + /** + * Sets the opening SVG element handler function for the XML parser. (*** TO BE COMPLETED ***) + * @param resource $parser The first parameter, parser, is a reference to the XML parser calling the handler. + * @param string $name The second parameter, name, contains the name of the element for which this handler is called. If case-folding is in effect for this parser, the element name will be in uppercase letters. + * @param array $attribs The third parameter, attribs, contains an associative array with the element's attributes (if any). The keys of this array are the attribute names, the values are the attribute values. Attribute names are case-folded on the same criteria as element names. Attribute values are not case-folded. The original order of the attributes can be retrieved by walking through attribs the normal way, using each(). The first key in the array was the first attribute, and so on. * @author Nicola Asuni * @since 5.0.000 (2010-05-02) - * @access protected - */ + * @access protected + */ protected function startSVGElementHandler($parser, $name, $attribs) { // check if we are in clip mode if ($this->svgclipmode) { @@ -19393,7 +19393,7 @@ if (!class_exists('TCPDF', false)) { $clipping = true; } // get styling properties - $prev_svgstyle = $this->svgstyles[(count($this->svgstyles) - 1)]; // previous style + $prev_svgstyle = $this->svgstyles[(count($this->svgstyles) - 1)]; // previous style $svgstyle = array(); // current style if (isset($attribs['style'])) { $attribs['style'] = ';'.$attribs['style']; @@ -19435,10 +19435,10 @@ if (!class_exists('TCPDF', false)) { } $svgstyle['transfmatrix'] = $tm; // process tag - switch($name) { - case 'defs': { - $this->svgdefsmode = true; - break; + switch($name) { + case 'defs': { + $this->svgdefsmode = true; + break; } // clipPath case 'clipPath': { @@ -19447,16 +19447,16 @@ if (!class_exists('TCPDF', false)) { $this->svgclippaths[$this->svgclipid] = array(); break; } - case 'svg': { - // start of SVG object - break; - } - case 'g': { - // group together related graphics elements + case 'svg': { + // start of SVG object + break; + } + case 'g': { + // group together related graphics elements array_push($this->svgstyles, $svgstyle); $this->StartTransform(); - $this->setSVGStyles($svgstyle, $prev_svgstyle); - break; + $this->setSVGStyles($svgstyle, $prev_svgstyle); + break; } case 'linearGradient': { $this->svggradientid = $attribs['id']; @@ -19753,26 +19753,26 @@ if (!class_exists('TCPDF', false)) { $this->startSVGElementHandler($parser, $use['name'], $use['attribs']); } break; - } - default: { - break; - } - } - } - - /** - * Sets the closing SVG element handler function for the XML parser. - * @param resource $parser The first parameter, parser, is a reference to the XML parser calling the handler. - * @param string $name The second parameter, name, contains the name of the element for which this handler is called. If case-folding is in effect for this parser, the element name will be in uppercase letters. + } + default: { + break; + } + } + } + + /** + * Sets the closing SVG element handler function for the XML parser. + * @param resource $parser The first parameter, parser, is a reference to the XML parser calling the handler. + * @param string $name The second parameter, name, contains the name of the element for which this handler is called. If case-folding is in effect for this parser, the element name will be in uppercase letters. * @author Nicola Asuni * @since 5.0.000 (2010-05-02) - * @access protected - */ - protected function endSVGElementHandler($parser, $name) { + * @access protected + */ + protected function endSVGElementHandler($parser, $name) { switch($name) { - case 'defs': { - $this->svgdefsmode = false; - break; + case 'defs': { + $this->svgdefsmode = false; + break; } // clipPath case 'clipPath': { @@ -19780,34 +19780,34 @@ if (!class_exists('TCPDF', false)) { break; } case 'g': { - // ungroup: remove last style from array + // ungroup: remove last style from array array_pop($this->svgstyles); - $this->StopTransform(); - break; + $this->StopTransform(); + break; } case 'text': - case 'tspan': { + case 'tspan': { // print text $this->Cell(0, 0, trim($this->svgtext), 0, 0, '', 0, '', 0, false, 'L', 'T'); - $this->StopTransform(); - break; - } - default: { - break; - } - } + $this->StopTransform(); + break; + } + default: { + break; + } + } } - - /** - * Sets the character data handler function for the XML parser. - * @param resource $parser The first parameter, parser, is a reference to the XML parser calling the handler. - * @param string $data The second parameter, data, contains the character data as a string. + + /** + * Sets the character data handler function for the XML parser. + * @param resource $parser The first parameter, parser, is a reference to the XML parser calling the handler. + * @param string $data The second parameter, data, contains the character data as a string. * @author Nicola Asuni * @since 5.0.000 (2010-05-02) - * @access protected - */ - protected function segSVGContentHandler($parser, $data) { - $this->svgtext .= $data; + * @access protected + */ + protected function segSVGContentHandler($parser, $data) { + $this->svgtext .= $data; } } // END OF TCPDF CLASS diff --git a/core/vendor/oyejorge/less.php/lib/Less/Configurable.php b/core/vendor/oyejorge/less.php/lib/Less/Configurable.php index aa7fd3eb7..be81c9f5f 100644 --- a/core/vendor/oyejorge/less.php/lib/Less/Configurable.php +++ b/core/vendor/oyejorge/less.php/lib/Less/Configurable.php @@ -1,69 +1,69 @@ -defaultOptions); - $this->options = array_merge($this->defaultOptions, $this->options, $options); - } - - - /** - * Get an option value by name - * - * If the option is empty or not set a NULL value will be returned. - * - * @param string $name - * @param mixed $default Default value if confiuration of $name is not present - * @return mixed - */ - public function getOption($name, $default = null){ - if(isset($this->options[$name])){ - return $this->options[$name]; - } - return $default; - } - - - /** - * Set an option - * - * @param string $name - * @param mixed $value - */ - public function setOption($name, $value){ - $this->options[$name] = $value; - } - +defaultOptions); + $this->options = array_merge($this->defaultOptions, $this->options, $options); + } + + + /** + * Get an option value by name + * + * If the option is empty or not set a NULL value will be returned. + * + * @param string $name + * @param mixed $default Default value if confiuration of $name is not present + * @return mixed + */ + public function getOption($name, $default = null){ + if(isset($this->options[$name])){ + return $this->options[$name]; + } + return $default; + } + + + /** + * Set an option + * + * @param string $name + * @param mixed $value + */ + public function setOption($name, $value){ + $this->options[$name] = $value; + } + } \ No newline at end of file diff --git a/core/vendor/oyejorge/less.php/lib/Less/Exception/Chunk.php b/core/vendor/oyejorge/less.php/lib/Less/Exception/Chunk.php index fcce1b4bf..97fce1b38 100644 --- a/core/vendor/oyejorge/less.php/lib/Less/Exception/Chunk.php +++ b/core/vendor/oyejorge/less.php/lib/Less/Exception/Chunk.php @@ -1,203 +1,203 @@ -message = 'ParseError: Unexpected input'; //default message - - $this->index = $index; - - $this->currentFile = $currentFile; - - $this->input = $input; - $this->input_len = strlen($input); - - $this->Chunks(); - $this->genMessage(); - } - - - /** - * See less.js chunks() - * We don't actually need the chunks - * - */ - protected function Chunks(){ - $level = 0; - $parenLevel = 0; - $lastMultiCommentEndBrace = null; - $lastOpening = null; - $lastMultiComment = null; - $lastParen = null; - - for( $this->parserCurrentIndex = 0; $this->parserCurrentIndex < $this->input_len; $this->parserCurrentIndex++ ){ - $cc = $this->CharCode($this->parserCurrentIndex); - if ((($cc >= 97) && ($cc <= 122)) || ($cc < 34)) { - // a-z or whitespace - continue; - } - - switch ($cc) { - - // ( - case 40: - $parenLevel++; - $lastParen = $this->parserCurrentIndex; - continue; - - // ) - case 41: - $parenLevel--; - if( $parenLevel < 0 ){ - return $this->fail("missing opening `(`"); - } - continue; - - // ; - case 59: - //if (!$parenLevel) { $this->emitChunk(); } - continue; - - // { - case 123: - $level++; - $lastOpening = $this->parserCurrentIndex; - continue; - - // } - case 125: - $level--; - if( $level < 0 ){ - return $this->fail("missing opening `{`"); - - } - //if (!$level && !$parenLevel) { $this->emitChunk(); } - continue; - // \ - case 92: - if ($this->parserCurrentIndex < $this->input_len - 1) { $this->parserCurrentIndex++; continue; } - return $this->fail("unescaped `\\`"); - - // ", ' and ` - case 34: - case 39: - case 96: - $matched = 0; - $currentChunkStartIndex = $this->parserCurrentIndex; - for ($this->parserCurrentIndex = $this->parserCurrentIndex + 1; $this->parserCurrentIndex < $this->input_len; $this->parserCurrentIndex++) { - $cc2 = $this->CharCode($this->parserCurrentIndex); - if ($cc2 > 96) { continue; } - if ($cc2 == $cc) { $matched = 1; break; } - if ($cc2 == 92) { // \ - if ($this->parserCurrentIndex == $this->input_len - 1) { - return $this->fail("unescaped `\\`"); - } - $this->parserCurrentIndex++; - } - } - if ($matched) { continue; } - return $this->fail("unmatched `" . chr($cc) . "`", $currentChunkStartIndex); - - // /, check for comment - case 47: - if ($parenLevel || ($this->parserCurrentIndex == $this->input_len - 1)) { continue; } - $cc2 = $this->CharCode($this->parserCurrentIndex+1); - if ($cc2 == 47) { - // //, find lnfeed - for ($this->parserCurrentIndex = $this->parserCurrentIndex + 2; $this->parserCurrentIndex < $this->input_len; $this->parserCurrentIndex++) { - $cc2 = $this->CharCode($this->parserCurrentIndex); - if (($cc2 <= 13) && (($cc2 == 10) || ($cc2 == 13))) { break; } - } - } else if ($cc2 == 42) { - // /*, find */ - $lastMultiComment = $currentChunkStartIndex = $this->parserCurrentIndex; - for ($this->parserCurrentIndex = $this->parserCurrentIndex + 2; $this->parserCurrentIndex < $this->input_len - 1; $this->parserCurrentIndex++) { - $cc2 = $this->CharCode($this->parserCurrentIndex); - if ($cc2 == 125) { $lastMultiCommentEndBrace = $this->parserCurrentIndex; } - if ($cc2 != 42) { continue; } - if ($this->CharCode($this->parserCurrentIndex+1) == 47) { break; } - } - if ($this->parserCurrentIndex == $this->input_len - 1) { - return $this->fail("missing closing `*/`", $currentChunkStartIndex); - } - } - continue; - - // *, check for unmatched */ - case 42: - if (($this->parserCurrentIndex < $this->input_len - 1) && ($this->CharCode($this->parserCurrentIndex+1) == 47)) { - return $this->fail("unmatched `/*`"); - } - continue; - } - } - - if( $level !== 0 ){ - if( ($lastMultiComment > $lastOpening) && ($lastMultiCommentEndBrace > $lastMultiComment) ){ - return $this->fail("missing closing `}` or `*/`", $lastOpening); - } else { - return $this->fail("missing closing `}`", $lastOpening); - } - } else if ( $parenLevel !== 0 ){ - return $this->fail("missing closing `)`", $lastParen); - } - - - //chunk didn't fail - - - //$this->emitChunk(true); - } - - public function CharCode($pos){ - return ord($this->input[$pos]); - } - - - public function fail( $msg, $index = null ){ - - if( !$index ){ - $this->index = $this->parserCurrentIndex; - }else{ - $this->index = $index; - } - $this->message = 'ParseError: '.$msg; - } - - - /* - function emitChunk( $force = false ){ - $len = $this->parserCurrentIndex - $this->emitFrom; - if ((($len < 512) && !$force) || !$len) { - return; - } - $chunks[] = substr($this->input, $this->emitFrom, $this->parserCurrentIndex + 1 - $this->emitFrom ); - $this->emitFrom = $this->parserCurrentIndex + 1; - } - */ - -} +message = 'ParseError: Unexpected input'; //default message + + $this->index = $index; + + $this->currentFile = $currentFile; + + $this->input = $input; + $this->input_len = strlen($input); + + $this->Chunks(); + $this->genMessage(); + } + + + /** + * See less.js chunks() + * We don't actually need the chunks + * + */ + protected function Chunks(){ + $level = 0; + $parenLevel = 0; + $lastMultiCommentEndBrace = null; + $lastOpening = null; + $lastMultiComment = null; + $lastParen = null; + + for( $this->parserCurrentIndex = 0; $this->parserCurrentIndex < $this->input_len; $this->parserCurrentIndex++ ){ + $cc = $this->CharCode($this->parserCurrentIndex); + if ((($cc >= 97) && ($cc <= 122)) || ($cc < 34)) { + // a-z or whitespace + continue; + } + + switch ($cc) { + + // ( + case 40: + $parenLevel++; + $lastParen = $this->parserCurrentIndex; + continue; + + // ) + case 41: + $parenLevel--; + if( $parenLevel < 0 ){ + return $this->fail("missing opening `(`"); + } + continue; + + // ; + case 59: + //if (!$parenLevel) { $this->emitChunk(); } + continue; + + // { + case 123: + $level++; + $lastOpening = $this->parserCurrentIndex; + continue; + + // } + case 125: + $level--; + if( $level < 0 ){ + return $this->fail("missing opening `{`"); + + } + //if (!$level && !$parenLevel) { $this->emitChunk(); } + continue; + // \ + case 92: + if ($this->parserCurrentIndex < $this->input_len - 1) { $this->parserCurrentIndex++; continue; } + return $this->fail("unescaped `\\`"); + + // ", ' and ` + case 34: + case 39: + case 96: + $matched = 0; + $currentChunkStartIndex = $this->parserCurrentIndex; + for ($this->parserCurrentIndex = $this->parserCurrentIndex + 1; $this->parserCurrentIndex < $this->input_len; $this->parserCurrentIndex++) { + $cc2 = $this->CharCode($this->parserCurrentIndex); + if ($cc2 > 96) { continue; } + if ($cc2 == $cc) { $matched = 1; break; } + if ($cc2 == 92) { // \ + if ($this->parserCurrentIndex == $this->input_len - 1) { + return $this->fail("unescaped `\\`"); + } + $this->parserCurrentIndex++; + } + } + if ($matched) { continue; } + return $this->fail("unmatched `" . chr($cc) . "`", $currentChunkStartIndex); + + // /, check for comment + case 47: + if ($parenLevel || ($this->parserCurrentIndex == $this->input_len - 1)) { continue; } + $cc2 = $this->CharCode($this->parserCurrentIndex+1); + if ($cc2 == 47) { + // //, find lnfeed + for ($this->parserCurrentIndex = $this->parserCurrentIndex + 2; $this->parserCurrentIndex < $this->input_len; $this->parserCurrentIndex++) { + $cc2 = $this->CharCode($this->parserCurrentIndex); + if (($cc2 <= 13) && (($cc2 == 10) || ($cc2 == 13))) { break; } + } + } else if ($cc2 == 42) { + // /*, find */ + $lastMultiComment = $currentChunkStartIndex = $this->parserCurrentIndex; + for ($this->parserCurrentIndex = $this->parserCurrentIndex + 2; $this->parserCurrentIndex < $this->input_len - 1; $this->parserCurrentIndex++) { + $cc2 = $this->CharCode($this->parserCurrentIndex); + if ($cc2 == 125) { $lastMultiCommentEndBrace = $this->parserCurrentIndex; } + if ($cc2 != 42) { continue; } + if ($this->CharCode($this->parserCurrentIndex+1) == 47) { break; } + } + if ($this->parserCurrentIndex == $this->input_len - 1) { + return $this->fail("missing closing `*/`", $currentChunkStartIndex); + } + } + continue; + + // *, check for unmatched */ + case 42: + if (($this->parserCurrentIndex < $this->input_len - 1) && ($this->CharCode($this->parserCurrentIndex+1) == 47)) { + return $this->fail("unmatched `/*`"); + } + continue; + } + } + + if( $level !== 0 ){ + if( ($lastMultiComment > $lastOpening) && ($lastMultiCommentEndBrace > $lastMultiComment) ){ + return $this->fail("missing closing `}` or `*/`", $lastOpening); + } else { + return $this->fail("missing closing `}`", $lastOpening); + } + } else if ( $parenLevel !== 0 ){ + return $this->fail("missing closing `)`", $lastParen); + } + + + //chunk didn't fail + + + //$this->emitChunk(true); + } + + public function CharCode($pos){ + return ord($this->input[$pos]); + } + + + public function fail( $msg, $index = null ){ + + if( !$index ){ + $this->index = $this->parserCurrentIndex; + }else{ + $this->index = $index; + } + $this->message = 'ParseError: '.$msg; + } + + + /* + function emitChunk( $force = false ){ + $len = $this->parserCurrentIndex - $this->emitFrom; + if ((($len < 512) && !$force) || !$len) { + return; + } + $chunks[] = substr($this->input, $this->emitFrom, $this->parserCurrentIndex + 1 - $this->emitFrom ); + $this->emitFrom = $this->parserCurrentIndex + 1; + } + */ + +} diff --git a/core/vendor/oyejorge/less.php/lib/Less/Exception/Compiler.php b/core/vendor/oyejorge/less.php/lib/Less/Exception/Compiler.php index 713e030d0..b645f61f3 100644 --- a/core/vendor/oyejorge/less.php/lib/Less/Exception/Compiler.php +++ b/core/vendor/oyejorge/less.php/lib/Less/Exception/Compiler.php @@ -1,11 +1,11 @@ -previous = $previous; - parent::__construct($message, $code); - } else { - parent::__construct($message, $code, $previous); - } - - $this->currentFile = $currentFile; - $this->index = $index; - - $this->genMessage(); - } - - - protected function getInput(){ - - if( !$this->input && $this->currentFile && $this->currentFile['filename'] && file_exists($this->currentFile['filename']) ){ - $this->input = file_get_contents( $this->currentFile['filename'] ); - } - } - - - - /** - * Converts the exception to string - * - * @return string - */ - public function genMessage(){ - - if( $this->currentFile && $this->currentFile['filename'] ){ - $this->message .= ' in '.basename($this->currentFile['filename']); - } - - if( $this->index !== null ){ - $this->getInput(); - if( $this->input ){ - $line = self::getLineNumber(); - $this->message .= ' on line '.$line.', column '.self::getColumn(); - - $lines = explode("\n",$this->input); - - $count = count($lines); - $start_line = max(0, $line-3); - $last_line = min($count, $start_line+6); - $num_len = strlen($last_line); - for( $i = $start_line; $i < $last_line; $i++ ){ - $this->message .= "\n".str_pad($i+1,$num_len,'0',STR_PAD_LEFT).'| '.$lines[$i]; - } - } - } - - } - - /** - * Returns the line number the error was encountered - * - * @return integer - */ - public function getLineNumber(){ - if( $this->index ){ - // https://bugs.php.net/bug.php?id=49790 - if (ini_get("mbstring.func_overload")) { - return substr_count(substr($this->input, 0, $this->index), "\n") + 1; - } else { - return substr_count($this->input, "\n", 0, $this->index) + 1; - } - } - return 1; - } - - - /** - * Returns the column the error was encountered - * - * @return integer - */ - public function getColumn(){ - - $part = substr($this->input, 0, $this->index); - $pos = strrpos($part,"\n"); - return $this->index - $pos; - } - -} +previous = $previous; + parent::__construct($message, $code); + } else { + parent::__construct($message, $code, $previous); + } + + $this->currentFile = $currentFile; + $this->index = $index; + + $this->genMessage(); + } + + + protected function getInput(){ + + if( !$this->input && $this->currentFile && $this->currentFile['filename'] && file_exists($this->currentFile['filename']) ){ + $this->input = file_get_contents( $this->currentFile['filename'] ); + } + } + + + + /** + * Converts the exception to string + * + * @return string + */ + public function genMessage(){ + + if( $this->currentFile && $this->currentFile['filename'] ){ + $this->message .= ' in '.basename($this->currentFile['filename']); + } + + if( $this->index !== null ){ + $this->getInput(); + if( $this->input ){ + $line = self::getLineNumber(); + $this->message .= ' on line '.$line.', column '.self::getColumn(); + + $lines = explode("\n",$this->input); + + $count = count($lines); + $start_line = max(0, $line-3); + $last_line = min($count, $start_line+6); + $num_len = strlen($last_line); + for( $i = $start_line; $i < $last_line; $i++ ){ + $this->message .= "\n".str_pad($i+1,$num_len,'0',STR_PAD_LEFT).'| '.$lines[$i]; + } + } + } + + } + + /** + * Returns the line number the error was encountered + * + * @return integer + */ + public function getLineNumber(){ + if( $this->index ){ + // https://bugs.php.net/bug.php?id=49790 + if (ini_get("mbstring.func_overload")) { + return substr_count(substr($this->input, 0, $this->index), "\n") + 1; + } else { + return substr_count($this->input, "\n", 0, $this->index) + 1; + } + } + return 1; + } + + + /** + * Returns the column the error was encountered + * + * @return integer + */ + public function getColumn(){ + + $part = substr($this->input, 0, $this->index); + $pos = strrpos($part,"\n"); + return $this->index - $pos; + } + +} diff --git a/core/vendor/oyejorge/less.php/lib/Less/Output/Mapped.php b/core/vendor/oyejorge/less.php/lib/Less/Output/Mapped.php index 884490a20..9e4cc4619 100644 --- a/core/vendor/oyejorge/less.php/lib/Less/Output/Mapped.php +++ b/core/vendor/oyejorge/less.php/lib/Less/Output/Mapped.php @@ -1,122 +1,122 @@ -contentsMap = $contentsMap; - $this->generator = $generator; - } - - /** - * Adds a chunk to the stack - * The $index for less.php may be different from less.js since less.php does not chunkify inputs - * - * @param string $chunk - * @param string $fileInfo - * @param integer $index - * @param mixed $mapLines - */ - public function add($chunk, $fileInfo = null, $index = 0, $mapLines = null){ - - //ignore adding empty strings - if( $chunk === '' ){ - return; - } - - - $sourceLines = array(); - $sourceColumns = ' '; - - - if( $fileInfo ){ - - $url = $fileInfo['currentUri']; - - if( isset($this->contentsMap[$url]) ){ - $inputSource = substr($this->contentsMap[$url], 0, $index); - $sourceLines = explode("\n", $inputSource); - $sourceColumns = end($sourceLines); - }else{ - throw new Exception('Filename '.$url.' not in contentsMap'); - } - - } - - $lines = explode("\n", $chunk); - $columns = end($lines); - - if($fileInfo){ - - if(!$mapLines){ - $this->generator->addMapping( - $this->lineNumber + 1, // generated_line - $this->column, // generated_column - count($sourceLines), // original_line - strlen($sourceColumns), // original_column - $fileInfo - ); - }else{ - for($i = 0, $count = count($lines); $i < $count; $i++){ - $this->generator->addMapping( - $this->lineNumber + $i + 1, // generated_line - $i === 0 ? $this->column : 0, // generated_column - count($sourceLines) + $i, // original_line - $i === 0 ? strlen($sourceColumns) : 0, // original_column - $fileInfo - ); - } - } - } - - if(count($lines) === 1){ - $this->column += strlen($columns); - }else{ - $this->lineNumber += count($lines) - 1; - $this->column = strlen($columns); - } - - // add only chunk - parent::add($chunk); - } - +contentsMap = $contentsMap; + $this->generator = $generator; + } + + /** + * Adds a chunk to the stack + * The $index for less.php may be different from less.js since less.php does not chunkify inputs + * + * @param string $chunk + * @param string $fileInfo + * @param integer $index + * @param mixed $mapLines + */ + public function add($chunk, $fileInfo = null, $index = 0, $mapLines = null){ + + //ignore adding empty strings + if( $chunk === '' ){ + return; + } + + + $sourceLines = array(); + $sourceColumns = ' '; + + + if( $fileInfo ){ + + $url = $fileInfo['currentUri']; + + if( isset($this->contentsMap[$url]) ){ + $inputSource = substr($this->contentsMap[$url], 0, $index); + $sourceLines = explode("\n", $inputSource); + $sourceColumns = end($sourceLines); + }else{ + throw new Exception('Filename '.$url.' not in contentsMap'); + } + + } + + $lines = explode("\n", $chunk); + $columns = end($lines); + + if($fileInfo){ + + if(!$mapLines){ + $this->generator->addMapping( + $this->lineNumber + 1, // generated_line + $this->column, // generated_column + count($sourceLines), // original_line + strlen($sourceColumns), // original_column + $fileInfo + ); + }else{ + for($i = 0, $count = count($lines); $i < $count; $i++){ + $this->generator->addMapping( + $this->lineNumber + $i + 1, // generated_line + $i === 0 ? $this->column : 0, // generated_column + count($sourceLines) + $i, // original_line + $i === 0 ? strlen($sourceColumns) : 0, // original_column + $fileInfo + ); + } + } + } + + if(count($lines) === 1){ + $this->column += strlen($columns); + }else{ + $this->lineNumber += count($lines) - 1; + $this->column = strlen($columns); + } + + // add only chunk + parent::add($chunk); + } + } \ No newline at end of file diff --git a/core/vendor/oyejorge/less.php/lib/Less/SourceMap/Generator.php b/core/vendor/oyejorge/less.php/lib/Less/SourceMap/Generator.php index ff73af065..cc9e65f36 100644 --- a/core/vendor/oyejorge/less.php/lib/Less/SourceMap/Generator.php +++ b/core/vendor/oyejorge/less.php/lib/Less/SourceMap/Generator.php @@ -1,365 +1,365 @@ - '', - - // an optional name of the generated code that this source map is associated with. - 'sourceMapFilename' => null, - - // url of the map - 'sourceMapURL' => null, - - // absolute path to a file to write the map to - 'sourceMapWriteTo' => null, - - // output source contents? - 'outputSourceFiles' => false, - - // base path for filename normalization - 'sourceMapRootpath' => '', - - // base path for filename normalization - 'sourceMapBasepath' => '' - ); - - /** - * The base64 VLQ encoder - * - * @var Less_SourceMap_Base64VLQ - */ - protected $encoder; - - /** - * Array of mappings - * - * @var array - */ - protected $mappings = array(); - - /** - * The root node - * - * @var Less_Tree_Ruleset - */ - protected $root; - - /** - * Array of contents map - * - * @var array - */ - protected $contentsMap = array(); - - /** - * File to content map - * - * @var array - */ - protected $sources = array(); - protected $source_keys = array(); - - /** - * Constructor - * - * @param Less_Tree_Ruleset $root The root node - * @param array $options Array of options - */ - public function __construct(Less_Tree_Ruleset $root, $contentsMap, $options = array()){ - $this->root = $root; - $this->contentsMap = $contentsMap; - $this->encoder = new Less_SourceMap_Base64VLQ(); - - $this->SetOptions($options); - - $this->options['sourceMapRootpath'] = $this->fixWindowsPath($this->options['sourceMapRootpath'], true); - $this->options['sourceMapBasepath'] = $this->fixWindowsPath($this->options['sourceMapBasepath'], true); - } - - /** - * Generates the CSS - * - * @return string - */ - public function generateCSS(){ - $output = new Less_Output_Mapped($this->contentsMap, $this); - - // catch the output - $this->root->genCSS($output); - - - $sourceMapUrl = $this->getOption('sourceMapURL'); - $sourceMapFilename = $this->getOption('sourceMapFilename'); - $sourceMapContent = $this->generateJson(); - $sourceMapWriteTo = $this->getOption('sourceMapWriteTo'); - - if( !$sourceMapUrl && $sourceMapFilename ){ - $sourceMapUrl = $this->normalizeFilename($sourceMapFilename); - } - - // write map to a file - if( $sourceMapWriteTo ){ - $this->saveMap($sourceMapWriteTo, $sourceMapContent); - } - - // inline the map - if( !$sourceMapUrl ){ - $sourceMapUrl = sprintf('data:application/json,%s', Less_Functions::encodeURIComponent($sourceMapContent)); - } - - if( $sourceMapUrl ){ - $output->add( sprintf('/*# sourceMappingURL=%s */', $sourceMapUrl) ); - } - - return $output->toString(); - } - - /** - * Saves the source map to a file - * - * @param string $file The absolute path to a file - * @param string $content The content to write - * @throws Exception If the file could not be saved - */ - protected function saveMap($file, $content){ - $dir = dirname($file); - // directory does not exist - if( !is_dir($dir) ){ - // FIXME: create the dir automatically? - throw new Exception(sprintf('The directory "%s" does not exist. Cannot save the source map.', $dir)); - } - // FIXME: proper saving, with dir write check! - if(file_put_contents($file, $content) === false){ - throw new Exception(sprintf('Cannot save the source map to "%s"', $file)); - } - return true; - } - - /** - * Normalizes the filename - * - * @param string $filename - * @return string - */ - protected function normalizeFilename($filename){ - - $filename = $this->fixWindowsPath($filename); - - $rootpath = $this->getOption('sourceMapRootpath'); - $basePath = $this->getOption('sourceMapBasepath'); - - // "Trim" the 'sourceMapBasepath' from the output filename. - if (strpos($filename, $basePath) === 0) { - $filename = substr($filename, strlen($basePath)); - } - - // Remove extra leading path separators. - if(strpos($filename, '\\') === 0 || strpos($filename, '/') === 0){ - $filename = substr($filename, 1); - } - - return $rootpath . $filename; - } - - /** - * Adds a mapping - * - * @param integer $generatedLine The line number in generated file - * @param integer $generatedColumn The column number in generated file - * @param integer $originalLine The line number in original file - * @param integer $originalColumn The column number in original file - * @param string $sourceFile The original source file - */ - public function addMapping($generatedLine, $generatedColumn, $originalLine, $originalColumn, $fileInfo ){ - - $this->mappings[] = array( - 'generated_line' => $generatedLine, - 'generated_column' => $generatedColumn, - 'original_line' => $originalLine, - 'original_column' => $originalColumn, - 'source_file' => $fileInfo['currentUri'] - ); - - $this->sources[$fileInfo['currentUri']] = $fileInfo['filename']; - } - - - /** - * Generates the JSON source map - * - * @return string - * @see https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit# - */ - protected function generateJson(){ - - $sourceMap = array(); - $mappings = $this->generateMappings(); - - // File version (always the first entry in the object) and must be a positive integer. - $sourceMap['version'] = self::VERSION; - - - // An optional name of the generated code that this source map is associated with. - $file = $this->getOption('sourceMapFilename'); - if( $file ){ - $sourceMap['file'] = $file; - } - - - // An optional source root, useful for relocating source files on a server or removing repeated values in the 'sources' entry. This value is prepended to the individual entries in the 'source' field. - $root = $this->getOption('sourceRoot'); - if( $root ){ - $sourceMap['sourceRoot'] = $root; - } - - - // A list of original sources used by the 'mappings' entry. - $sourceMap['sources'] = array(); - foreach($this->sources as $source_uri => $source_filename){ - $sourceMap['sources'][] = $this->normalizeFilename($source_filename); - } - - - // A list of symbol names used by the 'mappings' entry. - $sourceMap['names'] = array(); - - // A string with the encoded mapping data. - $sourceMap['mappings'] = $mappings; - - if( $this->getOption('outputSourceFiles') ){ - // An optional list of source content, useful when the 'source' can't be hosted. - // The contents are listed in the same order as the sources above. - // 'null' may be used if some original sources should be retrieved by name. - $sourceMap['sourcesContent'] = $this->getSourcesContent(); - } - - // less.js compat fixes - if( count($sourceMap['sources']) && empty($sourceMap['sourceRoot']) ){ - unset($sourceMap['sourceRoot']); - } - - return json_encode($sourceMap); - } - - /** - * Returns the sources contents - * - * @return array|null - */ - protected function getSourcesContent(){ - if(empty($this->sources)){ - return; - } - $content = array(); - foreach($this->sources as $sourceFile){ - $content[] = file_get_contents($sourceFile); - } - return $content; - } - - /** - * Generates the mappings string - * - * @return string - */ - public function generateMappings(){ - - if( !count($this->mappings) ){ - return ''; - } - - $this->source_keys = array_flip(array_keys($this->sources)); - - - // group mappings by generated line number. - $groupedMap = $groupedMapEncoded = array(); - foreach($this->mappings as $m){ - $groupedMap[$m['generated_line']][] = $m; - } - ksort($groupedMap); - - $lastGeneratedLine = $lastOriginalIndex = $lastOriginalLine = $lastOriginalColumn = 0; - - foreach($groupedMap as $lineNumber => $line_map){ - while(++$lastGeneratedLine < $lineNumber){ - $groupedMapEncoded[] = ';'; - } - - $lineMapEncoded = array(); - $lastGeneratedColumn = 0; - - foreach($line_map as $m){ - $mapEncoded = $this->encoder->encode($m['generated_column'] - $lastGeneratedColumn); - $lastGeneratedColumn = $m['generated_column']; - - // find the index - if( $m['source_file'] ){ - $index = $this->findFileIndex($m['source_file']); - if( $index !== false ){ - $mapEncoded .= $this->encoder->encode($index - $lastOriginalIndex); - $lastOriginalIndex = $index; - - // lines are stored 0-based in SourceMap spec version 3 - $mapEncoded .= $this->encoder->encode($m['original_line'] - 1 - $lastOriginalLine); - $lastOriginalLine = $m['original_line'] - 1; - - $mapEncoded .= $this->encoder->encode($m['original_column'] - $lastOriginalColumn); - $lastOriginalColumn = $m['original_column']; - } - } - - $lineMapEncoded[] = $mapEncoded; - } - - $groupedMapEncoded[] = implode(',', $lineMapEncoded) . ';'; - } - - return rtrim(implode($groupedMapEncoded), ';'); - } - - /** - * Finds the index for the filename - * - * @param string $filename - * @return integer|false - */ - protected function findFileIndex($filename){ - return $this->source_keys[$filename]; - } - - /** - * fix windows paths - * @param string $path - * @return string - */ - public function fixWindowsPath($path, $addEndSlash = false){ - $slash = ($addEndSlash) ? '/' : ''; - if( !empty($path) ){ - $path = str_replace('\\', '/', $path); - $path = rtrim($path,'/') . $slash; - } - - return $path; - } - + '', + + // an optional name of the generated code that this source map is associated with. + 'sourceMapFilename' => null, + + // url of the map + 'sourceMapURL' => null, + + // absolute path to a file to write the map to + 'sourceMapWriteTo' => null, + + // output source contents? + 'outputSourceFiles' => false, + + // base path for filename normalization + 'sourceMapRootpath' => '', + + // base path for filename normalization + 'sourceMapBasepath' => '' + ); + + /** + * The base64 VLQ encoder + * + * @var Less_SourceMap_Base64VLQ + */ + protected $encoder; + + /** + * Array of mappings + * + * @var array + */ + protected $mappings = array(); + + /** + * The root node + * + * @var Less_Tree_Ruleset + */ + protected $root; + + /** + * Array of contents map + * + * @var array + */ + protected $contentsMap = array(); + + /** + * File to content map + * + * @var array + */ + protected $sources = array(); + protected $source_keys = array(); + + /** + * Constructor + * + * @param Less_Tree_Ruleset $root The root node + * @param array $options Array of options + */ + public function __construct(Less_Tree_Ruleset $root, $contentsMap, $options = array()){ + $this->root = $root; + $this->contentsMap = $contentsMap; + $this->encoder = new Less_SourceMap_Base64VLQ(); + + $this->SetOptions($options); + + $this->options['sourceMapRootpath'] = $this->fixWindowsPath($this->options['sourceMapRootpath'], true); + $this->options['sourceMapBasepath'] = $this->fixWindowsPath($this->options['sourceMapBasepath'], true); + } + + /** + * Generates the CSS + * + * @return string + */ + public function generateCSS(){ + $output = new Less_Output_Mapped($this->contentsMap, $this); + + // catch the output + $this->root->genCSS($output); + + + $sourceMapUrl = $this->getOption('sourceMapURL'); + $sourceMapFilename = $this->getOption('sourceMapFilename'); + $sourceMapContent = $this->generateJson(); + $sourceMapWriteTo = $this->getOption('sourceMapWriteTo'); + + if( !$sourceMapUrl && $sourceMapFilename ){ + $sourceMapUrl = $this->normalizeFilename($sourceMapFilename); + } + + // write map to a file + if( $sourceMapWriteTo ){ + $this->saveMap($sourceMapWriteTo, $sourceMapContent); + } + + // inline the map + if( !$sourceMapUrl ){ + $sourceMapUrl = sprintf('data:application/json,%s', Less_Functions::encodeURIComponent($sourceMapContent)); + } + + if( $sourceMapUrl ){ + $output->add( sprintf('/*# sourceMappingURL=%s */', $sourceMapUrl) ); + } + + return $output->toString(); + } + + /** + * Saves the source map to a file + * + * @param string $file The absolute path to a file + * @param string $content The content to write + * @throws Exception If the file could not be saved + */ + protected function saveMap($file, $content){ + $dir = dirname($file); + // directory does not exist + if( !is_dir($dir) ){ + // FIXME: create the dir automatically? + throw new Exception(sprintf('The directory "%s" does not exist. Cannot save the source map.', $dir)); + } + // FIXME: proper saving, with dir write check! + if(file_put_contents($file, $content) === false){ + throw new Exception(sprintf('Cannot save the source map to "%s"', $file)); + } + return true; + } + + /** + * Normalizes the filename + * + * @param string $filename + * @return string + */ + protected function normalizeFilename($filename){ + + $filename = $this->fixWindowsPath($filename); + + $rootpath = $this->getOption('sourceMapRootpath'); + $basePath = $this->getOption('sourceMapBasepath'); + + // "Trim" the 'sourceMapBasepath' from the output filename. + if (strpos($filename, $basePath) === 0) { + $filename = substr($filename, strlen($basePath)); + } + + // Remove extra leading path separators. + if(strpos($filename, '\\') === 0 || strpos($filename, '/') === 0){ + $filename = substr($filename, 1); + } + + return $rootpath . $filename; + } + + /** + * Adds a mapping + * + * @param integer $generatedLine The line number in generated file + * @param integer $generatedColumn The column number in generated file + * @param integer $originalLine The line number in original file + * @param integer $originalColumn The column number in original file + * @param string $sourceFile The original source file + */ + public function addMapping($generatedLine, $generatedColumn, $originalLine, $originalColumn, $fileInfo ){ + + $this->mappings[] = array( + 'generated_line' => $generatedLine, + 'generated_column' => $generatedColumn, + 'original_line' => $originalLine, + 'original_column' => $originalColumn, + 'source_file' => $fileInfo['currentUri'] + ); + + $this->sources[$fileInfo['currentUri']] = $fileInfo['filename']; + } + + + /** + * Generates the JSON source map + * + * @return string + * @see https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit# + */ + protected function generateJson(){ + + $sourceMap = array(); + $mappings = $this->generateMappings(); + + // File version (always the first entry in the object) and must be a positive integer. + $sourceMap['version'] = self::VERSION; + + + // An optional name of the generated code that this source map is associated with. + $file = $this->getOption('sourceMapFilename'); + if( $file ){ + $sourceMap['file'] = $file; + } + + + // An optional source root, useful for relocating source files on a server or removing repeated values in the 'sources' entry. This value is prepended to the individual entries in the 'source' field. + $root = $this->getOption('sourceRoot'); + if( $root ){ + $sourceMap['sourceRoot'] = $root; + } + + + // A list of original sources used by the 'mappings' entry. + $sourceMap['sources'] = array(); + foreach($this->sources as $source_uri => $source_filename){ + $sourceMap['sources'][] = $this->normalizeFilename($source_filename); + } + + + // A list of symbol names used by the 'mappings' entry. + $sourceMap['names'] = array(); + + // A string with the encoded mapping data. + $sourceMap['mappings'] = $mappings; + + if( $this->getOption('outputSourceFiles') ){ + // An optional list of source content, useful when the 'source' can't be hosted. + // The contents are listed in the same order as the sources above. + // 'null' may be used if some original sources should be retrieved by name. + $sourceMap['sourcesContent'] = $this->getSourcesContent(); + } + + // less.js compat fixes + if( count($sourceMap['sources']) && empty($sourceMap['sourceRoot']) ){ + unset($sourceMap['sourceRoot']); + } + + return json_encode($sourceMap); + } + + /** + * Returns the sources contents + * + * @return array|null + */ + protected function getSourcesContent(){ + if(empty($this->sources)){ + return; + } + $content = array(); + foreach($this->sources as $sourceFile){ + $content[] = file_get_contents($sourceFile); + } + return $content; + } + + /** + * Generates the mappings string + * + * @return string + */ + public function generateMappings(){ + + if( !count($this->mappings) ){ + return ''; + } + + $this->source_keys = array_flip(array_keys($this->sources)); + + + // group mappings by generated line number. + $groupedMap = $groupedMapEncoded = array(); + foreach($this->mappings as $m){ + $groupedMap[$m['generated_line']][] = $m; + } + ksort($groupedMap); + + $lastGeneratedLine = $lastOriginalIndex = $lastOriginalLine = $lastOriginalColumn = 0; + + foreach($groupedMap as $lineNumber => $line_map){ + while(++$lastGeneratedLine < $lineNumber){ + $groupedMapEncoded[] = ';'; + } + + $lineMapEncoded = array(); + $lastGeneratedColumn = 0; + + foreach($line_map as $m){ + $mapEncoded = $this->encoder->encode($m['generated_column'] - $lastGeneratedColumn); + $lastGeneratedColumn = $m['generated_column']; + + // find the index + if( $m['source_file'] ){ + $index = $this->findFileIndex($m['source_file']); + if( $index !== false ){ + $mapEncoded .= $this->encoder->encode($index - $lastOriginalIndex); + $lastOriginalIndex = $index; + + // lines are stored 0-based in SourceMap spec version 3 + $mapEncoded .= $this->encoder->encode($m['original_line'] - 1 - $lastOriginalLine); + $lastOriginalLine = $m['original_line'] - 1; + + $mapEncoded .= $this->encoder->encode($m['original_column'] - $lastOriginalColumn); + $lastOriginalColumn = $m['original_column']; + } + } + + $lineMapEncoded[] = $mapEncoded; + } + + $groupedMapEncoded[] = implode(',', $lineMapEncoded) . ';'; + } + + return rtrim(implode($groupedMapEncoded), ';'); + } + + /** + * Finds the index for the filename + * + * @param string $filename + * @return integer|false + */ + protected function findFileIndex($filename){ + return $this->source_keys[$filename]; + } + + /** + * fix windows paths + * @param string $path + * @return string + */ + public function fixWindowsPath($path, $addEndSlash = false){ + $slash = ($addEndSlash) ? '/' : ''; + if( !empty($path) ){ + $path = str_replace('\\', '/', $path); + $path = rtrim($path,'/') . $slash; + } + + return $path; + } + } \ No newline at end of file diff --git a/core/vendor/phenx/php-font-lib/maps/cp1250.map b/core/vendor/phenx/php-font-lib/maps/cp1250.map index ec110af06..33a555eeb 100644 --- a/core/vendor/phenx/php-font-lib/maps/cp1250.map +++ b/core/vendor/phenx/php-font-lib/maps/cp1250.map @@ -1,251 +1,251 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+20AC Euro -!82 U+201A quotesinglbase -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!89 U+2030 perthousand -!8A U+0160 Scaron -!8B U+2039 guilsinglleft -!8C U+015A Sacute -!8D U+0164 Tcaron -!8E U+017D Zcaron -!8F U+0179 Zacute -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!99 U+2122 trademark -!9A U+0161 scaron -!9B U+203A guilsinglright -!9C U+015B sacute -!9D U+0165 tcaron -!9E U+017E zcaron -!9F U+017A zacute -!A0 U+00A0 space -!A1 U+02C7 caron -!A2 U+02D8 breve -!A3 U+0141 Lslash -!A4 U+00A4 currency -!A5 U+0104 Aogonek -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AA U+015E Scedilla -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+017B Zdotaccent -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+02DB ogonek -!B3 U+0142 lslash -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+00B8 cedilla -!B9 U+0105 aogonek -!BA U+015F scedilla -!BB U+00BB guillemotright -!BC U+013D Lcaron -!BD U+02DD hungarumlaut -!BE U+013E lcaron -!BF U+017C zdotaccent -!C0 U+0154 Racute -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+0102 Abreve -!C4 U+00C4 Adieresis -!C5 U+0139 Lacute -!C6 U+0106 Cacute -!C7 U+00C7 Ccedilla -!C8 U+010C Ccaron -!C9 U+00C9 Eacute -!CA U+0118 Eogonek -!CB U+00CB Edieresis -!CC U+011A Ecaron -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+010E Dcaron -!D0 U+0110 Dcroat -!D1 U+0143 Nacute -!D2 U+0147 Ncaron -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+0150 Ohungarumlaut -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+0158 Rcaron -!D9 U+016E Uring -!DA U+00DA Uacute -!DB U+0170 Uhungarumlaut -!DC U+00DC Udieresis -!DD U+00DD Yacute -!DE U+0162 Tcommaaccent -!DF U+00DF germandbls -!E0 U+0155 racute -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+0103 abreve -!E4 U+00E4 adieresis -!E5 U+013A lacute -!E6 U+0107 cacute -!E7 U+00E7 ccedilla -!E8 U+010D ccaron -!E9 U+00E9 eacute -!EA U+0119 eogonek -!EB U+00EB edieresis -!EC U+011B ecaron -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+010F dcaron -!F0 U+0111 dcroat -!F1 U+0144 nacute -!F2 U+0148 ncaron -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+0151 ohungarumlaut -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+0159 rcaron -!F9 U+016F uring -!FA U+00FA uacute -!FB U+0171 uhungarumlaut -!FC U+00FC udieresis -!FD U+00FD yacute -!FE U+0163 tcommaaccent -!FF U+02D9 dotaccent +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!89 U+2030 perthousand +!8A U+0160 Scaron +!8B U+2039 guilsinglleft +!8C U+015A Sacute +!8D U+0164 Tcaron +!8E U+017D Zcaron +!8F U+0179 Zacute +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9A U+0161 scaron +!9B U+203A guilsinglright +!9C U+015B sacute +!9D U+0165 tcaron +!9E U+017E zcaron +!9F U+017A zacute +!A0 U+00A0 space +!A1 U+02C7 caron +!A2 U+02D8 breve +!A3 U+0141 Lslash +!A4 U+00A4 currency +!A5 U+0104 Aogonek +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+015E Scedilla +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+017B Zdotaccent +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+02DB ogonek +!B3 U+0142 lslash +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+0105 aogonek +!BA U+015F scedilla +!BB U+00BB guillemotright +!BC U+013D Lcaron +!BD U+02DD hungarumlaut +!BE U+013E lcaron +!BF U+017C zdotaccent +!C0 U+0154 Racute +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+0139 Lacute +!C6 U+0106 Cacute +!C7 U+00C7 Ccedilla +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0118 Eogonek +!CB U+00CB Edieresis +!CC U+011A Ecaron +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+010E Dcaron +!D0 U+0110 Dcroat +!D1 U+0143 Nacute +!D2 U+0147 Ncaron +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+0150 Ohungarumlaut +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+0158 Rcaron +!D9 U+016E Uring +!DA U+00DA Uacute +!DB U+0170 Uhungarumlaut +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+0162 Tcommaaccent +!DF U+00DF germandbls +!E0 U+0155 racute +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+013A lacute +!E6 U+0107 cacute +!E7 U+00E7 ccedilla +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+0119 eogonek +!EB U+00EB edieresis +!EC U+011B ecaron +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+010F dcaron +!F0 U+0111 dcroat +!F1 U+0144 nacute +!F2 U+0148 ncaron +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+0151 ohungarumlaut +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+0159 rcaron +!F9 U+016F uring +!FA U+00FA uacute +!FB U+0171 uhungarumlaut +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+0163 tcommaaccent +!FF U+02D9 dotaccent diff --git a/core/vendor/phenx/php-font-lib/maps/cp1251.map b/core/vendor/phenx/php-font-lib/maps/cp1251.map index de6a198d9..b5960fe4c 100644 --- a/core/vendor/phenx/php-font-lib/maps/cp1251.map +++ b/core/vendor/phenx/php-font-lib/maps/cp1251.map @@ -1,255 +1,255 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0402 afii10051 -!81 U+0403 afii10052 -!82 U+201A quotesinglbase -!83 U+0453 afii10100 -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!88 U+20AC Euro -!89 U+2030 perthousand -!8A U+0409 afii10058 -!8B U+2039 guilsinglleft -!8C U+040A afii10059 -!8D U+040C afii10061 -!8E U+040B afii10060 -!8F U+040F afii10145 -!90 U+0452 afii10099 -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!99 U+2122 trademark -!9A U+0459 afii10106 -!9B U+203A guilsinglright -!9C U+045A afii10107 -!9D U+045C afii10109 -!9E U+045B afii10108 -!9F U+045F afii10193 -!A0 U+00A0 space -!A1 U+040E afii10062 -!A2 U+045E afii10110 -!A3 U+0408 afii10057 -!A4 U+00A4 currency -!A5 U+0490 afii10050 -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+0401 afii10023 -!A9 U+00A9 copyright -!AA U+0404 afii10053 -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+0407 afii10056 -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+0406 afii10055 -!B3 U+0456 afii10103 -!B4 U+0491 afii10098 -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+0451 afii10071 -!B9 U+2116 afii61352 -!BA U+0454 afii10101 -!BB U+00BB guillemotright -!BC U+0458 afii10105 -!BD U+0405 afii10054 -!BE U+0455 afii10102 -!BF U+0457 afii10104 -!C0 U+0410 afii10017 -!C1 U+0411 afii10018 -!C2 U+0412 afii10019 -!C3 U+0413 afii10020 -!C4 U+0414 afii10021 -!C5 U+0415 afii10022 -!C6 U+0416 afii10024 -!C7 U+0417 afii10025 -!C8 U+0418 afii10026 -!C9 U+0419 afii10027 -!CA U+041A afii10028 -!CB U+041B afii10029 -!CC U+041C afii10030 -!CD U+041D afii10031 -!CE U+041E afii10032 -!CF U+041F afii10033 -!D0 U+0420 afii10034 -!D1 U+0421 afii10035 -!D2 U+0422 afii10036 -!D3 U+0423 afii10037 -!D4 U+0424 afii10038 -!D5 U+0425 afii10039 -!D6 U+0426 afii10040 -!D7 U+0427 afii10041 -!D8 U+0428 afii10042 -!D9 U+0429 afii10043 -!DA U+042A afii10044 -!DB U+042B afii10045 -!DC U+042C afii10046 -!DD U+042D afii10047 -!DE U+042E afii10048 -!DF U+042F afii10049 -!E0 U+0430 afii10065 -!E1 U+0431 afii10066 -!E2 U+0432 afii10067 -!E3 U+0433 afii10068 -!E4 U+0434 afii10069 -!E5 U+0435 afii10070 -!E6 U+0436 afii10072 -!E7 U+0437 afii10073 -!E8 U+0438 afii10074 -!E9 U+0439 afii10075 -!EA U+043A afii10076 -!EB U+043B afii10077 -!EC U+043C afii10078 -!ED U+043D afii10079 -!EE U+043E afii10080 -!EF U+043F afii10081 -!F0 U+0440 afii10082 -!F1 U+0441 afii10083 -!F2 U+0442 afii10084 -!F3 U+0443 afii10085 -!F4 U+0444 afii10086 -!F5 U+0445 afii10087 -!F6 U+0446 afii10088 -!F7 U+0447 afii10089 -!F8 U+0448 afii10090 -!F9 U+0449 afii10091 -!FA U+044A afii10092 -!FB U+044B afii10093 -!FC U+044C afii10094 -!FD U+044D afii10095 -!FE U+044E afii10096 -!FF U+044F afii10097 +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0402 afii10051 +!81 U+0403 afii10052 +!82 U+201A quotesinglbase +!83 U+0453 afii10100 +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+20AC Euro +!89 U+2030 perthousand +!8A U+0409 afii10058 +!8B U+2039 guilsinglleft +!8C U+040A afii10059 +!8D U+040C afii10061 +!8E U+040B afii10060 +!8F U+040F afii10145 +!90 U+0452 afii10099 +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9A U+0459 afii10106 +!9B U+203A guilsinglright +!9C U+045A afii10107 +!9D U+045C afii10109 +!9E U+045B afii10108 +!9F U+045F afii10193 +!A0 U+00A0 space +!A1 U+040E afii10062 +!A2 U+045E afii10110 +!A3 U+0408 afii10057 +!A4 U+00A4 currency +!A5 U+0490 afii10050 +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+0401 afii10023 +!A9 U+00A9 copyright +!AA U+0404 afii10053 +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+0407 afii10056 +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+0406 afii10055 +!B3 U+0456 afii10103 +!B4 U+0491 afii10098 +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+0451 afii10071 +!B9 U+2116 afii61352 +!BA U+0454 afii10101 +!BB U+00BB guillemotright +!BC U+0458 afii10105 +!BD U+0405 afii10054 +!BE U+0455 afii10102 +!BF U+0457 afii10104 +!C0 U+0410 afii10017 +!C1 U+0411 afii10018 +!C2 U+0412 afii10019 +!C3 U+0413 afii10020 +!C4 U+0414 afii10021 +!C5 U+0415 afii10022 +!C6 U+0416 afii10024 +!C7 U+0417 afii10025 +!C8 U+0418 afii10026 +!C9 U+0419 afii10027 +!CA U+041A afii10028 +!CB U+041B afii10029 +!CC U+041C afii10030 +!CD U+041D afii10031 +!CE U+041E afii10032 +!CF U+041F afii10033 +!D0 U+0420 afii10034 +!D1 U+0421 afii10035 +!D2 U+0422 afii10036 +!D3 U+0423 afii10037 +!D4 U+0424 afii10038 +!D5 U+0425 afii10039 +!D6 U+0426 afii10040 +!D7 U+0427 afii10041 +!D8 U+0428 afii10042 +!D9 U+0429 afii10043 +!DA U+042A afii10044 +!DB U+042B afii10045 +!DC U+042C afii10046 +!DD U+042D afii10047 +!DE U+042E afii10048 +!DF U+042F afii10049 +!E0 U+0430 afii10065 +!E1 U+0431 afii10066 +!E2 U+0432 afii10067 +!E3 U+0433 afii10068 +!E4 U+0434 afii10069 +!E5 U+0435 afii10070 +!E6 U+0436 afii10072 +!E7 U+0437 afii10073 +!E8 U+0438 afii10074 +!E9 U+0439 afii10075 +!EA U+043A afii10076 +!EB U+043B afii10077 +!EC U+043C afii10078 +!ED U+043D afii10079 +!EE U+043E afii10080 +!EF U+043F afii10081 +!F0 U+0440 afii10082 +!F1 U+0441 afii10083 +!F2 U+0442 afii10084 +!F3 U+0443 afii10085 +!F4 U+0444 afii10086 +!F5 U+0445 afii10087 +!F6 U+0446 afii10088 +!F7 U+0447 afii10089 +!F8 U+0448 afii10090 +!F9 U+0449 afii10091 +!FA U+044A afii10092 +!FB U+044B afii10093 +!FC U+044C afii10094 +!FD U+044D afii10095 +!FE U+044E afii10096 +!FF U+044F afii10097 diff --git a/core/vendor/phenx/php-font-lib/maps/cp1252.map b/core/vendor/phenx/php-font-lib/maps/cp1252.map index dd490e596..b79015c31 100644 --- a/core/vendor/phenx/php-font-lib/maps/cp1252.map +++ b/core/vendor/phenx/php-font-lib/maps/cp1252.map @@ -1,251 +1,251 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+20AC Euro -!82 U+201A quotesinglbase -!83 U+0192 florin -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!88 U+02C6 circumflex -!89 U+2030 perthousand -!8A U+0160 Scaron -!8B U+2039 guilsinglleft -!8C U+0152 OE -!8E U+017D Zcaron -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!98 U+02DC tilde -!99 U+2122 trademark -!9A U+0161 scaron -!9B U+203A guilsinglright -!9C U+0153 oe -!9E U+017E zcaron -!9F U+0178 Ydieresis -!A0 U+00A0 space -!A1 U+00A1 exclamdown -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+00A4 currency -!A5 U+00A5 yen -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AA U+00AA ordfeminine -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+00B8 cedilla -!B9 U+00B9 onesuperior -!BA U+00BA ordmasculine -!BB U+00BB guillemotright -!BC U+00BC onequarter -!BD U+00BD onehalf -!BE U+00BE threequarters -!BF U+00BF questiondown -!C0 U+00C0 Agrave -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+00C3 Atilde -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+00C7 Ccedilla -!C8 U+00C8 Egrave -!C9 U+00C9 Eacute -!CA U+00CA Ecircumflex -!CB U+00CB Edieresis -!CC U+00CC Igrave -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+00CF Idieresis -!D0 U+00D0 Eth -!D1 U+00D1 Ntilde -!D2 U+00D2 Ograve -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+00D9 Ugrave -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+00DD Yacute -!DE U+00DE Thorn -!DF U+00DF germandbls -!E0 U+00E0 agrave -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+00E3 atilde -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+00E7 ccedilla -!E8 U+00E8 egrave -!E9 U+00E9 eacute -!EA U+00EA ecircumflex -!EB U+00EB edieresis -!EC U+00EC igrave -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+00EF idieresis -!F0 U+00F0 eth -!F1 U+00F1 ntilde -!F2 U+00F2 ograve -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+00F9 ugrave -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+00FD yacute -!FE U+00FE thorn -!FF U+00FF ydieresis +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8A U+0160 Scaron +!8B U+2039 guilsinglleft +!8C U+0152 OE +!8E U+017D Zcaron +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9A U+0161 scaron +!9B U+203A guilsinglright +!9C U+0153 oe +!9E U+017E zcaron +!9F U+0178 Ydieresis +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+00D0 Eth +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+00DE Thorn +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+00F0 eth +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+00FE thorn +!FF U+00FF ydieresis diff --git a/core/vendor/phenx/php-font-lib/maps/cp1253.map b/core/vendor/phenx/php-font-lib/maps/cp1253.map index 4bd826fb2..b5d843c1b 100644 --- a/core/vendor/phenx/php-font-lib/maps/cp1253.map +++ b/core/vendor/phenx/php-font-lib/maps/cp1253.map @@ -1,239 +1,239 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+20AC Euro -!82 U+201A quotesinglbase -!83 U+0192 florin -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!89 U+2030 perthousand -!8B U+2039 guilsinglleft -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!99 U+2122 trademark -!9B U+203A guilsinglright -!A0 U+00A0 space -!A1 U+0385 dieresistonos -!A2 U+0386 Alphatonos -!A3 U+00A3 sterling -!A4 U+00A4 currency -!A5 U+00A5 yen -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+2015 afii00208 -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+0384 tonos -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+0388 Epsilontonos -!B9 U+0389 Etatonos -!BA U+038A Iotatonos -!BB U+00BB guillemotright -!BC U+038C Omicrontonos -!BD U+00BD onehalf -!BE U+038E Upsilontonos -!BF U+038F Omegatonos -!C0 U+0390 iotadieresistonos -!C1 U+0391 Alpha -!C2 U+0392 Beta -!C3 U+0393 Gamma -!C4 U+0394 Delta -!C5 U+0395 Epsilon -!C6 U+0396 Zeta -!C7 U+0397 Eta -!C8 U+0398 Theta -!C9 U+0399 Iota -!CA U+039A Kappa -!CB U+039B Lambda -!CC U+039C Mu -!CD U+039D Nu -!CE U+039E Xi -!CF U+039F Omicron -!D0 U+03A0 Pi -!D1 U+03A1 Rho -!D3 U+03A3 Sigma -!D4 U+03A4 Tau -!D5 U+03A5 Upsilon -!D6 U+03A6 Phi -!D7 U+03A7 Chi -!D8 U+03A8 Psi -!D9 U+03A9 Omega -!DA U+03AA Iotadieresis -!DB U+03AB Upsilondieresis -!DC U+03AC alphatonos -!DD U+03AD epsilontonos -!DE U+03AE etatonos -!DF U+03AF iotatonos -!E0 U+03B0 upsilondieresistonos -!E1 U+03B1 alpha -!E2 U+03B2 beta -!E3 U+03B3 gamma -!E4 U+03B4 delta -!E5 U+03B5 epsilon -!E6 U+03B6 zeta -!E7 U+03B7 eta -!E8 U+03B8 theta -!E9 U+03B9 iota -!EA U+03BA kappa -!EB U+03BB lambda -!EC U+03BC mu -!ED U+03BD nu -!EE U+03BE xi -!EF U+03BF omicron -!F0 U+03C0 pi -!F1 U+03C1 rho -!F2 U+03C2 sigma1 -!F3 U+03C3 sigma -!F4 U+03C4 tau -!F5 U+03C5 upsilon -!F6 U+03C6 phi -!F7 U+03C7 chi -!F8 U+03C8 psi -!F9 U+03C9 omega -!FA U+03CA iotadieresis -!FB U+03CB upsilondieresis -!FC U+03CC omicrontonos -!FD U+03CD upsilontonos -!FE U+03CE omegatonos +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9B U+203A guilsinglright +!A0 U+00A0 space +!A1 U+0385 dieresistonos +!A2 U+0386 Alphatonos +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+2015 afii00208 +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+0384 tonos +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+0388 Epsilontonos +!B9 U+0389 Etatonos +!BA U+038A Iotatonos +!BB U+00BB guillemotright +!BC U+038C Omicrontonos +!BD U+00BD onehalf +!BE U+038E Upsilontonos +!BF U+038F Omegatonos +!C0 U+0390 iotadieresistonos +!C1 U+0391 Alpha +!C2 U+0392 Beta +!C3 U+0393 Gamma +!C4 U+0394 Delta +!C5 U+0395 Epsilon +!C6 U+0396 Zeta +!C7 U+0397 Eta +!C8 U+0398 Theta +!C9 U+0399 Iota +!CA U+039A Kappa +!CB U+039B Lambda +!CC U+039C Mu +!CD U+039D Nu +!CE U+039E Xi +!CF U+039F Omicron +!D0 U+03A0 Pi +!D1 U+03A1 Rho +!D3 U+03A3 Sigma +!D4 U+03A4 Tau +!D5 U+03A5 Upsilon +!D6 U+03A6 Phi +!D7 U+03A7 Chi +!D8 U+03A8 Psi +!D9 U+03A9 Omega +!DA U+03AA Iotadieresis +!DB U+03AB Upsilondieresis +!DC U+03AC alphatonos +!DD U+03AD epsilontonos +!DE U+03AE etatonos +!DF U+03AF iotatonos +!E0 U+03B0 upsilondieresistonos +!E1 U+03B1 alpha +!E2 U+03B2 beta +!E3 U+03B3 gamma +!E4 U+03B4 delta +!E5 U+03B5 epsilon +!E6 U+03B6 zeta +!E7 U+03B7 eta +!E8 U+03B8 theta +!E9 U+03B9 iota +!EA U+03BA kappa +!EB U+03BB lambda +!EC U+03BC mu +!ED U+03BD nu +!EE U+03BE xi +!EF U+03BF omicron +!F0 U+03C0 pi +!F1 U+03C1 rho +!F2 U+03C2 sigma1 +!F3 U+03C3 sigma +!F4 U+03C4 tau +!F5 U+03C5 upsilon +!F6 U+03C6 phi +!F7 U+03C7 chi +!F8 U+03C8 psi +!F9 U+03C9 omega +!FA U+03CA iotadieresis +!FB U+03CB upsilondieresis +!FC U+03CC omicrontonos +!FD U+03CD upsilontonos +!FE U+03CE omegatonos diff --git a/core/vendor/phenx/php-font-lib/maps/cp1254.map b/core/vendor/phenx/php-font-lib/maps/cp1254.map index 829473b28..3cc8c7894 100644 --- a/core/vendor/phenx/php-font-lib/maps/cp1254.map +++ b/core/vendor/phenx/php-font-lib/maps/cp1254.map @@ -1,249 +1,249 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+20AC Euro -!82 U+201A quotesinglbase -!83 U+0192 florin -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!88 U+02C6 circumflex -!89 U+2030 perthousand -!8A U+0160 Scaron -!8B U+2039 guilsinglleft -!8C U+0152 OE -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!98 U+02DC tilde -!99 U+2122 trademark -!9A U+0161 scaron -!9B U+203A guilsinglright -!9C U+0153 oe -!9F U+0178 Ydieresis -!A0 U+00A0 space -!A1 U+00A1 exclamdown -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+00A4 currency -!A5 U+00A5 yen -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AA U+00AA ordfeminine -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+00B8 cedilla -!B9 U+00B9 onesuperior -!BA U+00BA ordmasculine -!BB U+00BB guillemotright -!BC U+00BC onequarter -!BD U+00BD onehalf -!BE U+00BE threequarters -!BF U+00BF questiondown -!C0 U+00C0 Agrave -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+00C3 Atilde -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+00C7 Ccedilla -!C8 U+00C8 Egrave -!C9 U+00C9 Eacute -!CA U+00CA Ecircumflex -!CB U+00CB Edieresis -!CC U+00CC Igrave -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+00CF Idieresis -!D0 U+011E Gbreve -!D1 U+00D1 Ntilde -!D2 U+00D2 Ograve -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+00D9 Ugrave -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+0130 Idotaccent -!DE U+015E Scedilla -!DF U+00DF germandbls -!E0 U+00E0 agrave -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+00E3 atilde -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+00E7 ccedilla -!E8 U+00E8 egrave -!E9 U+00E9 eacute -!EA U+00EA ecircumflex -!EB U+00EB edieresis -!EC U+00EC igrave -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+00EF idieresis -!F0 U+011F gbreve -!F1 U+00F1 ntilde -!F2 U+00F2 ograve -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+00F9 ugrave -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+0131 dotlessi -!FE U+015F scedilla -!FF U+00FF ydieresis +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8A U+0160 Scaron +!8B U+2039 guilsinglleft +!8C U+0152 OE +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9A U+0161 scaron +!9B U+203A guilsinglright +!9C U+0153 oe +!9F U+0178 Ydieresis +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+011E Gbreve +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0130 Idotaccent +!DE U+015E Scedilla +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+011F gbreve +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0131 dotlessi +!FE U+015F scedilla +!FF U+00FF ydieresis diff --git a/core/vendor/phenx/php-font-lib/maps/cp1255.map b/core/vendor/phenx/php-font-lib/maps/cp1255.map index 079e10c61..fa135306d 100644 --- a/core/vendor/phenx/php-font-lib/maps/cp1255.map +++ b/core/vendor/phenx/php-font-lib/maps/cp1255.map @@ -1,233 +1,233 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+20AC Euro -!82 U+201A quotesinglbase -!83 U+0192 florin -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!88 U+02C6 circumflex -!89 U+2030 perthousand -!8B U+2039 guilsinglleft -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!98 U+02DC tilde -!99 U+2122 trademark -!9B U+203A guilsinglright -!A0 U+00A0 space -!A1 U+00A1 exclamdown -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+20AA afii57636 -!A5 U+00A5 yen -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AA U+00D7 multiply -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD sfthyphen -!AE U+00AE registered -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 middot -!B8 U+00B8 cedilla -!B9 U+00B9 onesuperior -!BA U+00F7 divide -!BB U+00BB guillemotright -!BC U+00BC onequarter -!BD U+00BD onehalf -!BE U+00BE threequarters -!BF U+00BF questiondown -!C0 U+05B0 afii57799 -!C1 U+05B1 afii57801 -!C2 U+05B2 afii57800 -!C3 U+05B3 afii57802 -!C4 U+05B4 afii57793 -!C5 U+05B5 afii57794 -!C6 U+05B6 afii57795 -!C7 U+05B7 afii57798 -!C8 U+05B8 afii57797 -!C9 U+05B9 afii57806 -!CB U+05BB afii57796 -!CC U+05BC afii57807 -!CD U+05BD afii57839 -!CE U+05BE afii57645 -!CF U+05BF afii57841 -!D0 U+05C0 afii57842 -!D1 U+05C1 afii57804 -!D2 U+05C2 afii57803 -!D3 U+05C3 afii57658 -!D4 U+05F0 afii57716 -!D5 U+05F1 afii57717 -!D6 U+05F2 afii57718 -!D7 U+05F3 gereshhebrew -!D8 U+05F4 gershayimhebrew -!E0 U+05D0 afii57664 -!E1 U+05D1 afii57665 -!E2 U+05D2 afii57666 -!E3 U+05D3 afii57667 -!E4 U+05D4 afii57668 -!E5 U+05D5 afii57669 -!E6 U+05D6 afii57670 -!E7 U+05D7 afii57671 -!E8 U+05D8 afii57672 -!E9 U+05D9 afii57673 -!EA U+05DA afii57674 -!EB U+05DB afii57675 -!EC U+05DC afii57676 -!ED U+05DD afii57677 -!EE U+05DE afii57678 -!EF U+05DF afii57679 -!F0 U+05E0 afii57680 -!F1 U+05E1 afii57681 -!F2 U+05E2 afii57682 -!F3 U+05E3 afii57683 -!F4 U+05E4 afii57684 -!F5 U+05E5 afii57685 -!F6 U+05E6 afii57686 -!F7 U+05E7 afii57687 -!F8 U+05E8 afii57688 -!F9 U+05E9 afii57689 -!FA U+05EA afii57690 -!FD U+200E afii299 -!FE U+200F afii300 +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9B U+203A guilsinglright +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+20AA afii57636 +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00D7 multiply +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD sfthyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 middot +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00F7 divide +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+05B0 afii57799 +!C1 U+05B1 afii57801 +!C2 U+05B2 afii57800 +!C3 U+05B3 afii57802 +!C4 U+05B4 afii57793 +!C5 U+05B5 afii57794 +!C6 U+05B6 afii57795 +!C7 U+05B7 afii57798 +!C8 U+05B8 afii57797 +!C9 U+05B9 afii57806 +!CB U+05BB afii57796 +!CC U+05BC afii57807 +!CD U+05BD afii57839 +!CE U+05BE afii57645 +!CF U+05BF afii57841 +!D0 U+05C0 afii57842 +!D1 U+05C1 afii57804 +!D2 U+05C2 afii57803 +!D3 U+05C3 afii57658 +!D4 U+05F0 afii57716 +!D5 U+05F1 afii57717 +!D6 U+05F2 afii57718 +!D7 U+05F3 gereshhebrew +!D8 U+05F4 gershayimhebrew +!E0 U+05D0 afii57664 +!E1 U+05D1 afii57665 +!E2 U+05D2 afii57666 +!E3 U+05D3 afii57667 +!E4 U+05D4 afii57668 +!E5 U+05D5 afii57669 +!E6 U+05D6 afii57670 +!E7 U+05D7 afii57671 +!E8 U+05D8 afii57672 +!E9 U+05D9 afii57673 +!EA U+05DA afii57674 +!EB U+05DB afii57675 +!EC U+05DC afii57676 +!ED U+05DD afii57677 +!EE U+05DE afii57678 +!EF U+05DF afii57679 +!F0 U+05E0 afii57680 +!F1 U+05E1 afii57681 +!F2 U+05E2 afii57682 +!F3 U+05E3 afii57683 +!F4 U+05E4 afii57684 +!F5 U+05E5 afii57685 +!F6 U+05E6 afii57686 +!F7 U+05E7 afii57687 +!F8 U+05E8 afii57688 +!F9 U+05E9 afii57689 +!FA U+05EA afii57690 +!FD U+200E afii299 +!FE U+200F afii300 diff --git a/core/vendor/phenx/php-font-lib/maps/cp1257.map b/core/vendor/phenx/php-font-lib/maps/cp1257.map index 2f2ecfa21..077fdc34a 100644 --- a/core/vendor/phenx/php-font-lib/maps/cp1257.map +++ b/core/vendor/phenx/php-font-lib/maps/cp1257.map @@ -1,244 +1,244 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+20AC Euro -!82 U+201A quotesinglbase -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!89 U+2030 perthousand -!8B U+2039 guilsinglleft -!8D U+00A8 dieresis -!8E U+02C7 caron -!8F U+00B8 cedilla -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!99 U+2122 trademark -!9B U+203A guilsinglright -!9D U+00AF macron -!9E U+02DB ogonek -!A0 U+00A0 space -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+00A4 currency -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00D8 Oslash -!A9 U+00A9 copyright -!AA U+0156 Rcommaaccent -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+00C6 AE -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+00F8 oslash -!B9 U+00B9 onesuperior -!BA U+0157 rcommaaccent -!BB U+00BB guillemotright -!BC U+00BC onequarter -!BD U+00BD onehalf -!BE U+00BE threequarters -!BF U+00E6 ae -!C0 U+0104 Aogonek -!C1 U+012E Iogonek -!C2 U+0100 Amacron -!C3 U+0106 Cacute -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+0118 Eogonek -!C7 U+0112 Emacron -!C8 U+010C Ccaron -!C9 U+00C9 Eacute -!CA U+0179 Zacute -!CB U+0116 Edotaccent -!CC U+0122 Gcommaaccent -!CD U+0136 Kcommaaccent -!CE U+012A Imacron -!CF U+013B Lcommaaccent -!D0 U+0160 Scaron -!D1 U+0143 Nacute -!D2 U+0145 Ncommaaccent -!D3 U+00D3 Oacute -!D4 U+014C Omacron -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+0172 Uogonek -!D9 U+0141 Lslash -!DA U+015A Sacute -!DB U+016A Umacron -!DC U+00DC Udieresis -!DD U+017B Zdotaccent -!DE U+017D Zcaron -!DF U+00DF germandbls -!E0 U+0105 aogonek -!E1 U+012F iogonek -!E2 U+0101 amacron -!E3 U+0107 cacute -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+0119 eogonek -!E7 U+0113 emacron -!E8 U+010D ccaron -!E9 U+00E9 eacute -!EA U+017A zacute -!EB U+0117 edotaccent -!EC U+0123 gcommaaccent -!ED U+0137 kcommaaccent -!EE U+012B imacron -!EF U+013C lcommaaccent -!F0 U+0161 scaron -!F1 U+0144 nacute -!F2 U+0146 ncommaaccent -!F3 U+00F3 oacute -!F4 U+014D omacron -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+0173 uogonek -!F9 U+0142 lslash -!FA U+015B sacute -!FB U+016B umacron -!FC U+00FC udieresis -!FD U+017C zdotaccent -!FE U+017E zcaron -!FF U+02D9 dotaccent +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!8D U+00A8 dieresis +!8E U+02C7 caron +!8F U+00B8 cedilla +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!99 U+2122 trademark +!9B U+203A guilsinglright +!9D U+00AF macron +!9E U+02DB ogonek +!A0 U+00A0 space +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00D8 Oslash +!A9 U+00A9 copyright +!AA U+0156 Rcommaaccent +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00C6 AE +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00F8 oslash +!B9 U+00B9 onesuperior +!BA U+0157 rcommaaccent +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00E6 ae +!C0 U+0104 Aogonek +!C1 U+012E Iogonek +!C2 U+0100 Amacron +!C3 U+0106 Cacute +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+0118 Eogonek +!C7 U+0112 Emacron +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0179 Zacute +!CB U+0116 Edotaccent +!CC U+0122 Gcommaaccent +!CD U+0136 Kcommaaccent +!CE U+012A Imacron +!CF U+013B Lcommaaccent +!D0 U+0160 Scaron +!D1 U+0143 Nacute +!D2 U+0145 Ncommaaccent +!D3 U+00D3 Oacute +!D4 U+014C Omacron +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+0172 Uogonek +!D9 U+0141 Lslash +!DA U+015A Sacute +!DB U+016A Umacron +!DC U+00DC Udieresis +!DD U+017B Zdotaccent +!DE U+017D Zcaron +!DF U+00DF germandbls +!E0 U+0105 aogonek +!E1 U+012F iogonek +!E2 U+0101 amacron +!E3 U+0107 cacute +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+0119 eogonek +!E7 U+0113 emacron +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+017A zacute +!EB U+0117 edotaccent +!EC U+0123 gcommaaccent +!ED U+0137 kcommaaccent +!EE U+012B imacron +!EF U+013C lcommaaccent +!F0 U+0161 scaron +!F1 U+0144 nacute +!F2 U+0146 ncommaaccent +!F3 U+00F3 oacute +!F4 U+014D omacron +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+0173 uogonek +!F9 U+0142 lslash +!FA U+015B sacute +!FB U+016B umacron +!FC U+00FC udieresis +!FD U+017C zdotaccent +!FE U+017E zcaron +!FF U+02D9 dotaccent diff --git a/core/vendor/phenx/php-font-lib/maps/cp1258.map b/core/vendor/phenx/php-font-lib/maps/cp1258.map index fed915f71..7032c35d6 100644 --- a/core/vendor/phenx/php-font-lib/maps/cp1258.map +++ b/core/vendor/phenx/php-font-lib/maps/cp1258.map @@ -1,247 +1,247 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+20AC Euro -!82 U+201A quotesinglbase -!83 U+0192 florin -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!88 U+02C6 circumflex -!89 U+2030 perthousand -!8B U+2039 guilsinglleft -!8C U+0152 OE -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!98 U+02DC tilde -!99 U+2122 trademark -!9B U+203A guilsinglright -!9C U+0153 oe -!9F U+0178 Ydieresis -!A0 U+00A0 space -!A1 U+00A1 exclamdown -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+00A4 currency -!A5 U+00A5 yen -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AA U+00AA ordfeminine -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+00B8 cedilla -!B9 U+00B9 onesuperior -!BA U+00BA ordmasculine -!BB U+00BB guillemotright -!BC U+00BC onequarter -!BD U+00BD onehalf -!BE U+00BE threequarters -!BF U+00BF questiondown -!C0 U+00C0 Agrave -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+0102 Abreve -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+00C7 Ccedilla -!C8 U+00C8 Egrave -!C9 U+00C9 Eacute -!CA U+00CA Ecircumflex -!CB U+00CB Edieresis -!CC U+0300 gravecomb -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+00CF Idieresis -!D0 U+0110 Dcroat -!D1 U+00D1 Ntilde -!D2 U+0309 hookabovecomb -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+01A0 Ohorn -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+00D9 Ugrave -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+01AF Uhorn -!DE U+0303 tildecomb -!DF U+00DF germandbls -!E0 U+00E0 agrave -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+0103 abreve -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+00E7 ccedilla -!E8 U+00E8 egrave -!E9 U+00E9 eacute -!EA U+00EA ecircumflex -!EB U+00EB edieresis -!EC U+0301 acutecomb -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+00EF idieresis -!F0 U+0111 dcroat -!F1 U+00F1 ntilde -!F2 U+0323 dotbelowcomb -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+01A1 ohorn -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+00F9 ugrave -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+01B0 uhorn -!FE U+20AB dong -!FF U+00FF ydieresis +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!82 U+201A quotesinglbase +!83 U+0192 florin +!84 U+201E quotedblbase +!85 U+2026 ellipsis +!86 U+2020 dagger +!87 U+2021 daggerdbl +!88 U+02C6 circumflex +!89 U+2030 perthousand +!8B U+2039 guilsinglleft +!8C U+0152 OE +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!98 U+02DC tilde +!99 U+2122 trademark +!9B U+203A guilsinglright +!9C U+0153 oe +!9F U+0178 Ydieresis +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+0300 gravecomb +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+0110 Dcroat +!D1 U+00D1 Ntilde +!D2 U+0309 hookabovecomb +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+01A0 Ohorn +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+01AF Uhorn +!DE U+0303 tildecomb +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+0301 acutecomb +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+0111 dcroat +!F1 U+00F1 ntilde +!F2 U+0323 dotbelowcomb +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+01A1 ohorn +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+01B0 uhorn +!FE U+20AB dong +!FF U+00FF ydieresis diff --git a/core/vendor/phenx/php-font-lib/maps/cp874.map b/core/vendor/phenx/php-font-lib/maps/cp874.map index 1006e6b17..16330d042 100644 --- a/core/vendor/phenx/php-font-lib/maps/cp874.map +++ b/core/vendor/phenx/php-font-lib/maps/cp874.map @@ -1,225 +1,225 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+20AC Euro -!85 U+2026 ellipsis -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!A0 U+00A0 space -!A1 U+0E01 kokaithai -!A2 U+0E02 khokhaithai -!A3 U+0E03 khokhuatthai -!A4 U+0E04 khokhwaithai -!A5 U+0E05 khokhonthai -!A6 U+0E06 khorakhangthai -!A7 U+0E07 ngonguthai -!A8 U+0E08 chochanthai -!A9 U+0E09 chochingthai -!AA U+0E0A chochangthai -!AB U+0E0B sosothai -!AC U+0E0C chochoethai -!AD U+0E0D yoyingthai -!AE U+0E0E dochadathai -!AF U+0E0F topatakthai -!B0 U+0E10 thothanthai -!B1 U+0E11 thonangmonthothai -!B2 U+0E12 thophuthaothai -!B3 U+0E13 nonenthai -!B4 U+0E14 dodekthai -!B5 U+0E15 totaothai -!B6 U+0E16 thothungthai -!B7 U+0E17 thothahanthai -!B8 U+0E18 thothongthai -!B9 U+0E19 nonuthai -!BA U+0E1A bobaimaithai -!BB U+0E1B poplathai -!BC U+0E1C phophungthai -!BD U+0E1D fofathai -!BE U+0E1E phophanthai -!BF U+0E1F fofanthai -!C0 U+0E20 phosamphaothai -!C1 U+0E21 momathai -!C2 U+0E22 yoyakthai -!C3 U+0E23 roruathai -!C4 U+0E24 ruthai -!C5 U+0E25 lolingthai -!C6 U+0E26 luthai -!C7 U+0E27 wowaenthai -!C8 U+0E28 sosalathai -!C9 U+0E29 sorusithai -!CA U+0E2A sosuathai -!CB U+0E2B hohipthai -!CC U+0E2C lochulathai -!CD U+0E2D oangthai -!CE U+0E2E honokhukthai -!CF U+0E2F paiyannoithai -!D0 U+0E30 saraathai -!D1 U+0E31 maihanakatthai -!D2 U+0E32 saraaathai -!D3 U+0E33 saraamthai -!D4 U+0E34 saraithai -!D5 U+0E35 saraiithai -!D6 U+0E36 sarauethai -!D7 U+0E37 saraueethai -!D8 U+0E38 sarauthai -!D9 U+0E39 sarauuthai -!DA U+0E3A phinthuthai -!DF U+0E3F bahtthai -!E0 U+0E40 saraethai -!E1 U+0E41 saraaethai -!E2 U+0E42 saraothai -!E3 U+0E43 saraaimaimuanthai -!E4 U+0E44 saraaimaimalaithai -!E5 U+0E45 lakkhangyaothai -!E6 U+0E46 maiyamokthai -!E7 U+0E47 maitaikhuthai -!E8 U+0E48 maiekthai -!E9 U+0E49 maithothai -!EA U+0E4A maitrithai -!EB U+0E4B maichattawathai -!EC U+0E4C thanthakhatthai -!ED U+0E4D nikhahitthai -!EE U+0E4E yamakkanthai -!EF U+0E4F fongmanthai -!F0 U+0E50 zerothai -!F1 U+0E51 onethai -!F2 U+0E52 twothai -!F3 U+0E53 threethai -!F4 U+0E54 fourthai -!F5 U+0E55 fivethai -!F6 U+0E56 sixthai -!F7 U+0E57 seventhai -!F8 U+0E58 eightthai -!F9 U+0E59 ninethai -!FA U+0E5A angkhankhuthai -!FB U+0E5B khomutthai +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+20AC Euro +!85 U+2026 ellipsis +!91 U+2018 quoteleft +!92 U+2019 quoteright +!93 U+201C quotedblleft +!94 U+201D quotedblright +!95 U+2022 bullet +!96 U+2013 endash +!97 U+2014 emdash +!A0 U+00A0 space +!A1 U+0E01 kokaithai +!A2 U+0E02 khokhaithai +!A3 U+0E03 khokhuatthai +!A4 U+0E04 khokhwaithai +!A5 U+0E05 khokhonthai +!A6 U+0E06 khorakhangthai +!A7 U+0E07 ngonguthai +!A8 U+0E08 chochanthai +!A9 U+0E09 chochingthai +!AA U+0E0A chochangthai +!AB U+0E0B sosothai +!AC U+0E0C chochoethai +!AD U+0E0D yoyingthai +!AE U+0E0E dochadathai +!AF U+0E0F topatakthai +!B0 U+0E10 thothanthai +!B1 U+0E11 thonangmonthothai +!B2 U+0E12 thophuthaothai +!B3 U+0E13 nonenthai +!B4 U+0E14 dodekthai +!B5 U+0E15 totaothai +!B6 U+0E16 thothungthai +!B7 U+0E17 thothahanthai +!B8 U+0E18 thothongthai +!B9 U+0E19 nonuthai +!BA U+0E1A bobaimaithai +!BB U+0E1B poplathai +!BC U+0E1C phophungthai +!BD U+0E1D fofathai +!BE U+0E1E phophanthai +!BF U+0E1F fofanthai +!C0 U+0E20 phosamphaothai +!C1 U+0E21 momathai +!C2 U+0E22 yoyakthai +!C3 U+0E23 roruathai +!C4 U+0E24 ruthai +!C5 U+0E25 lolingthai +!C6 U+0E26 luthai +!C7 U+0E27 wowaenthai +!C8 U+0E28 sosalathai +!C9 U+0E29 sorusithai +!CA U+0E2A sosuathai +!CB U+0E2B hohipthai +!CC U+0E2C lochulathai +!CD U+0E2D oangthai +!CE U+0E2E honokhukthai +!CF U+0E2F paiyannoithai +!D0 U+0E30 saraathai +!D1 U+0E31 maihanakatthai +!D2 U+0E32 saraaathai +!D3 U+0E33 saraamthai +!D4 U+0E34 saraithai +!D5 U+0E35 saraiithai +!D6 U+0E36 sarauethai +!D7 U+0E37 saraueethai +!D8 U+0E38 sarauthai +!D9 U+0E39 sarauuthai +!DA U+0E3A phinthuthai +!DF U+0E3F bahtthai +!E0 U+0E40 saraethai +!E1 U+0E41 saraaethai +!E2 U+0E42 saraothai +!E3 U+0E43 saraaimaimuanthai +!E4 U+0E44 saraaimaimalaithai +!E5 U+0E45 lakkhangyaothai +!E6 U+0E46 maiyamokthai +!E7 U+0E47 maitaikhuthai +!E8 U+0E48 maiekthai +!E9 U+0E49 maithothai +!EA U+0E4A maitrithai +!EB U+0E4B maichattawathai +!EC U+0E4C thanthakhatthai +!ED U+0E4D nikhahitthai +!EE U+0E4E yamakkanthai +!EF U+0E4F fongmanthai +!F0 U+0E50 zerothai +!F1 U+0E51 onethai +!F2 U+0E52 twothai +!F3 U+0E53 threethai +!F4 U+0E54 fourthai +!F5 U+0E55 fivethai +!F6 U+0E56 sixthai +!F7 U+0E57 seventhai +!F8 U+0E58 eightthai +!F9 U+0E59 ninethai +!FA U+0E5A angkhankhuthai +!FB U+0E5B khomutthai diff --git a/core/vendor/phenx/php-font-lib/maps/iso-8859-1.map b/core/vendor/phenx/php-font-lib/maps/iso-8859-1.map index 61740a38f..74fb2fe5c 100644 --- a/core/vendor/phenx/php-font-lib/maps/iso-8859-1.map +++ b/core/vendor/phenx/php-font-lib/maps/iso-8859-1.map @@ -1,256 +1,256 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+00A1 exclamdown -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+00A4 currency -!A5 U+00A5 yen -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AA U+00AA ordfeminine -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+00B8 cedilla -!B9 U+00B9 onesuperior -!BA U+00BA ordmasculine -!BB U+00BB guillemotright -!BC U+00BC onequarter -!BD U+00BD onehalf -!BE U+00BE threequarters -!BF U+00BF questiondown -!C0 U+00C0 Agrave -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+00C3 Atilde -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+00C7 Ccedilla -!C8 U+00C8 Egrave -!C9 U+00C9 Eacute -!CA U+00CA Ecircumflex -!CB U+00CB Edieresis -!CC U+00CC Igrave -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+00CF Idieresis -!D0 U+00D0 Eth -!D1 U+00D1 Ntilde -!D2 U+00D2 Ograve -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+00D9 Ugrave -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+00DD Yacute -!DE U+00DE Thorn -!DF U+00DF germandbls -!E0 U+00E0 agrave -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+00E3 atilde -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+00E7 ccedilla -!E8 U+00E8 egrave -!E9 U+00E9 eacute -!EA U+00EA ecircumflex -!EB U+00EB edieresis -!EC U+00EC igrave -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+00EF idieresis -!F0 U+00F0 eth -!F1 U+00F1 ntilde -!F2 U+00F2 ograve -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+00F9 ugrave -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+00FD yacute -!FE U+00FE thorn -!FF U+00FF ydieresis +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+00D0 Eth +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+00DE Thorn +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+00F0 eth +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+00FE thorn +!FF U+00FF ydieresis diff --git a/core/vendor/phenx/php-font-lib/maps/iso-8859-11.map b/core/vendor/phenx/php-font-lib/maps/iso-8859-11.map index 916881206..8cf66731a 100644 --- a/core/vendor/phenx/php-font-lib/maps/iso-8859-11.map +++ b/core/vendor/phenx/php-font-lib/maps/iso-8859-11.map @@ -1,248 +1,248 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+0E01 kokaithai -!A2 U+0E02 khokhaithai -!A3 U+0E03 khokhuatthai -!A4 U+0E04 khokhwaithai -!A5 U+0E05 khokhonthai -!A6 U+0E06 khorakhangthai -!A7 U+0E07 ngonguthai -!A8 U+0E08 chochanthai -!A9 U+0E09 chochingthai -!AA U+0E0A chochangthai -!AB U+0E0B sosothai -!AC U+0E0C chochoethai -!AD U+0E0D yoyingthai -!AE U+0E0E dochadathai -!AF U+0E0F topatakthai -!B0 U+0E10 thothanthai -!B1 U+0E11 thonangmonthothai -!B2 U+0E12 thophuthaothai -!B3 U+0E13 nonenthai -!B4 U+0E14 dodekthai -!B5 U+0E15 totaothai -!B6 U+0E16 thothungthai -!B7 U+0E17 thothahanthai -!B8 U+0E18 thothongthai -!B9 U+0E19 nonuthai -!BA U+0E1A bobaimaithai -!BB U+0E1B poplathai -!BC U+0E1C phophungthai -!BD U+0E1D fofathai -!BE U+0E1E phophanthai -!BF U+0E1F fofanthai -!C0 U+0E20 phosamphaothai -!C1 U+0E21 momathai -!C2 U+0E22 yoyakthai -!C3 U+0E23 roruathai -!C4 U+0E24 ruthai -!C5 U+0E25 lolingthai -!C6 U+0E26 luthai -!C7 U+0E27 wowaenthai -!C8 U+0E28 sosalathai -!C9 U+0E29 sorusithai -!CA U+0E2A sosuathai -!CB U+0E2B hohipthai -!CC U+0E2C lochulathai -!CD U+0E2D oangthai -!CE U+0E2E honokhukthai -!CF U+0E2F paiyannoithai -!D0 U+0E30 saraathai -!D1 U+0E31 maihanakatthai -!D2 U+0E32 saraaathai -!D3 U+0E33 saraamthai -!D4 U+0E34 saraithai -!D5 U+0E35 saraiithai -!D6 U+0E36 sarauethai -!D7 U+0E37 saraueethai -!D8 U+0E38 sarauthai -!D9 U+0E39 sarauuthai -!DA U+0E3A phinthuthai -!DF U+0E3F bahtthai -!E0 U+0E40 saraethai -!E1 U+0E41 saraaethai -!E2 U+0E42 saraothai -!E3 U+0E43 saraaimaimuanthai -!E4 U+0E44 saraaimaimalaithai -!E5 U+0E45 lakkhangyaothai -!E6 U+0E46 maiyamokthai -!E7 U+0E47 maitaikhuthai -!E8 U+0E48 maiekthai -!E9 U+0E49 maithothai -!EA U+0E4A maitrithai -!EB U+0E4B maichattawathai -!EC U+0E4C thanthakhatthai -!ED U+0E4D nikhahitthai -!EE U+0E4E yamakkanthai -!EF U+0E4F fongmanthai -!F0 U+0E50 zerothai -!F1 U+0E51 onethai -!F2 U+0E52 twothai -!F3 U+0E53 threethai -!F4 U+0E54 fourthai -!F5 U+0E55 fivethai -!F6 U+0E56 sixthai -!F7 U+0E57 seventhai -!F8 U+0E58 eightthai -!F9 U+0E59 ninethai -!FA U+0E5A angkhankhuthai -!FB U+0E5B khomutthai +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0E01 kokaithai +!A2 U+0E02 khokhaithai +!A3 U+0E03 khokhuatthai +!A4 U+0E04 khokhwaithai +!A5 U+0E05 khokhonthai +!A6 U+0E06 khorakhangthai +!A7 U+0E07 ngonguthai +!A8 U+0E08 chochanthai +!A9 U+0E09 chochingthai +!AA U+0E0A chochangthai +!AB U+0E0B sosothai +!AC U+0E0C chochoethai +!AD U+0E0D yoyingthai +!AE U+0E0E dochadathai +!AF U+0E0F topatakthai +!B0 U+0E10 thothanthai +!B1 U+0E11 thonangmonthothai +!B2 U+0E12 thophuthaothai +!B3 U+0E13 nonenthai +!B4 U+0E14 dodekthai +!B5 U+0E15 totaothai +!B6 U+0E16 thothungthai +!B7 U+0E17 thothahanthai +!B8 U+0E18 thothongthai +!B9 U+0E19 nonuthai +!BA U+0E1A bobaimaithai +!BB U+0E1B poplathai +!BC U+0E1C phophungthai +!BD U+0E1D fofathai +!BE U+0E1E phophanthai +!BF U+0E1F fofanthai +!C0 U+0E20 phosamphaothai +!C1 U+0E21 momathai +!C2 U+0E22 yoyakthai +!C3 U+0E23 roruathai +!C4 U+0E24 ruthai +!C5 U+0E25 lolingthai +!C6 U+0E26 luthai +!C7 U+0E27 wowaenthai +!C8 U+0E28 sosalathai +!C9 U+0E29 sorusithai +!CA U+0E2A sosuathai +!CB U+0E2B hohipthai +!CC U+0E2C lochulathai +!CD U+0E2D oangthai +!CE U+0E2E honokhukthai +!CF U+0E2F paiyannoithai +!D0 U+0E30 saraathai +!D1 U+0E31 maihanakatthai +!D2 U+0E32 saraaathai +!D3 U+0E33 saraamthai +!D4 U+0E34 saraithai +!D5 U+0E35 saraiithai +!D6 U+0E36 sarauethai +!D7 U+0E37 saraueethai +!D8 U+0E38 sarauthai +!D9 U+0E39 sarauuthai +!DA U+0E3A phinthuthai +!DF U+0E3F bahtthai +!E0 U+0E40 saraethai +!E1 U+0E41 saraaethai +!E2 U+0E42 saraothai +!E3 U+0E43 saraaimaimuanthai +!E4 U+0E44 saraaimaimalaithai +!E5 U+0E45 lakkhangyaothai +!E6 U+0E46 maiyamokthai +!E7 U+0E47 maitaikhuthai +!E8 U+0E48 maiekthai +!E9 U+0E49 maithothai +!EA U+0E4A maitrithai +!EB U+0E4B maichattawathai +!EC U+0E4C thanthakhatthai +!ED U+0E4D nikhahitthai +!EE U+0E4E yamakkanthai +!EF U+0E4F fongmanthai +!F0 U+0E50 zerothai +!F1 U+0E51 onethai +!F2 U+0E52 twothai +!F3 U+0E53 threethai +!F4 U+0E54 fourthai +!F5 U+0E55 fivethai +!F6 U+0E56 sixthai +!F7 U+0E57 seventhai +!F8 U+0E58 eightthai +!F9 U+0E59 ninethai +!FA U+0E5A angkhankhuthai +!FB U+0E5B khomutthai diff --git a/core/vendor/phenx/php-font-lib/maps/iso-8859-15.map b/core/vendor/phenx/php-font-lib/maps/iso-8859-15.map index 6c2b57127..2689703d1 100644 --- a/core/vendor/phenx/php-font-lib/maps/iso-8859-15.map +++ b/core/vendor/phenx/php-font-lib/maps/iso-8859-15.map @@ -1,256 +1,256 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+00A1 exclamdown -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+20AC Euro -!A5 U+00A5 yen -!A6 U+0160 Scaron -!A7 U+00A7 section -!A8 U+0161 scaron -!A9 U+00A9 copyright -!AA U+00AA ordfeminine -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+017D Zcaron -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+017E zcaron -!B9 U+00B9 onesuperior -!BA U+00BA ordmasculine -!BB U+00BB guillemotright -!BC U+0152 OE -!BD U+0153 oe -!BE U+0178 Ydieresis -!BF U+00BF questiondown -!C0 U+00C0 Agrave -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+00C3 Atilde -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+00C7 Ccedilla -!C8 U+00C8 Egrave -!C9 U+00C9 Eacute -!CA U+00CA Ecircumflex -!CB U+00CB Edieresis -!CC U+00CC Igrave -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+00CF Idieresis -!D0 U+00D0 Eth -!D1 U+00D1 Ntilde -!D2 U+00D2 Ograve -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+00D9 Ugrave -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+00DD Yacute -!DE U+00DE Thorn -!DF U+00DF germandbls -!E0 U+00E0 agrave -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+00E3 atilde -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+00E7 ccedilla -!E8 U+00E8 egrave -!E9 U+00E9 eacute -!EA U+00EA ecircumflex -!EB U+00EB edieresis -!EC U+00EC igrave -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+00EF idieresis -!F0 U+00F0 eth -!F1 U+00F1 ntilde -!F2 U+00F2 ograve -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+00F9 ugrave -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+00FD yacute -!FE U+00FE thorn -!FF U+00FF ydieresis +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+20AC Euro +!A5 U+00A5 yen +!A6 U+0160 Scaron +!A7 U+00A7 section +!A8 U+0161 scaron +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+017D Zcaron +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+017E zcaron +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+0152 OE +!BD U+0153 oe +!BE U+0178 Ydieresis +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+00D0 Eth +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+00DE Thorn +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+00F0 eth +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+00FE thorn +!FF U+00FF ydieresis diff --git a/core/vendor/phenx/php-font-lib/maps/iso-8859-16.map b/core/vendor/phenx/php-font-lib/maps/iso-8859-16.map index 202c8fe59..89b802a7a 100644 --- a/core/vendor/phenx/php-font-lib/maps/iso-8859-16.map +++ b/core/vendor/phenx/php-font-lib/maps/iso-8859-16.map @@ -1,256 +1,256 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+0104 Aogonek -!A2 U+0105 aogonek -!A3 U+0141 Lslash -!A4 U+20AC Euro -!A5 U+201E quotedblbase -!A6 U+0160 Scaron -!A7 U+00A7 section -!A8 U+0161 scaron -!A9 U+00A9 copyright -!AA U+0218 Scommaaccent -!AB U+00AB guillemotleft -!AC U+0179 Zacute -!AD U+00AD hyphen -!AE U+017A zacute -!AF U+017B Zdotaccent -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+010C Ccaron -!B3 U+0142 lslash -!B4 U+017D Zcaron -!B5 U+201D quotedblright -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+017E zcaron -!B9 U+010D ccaron -!BA U+0219 scommaaccent -!BB U+00BB guillemotright -!BC U+0152 OE -!BD U+0153 oe -!BE U+0178 Ydieresis -!BF U+017C zdotaccent -!C0 U+00C0 Agrave -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+0102 Abreve -!C4 U+00C4 Adieresis -!C5 U+0106 Cacute -!C6 U+00C6 AE -!C7 U+00C7 Ccedilla -!C8 U+00C8 Egrave -!C9 U+00C9 Eacute -!CA U+00CA Ecircumflex -!CB U+00CB Edieresis -!CC U+00CC Igrave -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+00CF Idieresis -!D0 U+0110 Dcroat -!D1 U+0143 Nacute -!D2 U+00D2 Ograve -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+0150 Ohungarumlaut -!D6 U+00D6 Odieresis -!D7 U+015A Sacute -!D8 U+0170 Uhungarumlaut -!D9 U+00D9 Ugrave -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+0118 Eogonek -!DE U+021A Tcommaaccent -!DF U+00DF germandbls -!E0 U+00E0 agrave -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+0103 abreve -!E4 U+00E4 adieresis -!E5 U+0107 cacute -!E6 U+00E6 ae -!E7 U+00E7 ccedilla -!E8 U+00E8 egrave -!E9 U+00E9 eacute -!EA U+00EA ecircumflex -!EB U+00EB edieresis -!EC U+00EC igrave -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+00EF idieresis -!F0 U+0111 dcroat -!F1 U+0144 nacute -!F2 U+00F2 ograve -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+0151 ohungarumlaut -!F6 U+00F6 odieresis -!F7 U+015B sacute -!F8 U+0171 uhungarumlaut -!F9 U+00F9 ugrave -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+0119 eogonek -!FE U+021B tcommaaccent -!FF U+00FF ydieresis +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0104 Aogonek +!A2 U+0105 aogonek +!A3 U+0141 Lslash +!A4 U+20AC Euro +!A5 U+201E quotedblbase +!A6 U+0160 Scaron +!A7 U+00A7 section +!A8 U+0161 scaron +!A9 U+00A9 copyright +!AA U+0218 Scommaaccent +!AB U+00AB guillemotleft +!AC U+0179 Zacute +!AD U+00AD hyphen +!AE U+017A zacute +!AF U+017B Zdotaccent +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+010C Ccaron +!B3 U+0142 lslash +!B4 U+017D Zcaron +!B5 U+201D quotedblright +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+017E zcaron +!B9 U+010D ccaron +!BA U+0219 scommaaccent +!BB U+00BB guillemotright +!BC U+0152 OE +!BD U+0153 oe +!BE U+0178 Ydieresis +!BF U+017C zdotaccent +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+0106 Cacute +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+0110 Dcroat +!D1 U+0143 Nacute +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+0150 Ohungarumlaut +!D6 U+00D6 Odieresis +!D7 U+015A Sacute +!D8 U+0170 Uhungarumlaut +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0118 Eogonek +!DE U+021A Tcommaaccent +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+0107 cacute +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+0111 dcroat +!F1 U+0144 nacute +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+0151 ohungarumlaut +!F6 U+00F6 odieresis +!F7 U+015B sacute +!F8 U+0171 uhungarumlaut +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0119 eogonek +!FE U+021B tcommaaccent +!FF U+00FF ydieresis diff --git a/core/vendor/phenx/php-font-lib/maps/iso-8859-2.map b/core/vendor/phenx/php-font-lib/maps/iso-8859-2.map index 65ae09f95..af9588d05 100644 --- a/core/vendor/phenx/php-font-lib/maps/iso-8859-2.map +++ b/core/vendor/phenx/php-font-lib/maps/iso-8859-2.map @@ -1,256 +1,256 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+0104 Aogonek -!A2 U+02D8 breve -!A3 U+0141 Lslash -!A4 U+00A4 currency -!A5 U+013D Lcaron -!A6 U+015A Sacute -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+0160 Scaron -!AA U+015E Scedilla -!AB U+0164 Tcaron -!AC U+0179 Zacute -!AD U+00AD hyphen -!AE U+017D Zcaron -!AF U+017B Zdotaccent -!B0 U+00B0 degree -!B1 U+0105 aogonek -!B2 U+02DB ogonek -!B3 U+0142 lslash -!B4 U+00B4 acute -!B5 U+013E lcaron -!B6 U+015B sacute -!B7 U+02C7 caron -!B8 U+00B8 cedilla -!B9 U+0161 scaron -!BA U+015F scedilla -!BB U+0165 tcaron -!BC U+017A zacute -!BD U+02DD hungarumlaut -!BE U+017E zcaron -!BF U+017C zdotaccent -!C0 U+0154 Racute -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+0102 Abreve -!C4 U+00C4 Adieresis -!C5 U+0139 Lacute -!C6 U+0106 Cacute -!C7 U+00C7 Ccedilla -!C8 U+010C Ccaron -!C9 U+00C9 Eacute -!CA U+0118 Eogonek -!CB U+00CB Edieresis -!CC U+011A Ecaron -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+010E Dcaron -!D0 U+0110 Dcroat -!D1 U+0143 Nacute -!D2 U+0147 Ncaron -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+0150 Ohungarumlaut -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+0158 Rcaron -!D9 U+016E Uring -!DA U+00DA Uacute -!DB U+0170 Uhungarumlaut -!DC U+00DC Udieresis -!DD U+00DD Yacute -!DE U+0162 Tcommaaccent -!DF U+00DF germandbls -!E0 U+0155 racute -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+0103 abreve -!E4 U+00E4 adieresis -!E5 U+013A lacute -!E6 U+0107 cacute -!E7 U+00E7 ccedilla -!E8 U+010D ccaron -!E9 U+00E9 eacute -!EA U+0119 eogonek -!EB U+00EB edieresis -!EC U+011B ecaron -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+010F dcaron -!F0 U+0111 dcroat -!F1 U+0144 nacute -!F2 U+0148 ncaron -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+0151 ohungarumlaut -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+0159 rcaron -!F9 U+016F uring -!FA U+00FA uacute -!FB U+0171 uhungarumlaut -!FC U+00FC udieresis -!FD U+00FD yacute -!FE U+0163 tcommaaccent -!FF U+02D9 dotaccent +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0104 Aogonek +!A2 U+02D8 breve +!A3 U+0141 Lslash +!A4 U+00A4 currency +!A5 U+013D Lcaron +!A6 U+015A Sacute +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+0160 Scaron +!AA U+015E Scedilla +!AB U+0164 Tcaron +!AC U+0179 Zacute +!AD U+00AD hyphen +!AE U+017D Zcaron +!AF U+017B Zdotaccent +!B0 U+00B0 degree +!B1 U+0105 aogonek +!B2 U+02DB ogonek +!B3 U+0142 lslash +!B4 U+00B4 acute +!B5 U+013E lcaron +!B6 U+015B sacute +!B7 U+02C7 caron +!B8 U+00B8 cedilla +!B9 U+0161 scaron +!BA U+015F scedilla +!BB U+0165 tcaron +!BC U+017A zacute +!BD U+02DD hungarumlaut +!BE U+017E zcaron +!BF U+017C zdotaccent +!C0 U+0154 Racute +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+0102 Abreve +!C4 U+00C4 Adieresis +!C5 U+0139 Lacute +!C6 U+0106 Cacute +!C7 U+00C7 Ccedilla +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0118 Eogonek +!CB U+00CB Edieresis +!CC U+011A Ecaron +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+010E Dcaron +!D0 U+0110 Dcroat +!D1 U+0143 Nacute +!D2 U+0147 Ncaron +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+0150 Ohungarumlaut +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+0158 Rcaron +!D9 U+016E Uring +!DA U+00DA Uacute +!DB U+0170 Uhungarumlaut +!DC U+00DC Udieresis +!DD U+00DD Yacute +!DE U+0162 Tcommaaccent +!DF U+00DF germandbls +!E0 U+0155 racute +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+0103 abreve +!E4 U+00E4 adieresis +!E5 U+013A lacute +!E6 U+0107 cacute +!E7 U+00E7 ccedilla +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+0119 eogonek +!EB U+00EB edieresis +!EC U+011B ecaron +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+010F dcaron +!F0 U+0111 dcroat +!F1 U+0144 nacute +!F2 U+0148 ncaron +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+0151 ohungarumlaut +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+0159 rcaron +!F9 U+016F uring +!FA U+00FA uacute +!FB U+0171 uhungarumlaut +!FC U+00FC udieresis +!FD U+00FD yacute +!FE U+0163 tcommaaccent +!FF U+02D9 dotaccent diff --git a/core/vendor/phenx/php-font-lib/maps/iso-8859-4.map b/core/vendor/phenx/php-font-lib/maps/iso-8859-4.map index a7d87bf3e..e81dd7f31 100644 --- a/core/vendor/phenx/php-font-lib/maps/iso-8859-4.map +++ b/core/vendor/phenx/php-font-lib/maps/iso-8859-4.map @@ -1,256 +1,256 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+0104 Aogonek -!A2 U+0138 kgreenlandic -!A3 U+0156 Rcommaaccent -!A4 U+00A4 currency -!A5 U+0128 Itilde -!A6 U+013B Lcommaaccent -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+0160 Scaron -!AA U+0112 Emacron -!AB U+0122 Gcommaaccent -!AC U+0166 Tbar -!AD U+00AD hyphen -!AE U+017D Zcaron -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+0105 aogonek -!B2 U+02DB ogonek -!B3 U+0157 rcommaaccent -!B4 U+00B4 acute -!B5 U+0129 itilde -!B6 U+013C lcommaaccent -!B7 U+02C7 caron -!B8 U+00B8 cedilla -!B9 U+0161 scaron -!BA U+0113 emacron -!BB U+0123 gcommaaccent -!BC U+0167 tbar -!BD U+014A Eng -!BE U+017E zcaron -!BF U+014B eng -!C0 U+0100 Amacron -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+00C3 Atilde -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+012E Iogonek -!C8 U+010C Ccaron -!C9 U+00C9 Eacute -!CA U+0118 Eogonek -!CB U+00CB Edieresis -!CC U+0116 Edotaccent -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+012A Imacron -!D0 U+0110 Dcroat -!D1 U+0145 Ncommaaccent -!D2 U+014C Omacron -!D3 U+0136 Kcommaaccent -!D4 U+00D4 Ocircumflex -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+0172 Uogonek -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+0168 Utilde -!DE U+016A Umacron -!DF U+00DF germandbls -!E0 U+0101 amacron -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+00E3 atilde -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+012F iogonek -!E8 U+010D ccaron -!E9 U+00E9 eacute -!EA U+0119 eogonek -!EB U+00EB edieresis -!EC U+0117 edotaccent -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+012B imacron -!F0 U+0111 dcroat -!F1 U+0146 ncommaaccent -!F2 U+014D omacron -!F3 U+0137 kcommaaccent -!F4 U+00F4 ocircumflex -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+0173 uogonek -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+0169 utilde -!FE U+016B umacron -!FF U+02D9 dotaccent +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0104 Aogonek +!A2 U+0138 kgreenlandic +!A3 U+0156 Rcommaaccent +!A4 U+00A4 currency +!A5 U+0128 Itilde +!A6 U+013B Lcommaaccent +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+0160 Scaron +!AA U+0112 Emacron +!AB U+0122 Gcommaaccent +!AC U+0166 Tbar +!AD U+00AD hyphen +!AE U+017D Zcaron +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+0105 aogonek +!B2 U+02DB ogonek +!B3 U+0157 rcommaaccent +!B4 U+00B4 acute +!B5 U+0129 itilde +!B6 U+013C lcommaaccent +!B7 U+02C7 caron +!B8 U+00B8 cedilla +!B9 U+0161 scaron +!BA U+0113 emacron +!BB U+0123 gcommaaccent +!BC U+0167 tbar +!BD U+014A Eng +!BE U+017E zcaron +!BF U+014B eng +!C0 U+0100 Amacron +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+012E Iogonek +!C8 U+010C Ccaron +!C9 U+00C9 Eacute +!CA U+0118 Eogonek +!CB U+00CB Edieresis +!CC U+0116 Edotaccent +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+012A Imacron +!D0 U+0110 Dcroat +!D1 U+0145 Ncommaaccent +!D2 U+014C Omacron +!D3 U+0136 Kcommaaccent +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+0172 Uogonek +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0168 Utilde +!DE U+016A Umacron +!DF U+00DF germandbls +!E0 U+0101 amacron +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+012F iogonek +!E8 U+010D ccaron +!E9 U+00E9 eacute +!EA U+0119 eogonek +!EB U+00EB edieresis +!EC U+0117 edotaccent +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+012B imacron +!F0 U+0111 dcroat +!F1 U+0146 ncommaaccent +!F2 U+014D omacron +!F3 U+0137 kcommaaccent +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+0173 uogonek +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0169 utilde +!FE U+016B umacron +!FF U+02D9 dotaccent diff --git a/core/vendor/phenx/php-font-lib/maps/iso-8859-5.map b/core/vendor/phenx/php-font-lib/maps/iso-8859-5.map index f9cd4edcf..8030fd544 100644 --- a/core/vendor/phenx/php-font-lib/maps/iso-8859-5.map +++ b/core/vendor/phenx/php-font-lib/maps/iso-8859-5.map @@ -1,256 +1,256 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+0401 afii10023 -!A2 U+0402 afii10051 -!A3 U+0403 afii10052 -!A4 U+0404 afii10053 -!A5 U+0405 afii10054 -!A6 U+0406 afii10055 -!A7 U+0407 afii10056 -!A8 U+0408 afii10057 -!A9 U+0409 afii10058 -!AA U+040A afii10059 -!AB U+040B afii10060 -!AC U+040C afii10061 -!AD U+00AD hyphen -!AE U+040E afii10062 -!AF U+040F afii10145 -!B0 U+0410 afii10017 -!B1 U+0411 afii10018 -!B2 U+0412 afii10019 -!B3 U+0413 afii10020 -!B4 U+0414 afii10021 -!B5 U+0415 afii10022 -!B6 U+0416 afii10024 -!B7 U+0417 afii10025 -!B8 U+0418 afii10026 -!B9 U+0419 afii10027 -!BA U+041A afii10028 -!BB U+041B afii10029 -!BC U+041C afii10030 -!BD U+041D afii10031 -!BE U+041E afii10032 -!BF U+041F afii10033 -!C0 U+0420 afii10034 -!C1 U+0421 afii10035 -!C2 U+0422 afii10036 -!C3 U+0423 afii10037 -!C4 U+0424 afii10038 -!C5 U+0425 afii10039 -!C6 U+0426 afii10040 -!C7 U+0427 afii10041 -!C8 U+0428 afii10042 -!C9 U+0429 afii10043 -!CA U+042A afii10044 -!CB U+042B afii10045 -!CC U+042C afii10046 -!CD U+042D afii10047 -!CE U+042E afii10048 -!CF U+042F afii10049 -!D0 U+0430 afii10065 -!D1 U+0431 afii10066 -!D2 U+0432 afii10067 -!D3 U+0433 afii10068 -!D4 U+0434 afii10069 -!D5 U+0435 afii10070 -!D6 U+0436 afii10072 -!D7 U+0437 afii10073 -!D8 U+0438 afii10074 -!D9 U+0439 afii10075 -!DA U+043A afii10076 -!DB U+043B afii10077 -!DC U+043C afii10078 -!DD U+043D afii10079 -!DE U+043E afii10080 -!DF U+043F afii10081 -!E0 U+0440 afii10082 -!E1 U+0441 afii10083 -!E2 U+0442 afii10084 -!E3 U+0443 afii10085 -!E4 U+0444 afii10086 -!E5 U+0445 afii10087 -!E6 U+0446 afii10088 -!E7 U+0447 afii10089 -!E8 U+0448 afii10090 -!E9 U+0449 afii10091 -!EA U+044A afii10092 -!EB U+044B afii10093 -!EC U+044C afii10094 -!ED U+044D afii10095 -!EE U+044E afii10096 -!EF U+044F afii10097 -!F0 U+2116 afii61352 -!F1 U+0451 afii10071 -!F2 U+0452 afii10099 -!F3 U+0453 afii10100 -!F4 U+0454 afii10101 -!F5 U+0455 afii10102 -!F6 U+0456 afii10103 -!F7 U+0457 afii10104 -!F8 U+0458 afii10105 -!F9 U+0459 afii10106 -!FA U+045A afii10107 -!FB U+045B afii10108 -!FC U+045C afii10109 -!FD U+00A7 section -!FE U+045E afii10110 -!FF U+045F afii10193 +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+0401 afii10023 +!A2 U+0402 afii10051 +!A3 U+0403 afii10052 +!A4 U+0404 afii10053 +!A5 U+0405 afii10054 +!A6 U+0406 afii10055 +!A7 U+0407 afii10056 +!A8 U+0408 afii10057 +!A9 U+0409 afii10058 +!AA U+040A afii10059 +!AB U+040B afii10060 +!AC U+040C afii10061 +!AD U+00AD hyphen +!AE U+040E afii10062 +!AF U+040F afii10145 +!B0 U+0410 afii10017 +!B1 U+0411 afii10018 +!B2 U+0412 afii10019 +!B3 U+0413 afii10020 +!B4 U+0414 afii10021 +!B5 U+0415 afii10022 +!B6 U+0416 afii10024 +!B7 U+0417 afii10025 +!B8 U+0418 afii10026 +!B9 U+0419 afii10027 +!BA U+041A afii10028 +!BB U+041B afii10029 +!BC U+041C afii10030 +!BD U+041D afii10031 +!BE U+041E afii10032 +!BF U+041F afii10033 +!C0 U+0420 afii10034 +!C1 U+0421 afii10035 +!C2 U+0422 afii10036 +!C3 U+0423 afii10037 +!C4 U+0424 afii10038 +!C5 U+0425 afii10039 +!C6 U+0426 afii10040 +!C7 U+0427 afii10041 +!C8 U+0428 afii10042 +!C9 U+0429 afii10043 +!CA U+042A afii10044 +!CB U+042B afii10045 +!CC U+042C afii10046 +!CD U+042D afii10047 +!CE U+042E afii10048 +!CF U+042F afii10049 +!D0 U+0430 afii10065 +!D1 U+0431 afii10066 +!D2 U+0432 afii10067 +!D3 U+0433 afii10068 +!D4 U+0434 afii10069 +!D5 U+0435 afii10070 +!D6 U+0436 afii10072 +!D7 U+0437 afii10073 +!D8 U+0438 afii10074 +!D9 U+0439 afii10075 +!DA U+043A afii10076 +!DB U+043B afii10077 +!DC U+043C afii10078 +!DD U+043D afii10079 +!DE U+043E afii10080 +!DF U+043F afii10081 +!E0 U+0440 afii10082 +!E1 U+0441 afii10083 +!E2 U+0442 afii10084 +!E3 U+0443 afii10085 +!E4 U+0444 afii10086 +!E5 U+0445 afii10087 +!E6 U+0446 afii10088 +!E7 U+0447 afii10089 +!E8 U+0448 afii10090 +!E9 U+0449 afii10091 +!EA U+044A afii10092 +!EB U+044B afii10093 +!EC U+044C afii10094 +!ED U+044D afii10095 +!EE U+044E afii10096 +!EF U+044F afii10097 +!F0 U+2116 afii61352 +!F1 U+0451 afii10071 +!F2 U+0452 afii10099 +!F3 U+0453 afii10100 +!F4 U+0454 afii10101 +!F5 U+0455 afii10102 +!F6 U+0456 afii10103 +!F7 U+0457 afii10104 +!F8 U+0458 afii10105 +!F9 U+0459 afii10106 +!FA U+045A afii10107 +!FB U+045B afii10108 +!FC U+045C afii10109 +!FD U+00A7 section +!FE U+045E afii10110 +!FF U+045F afii10193 diff --git a/core/vendor/phenx/php-font-lib/maps/iso-8859-7.map b/core/vendor/phenx/php-font-lib/maps/iso-8859-7.map index e163796b1..be8698afc 100644 --- a/core/vendor/phenx/php-font-lib/maps/iso-8859-7.map +++ b/core/vendor/phenx/php-font-lib/maps/iso-8859-7.map @@ -1,250 +1,250 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+2018 quoteleft -!A2 U+2019 quoteright -!A3 U+00A3 sterling -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AF U+2015 afii00208 -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+0384 tonos -!B5 U+0385 dieresistonos -!B6 U+0386 Alphatonos -!B7 U+00B7 periodcentered -!B8 U+0388 Epsilontonos -!B9 U+0389 Etatonos -!BA U+038A Iotatonos -!BB U+00BB guillemotright -!BC U+038C Omicrontonos -!BD U+00BD onehalf -!BE U+038E Upsilontonos -!BF U+038F Omegatonos -!C0 U+0390 iotadieresistonos -!C1 U+0391 Alpha -!C2 U+0392 Beta -!C3 U+0393 Gamma -!C4 U+0394 Delta -!C5 U+0395 Epsilon -!C6 U+0396 Zeta -!C7 U+0397 Eta -!C8 U+0398 Theta -!C9 U+0399 Iota -!CA U+039A Kappa -!CB U+039B Lambda -!CC U+039C Mu -!CD U+039D Nu -!CE U+039E Xi -!CF U+039F Omicron -!D0 U+03A0 Pi -!D1 U+03A1 Rho -!D3 U+03A3 Sigma -!D4 U+03A4 Tau -!D5 U+03A5 Upsilon -!D6 U+03A6 Phi -!D7 U+03A7 Chi -!D8 U+03A8 Psi -!D9 U+03A9 Omega -!DA U+03AA Iotadieresis -!DB U+03AB Upsilondieresis -!DC U+03AC alphatonos -!DD U+03AD epsilontonos -!DE U+03AE etatonos -!DF U+03AF iotatonos -!E0 U+03B0 upsilondieresistonos -!E1 U+03B1 alpha -!E2 U+03B2 beta -!E3 U+03B3 gamma -!E4 U+03B4 delta -!E5 U+03B5 epsilon -!E6 U+03B6 zeta -!E7 U+03B7 eta -!E8 U+03B8 theta -!E9 U+03B9 iota -!EA U+03BA kappa -!EB U+03BB lambda -!EC U+03BC mu -!ED U+03BD nu -!EE U+03BE xi -!EF U+03BF omicron -!F0 U+03C0 pi -!F1 U+03C1 rho -!F2 U+03C2 sigma1 -!F3 U+03C3 sigma -!F4 U+03C4 tau -!F5 U+03C5 upsilon -!F6 U+03C6 phi -!F7 U+03C7 chi -!F8 U+03C8 psi -!F9 U+03C9 omega -!FA U+03CA iotadieresis -!FB U+03CB upsilondieresis -!FC U+03CC omicrontonos -!FD U+03CD upsilontonos -!FE U+03CE omegatonos +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+2018 quoteleft +!A2 U+2019 quoteright +!A3 U+00A3 sterling +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AF U+2015 afii00208 +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+0384 tonos +!B5 U+0385 dieresistonos +!B6 U+0386 Alphatonos +!B7 U+00B7 periodcentered +!B8 U+0388 Epsilontonos +!B9 U+0389 Etatonos +!BA U+038A Iotatonos +!BB U+00BB guillemotright +!BC U+038C Omicrontonos +!BD U+00BD onehalf +!BE U+038E Upsilontonos +!BF U+038F Omegatonos +!C0 U+0390 iotadieresistonos +!C1 U+0391 Alpha +!C2 U+0392 Beta +!C3 U+0393 Gamma +!C4 U+0394 Delta +!C5 U+0395 Epsilon +!C6 U+0396 Zeta +!C7 U+0397 Eta +!C8 U+0398 Theta +!C9 U+0399 Iota +!CA U+039A Kappa +!CB U+039B Lambda +!CC U+039C Mu +!CD U+039D Nu +!CE U+039E Xi +!CF U+039F Omicron +!D0 U+03A0 Pi +!D1 U+03A1 Rho +!D3 U+03A3 Sigma +!D4 U+03A4 Tau +!D5 U+03A5 Upsilon +!D6 U+03A6 Phi +!D7 U+03A7 Chi +!D8 U+03A8 Psi +!D9 U+03A9 Omega +!DA U+03AA Iotadieresis +!DB U+03AB Upsilondieresis +!DC U+03AC alphatonos +!DD U+03AD epsilontonos +!DE U+03AE etatonos +!DF U+03AF iotatonos +!E0 U+03B0 upsilondieresistonos +!E1 U+03B1 alpha +!E2 U+03B2 beta +!E3 U+03B3 gamma +!E4 U+03B4 delta +!E5 U+03B5 epsilon +!E6 U+03B6 zeta +!E7 U+03B7 eta +!E8 U+03B8 theta +!E9 U+03B9 iota +!EA U+03BA kappa +!EB U+03BB lambda +!EC U+03BC mu +!ED U+03BD nu +!EE U+03BE xi +!EF U+03BF omicron +!F0 U+03C0 pi +!F1 U+03C1 rho +!F2 U+03C2 sigma1 +!F3 U+03C3 sigma +!F4 U+03C4 tau +!F5 U+03C5 upsilon +!F6 U+03C6 phi +!F7 U+03C7 chi +!F8 U+03C8 psi +!F9 U+03C9 omega +!FA U+03CA iotadieresis +!FB U+03CB upsilondieresis +!FC U+03CC omicrontonos +!FD U+03CD upsilontonos +!FE U+03CE omegatonos diff --git a/core/vendor/phenx/php-font-lib/maps/iso-8859-9.map b/core/vendor/phenx/php-font-lib/maps/iso-8859-9.map index 48c123ae6..a60bb19d4 100644 --- a/core/vendor/phenx/php-font-lib/maps/iso-8859-9.map +++ b/core/vendor/phenx/php-font-lib/maps/iso-8859-9.map @@ -1,256 +1,256 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+00A1 exclamdown -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+00A4 currency -!A5 U+00A5 yen -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AA U+00AA ordfeminine -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+00B8 cedilla -!B9 U+00B9 onesuperior -!BA U+00BA ordmasculine -!BB U+00BB guillemotright -!BC U+00BC onequarter -!BD U+00BD onehalf -!BE U+00BE threequarters -!BF U+00BF questiondown -!C0 U+00C0 Agrave -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+00C3 Atilde -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+00C7 Ccedilla -!C8 U+00C8 Egrave -!C9 U+00C9 Eacute -!CA U+00CA Ecircumflex -!CB U+00CB Edieresis -!CC U+00CC Igrave -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+00CF Idieresis -!D0 U+011E Gbreve -!D1 U+00D1 Ntilde -!D2 U+00D2 Ograve -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+00D9 Ugrave -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+0130 Idotaccent -!DE U+015E Scedilla -!DF U+00DF germandbls -!E0 U+00E0 agrave -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+00E3 atilde -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+00E7 ccedilla -!E8 U+00E8 egrave -!E9 U+00E9 eacute -!EA U+00EA ecircumflex -!EB U+00EB edieresis -!EC U+00EC igrave -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+00EF idieresis -!F0 U+011F gbreve -!F1 U+00F1 ntilde -!F2 U+00F2 ograve -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+00F9 ugrave -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+0131 dotlessi -!FE U+015F scedilla -!FF U+00FF ydieresis +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+0080 .notdef +!81 U+0081 .notdef +!82 U+0082 .notdef +!83 U+0083 .notdef +!84 U+0084 .notdef +!85 U+0085 .notdef +!86 U+0086 .notdef +!87 U+0087 .notdef +!88 U+0088 .notdef +!89 U+0089 .notdef +!8A U+008A .notdef +!8B U+008B .notdef +!8C U+008C .notdef +!8D U+008D .notdef +!8E U+008E .notdef +!8F U+008F .notdef +!90 U+0090 .notdef +!91 U+0091 .notdef +!92 U+0092 .notdef +!93 U+0093 .notdef +!94 U+0094 .notdef +!95 U+0095 .notdef +!96 U+0096 .notdef +!97 U+0097 .notdef +!98 U+0098 .notdef +!99 U+0099 .notdef +!9A U+009A .notdef +!9B U+009B .notdef +!9C U+009C .notdef +!9D U+009D .notdef +!9E U+009E .notdef +!9F U+009F .notdef +!A0 U+00A0 space +!A1 U+00A1 exclamdown +!A2 U+00A2 cent +!A3 U+00A3 sterling +!A4 U+00A4 currency +!A5 U+00A5 yen +!A6 U+00A6 brokenbar +!A7 U+00A7 section +!A8 U+00A8 dieresis +!A9 U+00A9 copyright +!AA U+00AA ordfeminine +!AB U+00AB guillemotleft +!AC U+00AC logicalnot +!AD U+00AD hyphen +!AE U+00AE registered +!AF U+00AF macron +!B0 U+00B0 degree +!B1 U+00B1 plusminus +!B2 U+00B2 twosuperior +!B3 U+00B3 threesuperior +!B4 U+00B4 acute +!B5 U+00B5 mu +!B6 U+00B6 paragraph +!B7 U+00B7 periodcentered +!B8 U+00B8 cedilla +!B9 U+00B9 onesuperior +!BA U+00BA ordmasculine +!BB U+00BB guillemotright +!BC U+00BC onequarter +!BD U+00BD onehalf +!BE U+00BE threequarters +!BF U+00BF questiondown +!C0 U+00C0 Agrave +!C1 U+00C1 Aacute +!C2 U+00C2 Acircumflex +!C3 U+00C3 Atilde +!C4 U+00C4 Adieresis +!C5 U+00C5 Aring +!C6 U+00C6 AE +!C7 U+00C7 Ccedilla +!C8 U+00C8 Egrave +!C9 U+00C9 Eacute +!CA U+00CA Ecircumflex +!CB U+00CB Edieresis +!CC U+00CC Igrave +!CD U+00CD Iacute +!CE U+00CE Icircumflex +!CF U+00CF Idieresis +!D0 U+011E Gbreve +!D1 U+00D1 Ntilde +!D2 U+00D2 Ograve +!D3 U+00D3 Oacute +!D4 U+00D4 Ocircumflex +!D5 U+00D5 Otilde +!D6 U+00D6 Odieresis +!D7 U+00D7 multiply +!D8 U+00D8 Oslash +!D9 U+00D9 Ugrave +!DA U+00DA Uacute +!DB U+00DB Ucircumflex +!DC U+00DC Udieresis +!DD U+0130 Idotaccent +!DE U+015E Scedilla +!DF U+00DF germandbls +!E0 U+00E0 agrave +!E1 U+00E1 aacute +!E2 U+00E2 acircumflex +!E3 U+00E3 atilde +!E4 U+00E4 adieresis +!E5 U+00E5 aring +!E6 U+00E6 ae +!E7 U+00E7 ccedilla +!E8 U+00E8 egrave +!E9 U+00E9 eacute +!EA U+00EA ecircumflex +!EB U+00EB edieresis +!EC U+00EC igrave +!ED U+00ED iacute +!EE U+00EE icircumflex +!EF U+00EF idieresis +!F0 U+011F gbreve +!F1 U+00F1 ntilde +!F2 U+00F2 ograve +!F3 U+00F3 oacute +!F4 U+00F4 ocircumflex +!F5 U+00F5 otilde +!F6 U+00F6 odieresis +!F7 U+00F7 divide +!F8 U+00F8 oslash +!F9 U+00F9 ugrave +!FA U+00FA uacute +!FB U+00FB ucircumflex +!FC U+00FC udieresis +!FD U+0131 dotlessi +!FE U+015F scedilla +!FF U+00FF ydieresis diff --git a/core/vendor/phenx/php-font-lib/maps/koi8-r.map b/core/vendor/phenx/php-font-lib/maps/koi8-r.map index 6ad5d05d0..026880d66 100644 --- a/core/vendor/phenx/php-font-lib/maps/koi8-r.map +++ b/core/vendor/phenx/php-font-lib/maps/koi8-r.map @@ -1,256 +1,256 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+2500 SF100000 -!81 U+2502 SF110000 -!82 U+250C SF010000 -!83 U+2510 SF030000 -!84 U+2514 SF020000 -!85 U+2518 SF040000 -!86 U+251C SF080000 -!87 U+2524 SF090000 -!88 U+252C SF060000 -!89 U+2534 SF070000 -!8A U+253C SF050000 -!8B U+2580 upblock -!8C U+2584 dnblock -!8D U+2588 block -!8E U+258C lfblock -!8F U+2590 rtblock -!90 U+2591 ltshade -!91 U+2592 shade -!92 U+2593 dkshade -!93 U+2320 integraltp -!94 U+25A0 filledbox -!95 U+2219 periodcentered -!96 U+221A radical -!97 U+2248 approxequal -!98 U+2264 lessequal -!99 U+2265 greaterequal -!9A U+00A0 space -!9B U+2321 integralbt -!9C U+00B0 degree -!9D U+00B2 twosuperior -!9E U+00B7 periodcentered -!9F U+00F7 divide -!A0 U+2550 SF430000 -!A1 U+2551 SF240000 -!A2 U+2552 SF510000 -!A3 U+0451 afii10071 -!A4 U+2553 SF520000 -!A5 U+2554 SF390000 -!A6 U+2555 SF220000 -!A7 U+2556 SF210000 -!A8 U+2557 SF250000 -!A9 U+2558 SF500000 -!AA U+2559 SF490000 -!AB U+255A SF380000 -!AC U+255B SF280000 -!AD U+255C SF270000 -!AE U+255D SF260000 -!AF U+255E SF360000 -!B0 U+255F SF370000 -!B1 U+2560 SF420000 -!B2 U+2561 SF190000 -!B3 U+0401 afii10023 -!B4 U+2562 SF200000 -!B5 U+2563 SF230000 -!B6 U+2564 SF470000 -!B7 U+2565 SF480000 -!B8 U+2566 SF410000 -!B9 U+2567 SF450000 -!BA U+2568 SF460000 -!BB U+2569 SF400000 -!BC U+256A SF540000 -!BD U+256B SF530000 -!BE U+256C SF440000 -!BF U+00A9 copyright -!C0 U+044E afii10096 -!C1 U+0430 afii10065 -!C2 U+0431 afii10066 -!C3 U+0446 afii10088 -!C4 U+0434 afii10069 -!C5 U+0435 afii10070 -!C6 U+0444 afii10086 -!C7 U+0433 afii10068 -!C8 U+0445 afii10087 -!C9 U+0438 afii10074 -!CA U+0439 afii10075 -!CB U+043A afii10076 -!CC U+043B afii10077 -!CD U+043C afii10078 -!CE U+043D afii10079 -!CF U+043E afii10080 -!D0 U+043F afii10081 -!D1 U+044F afii10097 -!D2 U+0440 afii10082 -!D3 U+0441 afii10083 -!D4 U+0442 afii10084 -!D5 U+0443 afii10085 -!D6 U+0436 afii10072 -!D7 U+0432 afii10067 -!D8 U+044C afii10094 -!D9 U+044B afii10093 -!DA U+0437 afii10073 -!DB U+0448 afii10090 -!DC U+044D afii10095 -!DD U+0449 afii10091 -!DE U+0447 afii10089 -!DF U+044A afii10092 -!E0 U+042E afii10048 -!E1 U+0410 afii10017 -!E2 U+0411 afii10018 -!E3 U+0426 afii10040 -!E4 U+0414 afii10021 -!E5 U+0415 afii10022 -!E6 U+0424 afii10038 -!E7 U+0413 afii10020 -!E8 U+0425 afii10039 -!E9 U+0418 afii10026 -!EA U+0419 afii10027 -!EB U+041A afii10028 -!EC U+041B afii10029 -!ED U+041C afii10030 -!EE U+041D afii10031 -!EF U+041E afii10032 -!F0 U+041F afii10033 -!F1 U+042F afii10049 -!F2 U+0420 afii10034 -!F3 U+0421 afii10035 -!F4 U+0422 afii10036 -!F5 U+0423 afii10037 -!F6 U+0416 afii10024 -!F7 U+0412 afii10019 -!F8 U+042C afii10046 -!F9 U+042B afii10045 -!FA U+0417 afii10025 -!FB U+0428 afii10042 -!FC U+042D afii10047 -!FD U+0429 afii10043 -!FE U+0427 afii10041 -!FF U+042A afii10044 +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+2500 SF100000 +!81 U+2502 SF110000 +!82 U+250C SF010000 +!83 U+2510 SF030000 +!84 U+2514 SF020000 +!85 U+2518 SF040000 +!86 U+251C SF080000 +!87 U+2524 SF090000 +!88 U+252C SF060000 +!89 U+2534 SF070000 +!8A U+253C SF050000 +!8B U+2580 upblock +!8C U+2584 dnblock +!8D U+2588 block +!8E U+258C lfblock +!8F U+2590 rtblock +!90 U+2591 ltshade +!91 U+2592 shade +!92 U+2593 dkshade +!93 U+2320 integraltp +!94 U+25A0 filledbox +!95 U+2219 periodcentered +!96 U+221A radical +!97 U+2248 approxequal +!98 U+2264 lessequal +!99 U+2265 greaterequal +!9A U+00A0 space +!9B U+2321 integralbt +!9C U+00B0 degree +!9D U+00B2 twosuperior +!9E U+00B7 periodcentered +!9F U+00F7 divide +!A0 U+2550 SF430000 +!A1 U+2551 SF240000 +!A2 U+2552 SF510000 +!A3 U+0451 afii10071 +!A4 U+2553 SF520000 +!A5 U+2554 SF390000 +!A6 U+2555 SF220000 +!A7 U+2556 SF210000 +!A8 U+2557 SF250000 +!A9 U+2558 SF500000 +!AA U+2559 SF490000 +!AB U+255A SF380000 +!AC U+255B SF280000 +!AD U+255C SF270000 +!AE U+255D SF260000 +!AF U+255E SF360000 +!B0 U+255F SF370000 +!B1 U+2560 SF420000 +!B2 U+2561 SF190000 +!B3 U+0401 afii10023 +!B4 U+2562 SF200000 +!B5 U+2563 SF230000 +!B6 U+2564 SF470000 +!B7 U+2565 SF480000 +!B8 U+2566 SF410000 +!B9 U+2567 SF450000 +!BA U+2568 SF460000 +!BB U+2569 SF400000 +!BC U+256A SF540000 +!BD U+256B SF530000 +!BE U+256C SF440000 +!BF U+00A9 copyright +!C0 U+044E afii10096 +!C1 U+0430 afii10065 +!C2 U+0431 afii10066 +!C3 U+0446 afii10088 +!C4 U+0434 afii10069 +!C5 U+0435 afii10070 +!C6 U+0444 afii10086 +!C7 U+0433 afii10068 +!C8 U+0445 afii10087 +!C9 U+0438 afii10074 +!CA U+0439 afii10075 +!CB U+043A afii10076 +!CC U+043B afii10077 +!CD U+043C afii10078 +!CE U+043D afii10079 +!CF U+043E afii10080 +!D0 U+043F afii10081 +!D1 U+044F afii10097 +!D2 U+0440 afii10082 +!D3 U+0441 afii10083 +!D4 U+0442 afii10084 +!D5 U+0443 afii10085 +!D6 U+0436 afii10072 +!D7 U+0432 afii10067 +!D8 U+044C afii10094 +!D9 U+044B afii10093 +!DA U+0437 afii10073 +!DB U+0448 afii10090 +!DC U+044D afii10095 +!DD U+0449 afii10091 +!DE U+0447 afii10089 +!DF U+044A afii10092 +!E0 U+042E afii10048 +!E1 U+0410 afii10017 +!E2 U+0411 afii10018 +!E3 U+0426 afii10040 +!E4 U+0414 afii10021 +!E5 U+0415 afii10022 +!E6 U+0424 afii10038 +!E7 U+0413 afii10020 +!E8 U+0425 afii10039 +!E9 U+0418 afii10026 +!EA U+0419 afii10027 +!EB U+041A afii10028 +!EC U+041B afii10029 +!ED U+041C afii10030 +!EE U+041D afii10031 +!EF U+041E afii10032 +!F0 U+041F afii10033 +!F1 U+042F afii10049 +!F2 U+0420 afii10034 +!F3 U+0421 afii10035 +!F4 U+0422 afii10036 +!F5 U+0423 afii10037 +!F6 U+0416 afii10024 +!F7 U+0412 afii10019 +!F8 U+042C afii10046 +!F9 U+042B afii10045 +!FA U+0417 afii10025 +!FB U+0428 afii10042 +!FC U+042D afii10047 +!FD U+0429 afii10043 +!FE U+0427 afii10041 +!FF U+042A afii10044 diff --git a/core/vendor/phenx/php-font-lib/maps/koi8-u.map b/core/vendor/phenx/php-font-lib/maps/koi8-u.map index 40a7e4fd7..97d9d031b 100644 --- a/core/vendor/phenx/php-font-lib/maps/koi8-u.map +++ b/core/vendor/phenx/php-font-lib/maps/koi8-u.map @@ -1,256 +1,256 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+2500 SF100000 -!81 U+2502 SF110000 -!82 U+250C SF010000 -!83 U+2510 SF030000 -!84 U+2514 SF020000 -!85 U+2518 SF040000 -!86 U+251C SF080000 -!87 U+2524 SF090000 -!88 U+252C SF060000 -!89 U+2534 SF070000 -!8A U+253C SF050000 -!8B U+2580 upblock -!8C U+2584 dnblock -!8D U+2588 block -!8E U+258C lfblock -!8F U+2590 rtblock -!90 U+2591 ltshade -!91 U+2592 shade -!92 U+2593 dkshade -!93 U+2320 integraltp -!94 U+25A0 filledbox -!95 U+2022 bullet -!96 U+221A radical -!97 U+2248 approxequal -!98 U+2264 lessequal -!99 U+2265 greaterequal -!9A U+00A0 space -!9B U+2321 integralbt -!9C U+00B0 degree -!9D U+00B2 twosuperior -!9E U+00B7 periodcentered -!9F U+00F7 divide -!A0 U+2550 SF430000 -!A1 U+2551 SF240000 -!A2 U+2552 SF510000 -!A3 U+0451 afii10071 -!A4 U+0454 afii10101 -!A5 U+2554 SF390000 -!A6 U+0456 afii10103 -!A7 U+0457 afii10104 -!A8 U+2557 SF250000 -!A9 U+2558 SF500000 -!AA U+2559 SF490000 -!AB U+255A SF380000 -!AC U+255B SF280000 -!AD U+0491 afii10098 -!AE U+255D SF260000 -!AF U+255E SF360000 -!B0 U+255F SF370000 -!B1 U+2560 SF420000 -!B2 U+2561 SF190000 -!B3 U+0401 afii10023 -!B4 U+0404 afii10053 -!B5 U+2563 SF230000 -!B6 U+0406 afii10055 -!B7 U+0407 afii10056 -!B8 U+2566 SF410000 -!B9 U+2567 SF450000 -!BA U+2568 SF460000 -!BB U+2569 SF400000 -!BC U+256A SF540000 -!BD U+0490 afii10050 -!BE U+256C SF440000 -!BF U+00A9 copyright -!C0 U+044E afii10096 -!C1 U+0430 afii10065 -!C2 U+0431 afii10066 -!C3 U+0446 afii10088 -!C4 U+0434 afii10069 -!C5 U+0435 afii10070 -!C6 U+0444 afii10086 -!C7 U+0433 afii10068 -!C8 U+0445 afii10087 -!C9 U+0438 afii10074 -!CA U+0439 afii10075 -!CB U+043A afii10076 -!CC U+043B afii10077 -!CD U+043C afii10078 -!CE U+043D afii10079 -!CF U+043E afii10080 -!D0 U+043F afii10081 -!D1 U+044F afii10097 -!D2 U+0440 afii10082 -!D3 U+0441 afii10083 -!D4 U+0442 afii10084 -!D5 U+0443 afii10085 -!D6 U+0436 afii10072 -!D7 U+0432 afii10067 -!D8 U+044C afii10094 -!D9 U+044B afii10093 -!DA U+0437 afii10073 -!DB U+0448 afii10090 -!DC U+044D afii10095 -!DD U+0449 afii10091 -!DE U+0447 afii10089 -!DF U+044A afii10092 -!E0 U+042E afii10048 -!E1 U+0410 afii10017 -!E2 U+0411 afii10018 -!E3 U+0426 afii10040 -!E4 U+0414 afii10021 -!E5 U+0415 afii10022 -!E6 U+0424 afii10038 -!E7 U+0413 afii10020 -!E8 U+0425 afii10039 -!E9 U+0418 afii10026 -!EA U+0419 afii10027 -!EB U+041A afii10028 -!EC U+041B afii10029 -!ED U+041C afii10030 -!EE U+041D afii10031 -!EF U+041E afii10032 -!F0 U+041F afii10033 -!F1 U+042F afii10049 -!F2 U+0420 afii10034 -!F3 U+0421 afii10035 -!F4 U+0422 afii10036 -!F5 U+0423 afii10037 -!F6 U+0416 afii10024 -!F7 U+0412 afii10019 -!F8 U+042C afii10046 -!F9 U+042B afii10045 -!FA U+0417 afii10025 -!FB U+0428 afii10042 -!FC U+042D afii10047 -!FD U+0429 afii10043 -!FE U+0427 afii10041 -!FF U+042A afii10044 +!00 U+0000 .notdef +!01 U+0001 .notdef +!02 U+0002 .notdef +!03 U+0003 .notdef +!04 U+0004 .notdef +!05 U+0005 .notdef +!06 U+0006 .notdef +!07 U+0007 .notdef +!08 U+0008 .notdef +!09 U+0009 .notdef +!0A U+000A .notdef +!0B U+000B .notdef +!0C U+000C .notdef +!0D U+000D .notdef +!0E U+000E .notdef +!0F U+000F .notdef +!10 U+0010 .notdef +!11 U+0011 .notdef +!12 U+0012 .notdef +!13 U+0013 .notdef +!14 U+0014 .notdef +!15 U+0015 .notdef +!16 U+0016 .notdef +!17 U+0017 .notdef +!18 U+0018 .notdef +!19 U+0019 .notdef +!1A U+001A .notdef +!1B U+001B .notdef +!1C U+001C .notdef +!1D U+001D .notdef +!1E U+001E .notdef +!1F U+001F .notdef +!20 U+0020 space +!21 U+0021 exclam +!22 U+0022 quotedbl +!23 U+0023 numbersign +!24 U+0024 dollar +!25 U+0025 percent +!26 U+0026 ampersand +!27 U+0027 quotesingle +!28 U+0028 parenleft +!29 U+0029 parenright +!2A U+002A asterisk +!2B U+002B plus +!2C U+002C comma +!2D U+002D hyphen +!2E U+002E period +!2F U+002F slash +!30 U+0030 zero +!31 U+0031 one +!32 U+0032 two +!33 U+0033 three +!34 U+0034 four +!35 U+0035 five +!36 U+0036 six +!37 U+0037 seven +!38 U+0038 eight +!39 U+0039 nine +!3A U+003A colon +!3B U+003B semicolon +!3C U+003C less +!3D U+003D equal +!3E U+003E greater +!3F U+003F question +!40 U+0040 at +!41 U+0041 A +!42 U+0042 B +!43 U+0043 C +!44 U+0044 D +!45 U+0045 E +!46 U+0046 F +!47 U+0047 G +!48 U+0048 H +!49 U+0049 I +!4A U+004A J +!4B U+004B K +!4C U+004C L +!4D U+004D M +!4E U+004E N +!4F U+004F O +!50 U+0050 P +!51 U+0051 Q +!52 U+0052 R +!53 U+0053 S +!54 U+0054 T +!55 U+0055 U +!56 U+0056 V +!57 U+0057 W +!58 U+0058 X +!59 U+0059 Y +!5A U+005A Z +!5B U+005B bracketleft +!5C U+005C backslash +!5D U+005D bracketright +!5E U+005E asciicircum +!5F U+005F underscore +!60 U+0060 grave +!61 U+0061 a +!62 U+0062 b +!63 U+0063 c +!64 U+0064 d +!65 U+0065 e +!66 U+0066 f +!67 U+0067 g +!68 U+0068 h +!69 U+0069 i +!6A U+006A j +!6B U+006B k +!6C U+006C l +!6D U+006D m +!6E U+006E n +!6F U+006F o +!70 U+0070 p +!71 U+0071 q +!72 U+0072 r +!73 U+0073 s +!74 U+0074 t +!75 U+0075 u +!76 U+0076 v +!77 U+0077 w +!78 U+0078 x +!79 U+0079 y +!7A U+007A z +!7B U+007B braceleft +!7C U+007C bar +!7D U+007D braceright +!7E U+007E asciitilde +!7F U+007F .notdef +!80 U+2500 SF100000 +!81 U+2502 SF110000 +!82 U+250C SF010000 +!83 U+2510 SF030000 +!84 U+2514 SF020000 +!85 U+2518 SF040000 +!86 U+251C SF080000 +!87 U+2524 SF090000 +!88 U+252C SF060000 +!89 U+2534 SF070000 +!8A U+253C SF050000 +!8B U+2580 upblock +!8C U+2584 dnblock +!8D U+2588 block +!8E U+258C lfblock +!8F U+2590 rtblock +!90 U+2591 ltshade +!91 U+2592 shade +!92 U+2593 dkshade +!93 U+2320 integraltp +!94 U+25A0 filledbox +!95 U+2022 bullet +!96 U+221A radical +!97 U+2248 approxequal +!98 U+2264 lessequal +!99 U+2265 greaterequal +!9A U+00A0 space +!9B U+2321 integralbt +!9C U+00B0 degree +!9D U+00B2 twosuperior +!9E U+00B7 periodcentered +!9F U+00F7 divide +!A0 U+2550 SF430000 +!A1 U+2551 SF240000 +!A2 U+2552 SF510000 +!A3 U+0451 afii10071 +!A4 U+0454 afii10101 +!A5 U+2554 SF390000 +!A6 U+0456 afii10103 +!A7 U+0457 afii10104 +!A8 U+2557 SF250000 +!A9 U+2558 SF500000 +!AA U+2559 SF490000 +!AB U+255A SF380000 +!AC U+255B SF280000 +!AD U+0491 afii10098 +!AE U+255D SF260000 +!AF U+255E SF360000 +!B0 U+255F SF370000 +!B1 U+2560 SF420000 +!B2 U+2561 SF190000 +!B3 U+0401 afii10023 +!B4 U+0404 afii10053 +!B5 U+2563 SF230000 +!B6 U+0406 afii10055 +!B7 U+0407 afii10056 +!B8 U+2566 SF410000 +!B9 U+2567 SF450000 +!BA U+2568 SF460000 +!BB U+2569 SF400000 +!BC U+256A SF540000 +!BD U+0490 afii10050 +!BE U+256C SF440000 +!BF U+00A9 copyright +!C0 U+044E afii10096 +!C1 U+0430 afii10065 +!C2 U+0431 afii10066 +!C3 U+0446 afii10088 +!C4 U+0434 afii10069 +!C5 U+0435 afii10070 +!C6 U+0444 afii10086 +!C7 U+0433 afii10068 +!C8 U+0445 afii10087 +!C9 U+0438 afii10074 +!CA U+0439 afii10075 +!CB U+043A afii10076 +!CC U+043B afii10077 +!CD U+043C afii10078 +!CE U+043D afii10079 +!CF U+043E afii10080 +!D0 U+043F afii10081 +!D1 U+044F afii10097 +!D2 U+0440 afii10082 +!D3 U+0441 afii10083 +!D4 U+0442 afii10084 +!D5 U+0443 afii10085 +!D6 U+0436 afii10072 +!D7 U+0432 afii10067 +!D8 U+044C afii10094 +!D9 U+044B afii10093 +!DA U+0437 afii10073 +!DB U+0448 afii10090 +!DC U+044D afii10095 +!DD U+0449 afii10091 +!DE U+0447 afii10089 +!DF U+044A afii10092 +!E0 U+042E afii10048 +!E1 U+0410 afii10017 +!E2 U+0411 afii10018 +!E3 U+0426 afii10040 +!E4 U+0414 afii10021 +!E5 U+0415 afii10022 +!E6 U+0424 afii10038 +!E7 U+0413 afii10020 +!E8 U+0425 afii10039 +!E9 U+0418 afii10026 +!EA U+0419 afii10027 +!EB U+041A afii10028 +!EC U+041B afii10029 +!ED U+041C afii10030 +!EE U+041D afii10031 +!EF U+041E afii10032 +!F0 U+041F afii10033 +!F1 U+042F afii10049 +!F2 U+0420 afii10034 +!F3 U+0421 afii10035 +!F4 U+0422 afii10036 +!F5 U+0423 afii10037 +!F6 U+0416 afii10024 +!F7 U+0412 afii10019 +!F8 U+042C afii10046 +!F9 U+042B afii10045 +!FA U+0417 afii10025 +!FB U+0428 afii10042 +!FC U+042D afii10047 +!FD U+0429 afii10043 +!FE U+0427 afii10041 +!FF U+042A afii10044 diff --git a/core/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php b/core/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php index 74332bd46..955411f06 100644 --- a/core/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php +++ b/core/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php @@ -1,860 +1,860 @@ -template_class) { - $template = $this; - } - if ($cache_id !== null && is_object($cache_id)) { - $parent = $cache_id; - $cache_id = null; - } - if ($parent === null && ($this instanceof Smarty || is_string($template))) { - $parent = $this; - } - // create template object if necessary - $_template = ($template instanceof $this->template_class) - ? $template - : $this->smarty->createTemplate($template, $cache_id, $compile_id, $parent, false); - // if called by Smarty object make sure we use current caching status - if ($this instanceof Smarty) { - $_template->caching = $this->caching; - } - // merge all variable scopes into template - if ($merge_tpl_vars) { - // save local variables - $save_tpl_vars = $_template->tpl_vars; - $save_config_vars = $_template->config_vars; - $ptr_array = array($_template); - $ptr = $_template; - while (isset($ptr->parent)) { - $ptr_array[] = $ptr = $ptr->parent; - } - $ptr_array = array_reverse($ptr_array); - $parent_ptr = reset($ptr_array); - $tpl_vars = $parent_ptr->tpl_vars; - $config_vars = $parent_ptr->config_vars; - while ($parent_ptr = next($ptr_array)) { - if (!empty($parent_ptr->tpl_vars)) { - $tpl_vars = array_merge($tpl_vars, $parent_ptr->tpl_vars); - } - if (!empty($parent_ptr->config_vars)) { - $config_vars = array_merge($config_vars, $parent_ptr->config_vars); - } - } - if (!empty(Smarty::$global_tpl_vars)) { - $tpl_vars = array_merge(Smarty::$global_tpl_vars, $tpl_vars); - } - $_template->tpl_vars = $tpl_vars; - $_template->config_vars = $config_vars; - } - // dummy local smarty variable - if (!isset($_template->tpl_vars['smarty'])) { - $_template->tpl_vars['smarty'] = new Smarty_Variable; - } - if (isset($this->smarty->error_reporting)) { - $_smarty_old_error_level = error_reporting($this->smarty->error_reporting); - } - // check URL debugging control - if (!$this->smarty->debugging && $this->smarty->debugging_ctrl == 'URL') { - if (isset($_SERVER['QUERY_STRING'])) { - $_query_string = $_SERVER['QUERY_STRING']; - } else { - $_query_string = ''; - } - if (false !== strpos($_query_string, $this->smarty->smarty_debug_id)) { - if (false !== strpos($_query_string, $this->smarty->smarty_debug_id . '=on')) { - // enable debugging for this browser session - setcookie('SMARTY_DEBUG', true); - $this->smarty->debugging = true; - } elseif (false !== strpos($_query_string, $this->smarty->smarty_debug_id . '=off')) { - // disable debugging for this browser session - setcookie('SMARTY_DEBUG', false); - $this->smarty->debugging = false; - } else { - // enable debugging for this page - $this->smarty->debugging = true; - } - } else { - if (isset($_COOKIE['SMARTY_DEBUG'])) { - $this->smarty->debugging = true; - } - } - } - // must reset merge template date - $_template->smarty->merged_templates_func = array(); - // get rendered template - // disable caching for evaluated code - if ($_template->source->recompiled) { - $_template->caching = false; - } - // checks if template exists - if (!$_template->source->exists) { - if ($_template->parent instanceof Smarty_Internal_Template) { - $parent_resource = " in '{$_template->parent->template_resource}'"; - } else { - $parent_resource = ''; - } - throw new SmartyException("Unable to load template {$_template->source->type} '{$_template->source->name}'{$parent_resource}"); - } - // read from cache or render - if (!($_template->caching == Smarty::CACHING_LIFETIME_CURRENT || $_template->caching == Smarty::CACHING_LIFETIME_SAVED) || !$_template->cached->valid) { - // render template (not loaded and not in cache) - if (!$_template->source->uncompiled) { - /** @var Smarty_Internal_Template $_smarty_tpl - * used in evaluated code - */ - $_smarty_tpl = $_template; - if ($_template->source->recompiled) { - $code = $_template->compiler->compileTemplate($_template); - if ($this->smarty->debugging) { - Smarty_Internal_Debug::start_render($_template); - } - try { - ob_start(); - eval("?>" . $code); - unset($code); - } - catch (Exception $e) { - ob_get_clean(); - throw $e; - } - } else { - if (!$_template->compiled->exists || ($_template->smarty->force_compile && !$_template->compiled->isCompiled)) { - $_template->compileTemplateSource(); - $code = file_get_contents($_template->compiled->filepath); - eval("?>" . $code); - unset($code); - $_template->compiled->loaded = true; - $_template->compiled->isCompiled = true; - } - if ($this->smarty->debugging) { - Smarty_Internal_Debug::start_render($_template); - } - if (!$_template->compiled->loaded) { - include($_template->compiled->filepath); - if ($_template->mustCompile) { - // recompile and load again - $_template->compileTemplateSource(); - $code = file_get_contents($_template->compiled->filepath); - eval("?>" . $code); - unset($code); - $_template->compiled->isCompiled = true; - } - $_template->compiled->loaded = true; - } else { - $_template->decodeProperties($_template->compiled->_properties, false); - } - try { - ob_start(); - if (empty($_template->properties['unifunc']) || !is_callable($_template->properties['unifunc'])) { - throw new SmartyException("Invalid compiled template for '{$_template->template_resource}'"); - } - array_unshift($_template->_capture_stack, array()); - // - // render compiled template - // - $_template->properties['unifunc']($_template); - // any unclosed {capture} tags ? - if (isset($_template->_capture_stack[0][0])) { - $_template->capture_error(); - } - array_shift($_template->_capture_stack); - } - catch (Exception $e) { - ob_get_clean(); - throw $e; - } - } - } else { - if ($_template->source->uncompiled) { - if ($this->smarty->debugging) { - Smarty_Internal_Debug::start_render($_template); - } - try { - ob_start(); - $_template->source->renderUncompiled($_template); - } - catch (Exception $e) { - ob_get_clean(); - throw $e; - } - } else { - throw new SmartyException("Resource '$_template->source->type' must have 'renderUncompiled' method"); - } - } - $_output = ob_get_clean(); - if (!$_template->source->recompiled && empty($_template->properties['file_dependency'][$_template->source->uid])) { - $_template->properties['file_dependency'][$_template->source->uid] = array($_template->source->filepath, $_template->source->timestamp, $_template->source->type); - } - if ($_template->parent instanceof Smarty_Internal_Template) { - $_template->parent->properties['file_dependency'] = array_merge($_template->parent->properties['file_dependency'], $_template->properties['file_dependency']); - foreach ($_template->required_plugins as $code => $tmp1) { - foreach ($tmp1 as $name => $tmp) { - foreach ($tmp as $type => $data) { - $_template->parent->required_plugins[$code][$name][$type] = $data; - } - } - } - } - if ($this->smarty->debugging) { - Smarty_Internal_Debug::end_render($_template); - } - // write to cache when nessecary - if (!$_template->source->recompiled && ($_template->caching == Smarty::CACHING_LIFETIME_SAVED || $_template->caching == Smarty::CACHING_LIFETIME_CURRENT)) { - if ($this->smarty->debugging) { - Smarty_Internal_Debug::start_cache($_template); - } - $_template->properties['has_nocache_code'] = false; - // get text between non-cached items - $cache_split = preg_split("!/\*%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*\/(.+?)/\*/%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*/!s", $_output); - // get non-cached items - preg_match_all("!/\*%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*\/(.+?)/\*/%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*/!s", $_output, $cache_parts); - $output = ''; - // loop over items, stitch back together - foreach ($cache_split as $curr_idx => $curr_split) { - // escape PHP tags in template content - $output .= preg_replace('/(<%|%>|<\?php|<\?|\?>)/', "\n", $curr_split); - if (isset($cache_parts[0][$curr_idx])) { - $_template->properties['has_nocache_code'] = true; - // remove nocache tags from cache output - $output .= preg_replace("!/\*/?%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*/!", '', $cache_parts[0][$curr_idx]); - } - } - if (!$no_output_filter && !$_template->has_nocache_code && (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))) { - $output = Smarty_Internal_Filter_Handler::runFilter('output', $output, $_template); - } - // rendering (must be done before writing cache file because of {function} nocache handling) - /** @var Smarty_Internal_Template $_smarty_tpl - * used in evaluated code - */ - $_smarty_tpl = $_template; - try { - ob_start(); - eval("?>" . $output); - $_output = ob_get_clean(); - } - catch (Exception $e) { - ob_get_clean(); - throw $e; - } - // write cache file content - $_template->writeCachedContent($output); - if ($this->smarty->debugging) { - Smarty_Internal_Debug::end_cache($_template); - } - } else { - // var_dump('renderTemplate', $_template->has_nocache_code, $_template->template_resource, $_template->properties['nocache_hash'], $_template->parent->properties['nocache_hash'], $_output); - if (!empty($_template->properties['nocache_hash']) && !empty($_template->parent->properties['nocache_hash'])) { - // replace nocache_hash - $_output = str_replace("{$_template->properties['nocache_hash']}", $_template->parent->properties['nocache_hash'], $_output); - $_template->parent->has_nocache_code = $_template->parent->has_nocache_code || $_template->has_nocache_code; - } - } - } else { - if ($this->smarty->debugging) { - Smarty_Internal_Debug::start_cache($_template); - } - try { - ob_start(); - array_unshift($_template->_capture_stack, array()); - // - // render cached template - // - $_template->properties['unifunc']($_template); - // any unclosed {capture} tags ? - if (isset($_template->_capture_stack[0][0])) { - $_template->capture_error(); - } - array_shift($_template->_capture_stack); - $_output = ob_get_clean(); - } - catch (Exception $e) { - ob_get_clean(); - throw $e; - } - if ($this->smarty->debugging) { - Smarty_Internal_Debug::end_cache($_template); - } - } - if ((!$this->caching || $_template->has_nocache_code || $_template->source->recompiled) && !$no_output_filter && (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))) { - $_output = Smarty_Internal_Filter_Handler::runFilter('output', $_output, $_template); - } - if (isset($this->error_reporting)) { - error_reporting($_smarty_old_error_level); - } - // display or fetch - if ($display) { - if ($this->caching && $this->cache_modified_check) { - $_isCached = $_template->isCached() && !$_template->has_nocache_code; - $_last_modified_date = @substr($_SERVER['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3); - if ($_isCached && $_template->cached->timestamp <= strtotime($_last_modified_date)) { - switch (PHP_SAPI) { - case 'cgi': // php-cgi < 5.3 - case 'cgi-fcgi': // php-cgi >= 5.3 - case 'fpm-fcgi': // php-fpm >= 5.3.3 - header('Status: 304 Not Modified'); - break; - - case 'cli': - if ( /* ^phpunit */ - !empty($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS']) /* phpunit$ */ - ) { - $_SERVER['SMARTY_PHPUNIT_HEADERS'][] = '304 Not Modified'; - } - break; - - default: - header($_SERVER['SERVER_PROTOCOL'] . ' 304 Not Modified'); - break; - } - } else { - switch (PHP_SAPI) { - case 'cli': - if ( /* ^phpunit */ - !empty($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS']) /* phpunit$ */ - ) { - $_SERVER['SMARTY_PHPUNIT_HEADERS'][] = 'Last-Modified: ' . gmdate('D, d M Y H:i:s', $_template->cached->timestamp) . ' GMT'; - } - break; - - default: - header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $_template->cached->timestamp) . ' GMT'); - break; - } - echo $_output; - } - } else { - echo $_output; - } - // debug output - if ($this->smarty->debugging) { - Smarty_Internal_Debug::display_debug($_template); - } - if ($merge_tpl_vars) { - // restore local variables - $_template->tpl_vars = $save_tpl_vars; - $_template->config_vars = $save_config_vars; - } - - return; - } else { - if ($merge_tpl_vars) { - // restore local variables - $_template->tpl_vars = $save_tpl_vars; - $_template->config_vars = $save_config_vars; - } - // return fetched content - return $_output; - } - } - - /** - * displays a Smarty template - * - * @param string $template the resource handle of the template file or template object - * @param mixed $cache_id cache id to be used with this template - * @param mixed $compile_id compile id to be used with this template - * @param object $parent next higher level of Smarty variables - */ - public function display($template = null, $cache_id = null, $compile_id = null, $parent = null) - { - // display template - $this->fetch($template, $cache_id, $compile_id, $parent, true); - } - - /** - * test if cache is valid - * - * @param string|object $template the resource handle of the template file or template object - * @param mixed $cache_id cache id to be used with this template - * @param mixed $compile_id compile id to be used with this template - * @param object $parent next higher level of Smarty variables - * - * @return boolean cache status - */ - public function isCached($template = null, $cache_id = null, $compile_id = null, $parent = null) - { - if ($template === null && $this instanceof $this->template_class) { - return $this->cached->valid; - } - if (!($template instanceof $this->template_class)) { - if ($parent === null) { - $parent = $this; - } - $template = $this->smarty->createTemplate($template, $cache_id, $compile_id, $parent, false); - } - // return cache status of template - return $template->cached->valid; - } - - /** - * creates a data object - * - * @param object $parent next higher level of Smarty variables - * - * @returns Smarty_Data data object - */ - public function createData($parent = null) - { - return new Smarty_Data($parent, $this); - } - - /** - * Registers plugin to be used in templates - * - * @param string $type plugin type - * @param string $tag name of template tag - * @param callback $callback PHP callback to register - * @param boolean $cacheable if true (default) this fuction is cachable - * @param array $cache_attr caching attributes if any - * - * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining - * @throws SmartyException when the plugin tag is invalid - */ - public function registerPlugin($type, $tag, $callback, $cacheable = true, $cache_attr = null) - { - if (isset($this->smarty->registered_plugins[$type][$tag])) { - throw new SmartyException("Plugin tag \"{$tag}\" already registered"); - } elseif (!is_callable($callback)) { - throw new SmartyException("Plugin \"{$tag}\" not callable"); - } else { - $this->smarty->registered_plugins[$type][$tag] = array($callback, (bool) $cacheable, (array) $cache_attr); - } - - return $this; - } - - /** - * Unregister Plugin - * - * @param string $type of plugin - * @param string $tag name of plugin - * - * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining - */ - public function unregisterPlugin($type, $tag) - { - if (isset($this->smarty->registered_plugins[$type][$tag])) { - unset($this->smarty->registered_plugins[$type][$tag]); - } - - return $this; - } - - /** - * Registers a resource to fetch a template - * - * @param string $type name of resource type - * @param Smarty_Resource|array $callback or instance of Smarty_Resource, or array of callbacks to handle resource (deprecated) - * - * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining - */ - public function registerResource($type, $callback) - { - $this->smarty->registered_resources[$type] = $callback instanceof Smarty_Resource ? $callback : array($callback, false); - - return $this; - } - - /** - * Unregisters a resource - * - * @param string $type name of resource type - * - * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining - */ - public function unregisterResource($type) - { - if (isset($this->smarty->registered_resources[$type])) { - unset($this->smarty->registered_resources[$type]); - } - - return $this; - } - - /** - * Registers a cache resource to cache a template's output - * - * @param string $type name of cache resource type - * @param Smarty_CacheResource $callback instance of Smarty_CacheResource to handle output caching - * - * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining - */ - public function registerCacheResource($type, Smarty_CacheResource $callback) - { - $this->smarty->registered_cache_resources[$type] = $callback; - - return $this; - } - - /** - * Unregisters a cache resource - * - * @param string $type name of cache resource type - * - * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining - */ - public function unregisterCacheResource($type) - { - if (isset($this->smarty->registered_cache_resources[$type])) { - unset($this->smarty->registered_cache_resources[$type]); - } - - return $this; - } - - /** - * Registers object to be used in templates - * - * @param $object_name - * @param object $object_impl the referenced PHP object to register - * @param array $allowed list of allowed methods (empty = all) - * @param boolean $smarty_args smarty argument format, else traditional - * @param array $block_methods list of block-methods - * - * @throws SmartyException - * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining - */ - public function registerObject($object_name, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array()) - { - // test if allowed methods callable - if (!empty($allowed)) { - foreach ((array) $allowed as $method) { - if (!is_callable(array($object_impl, $method)) && !property_exists($object_impl, $method)) { - throw new SmartyException("Undefined method or property '$method' in registered object"); - } - } - } - // test if block methods callable - if (!empty($block_methods)) { - foreach ((array) $block_methods as $method) { - if (!is_callable(array($object_impl, $method))) { - throw new SmartyException("Undefined method '$method' in registered object"); - } - } - } - // register the object - $this->smarty->registered_objects[$object_name] = - array($object_impl, (array) $allowed, (boolean) $smarty_args, (array) $block_methods); - - return $this; - } - - /** - * return a reference to a registered object - * - * @param string $name object name - * - * @return object - * @throws SmartyException if no such object is found - */ - public function getRegisteredObject($name) - { - if (!isset($this->smarty->registered_objects[$name])) { - throw new SmartyException("'$name' is not a registered object"); - } - if (!is_object($this->smarty->registered_objects[$name][0])) { - throw new SmartyException("registered '$name' is not an object"); - } - - return $this->smarty->registered_objects[$name][0]; - } - - /** - * unregister an object - * - * @param string $name object name - * - * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining - */ - public function unregisterObject($name) - { - if (isset($this->smarty->registered_objects[$name])) { - unset($this->smarty->registered_objects[$name]); - } - - return $this; - } - - /** - * Registers static classes to be used in templates - * - * @param $class_name - * @param string $class_impl the referenced PHP class to register - * - * @throws SmartyException - * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining - */ - public function registerClass($class_name, $class_impl) - { - // test if exists - if (!class_exists($class_impl)) { - throw new SmartyException("Undefined class '$class_impl' in register template class"); - } - // register the class - $this->smarty->registered_classes[$class_name] = $class_impl; - - return $this; - } - - /** - * Registers a default plugin handler - * - * @param callable $callback class/method name - * - * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining - * @throws SmartyException if $callback is not callable - */ - public function registerDefaultPluginHandler($callback) - { - if (is_callable($callback)) { - $this->smarty->default_plugin_handler_func = $callback; - } else { - throw new SmartyException("Default plugin handler '$callback' not callable"); - } - - return $this; - } - - /** - * Registers a default template handler - * - * @param callable $callback class/method name - * - * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining - * @throws SmartyException if $callback is not callable - */ - public function registerDefaultTemplateHandler($callback) - { - if (is_callable($callback)) { - $this->smarty->default_template_handler_func = $callback; - } else { - throw new SmartyException("Default template handler '$callback' not callable"); - } - - return $this; - } - - /** - * Registers a default template handler - * - * @param callable $callback class/method name - * - * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining - * @throws SmartyException if $callback is not callable - */ - public function registerDefaultConfigHandler($callback) - { - if (is_callable($callback)) { - $this->smarty->default_config_handler_func = $callback; - } else { - throw new SmartyException("Default config handler '$callback' not callable"); - } - - return $this; - } - - /** - * Registers a filter function - * - * @param string $type filter type - * @param callback $callback - * - * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining - */ - public function registerFilter($type, $callback) - { - $this->smarty->registered_filters[$type][$this->_get_filter_name($callback)] = $callback; - - return $this; - } - - /** - * Unregisters a filter function - * - * @param string $type filter type - * @param callback $callback - * - * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining - */ - public function unregisterFilter($type, $callback) - { - $name = $this->_get_filter_name($callback); - if (isset($this->smarty->registered_filters[$type][$name])) { - unset($this->smarty->registered_filters[$type][$name]); - } - - return $this; - } - - /** - * Return internal filter name - * - * @param callback $function_name - * - * @return string internal filter name - */ - public function _get_filter_name($function_name) - { - if (is_array($function_name)) { - $_class_name = (is_object($function_name[0]) ? - get_class($function_name[0]) : $function_name[0]); - - return $_class_name . '_' . $function_name[1]; - } else { - return $function_name; - } - } - - /** - * load a filter of specified type and name - * - * @param string $type filter type - * @param string $name filter name - * - * @throws SmartyException if filter could not be loaded - */ - public function loadFilter($type, $name) - { - $_plugin = "smarty_{$type}filter_{$name}"; - $_filter_name = $_plugin; - if ($this->smarty->loadPlugin($_plugin)) { - if (class_exists($_plugin, false)) { - $_plugin = array($_plugin, 'execute'); - } - if (is_callable($_plugin)) { - $this->smarty->registered_filters[$type][$_filter_name] = $_plugin; - - return true; - } - } - throw new SmartyException("{$type}filter \"{$name}\" not callable"); - } - - /** - * unload a filter of specified type and name - * - * @param string $type filter type - * @param string $name filter name - * - * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining - */ - public function unloadFilter($type, $name) - { - $_filter_name = "smarty_{$type}filter_{$name}"; - if (isset($this->smarty->registered_filters[$type][$_filter_name])) { - unset ($this->smarty->registered_filters[$type][$_filter_name]); - } - - return $this; - } - - /** - * preg_replace callback to convert camelcase getter/setter to underscore property names - * - * @param string $match match string - * - * @return string replacemant - */ - private function replaceCamelcase($match) - { - return "_" . strtolower($match[1]); - } - - /** - * Handle unknown class methods - * - * @param string $name unknown method-name - * @param array $args argument array - * - * @throws SmartyException - */ - public function __call($name, $args) - { - static $_prefixes = array('set' => true, 'get' => true); - static $_resolved_property_name = array(); - static $_resolved_property_source = array(); - - // method of Smarty object? - if (method_exists($this->smarty, $name)) { - return call_user_func_array(array($this->smarty, $name), $args); - } - // see if this is a set/get for a property - $first3 = strtolower(substr($name, 0, 3)); - if (isset($_prefixes[$first3]) && isset($name[3]) && $name[3] !== '_') { - if (isset($_resolved_property_name[$name])) { - $property_name = $_resolved_property_name[$name]; - } else { - // try to keep case correct for future PHP 6.0 case-sensitive class methods - // lcfirst() not available < PHP 5.3.0, so improvise - $property_name = strtolower(substr($name, 3, 1)) . substr($name, 4); - // convert camel case to underscored name - $property_name = preg_replace_callback('/([A-Z])/', array($this, 'replaceCamelcase'), $property_name); - $_resolved_property_name[$name] = $property_name; - } - if (isset($_resolved_property_source[$property_name])) { - $_is_this = $_resolved_property_source[$property_name]; - } else { - $_is_this = null; - if (property_exists($this, $property_name)) { - $_is_this = true; - } elseif (property_exists($this->smarty, $property_name)) { - $_is_this = false; - } - $_resolved_property_source[$property_name] = $_is_this; - } - if ($_is_this) { - if ($first3 == 'get') { - return $this->$property_name; - } else { - return $this->$property_name = $args[0]; - } - } elseif ($_is_this === false) { - if ($first3 == 'get') { - return $this->smarty->$property_name; - } else { - return $this->smarty->$property_name = $args[0]; - } - } else { - throw new SmartyException("property '$property_name' does not exist."); - } - } - if ($name == 'Smarty') { - throw new SmartyException("PHP5 requires you to call __construct() instead of Smarty()"); - } - // must be unknown - throw new SmartyException("Call of unknown method '$name'."); - } -} +template_class) { + $template = $this; + } + if ($cache_id !== null && is_object($cache_id)) { + $parent = $cache_id; + $cache_id = null; + } + if ($parent === null && ($this instanceof Smarty || is_string($template))) { + $parent = $this; + } + // create template object if necessary + $_template = ($template instanceof $this->template_class) + ? $template + : $this->smarty->createTemplate($template, $cache_id, $compile_id, $parent, false); + // if called by Smarty object make sure we use current caching status + if ($this instanceof Smarty) { + $_template->caching = $this->caching; + } + // merge all variable scopes into template + if ($merge_tpl_vars) { + // save local variables + $save_tpl_vars = $_template->tpl_vars; + $save_config_vars = $_template->config_vars; + $ptr_array = array($_template); + $ptr = $_template; + while (isset($ptr->parent)) { + $ptr_array[] = $ptr = $ptr->parent; + } + $ptr_array = array_reverse($ptr_array); + $parent_ptr = reset($ptr_array); + $tpl_vars = $parent_ptr->tpl_vars; + $config_vars = $parent_ptr->config_vars; + while ($parent_ptr = next($ptr_array)) { + if (!empty($parent_ptr->tpl_vars)) { + $tpl_vars = array_merge($tpl_vars, $parent_ptr->tpl_vars); + } + if (!empty($parent_ptr->config_vars)) { + $config_vars = array_merge($config_vars, $parent_ptr->config_vars); + } + } + if (!empty(Smarty::$global_tpl_vars)) { + $tpl_vars = array_merge(Smarty::$global_tpl_vars, $tpl_vars); + } + $_template->tpl_vars = $tpl_vars; + $_template->config_vars = $config_vars; + } + // dummy local smarty variable + if (!isset($_template->tpl_vars['smarty'])) { + $_template->tpl_vars['smarty'] = new Smarty_Variable; + } + if (isset($this->smarty->error_reporting)) { + $_smarty_old_error_level = error_reporting($this->smarty->error_reporting); + } + // check URL debugging control + if (!$this->smarty->debugging && $this->smarty->debugging_ctrl == 'URL') { + if (isset($_SERVER['QUERY_STRING'])) { + $_query_string = $_SERVER['QUERY_STRING']; + } else { + $_query_string = ''; + } + if (false !== strpos($_query_string, $this->smarty->smarty_debug_id)) { + if (false !== strpos($_query_string, $this->smarty->smarty_debug_id . '=on')) { + // enable debugging for this browser session + setcookie('SMARTY_DEBUG', true); + $this->smarty->debugging = true; + } elseif (false !== strpos($_query_string, $this->smarty->smarty_debug_id . '=off')) { + // disable debugging for this browser session + setcookie('SMARTY_DEBUG', false); + $this->smarty->debugging = false; + } else { + // enable debugging for this page + $this->smarty->debugging = true; + } + } else { + if (isset($_COOKIE['SMARTY_DEBUG'])) { + $this->smarty->debugging = true; + } + } + } + // must reset merge template date + $_template->smarty->merged_templates_func = array(); + // get rendered template + // disable caching for evaluated code + if ($_template->source->recompiled) { + $_template->caching = false; + } + // checks if template exists + if (!$_template->source->exists) { + if ($_template->parent instanceof Smarty_Internal_Template) { + $parent_resource = " in '{$_template->parent->template_resource}'"; + } else { + $parent_resource = ''; + } + throw new SmartyException("Unable to load template {$_template->source->type} '{$_template->source->name}'{$parent_resource}"); + } + // read from cache or render + if (!($_template->caching == Smarty::CACHING_LIFETIME_CURRENT || $_template->caching == Smarty::CACHING_LIFETIME_SAVED) || !$_template->cached->valid) { + // render template (not loaded and not in cache) + if (!$_template->source->uncompiled) { + /** @var Smarty_Internal_Template $_smarty_tpl + * used in evaluated code + */ + $_smarty_tpl = $_template; + if ($_template->source->recompiled) { + $code = $_template->compiler->compileTemplate($_template); + if ($this->smarty->debugging) { + Smarty_Internal_Debug::start_render($_template); + } + try { + ob_start(); + eval("?>" . $code); + unset($code); + } + catch (Exception $e) { + ob_get_clean(); + throw $e; + } + } else { + if (!$_template->compiled->exists || ($_template->smarty->force_compile && !$_template->compiled->isCompiled)) { + $_template->compileTemplateSource(); + $code = file_get_contents($_template->compiled->filepath); + eval("?>" . $code); + unset($code); + $_template->compiled->loaded = true; + $_template->compiled->isCompiled = true; + } + if ($this->smarty->debugging) { + Smarty_Internal_Debug::start_render($_template); + } + if (!$_template->compiled->loaded) { + include($_template->compiled->filepath); + if ($_template->mustCompile) { + // recompile and load again + $_template->compileTemplateSource(); + $code = file_get_contents($_template->compiled->filepath); + eval("?>" . $code); + unset($code); + $_template->compiled->isCompiled = true; + } + $_template->compiled->loaded = true; + } else { + $_template->decodeProperties($_template->compiled->_properties, false); + } + try { + ob_start(); + if (empty($_template->properties['unifunc']) || !is_callable($_template->properties['unifunc'])) { + throw new SmartyException("Invalid compiled template for '{$_template->template_resource}'"); + } + array_unshift($_template->_capture_stack, array()); + // + // render compiled template + // + $_template->properties['unifunc']($_template); + // any unclosed {capture} tags ? + if (isset($_template->_capture_stack[0][0])) { + $_template->capture_error(); + } + array_shift($_template->_capture_stack); + } + catch (Exception $e) { + ob_get_clean(); + throw $e; + } + } + } else { + if ($_template->source->uncompiled) { + if ($this->smarty->debugging) { + Smarty_Internal_Debug::start_render($_template); + } + try { + ob_start(); + $_template->source->renderUncompiled($_template); + } + catch (Exception $e) { + ob_get_clean(); + throw $e; + } + } else { + throw new SmartyException("Resource '$_template->source->type' must have 'renderUncompiled' method"); + } + } + $_output = ob_get_clean(); + if (!$_template->source->recompiled && empty($_template->properties['file_dependency'][$_template->source->uid])) { + $_template->properties['file_dependency'][$_template->source->uid] = array($_template->source->filepath, $_template->source->timestamp, $_template->source->type); + } + if ($_template->parent instanceof Smarty_Internal_Template) { + $_template->parent->properties['file_dependency'] = array_merge($_template->parent->properties['file_dependency'], $_template->properties['file_dependency']); + foreach ($_template->required_plugins as $code => $tmp1) { + foreach ($tmp1 as $name => $tmp) { + foreach ($tmp as $type => $data) { + $_template->parent->required_plugins[$code][$name][$type] = $data; + } + } + } + } + if ($this->smarty->debugging) { + Smarty_Internal_Debug::end_render($_template); + } + // write to cache when nessecary + if (!$_template->source->recompiled && ($_template->caching == Smarty::CACHING_LIFETIME_SAVED || $_template->caching == Smarty::CACHING_LIFETIME_CURRENT)) { + if ($this->smarty->debugging) { + Smarty_Internal_Debug::start_cache($_template); + } + $_template->properties['has_nocache_code'] = false; + // get text between non-cached items + $cache_split = preg_split("!/\*%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*\/(.+?)/\*/%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*/!s", $_output); + // get non-cached items + preg_match_all("!/\*%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*\/(.+?)/\*/%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*/!s", $_output, $cache_parts); + $output = ''; + // loop over items, stitch back together + foreach ($cache_split as $curr_idx => $curr_split) { + // escape PHP tags in template content + $output .= preg_replace('/(<%|%>|<\?php|<\?|\?>)/', "\n", $curr_split); + if (isset($cache_parts[0][$curr_idx])) { + $_template->properties['has_nocache_code'] = true; + // remove nocache tags from cache output + $output .= preg_replace("!/\*/?%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*/!", '', $cache_parts[0][$curr_idx]); + } + } + if (!$no_output_filter && !$_template->has_nocache_code && (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))) { + $output = Smarty_Internal_Filter_Handler::runFilter('output', $output, $_template); + } + // rendering (must be done before writing cache file because of {function} nocache handling) + /** @var Smarty_Internal_Template $_smarty_tpl + * used in evaluated code + */ + $_smarty_tpl = $_template; + try { + ob_start(); + eval("?>" . $output); + $_output = ob_get_clean(); + } + catch (Exception $e) { + ob_get_clean(); + throw $e; + } + // write cache file content + $_template->writeCachedContent($output); + if ($this->smarty->debugging) { + Smarty_Internal_Debug::end_cache($_template); + } + } else { + // var_dump('renderTemplate', $_template->has_nocache_code, $_template->template_resource, $_template->properties['nocache_hash'], $_template->parent->properties['nocache_hash'], $_output); + if (!empty($_template->properties['nocache_hash']) && !empty($_template->parent->properties['nocache_hash'])) { + // replace nocache_hash + $_output = str_replace("{$_template->properties['nocache_hash']}", $_template->parent->properties['nocache_hash'], $_output); + $_template->parent->has_nocache_code = $_template->parent->has_nocache_code || $_template->has_nocache_code; + } + } + } else { + if ($this->smarty->debugging) { + Smarty_Internal_Debug::start_cache($_template); + } + try { + ob_start(); + array_unshift($_template->_capture_stack, array()); + // + // render cached template + // + $_template->properties['unifunc']($_template); + // any unclosed {capture} tags ? + if (isset($_template->_capture_stack[0][0])) { + $_template->capture_error(); + } + array_shift($_template->_capture_stack); + $_output = ob_get_clean(); + } + catch (Exception $e) { + ob_get_clean(); + throw $e; + } + if ($this->smarty->debugging) { + Smarty_Internal_Debug::end_cache($_template); + } + } + if ((!$this->caching || $_template->has_nocache_code || $_template->source->recompiled) && !$no_output_filter && (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))) { + $_output = Smarty_Internal_Filter_Handler::runFilter('output', $_output, $_template); + } + if (isset($this->error_reporting)) { + error_reporting($_smarty_old_error_level); + } + // display or fetch + if ($display) { + if ($this->caching && $this->cache_modified_check) { + $_isCached = $_template->isCached() && !$_template->has_nocache_code; + $_last_modified_date = @substr($_SERVER['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3); + if ($_isCached && $_template->cached->timestamp <= strtotime($_last_modified_date)) { + switch (PHP_SAPI) { + case 'cgi': // php-cgi < 5.3 + case 'cgi-fcgi': // php-cgi >= 5.3 + case 'fpm-fcgi': // php-fpm >= 5.3.3 + header('Status: 304 Not Modified'); + break; + + case 'cli': + if ( /* ^phpunit */ + !empty($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS']) /* phpunit$ */ + ) { + $_SERVER['SMARTY_PHPUNIT_HEADERS'][] = '304 Not Modified'; + } + break; + + default: + header($_SERVER['SERVER_PROTOCOL'] . ' 304 Not Modified'); + break; + } + } else { + switch (PHP_SAPI) { + case 'cli': + if ( /* ^phpunit */ + !empty($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS']) /* phpunit$ */ + ) { + $_SERVER['SMARTY_PHPUNIT_HEADERS'][] = 'Last-Modified: ' . gmdate('D, d M Y H:i:s', $_template->cached->timestamp) . ' GMT'; + } + break; + + default: + header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $_template->cached->timestamp) . ' GMT'); + break; + } + echo $_output; + } + } else { + echo $_output; + } + // debug output + if ($this->smarty->debugging) { + Smarty_Internal_Debug::display_debug($_template); + } + if ($merge_tpl_vars) { + // restore local variables + $_template->tpl_vars = $save_tpl_vars; + $_template->config_vars = $save_config_vars; + } + + return; + } else { + if ($merge_tpl_vars) { + // restore local variables + $_template->tpl_vars = $save_tpl_vars; + $_template->config_vars = $save_config_vars; + } + // return fetched content + return $_output; + } + } + + /** + * displays a Smarty template + * + * @param string $template the resource handle of the template file or template object + * @param mixed $cache_id cache id to be used with this template + * @param mixed $compile_id compile id to be used with this template + * @param object $parent next higher level of Smarty variables + */ + public function display($template = null, $cache_id = null, $compile_id = null, $parent = null) + { + // display template + $this->fetch($template, $cache_id, $compile_id, $parent, true); + } + + /** + * test if cache is valid + * + * @param string|object $template the resource handle of the template file or template object + * @param mixed $cache_id cache id to be used with this template + * @param mixed $compile_id compile id to be used with this template + * @param object $parent next higher level of Smarty variables + * + * @return boolean cache status + */ + public function isCached($template = null, $cache_id = null, $compile_id = null, $parent = null) + { + if ($template === null && $this instanceof $this->template_class) { + return $this->cached->valid; + } + if (!($template instanceof $this->template_class)) { + if ($parent === null) { + $parent = $this; + } + $template = $this->smarty->createTemplate($template, $cache_id, $compile_id, $parent, false); + } + // return cache status of template + return $template->cached->valid; + } + + /** + * creates a data object + * + * @param object $parent next higher level of Smarty variables + * + * @returns Smarty_Data data object + */ + public function createData($parent = null) + { + return new Smarty_Data($parent, $this); + } + + /** + * Registers plugin to be used in templates + * + * @param string $type plugin type + * @param string $tag name of template tag + * @param callback $callback PHP callback to register + * @param boolean $cacheable if true (default) this fuction is cachable + * @param array $cache_attr caching attributes if any + * + * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining + * @throws SmartyException when the plugin tag is invalid + */ + public function registerPlugin($type, $tag, $callback, $cacheable = true, $cache_attr = null) + { + if (isset($this->smarty->registered_plugins[$type][$tag])) { + throw new SmartyException("Plugin tag \"{$tag}\" already registered"); + } elseif (!is_callable($callback)) { + throw new SmartyException("Plugin \"{$tag}\" not callable"); + } else { + $this->smarty->registered_plugins[$type][$tag] = array($callback, (bool) $cacheable, (array) $cache_attr); + } + + return $this; + } + + /** + * Unregister Plugin + * + * @param string $type of plugin + * @param string $tag name of plugin + * + * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining + */ + public function unregisterPlugin($type, $tag) + { + if (isset($this->smarty->registered_plugins[$type][$tag])) { + unset($this->smarty->registered_plugins[$type][$tag]); + } + + return $this; + } + + /** + * Registers a resource to fetch a template + * + * @param string $type name of resource type + * @param Smarty_Resource|array $callback or instance of Smarty_Resource, or array of callbacks to handle resource (deprecated) + * + * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining + */ + public function registerResource($type, $callback) + { + $this->smarty->registered_resources[$type] = $callback instanceof Smarty_Resource ? $callback : array($callback, false); + + return $this; + } + + /** + * Unregisters a resource + * + * @param string $type name of resource type + * + * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining + */ + public function unregisterResource($type) + { + if (isset($this->smarty->registered_resources[$type])) { + unset($this->smarty->registered_resources[$type]); + } + + return $this; + } + + /** + * Registers a cache resource to cache a template's output + * + * @param string $type name of cache resource type + * @param Smarty_CacheResource $callback instance of Smarty_CacheResource to handle output caching + * + * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining + */ + public function registerCacheResource($type, Smarty_CacheResource $callback) + { + $this->smarty->registered_cache_resources[$type] = $callback; + + return $this; + } + + /** + * Unregisters a cache resource + * + * @param string $type name of cache resource type + * + * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining + */ + public function unregisterCacheResource($type) + { + if (isset($this->smarty->registered_cache_resources[$type])) { + unset($this->smarty->registered_cache_resources[$type]); + } + + return $this; + } + + /** + * Registers object to be used in templates + * + * @param $object_name + * @param object $object_impl the referenced PHP object to register + * @param array $allowed list of allowed methods (empty = all) + * @param boolean $smarty_args smarty argument format, else traditional + * @param array $block_methods list of block-methods + * + * @throws SmartyException + * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining + */ + public function registerObject($object_name, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array()) + { + // test if allowed methods callable + if (!empty($allowed)) { + foreach ((array) $allowed as $method) { + if (!is_callable(array($object_impl, $method)) && !property_exists($object_impl, $method)) { + throw new SmartyException("Undefined method or property '$method' in registered object"); + } + } + } + // test if block methods callable + if (!empty($block_methods)) { + foreach ((array) $block_methods as $method) { + if (!is_callable(array($object_impl, $method))) { + throw new SmartyException("Undefined method '$method' in registered object"); + } + } + } + // register the object + $this->smarty->registered_objects[$object_name] = + array($object_impl, (array) $allowed, (boolean) $smarty_args, (array) $block_methods); + + return $this; + } + + /** + * return a reference to a registered object + * + * @param string $name object name + * + * @return object + * @throws SmartyException if no such object is found + */ + public function getRegisteredObject($name) + { + if (!isset($this->smarty->registered_objects[$name])) { + throw new SmartyException("'$name' is not a registered object"); + } + if (!is_object($this->smarty->registered_objects[$name][0])) { + throw new SmartyException("registered '$name' is not an object"); + } + + return $this->smarty->registered_objects[$name][0]; + } + + /** + * unregister an object + * + * @param string $name object name + * + * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining + */ + public function unregisterObject($name) + { + if (isset($this->smarty->registered_objects[$name])) { + unset($this->smarty->registered_objects[$name]); + } + + return $this; + } + + /** + * Registers static classes to be used in templates + * + * @param $class_name + * @param string $class_impl the referenced PHP class to register + * + * @throws SmartyException + * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining + */ + public function registerClass($class_name, $class_impl) + { + // test if exists + if (!class_exists($class_impl)) { + throw new SmartyException("Undefined class '$class_impl' in register template class"); + } + // register the class + $this->smarty->registered_classes[$class_name] = $class_impl; + + return $this; + } + + /** + * Registers a default plugin handler + * + * @param callable $callback class/method name + * + * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining + * @throws SmartyException if $callback is not callable + */ + public function registerDefaultPluginHandler($callback) + { + if (is_callable($callback)) { + $this->smarty->default_plugin_handler_func = $callback; + } else { + throw new SmartyException("Default plugin handler '$callback' not callable"); + } + + return $this; + } + + /** + * Registers a default template handler + * + * @param callable $callback class/method name + * + * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining + * @throws SmartyException if $callback is not callable + */ + public function registerDefaultTemplateHandler($callback) + { + if (is_callable($callback)) { + $this->smarty->default_template_handler_func = $callback; + } else { + throw new SmartyException("Default template handler '$callback' not callable"); + } + + return $this; + } + + /** + * Registers a default template handler + * + * @param callable $callback class/method name + * + * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining + * @throws SmartyException if $callback is not callable + */ + public function registerDefaultConfigHandler($callback) + { + if (is_callable($callback)) { + $this->smarty->default_config_handler_func = $callback; + } else { + throw new SmartyException("Default config handler '$callback' not callable"); + } + + return $this; + } + + /** + * Registers a filter function + * + * @param string $type filter type + * @param callback $callback + * + * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining + */ + public function registerFilter($type, $callback) + { + $this->smarty->registered_filters[$type][$this->_get_filter_name($callback)] = $callback; + + return $this; + } + + /** + * Unregisters a filter function + * + * @param string $type filter type + * @param callback $callback + * + * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining + */ + public function unregisterFilter($type, $callback) + { + $name = $this->_get_filter_name($callback); + if (isset($this->smarty->registered_filters[$type][$name])) { + unset($this->smarty->registered_filters[$type][$name]); + } + + return $this; + } + + /** + * Return internal filter name + * + * @param callback $function_name + * + * @return string internal filter name + */ + public function _get_filter_name($function_name) + { + if (is_array($function_name)) { + $_class_name = (is_object($function_name[0]) ? + get_class($function_name[0]) : $function_name[0]); + + return $_class_name . '_' . $function_name[1]; + } else { + return $function_name; + } + } + + /** + * load a filter of specified type and name + * + * @param string $type filter type + * @param string $name filter name + * + * @throws SmartyException if filter could not be loaded + */ + public function loadFilter($type, $name) + { + $_plugin = "smarty_{$type}filter_{$name}"; + $_filter_name = $_plugin; + if ($this->smarty->loadPlugin($_plugin)) { + if (class_exists($_plugin, false)) { + $_plugin = array($_plugin, 'execute'); + } + if (is_callable($_plugin)) { + $this->smarty->registered_filters[$type][$_filter_name] = $_plugin; + + return true; + } + } + throw new SmartyException("{$type}filter \"{$name}\" not callable"); + } + + /** + * unload a filter of specified type and name + * + * @param string $type filter type + * @param string $name filter name + * + * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining + */ + public function unloadFilter($type, $name) + { + $_filter_name = "smarty_{$type}filter_{$name}"; + if (isset($this->smarty->registered_filters[$type][$_filter_name])) { + unset ($this->smarty->registered_filters[$type][$_filter_name]); + } + + return $this; + } + + /** + * preg_replace callback to convert camelcase getter/setter to underscore property names + * + * @param string $match match string + * + * @return string replacemant + */ + private function replaceCamelcase($match) + { + return "_" . strtolower($match[1]); + } + + /** + * Handle unknown class methods + * + * @param string $name unknown method-name + * @param array $args argument array + * + * @throws SmartyException + */ + public function __call($name, $args) + { + static $_prefixes = array('set' => true, 'get' => true); + static $_resolved_property_name = array(); + static $_resolved_property_source = array(); + + // method of Smarty object? + if (method_exists($this->smarty, $name)) { + return call_user_func_array(array($this->smarty, $name), $args); + } + // see if this is a set/get for a property + $first3 = strtolower(substr($name, 0, 3)); + if (isset($_prefixes[$first3]) && isset($name[3]) && $name[3] !== '_') { + if (isset($_resolved_property_name[$name])) { + $property_name = $_resolved_property_name[$name]; + } else { + // try to keep case correct for future PHP 6.0 case-sensitive class methods + // lcfirst() not available < PHP 5.3.0, so improvise + $property_name = strtolower(substr($name, 3, 1)) . substr($name, 4); + // convert camel case to underscored name + $property_name = preg_replace_callback('/([A-Z])/', array($this, 'replaceCamelcase'), $property_name); + $_resolved_property_name[$name] = $property_name; + } + if (isset($_resolved_property_source[$property_name])) { + $_is_this = $_resolved_property_source[$property_name]; + } else { + $_is_this = null; + if (property_exists($this, $property_name)) { + $_is_this = true; + } elseif (property_exists($this->smarty, $property_name)) { + $_is_this = false; + } + $_resolved_property_source[$property_name] = $_is_this; + } + if ($_is_this) { + if ($first3 == 'get') { + return $this->$property_name; + } else { + return $this->$property_name = $args[0]; + } + } elseif ($_is_this === false) { + if ($first3 == 'get') { + return $this->smarty->$property_name; + } else { + return $this->smarty->$property_name = $args[0]; + } + } else { + throw new SmartyException("property '$property_name' does not exist."); + } + } + if ($name == 'Smarty') { + throw new SmartyException("PHP5 requires you to call __construct() instead of Smarty()"); + } + // must be unknown + throw new SmartyException("Call of unknown method '$name'."); + } +} diff --git a/core/vendor/symfony/form/Symfony/Component/Form/Resources/translations/validators.bg.xlf b/core/vendor/symfony/form/Symfony/Component/Form/Resources/translations/validators.bg.xlf index 9c2cfb523..6f00bde94 100644 --- a/core/vendor/symfony/form/Symfony/Component/Form/Resources/translations/validators.bg.xlf +++ b/core/vendor/symfony/form/Symfony/Component/Form/Resources/translations/validators.bg.xlf @@ -1,19 +1,19 @@ - - - - - - This form should not contain extra fields. - Тази форма не трябва да съдържа допълнителни полета. - - - The uploaded file was too large. Please try to upload a smaller file. - Каченият файл е твърде голям. Моля, опитайте да качите по-малък файл. - - - The CSRF token is invalid. Please try to resubmit the form. - Невалиден CSRF токен. Моля, опитайте да изпратите формата отново. - - - + + + + + + This form should not contain extra fields. + Тази форма не трябва да съдържа допълнителни полета. + + + The uploaded file was too large. Please try to upload a smaller file. + Каченият файл е твърде голям. Моля, опитайте да качите по-малък файл. + + + The CSRF token is invalid. Please try to resubmit the form. + Невалиден CSRF токен. Моля, опитайте да изпратите формата отново. + + + \ No newline at end of file diff --git a/core/vendor/symfony/validator/Symfony/Component/Validator/Resources/translations/validators.bg.xlf b/core/vendor/symfony/validator/Symfony/Component/Validator/Resources/translations/validators.bg.xlf index 5d02f264d..f6a67e725 100644 --- a/core/vendor/symfony/validator/Symfony/Component/Validator/Resources/translations/validators.bg.xlf +++ b/core/vendor/symfony/validator/Symfony/Component/Validator/Resources/translations/validators.bg.xlf @@ -1,219 +1,219 @@ - - - - - - This value should be false. - Стойността трябва да бъде лъжа (false). - - - This value should be true. - Стойността трябва да бъде истина (true). - - - This value should be of type {{ type }}. - Стойността трябва да бъде от тип {{ type }}. - - - This value should be blank. - Стойността трябва да бъде празна. - - - The value you selected is not a valid choice. - Избраната стойност е невалидна. - - - You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. - Трябва да изберете поне {{ limit }} опция.|Трябва да изберете поне {{ limit }} опции. - - - You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. - Трябва да изберете най-много {{ limit }} опция.|Трябва да изберете най-много {{ limit }} опции. - - - One or more of the given values is invalid. - Една или повече от зададените стойности е невалидна. - - - The fields {{ fields }} were not expected. - Полетата {{ fields }} не бяха очаквани. - - - The fields {{ fields }} are missing. - Полетата {{ fields }} липсват. - - - This value is not a valid date. - Стойността не е валидна дата (date). - - - This value is not a valid datetime. - Стойността не е валидна дата (datetime). - - - This value is not a valid email address. - Стойността не е валиден email адрес. - - - The file could not be found. - Файлът не беше открит. - - - The file is not readable. - Файлът не може да бъде прочетен. - - - The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. - Файлът е твърде голям ({{ size }} {{ suffix }}). Максималният размер е {{ limit }} {{ suffix }}. - - - The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. - Майм типа на файла е невалиден ({{ type }}). Разрешени майм типове са {{ types }}. - - - This value should be {{ limit }} or less. - Стойността трябва да бъде {{ limit }} или по-малко. - - - This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. - Стойността е твърде дълга. Трябва да съдържа най-много {{ limit }} символ.|Стойността е твърде дълга. Трябва да съдържа най-много {{ limit }} символа. - - - This value should be {{ limit }} or more. - Стойността трябва да бъде {{ limit }} или повече. - - - This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. - Стойността е твърде кратка. Трябва да съдържа поне {{ limit }} символ.|Стойността е твърде кратка. Трябва да съдържа поне {{ limit }} символа. - - - This value should not be blank. - Стойността не трябва да бъде празна. - - - This value should not be null. - Стойността не трябва да бъде null. - - - This value should be null. - Стойността трябва да бъде null. - - - This value is not valid. - Стойността не е валидна. - - - This value is not a valid time. - Стойността не е валидно време (time). - - - This value is not a valid URL. - Стойността не е валиден URL. - - - The two values should be equal. - Двете стойности трябва да бъдат равни. - - - The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. - Файлът е твърде голям. Разрешеният максимален размер е {{ limit }} {{ suffix }}. - - - The file is too large. - Файлът е твърде голям. - - - The file could not be uploaded. - Файлът не може да бъде качен. - - - This value should be a valid number. - Стойността трябва да бъде валиден номер. - - - This file is not a valid image. - Файлът не е валидно изображение. - - - This is not a valid IP address. - Това не е валиден IP адрес. - - - This value is not a valid language. - Стойността не е валиден език. - - - This value is not a valid locale. - Стойността не е валидна локализация. - - - This value is not a valid country. - Стойността не е валидна държава. - - - This value is already used. - Стойността вече е в употреба. - - - The size of the image could not be detected. - Размера на изображението не може да бъде определен. - - - The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. - Изображението е твърде широко ({{ width }}px). Широчината трябва да бъде максимум {{ max_width }}px. - - - The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. - Изображението е с твърде малка широчина ({{ width }}px). Широчината трябва да бъде минимум {{ min_width }}px. - - - The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. - Изображението е с твърде голяма височина ({{ height }}px). Височината трябва да бъде максимум {{ max_height }}px. - - - The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. - Изображението е с твърде малка височина ({{ height }}px). Височина трябва да бъде минимум {{ min_height }}px. - - - This value should be the user current password. - Стойността трябва да бъде текущата потребителска парола. - - - This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Стойността трябва да бъде точно {{ limit }} символ.|Стойността трябва да бъде точно {{ limit }} символа. - - - The file was only partially uploaded. - Файлът е качен частично. - - - No file was uploaded. - Файлът не беше качен. - - - No temporary folder was configured in php.ini. - Не е посочена директория за временни файлове в php.ini. - - - Cannot write temporary file to disk. - Не може да запише временен файл на диска. - - - A PHP extension caused the upload to fail. - PHP разширение предизвика прекъсване на качването. - - - This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Колекцията трябва да съдържа поне {{ limit }} елемент.|Колекцията трябва да съдържа поне {{ limit }} елемента. - - - This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Колекцията трябва да съдържа най-много {{ limit }} елемент.|Колекцията трябва да съдържа най-много {{ limit }} елемента. - - - This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. - Колекцията трябва да съдържа точно {{ limit }} елемент.|Колекцията трябва да съдържа точно {{ limit }} елемента. - - - - + + + + + + This value should be false. + Стойността трябва да бъде лъжа (false). + + + This value should be true. + Стойността трябва да бъде истина (true). + + + This value should be of type {{ type }}. + Стойността трябва да бъде от тип {{ type }}. + + + This value should be blank. + Стойността трябва да бъде празна. + + + The value you selected is not a valid choice. + Избраната стойност е невалидна. + + + You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices. + Трябва да изберете поне {{ limit }} опция.|Трябва да изберете поне {{ limit }} опции. + + + You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices. + Трябва да изберете най-много {{ limit }} опция.|Трябва да изберете най-много {{ limit }} опции. + + + One or more of the given values is invalid. + Една или повече от зададените стойности е невалидна. + + + The fields {{ fields }} were not expected. + Полетата {{ fields }} не бяха очаквани. + + + The fields {{ fields }} are missing. + Полетата {{ fields }} липсват. + + + This value is not a valid date. + Стойността не е валидна дата (date). + + + This value is not a valid datetime. + Стойността не е валидна дата (datetime). + + + This value is not a valid email address. + Стойността не е валиден email адрес. + + + The file could not be found. + Файлът не беше открит. + + + The file is not readable. + Файлът не може да бъде прочетен. + + + The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}. + Файлът е твърде голям ({{ size }} {{ suffix }}). Максималният размер е {{ limit }} {{ suffix }}. + + + The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}. + Майм типа на файла е невалиден ({{ type }}). Разрешени майм типове са {{ types }}. + + + This value should be {{ limit }} or less. + Стойността трябва да бъде {{ limit }} или по-малко. + + + This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less. + Стойността е твърде дълга. Трябва да съдържа най-много {{ limit }} символ.|Стойността е твърде дълга. Трябва да съдържа най-много {{ limit }} символа. + + + This value should be {{ limit }} or more. + Стойността трябва да бъде {{ limit }} или повече. + + + This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more. + Стойността е твърде кратка. Трябва да съдържа поне {{ limit }} символ.|Стойността е твърде кратка. Трябва да съдържа поне {{ limit }} символа. + + + This value should not be blank. + Стойността не трябва да бъде празна. + + + This value should not be null. + Стойността не трябва да бъде null. + + + This value should be null. + Стойността трябва да бъде null. + + + This value is not valid. + Стойността не е валидна. + + + This value is not a valid time. + Стойността не е валидно време (time). + + + This value is not a valid URL. + Стойността не е валиден URL. + + + The two values should be equal. + Двете стойности трябва да бъдат равни. + + + The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}. + Файлът е твърде голям. Разрешеният максимален размер е {{ limit }} {{ suffix }}. + + + The file is too large. + Файлът е твърде голям. + + + The file could not be uploaded. + Файлът не може да бъде качен. + + + This value should be a valid number. + Стойността трябва да бъде валиден номер. + + + This file is not a valid image. + Файлът не е валидно изображение. + + + This is not a valid IP address. + Това не е валиден IP адрес. + + + This value is not a valid language. + Стойността не е валиден език. + + + This value is not a valid locale. + Стойността не е валидна локализация. + + + This value is not a valid country. + Стойността не е валидна държава. + + + This value is already used. + Стойността вече е в употреба. + + + The size of the image could not be detected. + Размера на изображението не може да бъде определен. + + + The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px. + Изображението е твърде широко ({{ width }}px). Широчината трябва да бъде максимум {{ max_width }}px. + + + The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px. + Изображението е с твърде малка широчина ({{ width }}px). Широчината трябва да бъде минимум {{ min_width }}px. + + + The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px. + Изображението е с твърде голяма височина ({{ height }}px). Височината трябва да бъде максимум {{ max_height }}px. + + + The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px. + Изображението е с твърде малка височина ({{ height }}px). Височина трябва да бъде минимум {{ min_height }}px. + + + This value should be the user current password. + Стойността трябва да бъде текущата потребителска парола. + + + This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. + Стойността трябва да бъде точно {{ limit }} символ.|Стойността трябва да бъде точно {{ limit }} символа. + + + The file was only partially uploaded. + Файлът е качен частично. + + + No file was uploaded. + Файлът не беше качен. + + + No temporary folder was configured in php.ini. + Не е посочена директория за временни файлове в php.ini. + + + Cannot write temporary file to disk. + Не може да запише временен файл на диска. + + + A PHP extension caused the upload to fail. + PHP разширение предизвика прекъсване на качването. + + + This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. + Колекцията трябва да съдържа поне {{ limit }} елемент.|Колекцията трябва да съдържа поне {{ limit }} елемента. + + + This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. + Колекцията трябва да съдържа най-много {{ limit }} елемент.|Колекцията трябва да съдържа най-много {{ limit }} елемента. + + + This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. + Колекцията трябва да съдържа точно {{ limit }} елемент.|Колекцията трябва да съдържа точно {{ limit }} елемента. + + + + diff --git a/local/media/documents/content/eis2021_bilanveineux_cartographie_sclerotherapiechoguidelamousse_21mai2021-7.pdf b/local/media/documents/content/eis2021_bilanveineux_cartographie_sclerotherapiechoguidelamousse_21mai2021-7.pdf new file mode 100644 index 000000000..5d9dc8499 Binary files /dev/null and b/local/media/documents/content/eis2021_bilanveineux_cartographie_sclerotherapiechoguidelamousse_21mai2021-7.pdf differ diff --git a/local/media/documents/content/eisonlineflyer25juin2021-6.pdf b/local/media/documents/content/eisonlineflyer25juin2021-6.pdf new file mode 100644 index 000000000..ffe006c92 Binary files /dev/null and b/local/media/documents/content/eisonlineflyer25juin2021-6.pdf differ diff --git a/local/media/documents/content/eisonlineflyer28mai2021-10.pdf b/local/media/documents/content/eisonlineflyer28mai2021-10.pdf new file mode 100644 index 000000000..1eae4b16b Binary files /dev/null and b/local/media/documents/content/eisonlineflyer28mai2021-10.pdf differ diff --git a/local/media/documents/content/flyereisonline3mars_2avril_7mai2021-4.pdf b/local/media/documents/content/flyereisonline3mars_2avril_7mai2021-4.pdf new file mode 100644 index 000000000..36ee7e2cb Binary files /dev/null and b/local/media/documents/content/flyereisonline3mars_2avril_7mai2021-4.pdf differ diff --git a/local/media/images/content/capturedcran2021-05-0115.21.52-5.png b/local/media/images/content/capturedcran2021-05-0115.21.52-5.png new file mode 100644 index 000000000..00c5aaa8e Binary files /dev/null and b/local/media/images/content/capturedcran2021-05-0115.21.52-5.png differ diff --git a/local/media/images/content/capturedcran2021-05-0115.22.34-6.png b/local/media/images/content/capturedcran2021-05-0115.22.34-6.png new file mode 100644 index 000000000..2e4849528 Binary files /dev/null and b/local/media/images/content/capturedcran2021-05-0115.22.34-6.png differ diff --git a/local/media/images/content/capturedcran2021-05-0115.23.19-4.png b/local/media/images/content/capturedcran2021-05-0115.23.19-4.png new file mode 100644 index 000000000..33d0b6a47 Binary files /dev/null and b/local/media/images/content/capturedcran2021-05-0115.23.19-4.png differ diff --git a/local/media/images/module/Mercanet-4-logo-mercanet.png b/local/media/images/module/Mercanet-4-logo-mercanet.png new file mode 100644 index 000000000..4f156a938 Binary files /dev/null and b/local/media/images/module/Mercanet-4-logo-mercanet.png differ diff --git a/local/modules/Axepta/Axepta.php b/local/modules/Axepta/Axepta.php new file mode 100755 index 000000000..a359946ff --- /dev/null +++ b/local/modules/Axepta/Axepta.php @@ -0,0 +1,146 @@ +getPaymentFailurePageUrl($order->getId(), Translator::getInstance()->trans('Vous avez annulé le paiement', [], Axepta::DOMAIN_NAME)); + $urlNotification = URL::getInstance()->absoluteUrl('/axepta/notification'); + + $paymentRequest = new AxeptaPayment($hmac); + $paymentRequest->setCryptKey($cryptKey); + + $transId = time().$order->getId(); + + $paymentRequest->setUrl(AxeptaPayment::PAYSSL); + $paymentRequest->setMerchantID($merchantId); + $paymentRequest->setTransID($transId); + $paymentRequest->setAmount((int) ($order->getTotalAmount()*100)); + $paymentRequest->setCurrency($order->getCurrency()->getCode()); + $paymentRequest->setRefNr($order->getRef()); + $paymentRequest->setURLSuccess($urlNotification); + $paymentRequest->setURLFailure($urlNotification); + $paymentRequest->setURLNotify($urlNotification); + $paymentRequest->setURLBack($urlAnnulation); + $paymentRequest->setReponse('encrypt'); + $paymentRequest->setLanguage($this->getRequest()->getSession()->getLang()->getLocale()); + + if ($mode === 'TEST') { + // See https://docs.axepta.bnpparibas/display/DOCBNP/Test+environment + // In the encrypted data request, use the default parameter OrderDesc with the value "Test:0000". This will give you a correspondingly successful authorization after successful authentication. + $paymentRequest->setOrderDesc('Test:0000'); + } else { + $paymentRequest->setOrderDesc($order->getCustomer()->getFirstname() . ' ' . $order->getCustomer()->getLastname()); + } + + $paymentRequest->validate(); + + $mac = $paymentRequest->getShaSign(); + $data = $paymentRequest->getBfishCrypt(); + $len = $paymentRequest->getLen(); + + $transmit = [ + 'MerchantID' => $paymentRequest->getMerchantID(), + 'Len' => $len, + 'Data' => $data, + 'URLBack' => $urlAnnulation, + 'CustomField1' => sprintf( + "%s, %s", + MoneyFormat::getInstance($this->getRequest())->format($order->getTotalAmount(), 2), + $order->getCurrency()->getCode() + ), + 'CustomField2' => $order->getRef() + ]; + + TLog::getInstance()->error("Données Axcepta : " . print_r($paymentRequest->parameters, 1)); + TLog::getInstance()->error("URL Axcepta : " . $paymentRequest->getUrl()); + + $order + ->setTransactionRef($transId) + ->save(); + + return $this->generateGatewayFormResponse($order, $paymentRequest->getUrl(), $transmit); + } + + public function isValidPayment() + { + $hmac = self::getConfigValue(self::HMAC, null); + $merchantId = self::getConfigValue(self::MERCHANT_ID, null); + $cryptKey = self::getConfigValue(self::CRYPT_KEY, null); + $mode = self::getConfigValue(self::MODE, null); + $valid = true; + + if (($hmac === null || $merchantId === null || $cryptKey === null) && $mode !== 'TEST') { + Tlog::getInstance()->errro("Axepta module is not properly configured, some configuration data are missing."); + return false; + } + + if ($mode === 'TEST') { + $raw_ips = explode("\n", self::getConfigValue(self::ALLOWED_IP_LIST, '')); + $allowed_client_ips = array(); + + foreach ($raw_ips as $ip) { + $allowed_client_ips[] = trim($ip); + } + + $client_ip = $this->getRequest()->getClientIp(); + + $valid = in_array($client_ip, $allowed_client_ips) || in_array('*', $allowed_client_ips); + } + + if ($valid) { + // Check if total order amount is in the module's limits + $valid = $this->checkMinMaxAmount(self::MINIMUM_AMOUNT, self::MAXIMUM_AMOUNT); + } + + return $valid; + } + + protected function checkMinMaxAmount($min, $max) + { + $order_total = $this->getCurrentOrderTotalAmount(); + + $min_amount = self::getConfigValue($min, 0); + $max_amount = self::getConfigValue($max, 0); + + return $order_total > 0 && ($min_amount <= 0 || $order_total >= $min_amount) && ($max_amount <= 0 || $order_total <= $max_amount); + } +} diff --git a/local/modules/Axepta/Config/config.xml b/local/modules/Axepta/Config/config.xml new file mode 100755 index 000000000..ba949d414 --- /dev/null +++ b/local/modules/Axepta/Config/config.xml @@ -0,0 +1,25 @@ + + + + + +
+ + + + + + + + + + + + + + + + + diff --git a/local/modules/Axepta/Config/module.xml b/local/modules/Axepta/Config/module.xml new file mode 100755 index 000000000..bd04b10c4 --- /dev/null +++ b/local/modules/Axepta/Config/module.xml @@ -0,0 +1,28 @@ + + + Axepta\Axepta + + Payement with Axepta + + + Paiement avec Axepta + + + en_US + fr_FR + + 1.0.1 + + + Nicolas Barbey + nbarbey@openstudio.fr + + + classic + 2.3.0 + other + 0 + 0 + diff --git a/local/modules/Axepta/Config/routing.xml b/local/modules/Axepta/Config/routing.xml new file mode 100755 index 000000000..1b33ce28f --- /dev/null +++ b/local/modules/Axepta/Config/routing.xml @@ -0,0 +1,14 @@ + + + + + + Axepta\Controller\ConfigurationController::configure + + + + Axepta\Controller\NotificationController::notificationAction + + diff --git a/local/modules/Axepta/Controller/ConfigurationController.php b/local/modules/Axepta/Controller/ConfigurationController.php new file mode 100755 index 000000000..1c903fdcf --- /dev/null +++ b/local/modules/Axepta/Controller/ConfigurationController.php @@ -0,0 +1,80 @@ +checkAuth(AdminResources::MODULE, 'Axepta', AccessManager::UPDATE)) { + return $response; + } + + // Create the Form from the request + $configurationForm = $this->createForm('axepta_configuration'); + + try { + // Check the form against constraints violations + $form = $this->validateForm($configurationForm, "POST"); + + // Get the form field values + $data = $form->getData(); + + foreach ($data as $name => $value) { + if (is_array($value)) { + $value = implode(';', $value); + } + + Axepta::setConfigValue($name, $value); + } + + // Log configuration modification + $this->adminLogAppend( + "axepta.configuration.message", + AccessManager::UPDATE, + "Axepta configuration updated" + ); + + // Redirect to the success URL, + if ($this->getRequest()->get('save_mode') === 'stay') { + // If we have to stay on the same page, redisplay the configuration page/ + $route = '/admin/module/Axepta'; + } else { + // If we have to close the page, go back to the module back-office page. + $route = '/admin/modules'; + } + + return $this->generateRedirect(URL::getInstance()->absoluteUrl($route)); + + // An exit is performed after redirect.+ + } catch (FormValidationException $ex) { + // Form cannot be validated. Create the error message using + // the BaseAdminController helper method. + $error_msg = $this->createStandardFormValidationErrorMessage($ex); + } catch (\Exception $ex) { + // Any other error + $error_msg = $ex->getMessage(); + } + + // At this point, the form has errors, and should be redisplayed. We do not redirect, + // just redisplay the same template. + // Set up the Form error context, to make error information available in the template. + $this->setupFormErrorContext( + $this->getTranslator()->trans("Axepta configuration", [], Axepta::DOMAIN_NAME), + $error_msg, + $configurationForm, + $ex + ); + + // Do not redirect at this point, or the error context will be lost. + // Just redisplay the current template. + return $this->render('module-configure', array('module_code' => 'Payline')); + } +} \ No newline at end of file diff --git a/local/modules/Axepta/Controller/NotificationController.php b/local/modules/Axepta/Controller/NotificationController.php new file mode 100755 index 000000000..e0ba39484 --- /dev/null +++ b/local/modules/Axepta/Controller/NotificationController.php @@ -0,0 +1,68 @@ +getLog()->addInfo("Processing Axcepta notification"); + + $paymentResponse = new AxeptaPayment(Axepta::getConfigValue(Axepta::HMAC)); + $paymentResponse->setCryptKey(Axepta::getConfigValue(Axepta::CRYPT_KEY)); + $paymentResponse->setResponse($this->getRequest()->query->all()); + + $this->getLog()->addError("Notification parameters: ".print_r($paymentResponse->parameters, 1)); + + $transId = $paymentResponse->getTransID(); + + if (null === $order = OrderQuery::create()->filterByTransactionRef($transId)->findOne()) { + $this->getLog()->addInfo("Failed to fin order for transaction ID $transId. Aborting."); + + throw new TheliaProcessException( + Translator::getInstance()->trans("Failed to find order for transaction ID %id", ['id' => $transId ], Axepta::DOMAIN_NAME) + ); + } + + $this->getLog()->addInfo("Processing payment of order " . $order->getRef()); + + $event = new OrderEvent($order); + + if ($paymentResponse->isValid() && $paymentResponse->isSuccessful()) { + $this->getLog()->addInfo("Payment of order ".$order->getRef()." is successful."); + if (!$order->isPaid()) { + $this->getLog()->addInfo("Setting order status to 'paid'."); + $event->setStatus(OrderStatusQuery::getPaidStatus()->getId()); + $this->dispatch(TheliaEvents::ORDER_UPDATE_STATUS, $event); + } + + $this->redirectToSuccessPage($order->getId()); + } + + $this->getLog()->addInfo("Payment failed, cancelling order " . $order->getRef()); + + $event->setStatus(OrderStatusQuery::getCancelledStatus()->getId()); + $this->dispatch(TheliaEvents::ORDER_UPDATE_STATUS, $event); + + $this->getLog()->addInfo("Failure cause:".$paymentResponse->getDescription() . ' ('.$paymentResponse->getCode()); + $this->redirectToFailurePage($order->getId(), $paymentResponse->getDescription() . ' ('.$paymentResponse->getCode().')'); + } +} diff --git a/local/modules/Axepta/EventListeners/SendConfirmationEmail.php b/local/modules/Axepta/EventListeners/SendConfirmationEmail.php new file mode 100755 index 000000000..a12c210db --- /dev/null +++ b/local/modules/Axepta/EventListeners/SendConfirmationEmail.php @@ -0,0 +1,82 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Axepta\EventListeners; + +use Axepta\Axepta; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Thelia\Action\BaseAction; +use Thelia\Core\Event\Order\OrderEvent; +use Thelia\Core\Event\TheliaEvents; + +/** + * Axepta payment module + * + * @author Franck Allimant + */ +class SendConfirmationEmail extends BaseAction implements EventSubscriberInterface +{ + /** + * @param OrderEvent $event + * + * @throws \Exception if the message cannot be loaded. + */ + public function sendConfirmationEmail(OrderEvent $event) + { + if (Axepta::getConfigValue(Axepta::SEND_CONFIRMATION_MESSAGE_ONLY_IF_PAID, true)) { + // We send the order confirmation email only if the order is paid + $order = $event->getOrder(); + + if (!$order->isPaid() && $order->getPaymentModuleId() === (int) Axepta::getModuleId()) { + $event->stopPropagation(); + } + } + } + + /** + * Checks if order payment module is Axepta and if order new status is paid, send a confirmation email to the customer. + * + * @param OrderEvent $event + * @param $eventName + * @param EventDispatcherInterface $dispatcher + * + * @throws \Propel\Runtime\Exception\PropelException + */ + public function updateStatus(OrderEvent $event, $eventName, EventDispatcherInterface $dispatcher) + { + $order = $event->getOrder(); + + if ($order->isPaid() && $order->getPaymentModuleId() === Axepta::getModuleId()) { + $dispatcher->dispatch(TheliaEvents::ORDER_SEND_CONFIRMATION_EMAIL, $event); + } + } + + public static function getSubscribedEvents() + { + return array( + TheliaEvents::ORDER_UPDATE_STATUS => array("updateStatus", 128), + TheliaEvents::ORDER_SEND_CONFIRMATION_EMAIL => array("sendConfirmationEmail", 129) + ); + } +} diff --git a/local/modules/Axepta/Form/ConfigurationForm.php b/local/modules/Axepta/Form/ConfigurationForm.php new file mode 100755 index 000000000..c5e1fb332 --- /dev/null +++ b/local/modules/Axepta/Form/ConfigurationForm.php @@ -0,0 +1,150 @@ +formBuilder + ->add( + Axepta::MODE, + ChoiceType::class, + [ + 'constraints' => [new NotBlank()], + 'required' => true, + 'choices' => [ + 'TEST' => 'Test', + 'PRODUCTION' => 'Production', + ], + 'label' => $this->trans('Mode de fonctionnement', []), + 'data' => Axepta::getConfigValue(Axepta::MODE), + ] + ) + ->add( + Axepta::MERCHANT_ID, + TextType::class, + [ + 'constraints' => [new NotBlank()], + 'required' => true, + 'label' => $this->trans('Merchant ID'), + 'data' => Axepta::getConfigValue(Axepta::MERCHANT_ID, ''), + ] + ) + ->add( + Axepta::HMAC, + TextType::class, + [ + 'constraints' => [new NotBlank()], + 'required' => true, + 'label' => $this->trans('HMAC key'), + 'data' => Axepta::getConfigValue(Axepta::HMAC, ''), + ] + ) + ->add( + Axepta::CRYPT_KEY, + TextType::class, + [ + 'constraints' => [new NotBlank()], + 'required' => true, + 'label' => $this->trans('Blowfish encryption key'), + 'data' => Axepta::getConfigValue(Axepta::CRYPT_KEY, ''), + ] + ) + ->add( + Axepta::ALLOWED_IP_LIST, + TextareaType::class, + [ + 'required' => false, + 'label' => $this->trans('Allowed IPs in test mode'), + 'data' => Axepta::getConfigValue(Axepta::ALLOWED_IP_LIST), + 'label_attr' => array( + 'for' => Axepta::ALLOWED_IP_LIST, + 'help' => $this->trans( + 'List of IP addresses allowed to use this payment on the front-office when in test mode (your current IP is %ip). One address per line', + array('%ip' => $this->getRequest()->getClientIp()) + ), + 'rows' => 3 + ) + ] + ) + ->add( + Axepta::MINIMUM_AMOUNT, + NumberType::class, + array( + 'constraints' => array( + new NotBlank(), + new GreaterThanOrEqual(array('value' => 0)) + ), + 'required' => true, + 'label' => $this->trans('Minimum order total'), + 'data' => Axepta::getConfigValue(Axepta::MINIMUM_AMOUNT, 0), + 'label_attr' => array( + 'for' => 'minimum_amount', + 'help' => $this->trans('Minimum order total in the default currency for which this payment method is available. Enter 0 for no minimum') + ), + 'attr' => [ + 'step' => 'any' + ] + ) + ) + ->add( + Axepta::MAXIMUM_AMOUNT, + NumberType::class, + array( + 'constraints' => array( + new NotBlank(), + new GreaterThanOrEqual(array('value' => 0)) + ), + 'required' => true, + 'label' => $this->trans('Maximum order total'), + 'data' => Axepta::getConfigValue(Axepta::MAXIMUM_AMOUNT, 0), + 'label_attr' => array( + 'for' => 'maximum_amount', + 'help' => $this->trans('Maximum order total in the default currency for which this payment method is available. Enter 0 for no maximum') + ), + 'attr' => [ + 'step' => 'any' + ] + ) + ) + ->add( + Axepta::SEND_CONFIRMATION_MESSAGE_ONLY_IF_PAID, + 'checkbox', + [ + 'value' => 1, + 'required' => false, + 'label' => $this->trans('Send order confirmation on payment success'), + 'data' => (boolean)(Axepta::getConfigValue(Axepta::SEND_CONFIRMATION_MESSAGE_ONLY_IF_PAID, true)), + 'label_attr' => [ + 'help' => $this->trans( + 'If checked, the order confirmation message is sent to the customer only when the payment is successful. The order notification is always sent to the shop administrator' + ) + ] + ] + ) + + ; + } + + public function getName() + { + return 'axepta_configuration'; + } + + protected function trans($str, $params = []) + { + return Translator::getInstance()->trans($str, $params, Axepta::DOMAIN_NAME); + } +} diff --git a/local/modules/Axepta/Hook/HookManager.php b/local/modules/Axepta/Hook/HookManager.php new file mode 100755 index 000000000..6307110f0 --- /dev/null +++ b/local/modules/Axepta/Hook/HookManager.php @@ -0,0 +1,23 @@ +add( + $this->render('module-configuration.html') + ); + } + + public function onOrderPaymentGatewayJavascript(HookRenderEvent $event) + { + $event->add( + $this->render('hook/order-payment-gateway-javascript.html') + ); + } +} diff --git a/local/modules/Axepta/I18n/backOffice/default/fr_FR.php b/local/modules/Axepta/I18n/backOffice/default/fr_FR.php new file mode 100755 index 000000000..8c3bf10aa --- /dev/null +++ b/local/modules/Axepta/I18n/backOffice/default/fr_FR.php @@ -0,0 +1,6 @@ + 'Accès a Axepta', + 'Payment configuration' => 'Configuration de paiement', +); diff --git a/local/modules/Axepta/I18n/en_US.php b/local/modules/Axepta/I18n/en_US.php new file mode 100755 index 000000000..225cc4fd1 --- /dev/null +++ b/local/modules/Axepta/I18n/en_US.php @@ -0,0 +1,6 @@ + 'Operation Mode', + 'Vous avez annulé le paiement' => 'You have cancel the payment', +); diff --git a/local/modules/Axepta/I18n/fr_FR.php b/local/modules/Axepta/I18n/fr_FR.php new file mode 100755 index 000000000..8f75c6003 --- /dev/null +++ b/local/modules/Axepta/I18n/fr_FR.php @@ -0,0 +1,16 @@ + 'Adresse IP autorisé en mode de test ', + 'Blowfish encryption key' => 'Clé de cryptage Blowfish', + 'Failed to find order reference %ref' => 'La référence de commande %ref n\'a pas été trouvé', + 'HMAC key' => 'Clé HMAC', + 'If checked, the order confirmation message is sent to the customer only when the payment is successful. The order notification is always sent to the shop administrator' => 'Si cette case est cochée, le mail de confirmation de commande sera envoyé au client seulement si son paiement est validé.', + 'List of IP addresses allowed to use this payment on the front-office when in test mode (your current IP is %ip). One address per line' => 'Liste des adresses IP qui pourront choisir ce module de paiement en front-office pendant la phase de test (votre IP est 127.0.0.1). Une adresse par ligne.', + 'Maximum order total' => 'Montant maximum de commande', + 'Maximum order total in the default currency for which this payment method is available. Enter 0 for no maximum' => 'Montant maximum dans la devise par défaut pour proposer ce moyen de paiement. Laisser 0 pour ne pas fixer de maximum', + 'Merchant ID' => 'Id du commerçant', + 'Minimum order total' => 'Montant minimum de commande', + 'Minimum order total in the default currency for which this payment method is available. Enter 0 for no minimum' => 'Montant minimum dans la devise par défaut pour proposer ce moyen de paiement. Laisser 0 pour ne pas fixer de minimum', + 'Send order confirmation on payment success' => 'Confirmation de commande si le paiement réussit', +); diff --git a/local/modules/Axepta/Readme.md b/local/modules/Axepta/Readme.md new file mode 100755 index 000000000..e3d1ad69c --- /dev/null +++ b/local/modules/Axepta/Readme.md @@ -0,0 +1,27 @@ +# Axepta + +This module adds the payment solution Axepta. + +## Installation + +### Manually + +* Copy the module into ```/local/modules/``` directory and be sure that the name of the module is Axepta. +* Activate it in your thelia administration panel + +### Composer + +Add it in your main thelia composer.json file + +``` +composer require thelia/axepta-module:~1.0 +``` + +## Usage +* Contact Axepta to create an account. +* Go to the module configuration and add your HMAC key, Blowfish encryption key, and your merchant id. +* Set the operation mode to production + +Documentation : https://docs.axepta.bnpparibas + +If you want to test your configuration you can use this credit cards : https://docs.axepta.bnpparibas/display/DOCBNP/Test+Cards \ No newline at end of file diff --git a/local/modules/Axepta/Util/Axepta.php b/local/modules/Axepta/Util/Axepta.php new file mode 100755 index 000000000..c8c642aa3 --- /dev/null +++ b/local/modules/Axepta/Util/Axepta.php @@ -0,0 +1,488 @@ +secretKey = $secret; // HMAC key + } + + public function setCryptKey($secret) + { + $this->cryptKey = $secret; // blowfish crypt key + } + + /** hack to retrieve response field **/ + public function setReponse($encrypt='encrypt') + { + $this->parameters['Response'] = $encrypt; + } + + /** HMAC compute and store in MAC field**/ + public function shaCompose(array $parameters) + { + // compose SHA string + $shaString = ''; + foreach($parameters as $key) { + if(array_key_exists($key, $this->parameters) && !empty($this->parameters[$key])) { + $value = $this->parameters[$key]; + $shaString .= $value; + } + $shaString .= (array_search($key, $parameters) != (count($parameters)-1)) ? '*' : ''; + } + $this->parameters['MAC'] = hash_hmac('sha256', $shaString, $this->secretKey); + return $this->parameters['MAC']; + } + + /** @return string */ + public function getShaSign() + { + $this->validate(); + return $this->shaCompose($this->QHMACFields); + } + + public function BfishCompose(array $parameters) + { + // compose Blowfish hex string + $blowfishString = ''; + + foreach($parameters as $key) { + if(array_key_exists($key, $this->parameters) && !empty($this->parameters[$key])) { + $value = $this->parameters[$key]; + $blowfishString .= $key.'='.$value.'&'; + } + } + $blowfishString = rtrim($blowfishString,'&'); + $this->parameters['Debug'] = $blowfishString; + $this->parameters['Len'] = strlen($blowfishString); + $this->parameters[self::DATA_FIELD] = bin2hex($this->encrypt($blowfishString,$this->cryptKey)); + + return $this->parameters[self::DATA_FIELD]; + } + + /** @return string */ + public function getBfishCrypt() + { + $this->validate(); + return $this->BFishCompose($this->BfishFields); + } + + private function encrypt($data, $key) + { + $l = strlen($key); + if ($l < 16) + $key = str_repeat($key, ceil(16/$l)); + + if ($m = strlen($data)%8) + $data .= str_repeat("\x00", 8 - $m); + if (function_exists('mcrypt_encrypt')) + $val = mcrypt_encrypt(MCRYPT_BLOWFISH, $key, $data, MCRYPT_MODE_ECB); + else + $val = openssl_encrypt($data, 'BF-ECB', $key, OPENSSL_RAW_DATA | OPENSSL_NO_PADDING); + + return $val; + } + + private function decrypt($data, $key) + { + $l = strlen($key); + if ($l < 16) + $key = str_repeat($key, ceil(16/$l)); + + if (function_exists('mcrypt_encrypt')) + $val = mcrypt_decrypt(MCRYPT_BLOWFISH, $key, $data, MCRYPT_MODE_ECB); + else + $val = openssl_decrypt($data, 'BF-ECB', $key, OPENSSL_RAW_DATA | OPENSSL_NO_PADDING); + return rtrim($val, "\0"); + } + + /** @return string */ + public function getUrl() + { + return $this->pspURL; + } + + public function setUrl($pspUrl) + { + $this->validateUri($pspUrl); + $this->pspURL = $pspUrl; + } + + public function setURLSuccess($url) + { + $this->validateUri($url); + $this->parameters['URLSuccess'] = $url; + } + + public function setURLFailure($url) + { + $this->validateUri($url); + $this->parameters['URLFailure'] = $url; + } + + public function setURLNotify($url) + { + $this->validateUri($url); + $this->parameters['URLNotify'] = $url; + } + + public function setTransID($transactionReference) + { + if(preg_match('/[^a-zA-Z0-9_-]/', $transactionReference)) { + throw new \InvalidArgumentException("TransactionReference cannot contain special characters"); + } + $this->parameters['TransID'] = $transactionReference; + } + + /** + * Set amount in cents, eg EUR 12.34 is written as 1234 + */ + public function setAmount($amount) + { + if(!is_int($amount)) { + throw new \InvalidArgumentException("Integer expected. Amount is always in cents"); + } + if($amount <= 0) { + throw new \InvalidArgumentException("Amount must be a positive number"); + } + $this->parameters['Amount'] = $amount; + + } + + + public function setCaptureDay($number) + { + if (strlen($number) > 2) { + throw new \InvalidArgumentException("captureDay is too long"); + } + $this->parameters['captureDay'] = $number; + } + + // Methodes liees a la lutte contre la fraude + + public function setFraudDataBypass3DS($value) + { + if(strlen($value) > 128) { + throw new \InvalidArgumentException("fraudData.bypass3DS is too long"); + } + $this->parameters['fraudData.bypass3DS'] = $value; + } + + // Methodes liees au paiement one-click + + public function setMerchantWalletId($wallet) + { + if(strlen($wallet) > 21) { + throw new \InvalidArgumentException("merchantWalletId is too long"); + } + $this->parameters['merchantWalletId'] = $wallet; + } + + public function setPaymentPattern($paymentPattern) + { + $this->parameters['paymentPattern'] = $paymentPattern; + } + + public function __call($method, $args) + { + if(substr($method, 0, 3) == 'set') { + // $field = lcfirst(substr($method, 3)); + $field = substr($method, 3); + if(in_array($field, $this->pspFields)) { + $this->parameters[$field] = $args[0]; + return; + } + } + + if(substr($method, 0, 3) == 'get') { + // $field = lcfirst(substr($method, 3)); + $field = substr($method, 3); + if(array_key_exists($field, $this->parameters)) { + return $this->parameters[$field]; + } + } + + throw new \BadMethodCallException("Unknown method $method"); + } + + public function toArray() + { + return $this->parameters; + } + + public function toParameterString() + { + $parameterString = ""; + foreach($this->parameters as $key => $value) { + $parameterString .= $key . '=' . $value; + $parameterString .= (array_search($key, array_keys($this->parameters)) != (count($this->parameters)-1)) ? '|' : ''; + } + + return $parameterString; + } + + + public static function createFromArray($shaComposer, array $parameters) + { + $instance = new static($shaComposer); + foreach($parameters as $key => $value) + { + $instance->{"set$key"}($value); + } + return $instance; + } + + public function validate() + { + foreach($this->requiredFields as $field) { + if(empty($this->parameters[$field])) { + throw new \RuntimeException($field . " can not be empty"); + } + } + } + + protected function validateUri($uri) + { + if(!filter_var($uri, FILTER_VALIDATE_URL)) { + throw new \InvalidArgumentException("Uri is not valid"); + } + if(strlen($uri) > 200) { + throw new \InvalidArgumentException("Uri is too long"); + } + } + + // Traitement des reponses d'Axepta + // ----------------------------------- + + /** @var string */ + const SHASIGN_FIELD = "MAC"; + + /** @var string */ + const DATA_FIELD = "Data"; + + public function setResponse(array $httpRequest) + { + // use lowercase internally + // $httpRequest = array_change_key_case($httpRequest, CASE_UPPER); + + // set sha sign + // $this->shaSign = $this->extractShaSign($httpRequest); + + // filter request for Sips parameters + $this->parameters = $this->filterRequestParameters($httpRequest); + } + + /** + * @var string + */ + private $shaSign; + + private $dataString; + + /** + * Filter http request parameters + * @param array $requestParameters + */ + private function filterRequestParameters(array $httpRequest) + { + //filter request for Sips parameters + $parameters = $this->parameters; + if(!array_key_exists(self::DATA_FIELD, $httpRequest) || $httpRequest[self::DATA_FIELD] == '') { + // throw new InvalidArgumentException('Data parameter not present in parameters.'); + $parameters['Debug'] = implode('&',$httpRequest); + foreach($httpRequest as $key=>$value) { + $key = ($key=='mid')? 'MerchantID':$key; + $parameters[$key]=$value; + } + } else { + $parameters[self::DATA_FIELD] = $httpRequest[self::DATA_FIELD]; + $this->dataString = $this->decrypt(hex2bin($parameters[self::DATA_FIELD]),$this->cryptKey); + $parameters['Debug'] = $this->dataString; + $dataParams = explode('&', $this->dataString); + foreach($dataParams as $dataParamString) { + $dataKeyValue = explode('=',$dataParamString,2); + $key = ($dataKeyValue[0]=='mid')?'MerchantID':$dataKeyValue[0]; + $parameters[$key] = $dataKeyValue[1]; + } + + } + + return $parameters; + } + + public function getSeal() + { + return $this->shaSign; + } + + private function extractShaSign(array $parameters) + { + if(!array_key_exists(self::SHASIGN_FIELD, $parameters) || $parameters[self::SHASIGN_FIELD] == '') { + throw new \InvalidArgumentException('SHASIGN parameter not present in parameters.'); + } + return $parameters[self::SHASIGN_FIELD]; + } + + public function isValid() + { + // return $this->shaCompose($this->RHMACFields) == $this->shaSign; + return $this->shaCompose($this->RHMACFields) == $this->parameters['MAC']; + } + + /** + * Retrieves a response parameter + * @param string $param + * @throws \InvalidArgumentException + */ + public function getParam($key) + { + if(method_exists($this, 'get'.$key)) { + return $this->{'get'.$key}(); + } + + // always use uppercase + // $key = strtoupper($key); + // $parameters = array_change_key_case($this->parameters,CASE_UPPER); + $parameters = $this->parameters; + if(!array_key_exists($key, $parameters)) { + throw new \InvalidArgumentException('Parameter ' . $key . ' does not exist.'); + } + + return $parameters[$key]; + } + + /** + * @return int Amount in cents + */ + public function getAmount() + { + $value = trim($this->parameters['Amount']); + return (int) ($value); + } + + public function isSuccessful() + { + return in_array($this->getParam('Status'), array("OK", "AUTHORIZED")); + } + + public function getDataString() + { + return $this->dataString; + } +} diff --git a/local/modules/Axepta/composer.json b/local/modules/Axepta/composer.json new file mode 100755 index 000000000..13badc9d4 --- /dev/null +++ b/local/modules/Axepta/composer.json @@ -0,0 +1,12 @@ +{ + "name": "thelia/axepta-module", + "description": "Axepta payment module for Thelia", + "license": "LGPL-3.0-or-later", + "type": "thelia-module", + "require": { + "thelia/installer": "~1.1" + }, + "extra": { + "installer-name": "Axepta" + } +} diff --git a/local/modules/Axepta/templates/backOffice/default/module-configuration.html b/local/modules/Axepta/templates/backOffice/default/module-configuration.html new file mode 100755 index 000000000..b26f27045 --- /dev/null +++ b/local/modules/Axepta/templates/backOffice/default/module-configuration.html @@ -0,0 +1,52 @@ +
+
+
+
+ {intl d='axepta.bo.default' l="Axepta Configuration"} +
+
+ +
+
+
+ {form name="axepta_configuration"} + + {form_hidden_fields} + + {include file = "includes/inner-form-toolbar.html" + hide_flags = true + page_url = "{url path='/admin/module/Axepta'}" + close_url = "{url path='/admin/modules'}" + } + + {if $form_error} +
+
+
{$form_error_message}
+
+
+ {/if} + +
+
+

{intl d='axepta.bo.default' l="Access to Axepta Platform"}

+ {render_form_field field="merchant_id"} + {render_form_field field="hmac"} + {render_form_field field="crypt_key"} +
+
+

{intl d='axepta.bo.default' l="Payment configuration"}

+ {render_form_field field="send_confirmation_message_only_if_paid"} + {render_form_field field="run_mode"} + {render_form_field field="allowed_ip_list"} + {render_form_field field="minimum_amount"} + {render_form_field field="maximum_amount"} +
+
+ + {/form} +
+
+
+
+
diff --git a/local/modules/Axepta/templates/frontOffice/default/hook/order-payment-gateway-javascript.html b/local/modules/Axepta/templates/frontOffice/default/hook/order-payment-gateway-javascript.html new file mode 100755 index 000000000..30870be76 --- /dev/null +++ b/local/modules/Axepta/templates/frontOffice/default/hook/order-payment-gateway-javascript.html @@ -0,0 +1,16 @@ +{* We shoud use the "GET" method fo rsome fields to be properly processed byt the gateway *} +{* see https://docs.axepta.bnpparibas/display/DOCBNP/Payment+page#Paymentpage-Howtocallthepaymentmethodsselectionpage? *} + diff --git a/local/modules/CreditNote/CHANGELOG.md b/local/modules/CreditNote/CHANGELOG.md new file mode 100644 index 000000000..497011363 --- /dev/null +++ b/local/modules/CreditNote/CHANGELOG.md @@ -0,0 +1,3 @@ +#2.3.0 + +- First public version, OpenSource <3 \ No newline at end of file diff --git a/local/modules/CreditNote/Config/Update/sql/2.1.1.sql b/local/modules/CreditNote/Config/Update/sql/2.1.1.sql new file mode 100644 index 000000000..e0157d73e --- /dev/null +++ b/local/modules/CreditNote/Config/Update/sql/2.1.1.sql @@ -0,0 +1,10 @@ + +# This is a fix for InnoDB in MySQL >= 4.1.x +# It "suspends judgement" for fkey relationships until are tables are set. +SET FOREIGN_KEY_CHECKS = 0; + +ALTER TABLE `credit_note` ADD `discount_without_tax` DECIMAL(16,6) DEFAULT 0.000000 AFTER `total_price_with_tax`, ADD `discount_with_tax` DECIMAL(16,6) DEFAULT 0.000000 AFTER `discount_without_tax`; +ALTER TABLE `credit_note_version` ADD `discount_without_tax` DECIMAL(16,6) DEFAULT 0.000000 AFTER `total_price_with_tax`, ADD `discount_with_tax` DECIMAL(16,6) DEFAULT 0.000000 AFTER `discount_without_tax`; + +# This restores the fkey checks, after having unset them earlier +SET FOREIGN_KEY_CHECKS = 1; diff --git a/local/modules/CreditNote/Config/Update/sql/2.1.3.sql b/local/modules/CreditNote/Config/Update/sql/2.1.3.sql new file mode 100644 index 000000000..6be3c7221 --- /dev/null +++ b/local/modules/CreditNote/Config/Update/sql/2.1.3.sql @@ -0,0 +1,16 @@ + +# This is a fix for InnoDB in MySQL >= 4.1.x +# It "suspends judgement" for fkey relationships until are tables are set. +SET FOREIGN_KEY_CHECKS = 0; + +SELECT @max_id := IFNULL(MAX(`id`),0) FROM `credit_note_type`; + +INSERT INTO `credit_note_type` (`id`, `code`, `position`, `color`, `required_order`, `created_at`, `updated_at`) VALUES +(@max_id+1, 'difference_refund', @max_id+1, '#CF7973', 0, NOW(), NOW()); + +INSERT INTO `credit_note_type_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES +(@max_id+1, 'en_US', 'Difference refund', '', '', ''), +(@max_id+1, 'fr_FR', 'Remboursement de la différence', '', '', ''); + +# This restores the fkey checks, after having unset them earlier +SET FOREIGN_KEY_CHECKS = 1; diff --git a/local/modules/CreditNote/Config/Update/sql/2.3.4.sql b/local/modules/CreditNote/Config/Update/sql/2.3.4.sql new file mode 100644 index 000000000..cd2618462 --- /dev/null +++ b/local/modules/CreditNote/Config/Update/sql/2.3.4.sql @@ -0,0 +1,18 @@ + +# This is a fix for InnoDB in MySQL >= 4.1.x +# It "suspends judgement" for fkey relationships until are tables are set. +SET FOREIGN_KEY_CHECKS = 0; + +ALTER TABLE credit_note +DROP COLUMN version; + +ALTER TABLE credit_note +DROP COLUMN version_created_at; + +ALTER TABLE credit_note +DROP COLUMN version_created_by; + +DROP TABLE IF EXISTS `credit_note_version`; + +# This restores the fkey checks, after having unset them earlier +SET FOREIGN_KEY_CHECKS = 1; diff --git a/local/modules/CreditNote/Config/config.xml b/local/modules/CreditNote/Config/config.xml new file mode 100644 index 000000000..e00b0ac8a --- /dev/null +++ b/local/modules/CreditNote/Config/config.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/local/modules/CreditNote/Config/insert.sql b/local/modules/CreditNote/Config/insert.sql new file mode 100644 index 000000000..b8087800a --- /dev/null +++ b/local/modules/CreditNote/Config/insert.sql @@ -0,0 +1,47 @@ +SET FOREIGN_KEY_CHECKS = 0; + +INSERT INTO `credit_note_status` (`id`, `code`, `position`, `color`, `invoiced`, `used`, `created_at`, `updated_at`) VALUES +(1, 'proposed', 1, '#999966', 0, 0, NOW(), NOW()), +(2, 'refused', 2, '#e60000', 0, 0, NOW(), NOW()), +(3, 'accepted', 3, '#00cc00', 1, 0, NOW(), NOW()), +(4, 'used', 4, '#3399ff', 1, 1, NOW(), NOW()); + +INSERT INTO `credit_note_status_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES +(1, 'en_US', 'Proposed', '', '', ''), +(1, 'fr_FR', 'Proposé', '', '', ''), +(2, 'en_US', 'Refused', '', '', ''), +(2, 'fr_FR', 'Refusé', '', '', ''), +(3, 'en_US', 'Accepted', '', '', ''), +(3, 'fr_FR', 'Accepté', '', '', ''), +(4, 'en_US', 'Used', '', '', ''), +(4, 'fr_FR', 'Utilisé', '', '', ''); + +INSERT INTO `credit_note_status_flow` (`id`, `from_status_id`, `to_status_id`, `priority`, `root`, `created_at`, `updated_at`) VALUES +(1, 1, 2, 1, 1, NOW(), NOW()), +(2, 1, 3, 1, 0, NOW(), NOW()), +(3, 2, 1, 1, 1, NOW(), NOW()), +(4, 3, 4, 1, 0, NOW(), NOW()); + +INSERT INTO `credit_note_type` (`id`, `code`, `position`, `color`, `required_order`, `created_at`, `updated_at`) VALUES +(1, 'order_full_refund', 1, '#1abc9c', 1, NOW(), NOW()), +(2, 'back_product', 2, '#40d47e', 1, NOW(), NOW()), +(3, 'billing_error', 3, '#3498db', 1, NOW(), NOW()), +(4, 'rebate', 4, '#9b59b6', 0, NOW(), NOW()), +(5, 'discount', 5, '#34495e', 0, NOW(), NOW()), +(6, 'difference_refund', 5, '#CF7973', 0, NOW(), NOW()); + +INSERT INTO `credit_note_type_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES +(1, 'en_US', 'Order Full refund', '', '', ''), +(1, 'fr_FR', 'Remboursement complet', '', '', ''), +(2, 'en_US', 'Back Product', '', '', ''), +(2, 'fr_FR', 'Retour produit', '', '', ''), +(3, 'en_US', 'Billing error', '', '', ''), +(3, 'fr_FR', 'Erreur de facturation', '', '', ''), +(4, 'en_US', 'A rebate', '', '', ''), +(4, 'fr_FR', 'Un rabais', '', '', ''), +(5, 'en_US', 'A discount', '', '', ''), +(5, 'fr_FR', 'Une remise', '', '', ''), +(6, 'en_US', 'Difference refund', '', '', ''), +(6, 'fr_FR', 'Remboursement de la différence', '', '', ''); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/local/modules/CreditNote/Config/module.xml b/local/modules/CreditNote/Config/module.xml new file mode 100644 index 000000000..898e24595 --- /dev/null +++ b/local/modules/CreditNote/Config/module.xml @@ -0,0 +1,26 @@ + + + CreditNote\CreditNote + + Credit notes + Allows granting credit notes to customers + + + Avoirs + Permet d'accorder des avoirs aux clients + + + en_US + fr_FR + + 2.3.6 + + Gilles Bourgeat + gbourgeat@openstudio.fr + + classic + 2.3.0 + beta + diff --git a/local/modules/CreditNote/Config/routing.xml b/local/modules/CreditNote/Config/routing.xml new file mode 100644 index 000000000..8eba6a3c5 --- /dev/null +++ b/local/modules/CreditNote/Config/routing.xml @@ -0,0 +1,50 @@ + + + + + CreditNote:CreditNote:generateInvoicePdf + 0 + [0|1|2] + \d+ + + + + CreditNote:CreditNote:list + + + + CreditNote:CreditNote:ajaxModalCreate + + + + CreditNote:CreditNote:create + + + + CreditNote:CreditNote:view + \d+ + + + + CreditNote:CreditNote:update + \d+ + + + + CreditNote:CreditNote:delete + \d+ + + + + CreditNote:CreditNote:searchCustomer + + + + CreditNote:CreditNote:searchOrder + + + + CreditNote:CreditNote:loadOrder + + diff --git a/local/modules/CreditNote/Config/schema.xml b/local/modules/CreditNote/Config/schema.xml new file mode 100644 index 000000000..232716807 --- /dev/null +++ b/local/modules/CreditNote/Config/schema.xml @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
diff --git a/local/modules/CreditNote/Config/sqldb.map b/local/modules/CreditNote/Config/sqldb.map new file mode 100644 index 000000000..63a93baa8 --- /dev/null +++ b/local/modules/CreditNote/Config/sqldb.map @@ -0,0 +1,2 @@ +# Sqlfile -> Database map +thelia.sql=thelia diff --git a/local/modules/CreditNote/Config/thelia.sql b/local/modules/CreditNote/Config/thelia.sql new file mode 100644 index 000000000..85b908548 --- /dev/null +++ b/local/modules/CreditNote/Config/thelia.sql @@ -0,0 +1,358 @@ + +# This is a fix for InnoDB in MySQL >= 4.1.x +# It "suspends judgement" for fkey relationships until are tables are set. +SET FOREIGN_KEY_CHECKS = 0; + +-- --------------------------------------------------------------------- +-- credit_note +-- --------------------------------------------------------------------- + +DROP TABLE IF EXISTS `credit_note`; + +CREATE TABLE `credit_note` +( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `ref` VARCHAR(45), + `invoice_ref` VARCHAR(45), + `invoice_address_id` INTEGER NOT NULL, + `invoice_date` DATETIME, + `order_id` INTEGER, + `customer_id` INTEGER NOT NULL, + `parent_id` INTEGER, + `type_id` INTEGER NOT NULL, + `status_id` INTEGER NOT NULL, + `currency_id` INTEGER NOT NULL, + `currency_rate` FLOAT, + `total_price` DECIMAL(16,6) DEFAULT 0.000000, + `total_price_with_tax` DECIMAL(16,6) DEFAULT 0.000000, + `discount_without_tax` DECIMAL(16,6) DEFAULT 0.000000, + `discount_with_tax` DECIMAL(16,6) DEFAULT 0.000000, + `allow_partial_use` TINYINT(1) DEFAULT 1, + `created_at` DATETIME, + `updated_at` DATETIME, + PRIMARY KEY (`id`), + UNIQUE INDEX `ref_UNIQUE` (`ref`), + UNIQUE INDEX `invoice_ref_UNIQUE` (`invoice_ref`), + INDEX `idx_order_id_fk` (`order_id`), + INDEX `idx_customer_id_fk` (`customer_id`), + INDEX `idx_parent_id_fk` (`parent_id`), + INDEX `idx_type_id_fk` (`type_id`), + INDEX `idx_status_id_fk` (`status_id`), + INDEX `credit_note_FI_6` (`currency_id`), + INDEX `credit_note_FI_7` (`invoice_address_id`), + CONSTRAINT `credit_note_FK_1` + FOREIGN KEY (`order_id`) + REFERENCES `order` (`id`) + ON UPDATE RESTRICT + ON DELETE RESTRICT, + CONSTRAINT `credit_note_FK_2` + FOREIGN KEY (`customer_id`) + REFERENCES `customer` (`id`) + ON UPDATE RESTRICT + ON DELETE RESTRICT, + CONSTRAINT `credit_note_FK_3` + FOREIGN KEY (`parent_id`) + REFERENCES `credit_note` (`id`) + ON UPDATE RESTRICT + ON DELETE RESTRICT, + CONSTRAINT `credit_note_FK_4` + FOREIGN KEY (`type_id`) + REFERENCES `credit_note_type` (`id`) + ON UPDATE RESTRICT + ON DELETE RESTRICT, + CONSTRAINT `credit_note_FK_5` + FOREIGN KEY (`status_id`) + REFERENCES `credit_note_status` (`id`) + ON UPDATE RESTRICT + ON DELETE RESTRICT, + CONSTRAINT `credit_note_FK_6` + FOREIGN KEY (`currency_id`) + REFERENCES `currency` (`id`) + ON UPDATE RESTRICT + ON DELETE RESTRICT, + CONSTRAINT `credit_note_FK_7` + FOREIGN KEY (`invoice_address_id`) + REFERENCES `credit_note_address` (`id`) + ON UPDATE RESTRICT + ON DELETE RESTRICT +) ENGINE=InnoDB; + +-- --------------------------------------------------------------------- +-- credit_note_address +-- --------------------------------------------------------------------- + +DROP TABLE IF EXISTS `credit_note_address`; + +CREATE TABLE `credit_note_address` +( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `customer_title_id` INTEGER, + `company` VARCHAR(255), + `firstname` VARCHAR(255) NOT NULL, + `lastname` VARCHAR(255) NOT NULL, + `address1` VARCHAR(255) NOT NULL, + `address2` VARCHAR(255), + `address3` VARCHAR(255), + `zipcode` VARCHAR(10) NOT NULL, + `city` VARCHAR(255) NOT NULL, + `phone` VARCHAR(20), + `cellphone` VARCHAR(20), + `country_id` INTEGER NOT NULL, + `state_id` INTEGER, + `created_at` DATETIME, + `updated_at` DATETIME, + PRIMARY KEY (`id`), + INDEX `FI_credit_note_address_customer_title_id` (`customer_title_id`), + INDEX `FI_credit_note_address_country_id` (`country_id`), + INDEX `FI_credit_note_address_state_id` (`state_id`), + CONSTRAINT `fk_credit_note_address_customer_title_id` + FOREIGN KEY (`customer_title_id`) + REFERENCES `customer_title` (`id`) + ON UPDATE RESTRICT + ON DELETE RESTRICT, + CONSTRAINT `fk_credit_note_address_country_id` + FOREIGN KEY (`country_id`) + REFERENCES `country` (`id`) + ON UPDATE RESTRICT + ON DELETE RESTRICT, + CONSTRAINT `fk_credit_note_address_state_id` + FOREIGN KEY (`state_id`) + REFERENCES `state` (`id`) + ON UPDATE RESTRICT + ON DELETE RESTRICT +) ENGINE=InnoDB; + +-- --------------------------------------------------------------------- +-- order_credit_note +-- --------------------------------------------------------------------- + +DROP TABLE IF EXISTS `order_credit_note`; + +CREATE TABLE `order_credit_note` +( + `order_id` INTEGER NOT NULL, + `credit_note_id` INTEGER NOT NULL, + `amount_price` DECIMAL(16,6) DEFAULT 0.000000, + `created_at` DATETIME, + `updated_at` DATETIME, + PRIMARY KEY (`order_id`,`credit_note_id`), + INDEX `order_credit_note_FI_2` (`credit_note_id`), + CONSTRAINT `order_credit_note_FK_1` + FOREIGN KEY (`order_id`) + REFERENCES `order` (`id`) + ON UPDATE RESTRICT + ON DELETE CASCADE, + CONSTRAINT `order_credit_note_FK_2` + FOREIGN KEY (`credit_note_id`) + REFERENCES `credit_note` (`id`) + ON UPDATE RESTRICT + ON DELETE CASCADE +) ENGINE=InnoDB; + +-- --------------------------------------------------------------------- +-- cart_credit_note +-- --------------------------------------------------------------------- + +DROP TABLE IF EXISTS `cart_credit_note`; + +CREATE TABLE `cart_credit_note` +( + `cart_id` INTEGER NOT NULL, + `credit_note_id` INTEGER NOT NULL, + `amount_price` DECIMAL(16,6) DEFAULT 0.000000, + `created_at` DATETIME, + `updated_at` DATETIME, + PRIMARY KEY (`cart_id`,`credit_note_id`), + INDEX `cart_credit_note_FI_2` (`credit_note_id`), + CONSTRAINT `cart_credit_note_FK_1` + FOREIGN KEY (`cart_id`) + REFERENCES `cart` (`id`) + ON UPDATE RESTRICT + ON DELETE CASCADE, + CONSTRAINT `cart_credit_note_FK_2` + FOREIGN KEY (`credit_note_id`) + REFERENCES `credit_note` (`id`) + ON UPDATE RESTRICT + ON DELETE CASCADE +) ENGINE=InnoDB; + +-- --------------------------------------------------------------------- +-- credit_note_status +-- --------------------------------------------------------------------- + +DROP TABLE IF EXISTS `credit_note_status`; + +CREATE TABLE `credit_note_status` +( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `code` VARCHAR(45), + `color` CHAR(7), + `invoiced` TINYINT(1) DEFAULT 0 NOT NULL, + `used` TINYINT(1) DEFAULT 0 NOT NULL, + `position` INTEGER(11), + `created_at` DATETIME, + `updated_at` DATETIME, + PRIMARY KEY (`id`) +) ENGINE=InnoDB; + +-- --------------------------------------------------------------------- +-- credit_note_status_flow +-- --------------------------------------------------------------------- + +DROP TABLE IF EXISTS `credit_note_status_flow`; + +CREATE TABLE `credit_note_status_flow` +( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `from_status_id` INTEGER NOT NULL, + `to_status_id` INTEGER NOT NULL, + `priority` INTEGER(11), + `root` TINYINT(1) DEFAULT 0 NOT NULL, + `created_at` DATETIME, + `updated_at` DATETIME, + PRIMARY KEY (`id`), + INDEX `FI_dit_note_status_flow_credit_note_status_from` (`from_status_id`), + INDEX `FI_dit_note_status_flow_credit_note_status_to` (`to_status_id`), + CONSTRAINT `credit_note_status_flow_credit_note_status_from` + FOREIGN KEY (`from_status_id`) + REFERENCES `credit_note_status` (`id`) + ON UPDATE RESTRICT + ON DELETE CASCADE, + CONSTRAINT `credit_note_status_flow_credit_note_status_to` + FOREIGN KEY (`to_status_id`) + REFERENCES `credit_note_status` (`id`) + ON UPDATE RESTRICT + ON DELETE CASCADE +) ENGINE=InnoDB; + +-- --------------------------------------------------------------------- +-- credit_note_type +-- --------------------------------------------------------------------- + +DROP TABLE IF EXISTS `credit_note_type`; + +CREATE TABLE `credit_note_type` +( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `code` VARCHAR(45), + `color` CHAR(7), + `position` INTEGER(11), + `required_order` TINYINT(1) DEFAULT 0 NOT NULL, + `created_at` DATETIME, + `updated_at` DATETIME, + PRIMARY KEY (`id`) +) ENGINE=InnoDB; + +-- --------------------------------------------------------------------- +-- credit_note_detail +-- --------------------------------------------------------------------- + +DROP TABLE IF EXISTS `credit_note_detail`; + +CREATE TABLE `credit_note_detail` +( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `credit_note_id` INTEGER NOT NULL, + `price` DECIMAL(16,6) DEFAULT 0.000000, + `price_with_tax` DECIMAL(16,6) DEFAULT 0.000000, + `tax_rule_id` INTEGER, + `order_product_id` INTEGER, + `type` VARCHAR(55), + `quantity` INTEGER DEFAULT 0 NOT NULL, + `title` VARCHAR(255), + `created_at` DATETIME, + `updated_at` DATETIME, + PRIMARY KEY (`id`), + INDEX `idx_credit_note_id_fk` (`credit_note_id`), + INDEX `idx_order_product_id_fk` (`order_product_id`), + INDEX `credit_note_detail_FI_3` (`tax_rule_id`), + CONSTRAINT `credit_note_detail_FK_1` + FOREIGN KEY (`credit_note_id`) + REFERENCES `credit_note` (`id`) + ON UPDATE RESTRICT + ON DELETE CASCADE, + CONSTRAINT `credit_note_detail_FK_2` + FOREIGN KEY (`order_product_id`) + REFERENCES `order_product` (`id`) + ON UPDATE RESTRICT + ON DELETE RESTRICT, + CONSTRAINT `credit_note_detail_FK_3` + FOREIGN KEY (`tax_rule_id`) + REFERENCES `tax_rule` (`id`) + ON UPDATE RESTRICT + ON DELETE RESTRICT +) ENGINE=InnoDB; + +-- --------------------------------------------------------------------- +-- credit_note_comment +-- --------------------------------------------------------------------- + +DROP TABLE IF EXISTS `credit_note_comment`; + +CREATE TABLE `credit_note_comment` +( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `credit_note_id` INTEGER NOT NULL, + `admin_id` INTEGER, + `comment` LONGTEXT, + `created_at` DATETIME, + `updated_at` DATETIME, + PRIMARY KEY (`id`), + INDEX `idx_credit_note_id_fk` (`credit_note_id`), + INDEX `idx_admin_id_fk` (`admin_id`), + CONSTRAINT `credit_note_comment_FK_1` + FOREIGN KEY (`credit_note_id`) + REFERENCES `credit_note` (`id`) + ON UPDATE RESTRICT + ON DELETE CASCADE, + CONSTRAINT `credit_note_comment_FK_2` + FOREIGN KEY (`admin_id`) + REFERENCES `admin` (`id`) + ON UPDATE RESTRICT + ON DELETE SET NULL +) ENGINE=InnoDB; + +-- --------------------------------------------------------------------- +-- credit_note_status_i18n +-- --------------------------------------------------------------------- + +DROP TABLE IF EXISTS `credit_note_status_i18n`; + +CREATE TABLE `credit_note_status_i18n` +( + `id` INTEGER NOT NULL, + `locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL, + `title` VARCHAR(255), + `description` LONGTEXT, + `chapo` TEXT, + `postscriptum` TEXT, + PRIMARY KEY (`id`,`locale`), + CONSTRAINT `credit_note_status_i18n_FK_1` + FOREIGN KEY (`id`) + REFERENCES `credit_note_status` (`id`) + ON DELETE CASCADE +) ENGINE=InnoDB; + +-- --------------------------------------------------------------------- +-- credit_note_type_i18n +-- --------------------------------------------------------------------- + +DROP TABLE IF EXISTS `credit_note_type_i18n`; + +CREATE TABLE `credit_note_type_i18n` +( + `id` INTEGER NOT NULL, + `locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL, + `title` VARCHAR(255), + `description` LONGTEXT, + `chapo` TEXT, + `postscriptum` TEXT, + PRIMARY KEY (`id`,`locale`), + CONSTRAINT `credit_note_type_i18n_FK_1` + FOREIGN KEY (`id`) + REFERENCES `credit_note_type` (`id`) + ON DELETE CASCADE +) ENGINE=InnoDB; + +# This restores the fkey checks, after having unset them earlier +SET FOREIGN_KEY_CHECKS = 1; diff --git a/local/modules/CreditNote/Controller/CreditNoteController.php b/local/modules/CreditNote/Controller/CreditNoteController.php new file mode 100644 index 000000000..1b7702961 --- /dev/null +++ b/local/modules/CreditNote/Controller/CreditNoteController.php @@ -0,0 +1,904 @@ + + */ +class CreditNoteController extends BaseAdminController +{ + use CriteriaSearchHelper; + + /** + * @param Request $request + * @return \Thelia\Core\HttpFoundation\Response + */ + public function listAction(Request $request) + { + return $this->render( + "credit-note-list", + [ + + ] + ); + } + + /** + * @param Request $request + * @param int $id + * @return \Thelia\Core\HttpFoundation\Response + */ + public function viewAction(Request $request, $id) + { + $creditNote = CreditNoteQuery::create() + ->filterById($id, Criteria::EQUAL) + ->findOne(); + + $creditNote = $this->performCreditNote($creditNote); + + return $this->render("ajax/credit-note-modal", [ + 'creditNote' => $creditNote + ]); + } + + public function createAction(Request $request) + { + $creditNote = $this->performCreditNote(); + + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteTableMap::DATABASE_NAME); + + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + + try { + $creditNote->save(); + $con->commit(); + } catch (\Exception $e) { + $con->rollBack(); + throw $e; + } + + if (null !== $request->get('success-url')) { + return new RedirectResponse($request->get('success-url')); + } + + if (null !== $creditNote->getOrder()) { + return $this->generateRedirectFromRoute( + 'admin.order.update.view', + [ + 'tab' => 'credit-note' + ], + [ + 'order_id' => $creditNote->getOrder()->getId() + ] + ); + } + + if (null !== $creditNote->getCustomer()) { + return $this->generateRedirectFromRoute('admin.customer.update.view', [], [ + 'customer_id' => $creditNote->getCustomer()->getId() + ]); + } + } + + public function updateAction(Request $request, $id) + { + $creditNote = CreditNoteQuery::create() + ->filterById($id, Criteria::EQUAL) + ->findOne(); + + $creditNote = $this->performCreditNote($creditNote); + + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteTableMap::DATABASE_NAME); + + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + + try { + $creditNote->save(); + $con->commit(); + } catch (\Exception $e) { + $con->rollBack(); + throw $e; + } + + if (null !== $request->get('success-url')) { + return new RedirectResponse($request->get('success-url')); + } + + if (null !== $creditNote->getOrder()) { + return $this->generateRedirectFromRoute( + 'admin.order.update.view', + [ + 'tab' => 'credit-note' + ], + [ + 'order_id' => $creditNote->getOrder()->getId() + ] + ); + } + + if (null !== $creditNote->getCustomer()) { + return $this->generateRedirectFromRoute('admin.customer.update.view', [], [ + 'customer_id' => $creditNote->getCustomer()->getId() + ]); + } + } + + public function deleteAction(Request $request, $id) + { + $creditNote = CreditNoteQuery::create()->findOneById($id); + + if (!empty($creditNote->getInvoiceRef())) { + $request->getSession()->getFlashBag()->set( + 'error', + $this->getTranslator()->trans( + "You can not delete this credit note" + ) + ); + } else { + CreditNoteQuery::create()->filterById($id)->delete(); + } + + if (null !== $request->get('success-url')) { + return new RedirectResponse($request->get('success-url')); + } + + if (null !== $creditNote->getOrder()) { + return $this->generateRedirectFromRoute( + 'admin.order.update.view', + [ + 'tab' => 'credit-note' + ], + [ + 'order_id' => $creditNote->getOrder()->getId() + ] + ); + } + + if (null !== $creditNote->getCustomer()) { + return $this->generateRedirectFromRoute('admin.customer.update.view', [], [ + 'customer_id' => $creditNote->getCustomer()->getId() + ]); + } + } + + /** + * @param Request $request + * @return \Thelia\Core\HttpFoundation\Response + */ + public function ajaxModalCreateAction(Request $request) + { + $creditNote = $this->performCreditNote(); + + return $this->render("ajax/credit-note-modal", [ + 'creditNote' => $creditNote + ]); + } + + public function generateInvoicePdfAction($creditNoteId, $browser) + { + return $this->generateCreditNotePdf($creditNoteId, 'credit-note', true, true, $browser); + } + + /** + * @param int $creditNoteId + * @param string $fileName + * @param bool $checkCreditNoteStatus + * @param bool $checkAdminUser + * @return \Symfony\Component\HttpFoundation\Response + */ + protected function generateCreditNotePdf($creditNoteId, $fileName, $checkCreditNoteStatus = true, $checkAdminUser = true, $browser = false) + { + $creditNote = CreditNoteQuery::create()->findPk($creditNoteId); + + // check if the order has the paid status + if ($checkAdminUser && !$this->getSecurityContext()->hasAdminUser()) { + throw new NotFoundHttpException(); + } + + if ($checkCreditNoteStatus && !$creditNote->getCreditNoteStatus()->getInvoiced()) { + throw new NotFoundHttpException(); + } + + $html = $this->renderRaw( + $fileName, + [ + 'credit_note_id' => $creditNote->getId() + ], + $this->getTemplateHelper()->getActivePdfTemplate() + ); + + if ((int) $browser === 2) { + return new Response($html); + } + + try { + $pdfEvent = new PdfEvent($html); + + $this->dispatch(TheliaEvents::GENERATE_PDF, $pdfEvent); + + if ($pdfEvent->hasPdf()) { + if ((int) $browser === 1) { + $browser = true; + } else { + $browser = false; + } + return $this->pdfResponse($pdfEvent->getPdf(), $creditNote->getInvoiceRef(), 200, $browser); + } + } catch (\Exception $e) { + Tlog::getInstance()->error( + sprintf( + 'error during generating invoice pdf for credit note id : %d with message "%s"', + $creditNote->getId(), + $e->getMessage() + ) + ); + } + + throw new TheliaProcessException( + $this->getTranslator()->trans( + "We're sorry, this PDF invoice is not available at the moment." + ) + ); + } + + /** + * @return CreditNote + */ + protected function performCreditNote(CreditNote $creditNote = null) + { + if (null === $creditNote) { + $creditNote = new CreditNote(); + } + + $creditNote->setDispatcher($this->getDispatcher()); + + $form = $this->createForm('credit-note.create', 'form', [], ['csrf_protection' => false]); + + $formValidate = $this->validateForm($form, 'post'); + + if (null === $creditNote->getInvoiceRef()) { + $this + ->performType($formValidate, $creditNote) + ->performOrder($formValidate, $creditNote) + ->performCurrency($formValidate, $creditNote) + ->performCustomer($formValidate, $creditNote) + ->performInvoiceAddress($formValidate, $creditNote) + ->performStatus($formValidate, $creditNote) + ->performFreeAmounts($formValidate, $creditNote) + ->performOrderProducts($formValidate, $creditNote) + ->performDiscount($formValidate, $creditNote) + ->performAmount($formValidate, $creditNote) + ; + } + + $this->performComment($formValidate, $creditNote); + + $this->getParserContext()->addForm($form); + + $creditNote->setDispatcher($this->getDispatcher()); + + return $creditNote; + } + + protected function performDiscount(Form $formValidate, CreditNote $creditNote) + { + $discountWithoutTax = $formValidate->get('discount_without_tax')->getData(); + $discountWithTax = $formValidate->get('discount_with_tax')->getData(); + + if (null !== $creditNote->getOrder() && $creditNote->getCreditNoteType()->getCode() === CreditNoteHelper::TYPE_ORDER_FULL_REFUND) { + $creditNote->setDiscountWithoutTax($creditNote->getOrder()->getDiscount()); + $creditNote->setDiscountWithTax($creditNote->getOrder()->getDiscount()); + } elseif (null !== $discountWithoutTax && null !== $discountWithTax) { + $creditNote->setDiscountWithoutTax($discountWithoutTax); + $creditNote->setDiscountWithTax($discountWithTax); + } elseif (null === $creditNote->getOrder()) { + $creditNote->setDiscountWithoutTax(0); + $creditNote->setDiscountWithTax(0); + } + + return $this; + } + + protected function performInvoiceAddress(Form $formValidate, CreditNote $creditNote) + { + if (!empty($creditNote->getInvoiceRef())) { + return $this; + } + + $action = $formValidate->get('action')->getData(); + + $invoiceAddressId = $formValidate->get('invoice_address_id')->getData(); + + if ($action !== 'view') { + $creditNoteAddress = $creditNote->getCreditNoteAddress(); + + if (null === $creditNoteAddress) { + $creditNoteAddress = new CreditNoteAddress(); + } + + if (null === $creditNote->getCustomer()) { + $creditNoteAddress = new CreditNoteAddress(); + } elseif ($invoiceAddressId) { + $address = AddressQuery::create()->findOneById((int)$invoiceAddressId); + + $customerTitle = $address->getCustomerTitle(); + + $creditNoteAddress + ->setCustomerTitleId($customerTitle ? $customerTitle->getId() : null) + ->setAddress1($address->getAddress1()) + ->setAddress2($address->getAddress2()) + ->setAddress3($address->getAddress3()) + ->setFirstname($address->getFirstname()) + ->setLastname($address->getLastname()) + ->setCity($address->getCity()) + ->setZipcode($address->getZipcode()) + ->setCompany($address->getCompany()) + ->setCountryId($address->getCountry()->getId()); + } else { + $invoiceAddressTitle = $formValidate->get('invoice_address_title')->getData(); + $invoiceAddressFirstname = $formValidate->get('invoice_address_firstname')->getData(); + $invoiceAddressLastname = $formValidate->get('invoice_address_lastname')->getData(); + $invoiceAddressCompany = $formValidate->get('invoice_address_company')->getData(); + $invoiceAddressAddress1 = $formValidate->get('invoice_address_address1')->getData(); + $invoiceAddressAddress2 = $formValidate->get('invoice_address_address2')->getData(); + $invoiceAddressZipcode = $formValidate->get('invoice_address_zipcode')->getData(); + $invoiceAddressCity = $formValidate->get('invoice_address_city')->getData(); + $invoiceAddressCountryId = $formValidate->get('invoice_address_country_id')->getData(); + + $country = CountryQuery::create()->findOneById($invoiceAddressCountryId); + + $creditNoteAddress + ->setCustomerTitleId($invoiceAddressTitle) + ->setAddress1($invoiceAddressAddress1) + ->setAddress2($invoiceAddressAddress2) + ->setFirstname($invoiceAddressFirstname) + ->setLastname($invoiceAddressLastname) + ->setCity($invoiceAddressCity) + ->setZipcode($invoiceAddressZipcode) + ->setCompany($invoiceAddressCompany) + ->setCountryId( + $country ? $country->getId() : null + ); + } + + if (empty($creditNoteAddress->getLastname()) && ('create' === $action || 'update' === $action)) { + $formValidate->addError( + new FormError('Please select a invoice address') + ); + + $creditNoteAddress->save(); + } + + $creditNote->setCreditNoteAddress($creditNoteAddress); + } elseif (null === $creditNote->getId()) { + if (null !== $creditNote->getOrder() && null === $creditNote->getCreditNoteAddress()) { + $address = $creditNote->getOrder()->getOrderAddressRelatedByInvoiceOrderAddressId(); + + $customerTitle = $address->getCustomerTitle(); + + $creditNoteAddress = new CreditNoteAddress(); + + $creditNoteAddress + ->setCustomerTitleId($customerTitle ? $customerTitle->getId() : null) + ->setAddress1($address->getAddress1()) + ->setAddress2($address->getAddress2()) + ->setAddress3($address->getAddress3()) + ->setFirstname($address->getFirstname()) + ->setLastname($address->getLastname()) + ->setCity($address->getCity()) + ->setZipcode($address->getZipcode()) + ->setCompany($address->getCompany()) + ->setCountryId($address->getCountry()->getId()); + + $creditNote->setCreditNoteAddress($creditNoteAddress); + } else { + $creditNote->setCreditNoteAddress(new CreditNoteAddress()); + } + } + + return $this; + } + + protected function performAmount(Form $formValidate, CreditNote $creditNote) + { + $totalPrice = 0; + $totalPriceWithTax = 0; + + foreach ($creditNote->getCreditNoteDetails() as $creditNoteDetail) { + $totalPrice += $creditNoteDetail->getPrice() * $creditNoteDetail->getQuantity(); + $totalPriceWithTax += $creditNoteDetail->getPriceWithTax() * $creditNoteDetail->getQuantity(); + } + + $totalPrice -= $creditNote->getDiscountWithoutTax(); + $totalPriceWithTax -= $creditNote->getDiscountWithTax(); + + $creditNote->setTotalPrice($totalPrice); + $creditNote->setTotalPriceWithTax($totalPriceWithTax); + + return $this; + } + + protected function performComment(Form $formValidate, CreditNote $creditNote) + { + /** @var string $orderId */ + $comment = trim($formValidate->get('comment')->getData()); + + if (null !== $comment && !empty($comment)) { + $creditNote->addCreditNoteComment( + (new CreditNoteComment()) + ->setComment($comment) + ->setAdminId($this->getSecurityContext()->getAdminUser()->getId()) + ); + } + + return $this; + } + + protected function performOrder(Form $formValidate, CreditNote $creditNote) + { + /** @var int $orderId */ + $orderId = $formValidate->get('order_id')->getData(); + + if (null !== $orderId && !empty($orderId)) { + $order = OrderQuery::create()->findPk($orderId); + + $creditNote + ->setOrder($order) + ->setCustomer($order->getCustomer()) + ->setCurrency($order->getCurrency()); + + if ($order->getStatusId() == 1 || $order->getStatusId() == 5) { + throw new \Exception('This order is not invoiced'); + } + } + + return $this; + } + + protected function performCurrency(Form $formValidate, CreditNote $creditNote) + { + /** @var int $currencyId */ + $currencyId = $formValidate->get('currency_id')->getData(); + + if (null !== $creditNote->getOrder()) { + $creditNote->setCurrency($creditNote->getOrder()->getCurrency()); + } elseif ($creditNote->getCurrency() === null) { + if (!empty($currencyId) && $currency = CurrencyQuery::create()->findPk($currencyId)) { + $creditNote->setCurrency($currency); + } else { + $creditNote->setCurrency(CurrencyQuery::create()->findOneByByDefault(true)); + } + } + + return $this; + } + + protected function performCustomer(Form $formValidate, CreditNote $creditNote) + { + /** @var int $customerId */ + $customerId = $formValidate->get('customer_id')->getData(); + + // check if order + if (!empty($orderId) && null !== $order = OrderQuery::create()->findPk($orderId)) { + $creditNote + ->setOrder($order) + ->setCurrency($order->getCurrency()) + ->setCustomer($order->getCustomer()); + } elseif (!empty($customerId) && null !== $customer = CustomerQuery::create()->findPk($customerId)) { + $creditNote->setCustomer($customer); + } + + return $this; + } + + protected function performType(Form $formValidate, CreditNote $creditNote) + { + /** @var int $typeId */ + $typeId = $formValidate->get('type_id')->getData(); + + if (!empty($typeId) && null !== $type = CreditNoteTypeQuery::create()->findPk($typeId)) { + $creditNote->setCreditNoteType($type); + } elseif (null === $creditNote->getTypeId()) { + $creditNote->setCreditNoteType(CreditNoteTypeQuery::create()->findOne()); + } + + return $this; + } + + protected function performStatus(Form $formValidate, CreditNote $creditNote) + { + /** @var int $statusId */ + $statusId = $formValidate->get('status_id')->getData(); + + if (!empty($statusId) && null !== $status = CreditNoteStatusQuery::create()->findPk($statusId)) { + $creditNote->setCreditNoteStatus($status); + } elseif (null === $creditNote->getStatusId()) { + $creditNote->setCreditNoteStatus(CreditNoteStatusQuery::create()->findOne()); + } + + return $this; + } + + protected function performFreeAmounts(Form $formValidate, CreditNote $creditNote) + { + /** @var string[] $freeAmountTitles */ + $freeAmountTitles = $formValidate->get('free_amount_title')->getData(); + + /** @var float[] $freeAmountPrices */ + $freeAmountPrices = $formValidate->get('free_amount_price')->getData(); + + /** @var float[] $freeAmountPricesWithTax */ + $freeAmountPricesWithTax = $formValidate->get('free_amount_price_with_tax')->getData(); + + /** @var int[] $freeAmountTaxRuleIds */ + $freeAmountTaxRuleIds = $formValidate->get('free_amount_tax_rule_id')->getData(); + + /** @var string[] $freeAmountTaxRuleIds */ + $freeAmountIds = $formValidate->get('free_amount_id')->getData(); + + /** @var string[] $freeAmountTypes */ + $freeAmountTypes = $formValidate->get('free_amount_type')->getData(); + + /** @var string $freeAmountTypes */ + $action = $formValidate->get('action')->getData(); + + foreach ($creditNote->getCreditNoteDetails() as $creditNoteDetail) { + if (empty($creditNoteDetail->getOrderProductId())) { + foreach ($freeAmountTitles as $key => $freeAmountTitle) { + if ($freeAmountIds[$key] == $creditNoteDetail->getId()) { + $creditNoteDetail + ->setTitle($freeAmountTitle) + ->setPrice($freeAmountPrices[$key]) + ->setTaxRuleId($freeAmountTaxRuleIds[$key]) + ->setType($freeAmountTypes[$key]) + ->setPriceWithTax($freeAmountPricesWithTax[$key]); + } + } + } + } + + /** + * @var int $key + * @var int $freeAmountTitle + */ + foreach ($freeAmountTitles as $key => $freeAmountTitle) { + if (empty($freeAmountIds[$key])) { + $creditNote->addCreditNoteDetail( + (new CreditNoteDetail()) + ->setTitle($freeAmountTitle) + ->setPrice($freeAmountPrices[$key]) + ->setTaxRuleId($freeAmountTaxRuleIds[$key]) + ->setType($freeAmountTypes[$key]) + ->setQuantity(1) + ->setPriceWithTax($freeAmountPricesWithTax[$key]) + ); + } + } + + if (null !== $creditNote->getOrder() && $creditNote->getCreditNoteType()->getCode() === CreditNoteHelper::TYPE_ORDER_FULL_REFUND) { + if (!(float) $creditNote->getOrder()->getPostage()) { + foreach ($creditNote->getCreditNoteDetails() as $creditNoteDetail) { + if ($creditNoteDetail->getType() == 'shipping') { + $creditNote->removeCreditNoteDetail($creditNoteDetail); + } + } + } else { + $findShipping = false; + foreach ($creditNote->getCreditNoteDetails() as $creditNoteDetail) { + if ($creditNoteDetail->getType() == 'shipping') { + $findShipping = true; + $creditNoteDetail + ->setPrice( + $creditNote->getOrder()->getPostage() - $creditNote->getOrder()->getPostageTax() + ) + ->setPriceWithTax( + $creditNote->getOrder()->getPostage() + ); + } + } + + if (!$findShipping) { + $creditNote->addCreditNoteDetail( + (new CreditNoteDetail()) + ->setQuantity(1) + ->setTitle('Frais de port') + ->setPrice($creditNote->getOrder()->getPostage() - $creditNote->getOrder()->getPostageTax()) + ->setType('shipping') + ->setPriceWithTax($creditNote->getOrder()->getPostage()) + ); + } + } + } + + if ('refresh' === $action || $action === 'update') { + foreach ($creditNote->getCreditNoteDetails() as $creditNoteDetail) { + $find = false; + if (empty($creditNoteDetail->getOrderProductId())) { + foreach ($freeAmountTitles as $key => $freeAmountTitle) { + if ($freeAmountIds[$key] == $creditNoteDetail->getId()) { + $find = true; + } + } + + if (!$find) { + $creditNote->removeCreditNoteDetail($creditNoteDetail); + } + } + } + } + + return $this; + } + + /** + * @param Form $formValidate + * @param CreditNote $creditNote + * @return $this + */ + protected function performOrderProducts(Form $formValidate, CreditNote $creditNote) + { + if (null === $creditNote->getOrder()) { + return $this; + } + + /** @var string $freeAmountTypes */ + $action = $formValidate->get('action')->getData(); + + /** @var int[] $orderProductQuantities */ + $orderProductQuantities = $formValidate->get('order_product_quantity')->getData(); + + foreach ($creditNote->getOrder()->getOrderProducts() as $orderProduct) { + $creditNoteDetail = null; + if (null !== $creditNote->getId()) { + $creditNoteDetail = CreditNoteDetailQuery::create() + ->filterByCreditNoteId($creditNote->getId()) + ->filterByOrderProductId($orderProduct->getId()) + ->findOne(); + } + + if (null === $creditNoteDetail) { + $creditNoteDetail = new CreditNoteDetail; + } + + if ($creditNote->getCreditNoteType()->getCode() === CreditNoteHelper::TYPE_ORDER_FULL_REFUND) { + $creditNoteDetail->setQuantity($orderProduct->getQuantity()); + } else { + if (isset($orderProductQuantities[$orderProduct->getId()])) { + $creditNoteDetail->setQuantity($orderProductQuantities[$orderProduct->getId()]); + } + } + + if ((float) $creditNoteDetail->getQuantity() <= 0) { + $creditNote->removeCreditNoteDetail($creditNoteDetail); + continue; + } + + if ((int) $orderProduct->getWasInPromo()) { + $orderProductWithoutTax = ((float) $orderProduct->getPromoPrice()); + $orderProductWithTax = (float) $orderProduct->getPromoPrice(); + } else { + $orderProductWithoutTax = ((float) $orderProduct->getPrice()); + $orderProductWithTax = (float) $orderProduct->getPrice(); + } + + $orderProductTaxes = $orderProduct->getOrderProductTaxes(); + /** @var OrderProductTax $orderProductTax */ + foreach ($orderProductTaxes as $orderProductTax) { + if ((int) $orderProduct->getWasInPromo()) { + $orderProductWithTax += (float) $orderProductTax->getPromoAmount(); + } else { + $orderProductWithTax += (float) $orderProductTax->getAmount(); + } + } + + $creditNoteDetail + ->setOrderProduct($orderProduct) + ->setTitle($orderProduct->getTitle()) + ->setPrice($orderProductWithoutTax) + ->setType('product') + ->setPriceWithTax($orderProductWithTax); + + if (null !== $pse = ProductSaleElementsQuery::create()->findOneById($orderProduct->getProductSaleElementsId())) { + if ($pse->getProduct() === null) { + $creditNoteDetail->setTaxRuleId(TaxRuleQuery::create()->findOneByIsDefault(true)->getId()); + } else { + $creditNoteDetail + ->setTaxRuleId( + $pse + ->getProduct() + ->getTaxRuleId() + ) + ; + } + } + + $creditNote->addCreditNoteDetail( + $creditNoteDetail + ); + } + + if ($action === 'update') { + foreach ($creditNote->getCreditNoteDetails() as $creditNoteDetail) { + if ((float) $creditNoteDetail->getQuantity() === 0.0 && $creditNoteDetail->getType() === 'product') { + $creditNote->removeCreditNoteDetail($creditNoteDetail); + } + } + } + + return $this; + } + + /** + * @param Request $request + * @return JsonResponse + * @throws \Propel\Runtime\Exception\PropelException + */ + public function searchCustomerAction(Request $request) + { + $customerQuery = CustomerQuery::create() + ->innerJoinAddress() + ->groupById() + ->limit(20); + + $this->whereConcatRegex($customerQuery, [ + 'customer.FIRSTNAME', + 'customer.LASTNAME', + 'customer.EMAIL', + 'address.COMPANY', + 'address.PHONE' + ], $request->get('q')); + + $customerQuery + ->withColumn(AddressTableMap::COMPANY, 'COMPANY') + ->withColumn(AddressTableMap::ADDRESS1, 'ADDRESS') + ->withColumn(AddressTableMap::CITY, 'CITY') + ->withColumn(AddressTableMap::ZIPCODE, 'ZIPCODE') + ->withColumn(AddressTableMap::PHONE, 'PHONE'); + + $customers = $customerQuery->find(); + + $json = [ + 'incomplete_results' => count($customers) ? false : true, + 'items' => [] + ]; + + /** @var Customer $customer */ + foreach ($customers as $customer) { + $json['items'][] = [ + 'id' => $customer->getId(), + 'company' => $customer->getVirtualColumn('COMPANY'), + 'firstname' => $customer->getFirstname(), + 'lastname' => $customer->getLastname(), + 'ref' => $customer->getRef(), + 'address' => $this->formatAddress($customer) + ]; + } + + return new JsonResponse($json); + } + + /** + * @param Request $request + * @return JsonResponse + * @throws \Propel\Runtime\Exception\PropelException + */ + public function searchOrderAction(Request $request) + { + $orderQuery = OrderQuery::create(); + + //$orderQuery->filterByInvoiceRef(null, Criteria::ISNOTNULL); + + $orderQuery->useOrderStatusQuery() + ->filterById([1,5], Criteria::NOT_IN) + ->endUse(); + + if (null !== $customerId = $request->get('customerId')) { + if ((int) $customerId > 0) { + $orderQuery->filterByCustomerId((int) $customerId); + } + } + + $orderQuery->innerJoinOrderAddressRelatedByInvoiceOrderAddressId() + ->groupById() + ->limit(20); + + $this->whereConcatRegex($orderQuery, [ + 'order.REF', + 'order_address.LASTNAME', + 'order_address.FIRSTNAME', + 'order_address.COMPANY', + 'order_address.PHONE' + ], $request->get('q')); + + $orderQuery + ->withColumn(OrderAddressTableMap::FIRSTNAME, 'FIRSTNAME') + ->withColumn(OrderAddressTableMap::LASTNAME, 'LASTNAME') + ->withColumn(OrderAddressTableMap::COMPANY, 'COMPANY') + ->withColumn(OrderAddressTableMap::ADDRESS1, 'ADDRESS') + ->withColumn(OrderAddressTableMap::CITY, 'CITY') + ->withColumn(OrderAddressTableMap::ZIPCODE, 'ZIPCODE') + ->withColumn(OrderAddressTableMap::PHONE, 'PHONE'); + + $orders = $orderQuery->find(); + + $json = [ + 'incomplete_results' => count($orders) ? false : true, + 'items' => [] + ]; + + /** @var Order $order */ + foreach ($orders as $order) { + $json['items'][] = [ + 'id' => $order->getId(), + 'ref' => $order->getRef(), + 'company' => $order->getVirtualColumn('COMPANY'), + 'firstname' => $order->getVirtualColumn('FIRSTNAME'), + 'lastname' => $order->getVirtualColumn('LASTNAME'), + 'address' => $this->formatAddress($order), + ]; + } + + return new JsonResponse($json); + } + + /** + * @param ActiveRecordInterface $model + * @return mixed + */ + protected function formatAddress(ActiveRecordInterface $model) + { + /** @var Order|Customer $model */ + return implode(' ', [$model->getVirtualColumn('ADDRESS'), $model->getVirtualColumn('ZIPCODE'), $model->getVirtualColumn('CITY')]); + } +} diff --git a/local/modules/CreditNote/CreditNote.php b/local/modules/CreditNote/CreditNote.php new file mode 100644 index 000000000..7db920a75 --- /dev/null +++ b/local/modules/CreditNote/CreditNote.php @@ -0,0 +1,84 @@ +gilles.bourgeat@gmail.com> + */ +class CreditNote extends BaseModule +{ + const DOMAIN_MESSAGE = "creditnote"; + + const CONFIG_KEY_REF_PREFIX = 'ref_prefix'; + const CONFIG_KEY_REF_MIN_LENGTH = 'ref_min_length'; + const CONFIG_KEY_REF_INCREMENT = 'ref_increment'; + const CONFIG_KEY_INVOICE_REF_PREFIX = 'invoice_ref_prefix'; + const CONFIG_KEY_INVOICE_REF_MIN_LENGTH = 'invoice_ref_min_length'; + const CONFIG_KEY_INVOICE_REF_INCREMENT = 'invoice_ref_increment'; + const CONFIG_KEY_INVOICE_REF_WITH_THELIA_ORDER = 'invoice_ref_with_thelia_order'; + + /** + * @param ConnectionInterface $con + */ + public function postActivation(ConnectionInterface $con = null) + { + if (!$this->getConfigValue('is_initialized', false)) { + $database = new Database($con); + $database->insertSql(null, [__DIR__ . "/Config/thelia.sql", __DIR__ . "/Config/insert.sql"]); + $this->setConfigValue(self::CONFIG_KEY_REF_INCREMENT, 1); + $this->setConfigValue(self::CONFIG_KEY_REF_PREFIX, 'CN'); + $this->setConfigValue(self::CONFIG_KEY_REF_MIN_LENGTH, 8); + $this->setConfigValue(self::CONFIG_KEY_INVOICE_REF_INCREMENT, 1); + $this->setConfigValue(self::CONFIG_KEY_INVOICE_REF_PREFIX, 'FA'); + $this->setConfigValue(self::CONFIG_KEY_INVOICE_REF_MIN_LENGTH, 8); + $this->setConfigValue(self::CONFIG_KEY_INVOICE_REF_WITH_THELIA_ORDER, 0); + $this->setConfigValue('is_initialized', true); + } + } + + public function update($currentVersion, $newVersion, ConnectionInterface $con = null) + { + if (null === self::getConfigValue(self::CONFIG_KEY_INVOICE_REF_WITH_THELIA_ORDER)) { + self::setConfigValue( + self::CONFIG_KEY_INVOICE_REF_WITH_THELIA_ORDER, + 0 + ); + } + + $sqlToExecute = []; + $finder = new Finder(); + $sort = function (\SplFileInfo $a, \SplFileInfo $b) { + $a = strtolower(substr($a->getRelativePathname(), 0, -4)); + $b = strtolower(substr($b->getRelativePathname(), 0, -4)); + return version_compare($a, $b); + }; + + $files = $finder->name('*.sql') + ->in(__DIR__ ."/Config/Update/") + ->sort($sort); + + foreach ($files as $file) { + if (version_compare($file->getFilename(), $currentVersion, ">")) { + $sqlToExecute[$file->getFilename()] = $file->getRealPath(); + } + } + + $database = new Database($con); + + foreach ($sqlToExecute as $version => $sql) { + $database->insertSql(null, [$sql]); + } + } +} diff --git a/local/modules/CreditNote/Event/CreditNoteEvents.php b/local/modules/CreditNote/Event/CreditNoteEvents.php new file mode 100644 index 000000000..3cba9d767 --- /dev/null +++ b/local/modules/CreditNote/Event/CreditNoteEvents.php @@ -0,0 +1,57 @@ +gilles.bourgeat@gmail.com> + */ +class CreditNoteEvents +{ + const PROPEL_PRE_INSERT = "credit-note.pre.insert."; + + const PROPEL_POST_INSERT = "credit-note.post.insert."; + + const PROPEL_PRE_UPDATE = "credit-note.pre.update."; + + const PROPEL_POST_UPDATE = "credit-note.post.update."; + + const PROPEL_PRE_DELETE = "credit-note.pre.delete."; + + const PROPEL_POST_DELETE = "credit-note.post.delete."; + + public static function preInsert($tableName) + { + return self::PROPEL_PRE_INSERT . $tableName; + } + + public static function postInsert($tableName) + { + return self::PROPEL_POST_INSERT . $tableName; + } + + public static function preUpdate($tableName) + { + return self::PROPEL_PRE_UPDATE . $tableName; + } + + public static function postUpdate($tableName) + { + return self::PROPEL_POST_UPDATE . $tableName; + } + + public static function preDelete($tableName) + { + return self::PROPEL_PRE_DELETE . $tableName; + } + + public static function postDelete($tableName) + { + return self::PROPEL_POST_DELETE . $tableName; + } +} diff --git a/local/modules/CreditNote/Event/PropelEvent.php b/local/modules/CreditNote/Event/PropelEvent.php new file mode 100644 index 000000000..534f3d09c --- /dev/null +++ b/local/modules/CreditNote/Event/PropelEvent.php @@ -0,0 +1,51 @@ + + */ +class PropelEvent extends ActionEvent +{ + /** @var ActiveRecordInterface */ + protected $instance; + + /** @var mixed */ + protected $return; + + /** + * PropelEvent constructor. + * @param ActiveRecordInterface $instance + */ + public function __construct(ActiveRecordInterface $instance) + { + $this->instance = $instance; + } + + /** + * @return ActiveRecordInterface + */ + public function getInstance() + { + return $this->instance; + } + + /** + * @param ActiveRecordInterface $instance + * @return PropelEvent + */ + public function setInstance($instance) + { + $this->instance = $instance; + return $this; + } +} diff --git a/local/modules/CreditNote/EventListener/CreditNoteListener.php b/local/modules/CreditNote/EventListener/CreditNoteListener.php new file mode 100644 index 000000000..bfd9cb032 --- /dev/null +++ b/local/modules/CreditNote/EventListener/CreditNoteListener.php @@ -0,0 +1,123 @@ + + */ +class CreditNoteListener implements EventSubscriberInterface +{ + /** + * Add credit note ref before save + * @param PropelEvent $event + */ + public function generateCreditNoteInvoiceRef(PropelEvent $event) + { + /** @var CreditNoteModel $instance */ + $instance = $event->getInstance(); + + if ($instance->isColumnModified(CreditNoteTableMap::STATUS_ID)) { + if ($instance->getInvoiceRef() !== null && !$instance->getCreditNoteStatus()->getInvoiced()) { + throw new \Exception('This credit note is already invoiced, you can not cancel it'); + } + + if ($instance->getCreditNoteStatus()->getInvoiced() && $instance->getInvoiceRef() === null) { + if ((int) CreditNote::getConfigValue(CreditNote::CONFIG_KEY_INVOICE_REF_WITH_THELIA_ORDER)) { + if (!class_exists('\InvoiceRef\EventListeners\OrderListener')) { + throw new \Exception('Missing module InvoiceRef'); + } + + // dans le cas ou la facturation suit celle des commandes + $invoiceRef = ConfigQuery::create() + ->findOneByName('invoiceRef'); + + $value = $invoiceRef->getValue(); + + $instance->setInvoiceRef($value) + ->setInvoiceDate(new \DateTime()) + ; + + $invoiceRef->setValue(++$value) + ->save(); + } else { + // cas ou la facturation suit sa propre règle + $ref = CreditNote::getConfigValue(CreditNote::CONFIG_KEY_INVOICE_REF_PREFIX) . str_pad( + (int) CreditNote::getConfigValue(CreditNote::CONFIG_KEY_INVOICE_REF_INCREMENT, 1) + 1, + CreditNote::getConfigValue(CreditNote::CONFIG_KEY_INVOICE_REF_MIN_LENGTH, 8), + "0", + STR_PAD_LEFT + ); + + $instance->setInvoiceRef($ref); + $instance->setInvoiceDate(new \DateTime()); + + CreditNote::setConfigValue( + CreditNote::CONFIG_KEY_INVOICE_REF_INCREMENT, + (int) CreditNote::getConfigValue(CreditNote::CONFIG_KEY_INVOICE_REF_INCREMENT, 1) + 1 + ); + } + } + } + } + + /** + * Add credit note ref before save + * @param PropelEvent $event + */ + public function generateCreditNoteRef(PropelEvent $event) + { + /** @var CreditNoteModel $instance */ + $instance = $event->getInstance(); + + if ($instance->getRef() === null) { + $ref = CreditNote::getConfigValue(CreditNote::CONFIG_KEY_REF_PREFIX) . str_pad( + (int) CreditNote::getConfigValue(CreditNote::CONFIG_KEY_REF_INCREMENT, 1) + 1, + CreditNote::getConfigValue(CreditNote::CONFIG_KEY_REF_MIN_LENGTH, 8), + "0", + STR_PAD_LEFT + ); + + $instance->setRef($ref); + $instance->setInvoiceDate(new \DateTime()); + } + + $this->generateCreditNoteInvoiceRef($event); + } + + public function incrementCreditNoteRef(PropelEvent $event) + { + CreditNote::setConfigValue( + CreditNote::CONFIG_KEY_REF_INCREMENT, + (int) CreditNote::getConfigValue(CreditNote::CONFIG_KEY_REF_INCREMENT, 1) + 1 + ); + } + + public static function getSubscribedEvents() + { + return array( + CreditNoteEvents::preInsert(CreditNoteTableMap::TABLE_NAME) => [ + 'generateCreditNoteRef', 128 + ], + CreditNoteEvents::postInsert(CreditNoteTableMap::TABLE_NAME) => [ + 'incrementCreditNoteRef', 128 + ], + CreditNoteEvents::preUpdate(CreditNoteTableMap::TABLE_NAME) => [ + 'generateCreditNoteInvoiceRef', 128 + ] + ); + } +} diff --git a/local/modules/CreditNote/Form/CreditNoteCreateForm.php b/local/modules/CreditNote/Form/CreditNoteCreateForm.php new file mode 100644 index 000000000..849a3d8b9 --- /dev/null +++ b/local/modules/CreditNote/Form/CreditNoteCreateForm.php @@ -0,0 +1,156 @@ + + */ +class CreditNoteCreateForm extends BaseForm +{ + /** + * @return string the name of you form. This name must be unique + */ + public function getName() + { + return 'credit-note-create'; + } + + /** + * + * in this function you add all the fields you need for your Form. + * Form this you have to call add method on $this->formBuilder attribute : + * + */ + protected function buildForm() + { + $this->formBuilder + ->add('action', 'text', array( + 'required' => false + )) + ->add('customer_id', 'integer', array( + 'required' => false + )) + ->add('order_id', 'integer', array( + 'required' => false + )) + ->add('status_id', 'integer', array( + 'required' => false + )) + ->add('currency_id', 'integer', array( + 'required' => false + )) + ->add('type_id', 'integer', array( + 'required' => false + )) + ->add('currency_id', 'integer', array( + 'required' => false + )) + ->add('total_price', 'number', array( + 'required' => false + )) + ->add('comment', 'text', array( + 'required' => false + )); + + $this->formBuilder + ->add('order_product_quantity', 'collection', array( + 'required' => false, + 'allow_add' => true, + 'allow_delete' => true + )); + + $this->formBuilder + ->add('free_amount_price', 'collection', array( + 'required' => false, + 'allow_add' => true, + 'allow_delete' => true + )) + ->add('free_amount_price_with_tax', 'collection', array( + 'required' => false, + 'allow_add' => true, + 'allow_delete' => true + )) + ->add('free_amount_tax_rule_id', 'collection', array( + 'required' => false, + 'allow_add' => true, + 'allow_delete' => true + )) + ->add('free_amount_type', 'collection', array( + 'required' => false, + 'allow_add' => true, + 'allow_delete' => true + )) + ->add('free_amount_title', 'collection', array( + 'required' => false, + 'allow_add' => true, + 'allow_delete' => true + )) + ->add('free_amount_id', 'collection', array( + 'required' => false, + 'allow_add' => true, + 'allow_delete' => true + )); + + $this->formBuilder + ->add('discount_without_tax', 'number', array( + 'required' => false + )) + ->add('discount_with_tax', 'number', array( + 'required' => false + )) + ; + + $this->formBuilder->add('ui_target', ChoiceType::class, [ + 'choices' => [ + 'order' => 'order', + 'customer' => 'customer' + ] + ]); + + $this->formBuilder->add('ui_target_id', IntegerType::class); + + $this->formBuilder + ->add('invoice_address_id', IntegerType::class, array( + 'required' => false + )) + ->add('invoice_address_title', TextType::class, array( + 'required' => false + )) + ->add('invoice_address_firstname', TextType::class, array( + 'required' => false + )) + ->add('invoice_address_lastname', TextType::class, array( + 'required' => false + )) + ->add('invoice_address_company', TextType::class, array( + 'required' => false + )) + ->add('invoice_address_address1', TextType::class, array( + 'required' => false + )) + ->add('invoice_address_address2', TextType::class, array( + 'required' => false + )) + ->add('invoice_address_zipcode', TextType::class, array( + 'required' => false + )) + ->add('invoice_address_city', TextType::class, array( + 'required' => false + )) + ->add('invoice_address_country_id', IntegerType::class, array( + 'required' => false + )) + ; + } +} diff --git a/local/modules/CreditNote/Form/CreditNoteEmptyForm.php b/local/modules/CreditNote/Form/CreditNoteEmptyForm.php new file mode 100644 index 000000000..1493cf05a --- /dev/null +++ b/local/modules/CreditNote/Form/CreditNoteEmptyForm.php @@ -0,0 +1,35 @@ + + */ +class CreditNoteEmptyForm extends BaseForm +{ + /** + * @return string the name of you form. This name must be unique + */ + public function getName() + { + return 'credit-note-delete'; + } + + /** + * + * in this function you add all the fields you need for your Form. + * Form this you have to call add method on $this->formBuilder attribute : + * + */ + protected function buildForm() + { + } +} diff --git a/local/modules/CreditNote/Helper/CreditNoteHelper.php b/local/modules/CreditNote/Helper/CreditNoteHelper.php new file mode 100644 index 000000000..87495f1be --- /dev/null +++ b/local/modules/CreditNote/Helper/CreditNoteHelper.php @@ -0,0 +1,26 @@ +gilles.bourgeat@gmail.com> + */ +class CreditNoteHelper +{ + const STATUS_PROPOSED = 'proposed'; + const STATUS_REFUSED = 'refused'; + const STATUS_ACCEPTED = 'accepted'; + const STATUS_USED = 'used'; + + const TYPE_ORDER_FULL_REFUND = 'order_full_refund'; + const TYPE_BACK_PRODUCT = 'back_product'; + const TYPE_BILLING_ERROR = 'billing_error'; + const TYPE_REBATE = 'rebate'; + const TYPE_DISCOUNT = 'discount'; +} diff --git a/local/modules/CreditNote/Helper/CriteriaSearchHelper.php b/local/modules/CreditNote/Helper/CriteriaSearchHelper.php new file mode 100644 index 000000000..c79e6222a --- /dev/null +++ b/local/modules/CreditNote/Helper/CriteriaSearchHelper.php @@ -0,0 +1,57 @@ +gilles.bourgeat@gmail.com> + */ +trait CriteriaSearchHelper +{ + /** + * @param string $q + * @return string + */ + public function getRegex($q) + { + $q = explode(' ', $q); + + $words = array(); + + foreach ($q as $v) { + $v = trim($v); + if (strlen($v) > 2 && preg_match('/^[a-z0-9]+$/i', $v)) { + $words[] = $v; + } + } + + if (!count($words)) { + return null; + } + + $regex = array(); + $regex[] = '.*' . implode('.+', $words) . '.*'; + if (count($words) > 1) { + $regex[] = '.*' . implode('.+', array_reverse($words)) . '.*'; + } + + return implode('|', $regex); + } + + /** + * @param ModelCriteria $query + * @param array $columns + * @param string $q + */ + public function whereConcatRegex(ModelCriteria $query, array $columns, $q) + { + $query->where("CONCAT_WS(' ', " . implode(',', $columns). ") REGEXP ?", self::getRegex($q), \PDO::PARAM_STR); + } +} diff --git a/local/modules/CreditNote/Hook/Back/CustomerEditHook.php b/local/modules/CreditNote/Hook/Back/CustomerEditHook.php new file mode 100644 index 000000000..f4ac684f6 --- /dev/null +++ b/local/modules/CreditNote/Hook/Back/CustomerEditHook.php @@ -0,0 +1,46 @@ +gilles.bourgeat@gmail.com> + */ +class CustomerEditHook extends BaseHook +{ + public function onCustomerEdit(HookRenderEvent $event) + { + $event->add($this->render( + 'hook/customer.edit.html', + array_merge($event->getArguments(), [ + + ]) + )); + } + + public function onCustomerEditBottom(HookRenderEvent $event) + { + $event->add($this->render( + 'includes/credit-note-modal.html', + array_merge($event->getArguments(), []) + )); + } + + public function onCustomerEditJs(HookRenderEvent $event) + { + $event->add($this->render( + 'includes/credit-note-js.html', + array_merge($event->getArguments(), []) + )); + } +} diff --git a/local/modules/CreditNote/Hook/Back/MainHook.php b/local/modules/CreditNote/Hook/Back/MainHook.php new file mode 100644 index 000000000..123f591e7 --- /dev/null +++ b/local/modules/CreditNote/Hook/Back/MainHook.php @@ -0,0 +1,29 @@ +gilles.bourgeat@gmail.com> + */ +class MainHook extends BaseHook +{ + public function onMainFooterJs(HookRenderEvent $event) + { + $event->add($this->render( + 'hook/main.footer-js.html', + $event->getArguments() + [ + 'admin_current_location' => ($this->getRequest()->get('_route') == 'creditnote.list' ? 'credit-note' : '') + ] + )); + } +} diff --git a/local/modules/CreditNote/Hook/Back/OrderEditHook.php b/local/modules/CreditNote/Hook/Back/OrderEditHook.php new file mode 100644 index 000000000..d3aa3d790 --- /dev/null +++ b/local/modules/CreditNote/Hook/Back/OrderEditHook.php @@ -0,0 +1,73 @@ +gilles.bourgeat@gmail.com> + */ +class OrderEditHook extends BaseHook +{ + public function onOrderEditProductList(HookRenderEvent $event) + { + $creditNoteDetails = CreditNoteDetailQuery::create() + ->filterByQuantity(0, Criteria::GREATER_THAN) + ->filterByOrderProductId($event->getArgument('order_product_id')) + ->find(); + + $event->add($this->render( + 'hook/order-edit.product-list.html', + $event->getArguments() + ['creditNoteDetails' => $creditNoteDetails] + )); + } + + public function onOrderTab(HookRenderBlockEvent $event) + { + $count = CreditNoteQuery::create() + ->filterByOrderId($event->getArgument('id')) + ->count(); + + $event->add( + [ + "id" => "credit-note", + "title" => Translator::getInstance()->trans("Credit Note", [], CreditNote::DOMAIN_MESSAGE) . ($count ? ' (' . $count . ')' : ''), + "content" => $this->render('hook/order.tab.html', array_merge($event->getArguments(), [ + + ])) + ] + ); + } + + public function onOrderEditBottom(HookRenderEvent $event) + { + $event->add($this->render( + 'includes/credit-note-modal.html', + array_merge($event->getArguments(), [ + + ]) + )); + } + + public function onOrderEditJs(HookRenderEvent $event) + { + $event->add($this->render( + 'hook/order.edit-js.html', + array_merge($event->getArguments(), []) + )); + } +} diff --git a/local/modules/CreditNote/I18n/backOffice/default/en_US.php b/local/modules/CreditNote/I18n/backOffice/default/en_US.php new file mode 100644 index 000000000..d982aaf14 --- /dev/null +++ b/local/modules/CreditNote/I18n/backOffice/default/en_US.php @@ -0,0 +1,15 @@ + "Credit notes", + "There are no credit notes for this order." => "There are no credit notes for this order.", + "Credit note for order %order_ref" => "Credit note for order %order_ref", + "Create a credit note" => "Create a credit note", + "Credit note created." => "Credit note created.", + "Credit note for this order" => "Credit note for this order", + "Total credit notes amount" => "Total credit notes amount", + "This order has not been paid." => "This order has not been paid.", + + // emails + "Message sent to the customer when a credit note is created from an order." + => "Message sent to the customer when a credit note is created from an order.", +]; diff --git a/local/modules/CreditNote/I18n/backOffice/default/fr_FR.php b/local/modules/CreditNote/I18n/backOffice/default/fr_FR.php new file mode 100644 index 000000000..ef76afd36 --- /dev/null +++ b/local/modules/CreditNote/I18n/backOffice/default/fr_FR.php @@ -0,0 +1,107 @@ + '#', + 'Action' => 'Action', + 'Add a free amount' => 'Ajouter un montant libre', + 'Add a new credit note' => 'Ajouter un nouvel avoir', + 'Address : ' => 'Adresse :', + 'Address complement : ' => 'Complément d\'adresse :', + 'All Credit Notes' => 'Tous les avoirs', + 'Amount with tax' => 'Montant TTC', + 'Amount with tax %currency' => 'Montant TTC %currency', + 'Amount without tax' => 'Montant HT', + 'Amount without tax %currency' => 'Montant HT %currency', + 'An error has occurred !!!' => 'Une erreur est survenue', + 'Cancel' => 'Annuler', + 'City : ' => 'Ville :', + 'Close' => 'Fermer', + 'Combination reference' => 'Référence déclinaison', + 'Company : ' => 'Société :', + 'Country : ' => 'Pays :', + 'Coupon code' => 'Code coupon', + 'Create credit note' => 'Créer l\'avoir', + 'Create date' => 'Date de création', + 'Credit Note Informations : ' => 'Informations avoir', + 'Credit Note ref' => 'Avoir ref', + 'Credit Note used :' => 'Avoir utilisé', + 'Credit Notes' => 'Avoirs', + 'Credit note' => 'Avoir', + 'Credit note ref : %ref' => 'Référence avoir : %ref', + 'Credit note used : ' => 'Avoir utilisé :', + 'Credit note versions : ' => 'Versions de l\'avoir', + 'Credit notes' => 'Avoirs', + 'Customer' => 'Client', + 'Customer : ' => 'Client :', + 'Delete' => 'Supprimer', + 'Delete credit note' => 'Supprimer cet avoir', + 'Discount' => 'Réduction', + 'Discount with tax : ' => 'Réduction TTC', + 'Discount without tax : ' => 'Réduction HT', + 'Do you really want to delete this credit note ?' => 'Voulez-vous vraiment supprimer cet avoir', + 'Edit' => 'Editer', + 'Fees' => 'Honoraires', + 'Firstname' => 'Prénom :', + 'Free amount : ' => 'Montant libre', + 'Home' => 'Accueil', + 'Internal comment : ' => 'Commentaire interne', + 'Invoice address' => 'Adresse de facturation', + 'Invoice date' => 'Date facture', + 'Invoice ref' => 'Référence facture', + 'Invoice ref : %ref' => 'Référence facture : %ref', + 'Lastname : ' => 'Nom :', + 'Message content : ' => 'Message :', + 'Message status : ' => 'Statut :', + 'No' => 'Non', + 'No comments found for this credit note' => 'Aucun commentaire trouvé pour cet avoir', + 'No free amount.' => 'Aucun montant libre', + 'No version found for this credit note' => 'Aucune version trouvée pour cet avoir', + 'Order' => 'Commande', + 'Order : ' => 'Commande :', + 'Order Informations : ' => 'Informations sur la commande :', + 'Order discount informations : ' => 'Information sur la réduction appliquée à la commande', + 'Other' => 'Autre', + 'PDF' => 'PDF', + 'Please wait, loading' => 'Veillez patienter, chargement ...', + 'Postage' => 'Frais de livraison', + 'Product' => 'Produit', + 'Quantity' => 'Quantité', + 'Ref' => 'Ref', + 'Ref :' => 'Ref :', + 'Remaining to pay : ' => 'Reste à payer', + 'Save' => 'Sauvgarder', + 'Search...' => 'Rechercher ...', + 'Shipping' => 'Livraison', + 'Status' => 'Statut', + 'Status : ' => 'Statut :', + 'Status : %title' => 'Statut : %title', + 'Tax' => 'Taxe', + 'Tax rule' => 'Règle de taxe', + 'Taxes' => 'Taxes', + 'Taxes : ' => 'Taxes : ', + 'This credit note use the currency : %currency' => 'Cet avoir utilise la devise : %currency', + 'This credit note use the currency : %currency' => 'Cet avoir utilise la devise : %currency', + 'Titile' => 'Titre', + 'Title' => 'Titre', + 'Total' => 'Total', + 'Total including discount' => 'Total avec réduction', + 'Total with tax' => 'Total TTC', + 'Total with tax : ' => 'Total TTC : ', + 'Total without discount' => 'Total sans réduction', + 'Total without tax' => 'Total HT', + 'Total without tax : ' => 'Total HT : ', + 'Type' => 'Type', + 'Type : ' => 'Type :', + 'Unit taxed price' => 'Prix unitaire taxé', + 'Unit. price' => 'Prix unitaire', + 'Update credit note' => 'Mettre à jour l\'avoir', + 'Update date' => 'Date de mise à jour', + 'Used by order :' => 'Utilisé par commande :', + 'User' => 'Utilisateur', + 'View' => 'Voir', + 'Virtual product' => 'Produit virtuel', + 'Yes' => 'Oui', + 'You can not create a credit note for this order because it is not invoiced.' => 'Vous ne pouvez pas créer d\'avoir pour cette commande, elle n\'est pas facturée', + 'You have no credit notes for the moment.' => 'Vous n\'avez pas d\'avoir', + 'Zipcode : ' => 'Code postal', +); diff --git a/local/modules/CreditNote/I18n/email/default/en_US.php b/local/modules/CreditNote/I18n/email/default/en_US.php new file mode 100644 index 000000000..caae0708c --- /dev/null +++ b/local/modules/CreditNote/I18n/email/default/en_US.php @@ -0,0 +1,9 @@ + "Credit note on your order %order_ref", + "You have been granted a credit note of %credit_note_amount on your order %order_ref." + => "You have been granted a credit note of %credit_note_amount on your order %order_ref.", + "Use the coupon code %coupon_code to use this credit note." + => "Use the coupon code %coupon_code to use this credit note.", +]; diff --git a/local/modules/CreditNote/I18n/email/default/fr_FR.php b/local/modules/CreditNote/I18n/email/default/fr_FR.php new file mode 100644 index 000000000..4b2da33f9 --- /dev/null +++ b/local/modules/CreditNote/I18n/email/default/fr_FR.php @@ -0,0 +1,9 @@ + "Avoir sur votre commande %order_ref", + "You have been granted a credit note of %credit_note_amount on your order %order_ref." + => "Un avoir de %credit_note_amount vous a été accordé suite à votre commande %order_ref.", + "Use the coupon code %coupon_code to use this credit note." + => "Utilisez-le en entrant le code promo %coupon_code.", +]; diff --git a/local/modules/CreditNote/I18n/en_US.php b/local/modules/CreditNote/I18n/en_US.php new file mode 100644 index 000000000..80b3460ba --- /dev/null +++ b/local/modules/CreditNote/I18n/en_US.php @@ -0,0 +1,10 @@ + "CreditNote module configuration", + "Configuration correctly saved" => "Configuration correctly saved", + "Coupon code validity period (days)" => "Coupon code validity period (days)", + "Coupon code prefix" => "Coupon code prefix", + "Restrict coupon codes from order credit notes to the original customer" + => "Restrict coupon codes from order credit notes to the original customer", +]; diff --git a/local/modules/CreditNote/I18n/fr_FR.php b/local/modules/CreditNote/I18n/fr_FR.php new file mode 100644 index 000000000..84da47a02 --- /dev/null +++ b/local/modules/CreditNote/I18n/fr_FR.php @@ -0,0 +1,7 @@ + 'Avoir', + 'We\'re sorry, this PDF invoice is not available at the moment.' => 'Erreur, impossible de créer le pdf', + 'You can not delete this credit note' => 'Vous ne pouvez pas supprimer cet avoir', +); diff --git a/local/modules/CreditNote/I18n/pdf/default/fr_FR.php b/local/modules/CreditNote/I18n/pdf/default/fr_FR.php new file mode 100644 index 000000000..e84959eb2 --- /dev/null +++ b/local/modules/CreditNote/I18n/pdf/default/fr_FR.php @@ -0,0 +1,25 @@ + 'Facture d\'avoir', + 'Combination ref : ' => 'Référence déclinaison :', + 'Credit note REF' => 'Référence avoir', + 'Customer Number' => 'Référence client', + 'Discount' => 'Réduction', + 'Email: ' => 'E-mail :', + 'Invoice REF' => 'Référence facture', + 'Invoice address' => 'Adresse de facturation', + 'Invoice date' => 'Date de facturation', + 'Phone: ' => 'Téléphone :', + 'Product' => 'Produit', + 'Product ref : ' => 'Référence produit :', + 'Quantity' => 'Quantité', + 'Referance invoice REF' => 'Fait référence à la facture', + 'Referance order REF' => 'Fait référence à la commande', + 'Tax' => 'Taxe', + 'Total with tax' => 'Total TTC', + 'Total without tax' => 'Total HT', + 'Unit taxed price' => 'Prix unitaire taxé', + 'Unit. price' => 'Prix unitaire', + 'page' => 'page', +); diff --git a/local/modules/CreditNote/LICENSE.md b/local/modules/CreditNote/LICENSE.md new file mode 100644 index 000000000..16e6d881e --- /dev/null +++ b/local/modules/CreditNote/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 thelia-modules + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/local/modules/CreditNote/Loop/CreditNote.php b/local/modules/CreditNote/Loop/CreditNote.php new file mode 100644 index 000000000..c35464aed --- /dev/null +++ b/local/modules/CreditNote/Loop/CreditNote.php @@ -0,0 +1,270 @@ + + * + * @method string[] getRef() + * @method string[] getInvoiceRef() + * @method int[] getId() + * @method int[] getStatusId() + * @method int[] getOrderProductId() + * @method int[] getTypeId() + * @method int[] getOrderId() + * @method int[] getCustomerId() + * @method int[] getParentId() + * @method string[] getOrder() + * @method boolean|string getUsed() + * @method boolean|string getInvoiced() + */ +class CreditNote extends BaseLoop implements PropelSearchLoopInterface +{ + protected $timestampable = true; + + protected function getArgDefinitions() + { + return new ArgumentCollection( + Argument::createAnyListTypeArgument('ref'), + Argument::createAnyListTypeArgument('invoice_ref'), + Argument::createIntListTypeArgument("id"), + Argument::createAnyListTypeArgument("status_id"), + Argument::createAnyListTypeArgument("order_product_id"), + Argument::createAnyListTypeArgument("type_id"), + Argument::createIntListTypeArgument("order_id"), + Argument::createIntListTypeArgument("customer_id"), + Argument::createIntListTypeArgument("parent_id"), + Argument::createBooleanOrBothTypeArgument("used"), + Argument::createBooleanOrBothTypeArgument("invoiced"), + Argument::createEnumListTypeArgument( + "order", + [ + "id", "id-reverse", + "create-date", "create-date-reverse", + "status", "status-reverse", + 'update-date', 'update-date-reverse', + ], + "id" + ) + ); + } + + /** + * this method returns a Propel ModelCriteria + * + * @return \Propel\Runtime\ActiveQuery\ModelCriteria + */ + public function buildModelCriteria() + { + $query = new CreditNoteQuery(); + + if (null !== $id = $this->getId()) { + $query->filterById($id); + } + + if (null !== $invoiceRef = $this->getInvoiceRef()) { + $query->filterByInvoiceRef($invoiceRef); + } + + if (null !== $ref = $this->getRef()) { + $query->filterByRef($ref); + } + + if (null !== $type = $this->getTypeId()) { + $query->FilterByTypeId($type); + } + + if (null !== $status = $this->getStatusId()) { + $query->filterByStatusId($status); + } + + if (null !== $orderProduct = $this->getOrderProductId()) { + $query->useCreditNoteDetailQuery() + ->filterByOrderProductId($orderProduct) + ->endUse(); + } + + if (null !== $order = $this->getOrderId()) { + $query->filterByOrderId($order); + } + + if (null !== $parent = $this->getParentId()) { + $query->filterByParentId($parent); + } + + if (null !== $customer = $this->getCustomerId()) { + $query->filterByCustomerId($customer); + } + + if (is_bool($this->getUsed())) { + $query->useCreditNoteStatusQuery() + ->filterByUsed($this->getUsed()) + ->endUse(); + } + + if (is_bool($this->getInvoiced())) { + $query->useCreditNoteStatusQuery() + ->filterByInvoiced($this->getInvoiced()) + ->endUse(); + } + + $this->addJoin($query); + + $this->addVirtualColumn($query); + + $this->buildModelCriteriaOrder($query); + + $query->groupById(); + + return $query; + } + + /** + * @param CreditNoteQuery $query + */ + protected function buildModelCriteriaOrder($query) + { + foreach ($this->getOrder() as $order) { + switch ($order) { + case "id": + $query->orderById(); + break; + case "id-reverse": + $query->orderById(Criteria::DESC); + break; + case 'create-date': + $query->orderByCreatedAt(Criteria::ASC); + break; + case 'create-date-reverse': + $query->orderByCreatedAt(Criteria::DESC); + break; + case 'status': + $query->orderByStatusId(Criteria::ASC); + break; + case 'status-reverse': + $query->orderByStatusId(Criteria::DESC); + break; + case 'update-date': + $query->orderByUpdatedAt(Criteria::ASC); + break; + case 'update-date-reverse': + $query->orderByUpdatedAt(Criteria::DESC); + break; + } + } + } + + /** + * @param CreditNoteQuery $query + */ + protected function addJoin($query) + { + $query->useCustomerQuery() + ->endUse(); + + $query->useOrderQuery() + ->endUse(); + + $query->useCreditNoteTypeQuery() + ->leftJoinCreditNoteTypeI18n(CreditNoteTypeI18nTableMap::TABLE_NAME) + ->endUse(); + + $query->addJoinCondition(CreditNoteTypeI18nTableMap::TABLE_NAME, CreditNoteTypeI18nTableMap::LOCALE . '=?', $this->getLocale()); + + $query->useCreditNoteStatusQuery() + ->leftJoinCreditNoteStatusI18n(CreditNoteStatusI18nTableMap::TABLE_NAME) + ->endUse(); + + $query->addJoinCondition(CreditNoteStatusI18nTableMap::TABLE_NAME, CreditNoteStatusI18nTableMap::LOCALE . '=?', $this->getLocale()); + } + + /** + * @param CreditNoteQuery $query + */ + protected function addVirtualColumn($query) + { + $query + ->withColumn('CONCAT_WS(" ",' . CustomerTableMap::FIRSTNAME . ',' . CustomerTableMap::LASTNAME .')', 'CUSTOMER_NAME') + ->withColumn(OrderTableMap::REF, 'ORDER_REF') + ->withColumn(CreditNoteStatusI18nTableMap::TITLE, 'STATUS_TITLE') + ->withColumn(CreditNoteStatusTableMap::COLOR, 'STATUS_COLOR') + ->withColumn(CreditNoteTypeI18nTableMap::TITLE, 'TYPE_TITLE') + ->withColumn(CreditNoteTypeTableMap::COLOR, 'TYPE_COLOR'); + } + + /** + * @param LoopResult $loopResult + * + * @return LoopResult + */ + public function parseResults(LoopResult $loopResult) + { + /** @var CreditNoteModel $entry */ + foreach ($loopResult->getResultDataCollection() as $entry) { + $row = new LoopResultRow($entry); + $row + ->set("ID", $entry->getId()) + ->set("REF", $entry->getRef()) + ->set("INVOICE_REF", $entry->getInvoiceRef()) + ->set("INVOICE_DATE", $entry->getInvoiceDate()) + ->set("TYPE_ID", $entry->getTypeId()) + ->set("STATUS_ID", $entry->getStatusId()) + ->set("ORDER_ID", $entry->getOrderId()) + ->set("PARENT_ID", $entry->getParentId()) + ->set("CUSTOMER_ID", $entry->getCustomerId()) + ->set('CURRENCY_ID', $entry->getCurrencyId()) + ->set("TOTAL_PRICE", $entry->getTotalPrice()) + ->set("TOTAL_PRICE_WITH_TAX", $entry->getTotalPriceWithTax()) + + ->set("DISCOUNT_WITHOUT_TAX", $entry->getDiscountWithoutTax()) + ->set("DISCOUNT_WITH_TAX", $entry->getDiscountWithTax()) + + ->set('CUSTOMER_NAME', $entry->getVirtualColumn('CUSTOMER_NAME')) + ->set('ORDER_REF', $entry->getVirtualColumn('ORDER_REF')) + + ->set('STATUS_TITLE', $entry->getVirtualColumn('STATUS_TITLE')) + ->set('STATUS_COLOR', $entry->getVirtualColumn('STATUS_COLOR')) + ->set('TYPE_TITLE', $entry->getVirtualColumn('TYPE_TITLE')) + ->set('TYPE_COLOR', $entry->getVirtualColumn('TYPE_COLOR')) + ; + $this->addOutputFields($row, $entry); + $loopResult->addRow($row); + } + + return $loopResult; + } + + /** + * @return string + */ + protected function getLocale() + { + if ($this->request->fromAdmin()) { + return $this->request->getSession()->getAdminUser()->getLocale(); + } else { + return $this->request->getSession()->getLang()->getLocale(); + } + } +} diff --git a/local/modules/CreditNote/Loop/CreditNoteAddress.php b/local/modules/CreditNote/Loop/CreditNoteAddress.php new file mode 100644 index 000000000..3973bc055 --- /dev/null +++ b/local/modules/CreditNote/Loop/CreditNoteAddress.php @@ -0,0 +1,76 @@ +gilles.bourgeat@gmail.com> + */ +class CreditNoteAddress extends BaseLoop implements PropelSearchLoopInterface +{ + protected $timestampable = true; + + /** + * @return ArgumentCollection + */ + protected function getArgDefinitions() + { + return new ArgumentCollection( + Argument::createIntTypeArgument('id', null, true) + ); + } + + public function buildModelCriteria() + { + $search = CreditNoteAddressQuery::create(); + + $id = $this->getId(); + + $search->filterById($id, Criteria::IN); + + return $search; + } + + public function parseResults(LoopResult $loopResult) + { + /** @var \CreditNote\Model\CreditNoteAddress $creditNoteAddress */ + foreach ($loopResult->getResultDataCollection() as $creditNoteAddress) { + $loopResultRow = new LoopResultRow($creditNoteAddress); + $loopResultRow + ->set("ID", $creditNoteAddress->getId()) + ->set("TITLE", $creditNoteAddress->getCustomerTitleId()) + ->set("COMPANY", $creditNoteAddress->getCompany()) + ->set("FIRSTNAME", $creditNoteAddress->getFirstname()) + ->set("LASTNAME", $creditNoteAddress->getLastname()) + ->set("ADDRESS1", $creditNoteAddress->getAddress1()) + ->set("ADDRESS2", $creditNoteAddress->getAddress2()) + ->set("ADDRESS3", $creditNoteAddress->getAddress3()) + ->set("ZIPCODE", $creditNoteAddress->getZipcode()) + ->set("CITY", $creditNoteAddress->getCity()) + ->set("COUNTRY", $creditNoteAddress->getCountryId()) + ->set("STATE", $creditNoteAddress->getStateId()) + ->set("PHONE", $creditNoteAddress->getPhone()) + ->set("CELLPHONE", $creditNoteAddress->getCellphone()) + ; + $this->addOutputFields($loopResultRow, $creditNoteAddress); + + $loopResult->addRow($loopResultRow); + } + + return $loopResult; + } +} diff --git a/local/modules/CreditNote/Loop/CreditNoteComment.php b/local/modules/CreditNote/Loop/CreditNoteComment.php new file mode 100644 index 000000000..ebaf361ab --- /dev/null +++ b/local/modules/CreditNote/Loop/CreditNoteComment.php @@ -0,0 +1,126 @@ + + * + * @method string[] getCode() + * @method int[] getId() + * @method int[] getCreditNoteId() + * @method string[] getOrder() + */ +class CreditNoteComment extends BaseI18nLoop implements PropelSearchLoopInterface +{ + protected $timestampable = true; + + protected function getArgDefinitions() + { + return new ArgumentCollection( + Argument::createIntListTypeArgument("id"), + Argument::createIntListTypeArgument("credit_note_id"), + Argument::createEnumListTypeArgument( + "order", + [ + "id", "id-reverse", + "create-date", "create-date-reverse" + ], + "create-date" + ) + ); + } + + /** + * this method returns a Propel ModelCriteria + * + * @return \Propel\Runtime\ActiveQuery\ModelCriteria + */ + public function buildModelCriteria() + { + $query = new CreditNoteCommentQuery(); + + if (null !== $id = $this->getId()) { + $query->filterById($id); + } + + if (null !== $creditNoteId = $this->getCreditNoteId()) { + $query->filterByCreditNoteId($creditNoteId); + } + + $query->useAdminQuery() + ->endUse(); + + $query->withColumn(AdminTableMap::LOGIN, 'ADMIN_LOGIN'); + $query->withColumn(AdminTableMap::FIRSTNAME, 'ADMIN_FIRST_NAME'); + $query->withColumn(AdminTableMap::LASTNAME, 'ADMIN_LAST_NAME'); + + $this->buildModelCriteriaOrder($query); + + return $query; + } + + /** + * @param CreditNoteCommentQuery $query + */ + protected function buildModelCriteriaOrder($query) + { + foreach ($this->getOrder() as $order) { + switch ($order) { + case "id": + $query->orderById(); + break; + case "id-reverse": + $query->orderById(Criteria::DESC); + break; + case 'create-date': + $query->orderByCreatedAt(Criteria::ASC); + break; + case 'create-date-reverse': + $query->orderByCreatedAt(Criteria::DESC); + break; + } + } + } + + /** + * @param LoopResult $loopResult + * + * @return LoopResult + */ + public function parseResults(LoopResult $loopResult) + { + /** @var \CreditNote\Model\CreditNoteComment $entry */ + foreach ($loopResult->getResultDataCollection() as $entry) { + $row = new LoopResultRow($entry); + $row + ->set("ID", $entry->getId()) + ->set("CREDIT_NOTE_ID", $entry->getCreditNoteId()) + ->set("ADMIN_ID", $entry->getAdminId()) + ->set("ADMIN_LOGIN", $entry->getVirtualColumn('ADMIN_LOGIN')) + ->set("ADMIN_FIRST_NAME", $entry->getVirtualColumn('ADMIN_FIRST_NAME')) + ->set("ADMIN_LAST_NAME", $entry->getVirtualColumn('ADMIN_LAST_NAME')) + ->set("COMMENT", $entry->getComment()) + ; + $this->addOutputFields($row, $entry); + $loopResult->addRow($row); + } + + return $loopResult; + } +} diff --git a/local/modules/CreditNote/Loop/CreditNoteDetail.php b/local/modules/CreditNote/Loop/CreditNoteDetail.php new file mode 100644 index 000000000..d946340e3 --- /dev/null +++ b/local/modules/CreditNote/Loop/CreditNoteDetail.php @@ -0,0 +1,112 @@ + + * + * @method int[] getId() + * @method int[] getCreditNoteId() + * @method string[] getOrder() + */ +class CreditNoteDetail extends BaseI18nLoop implements PropelSearchLoopInterface +{ + protected $timestampable = true; + + protected function getArgDefinitions() + { + return new ArgumentCollection( + Argument::createIntListTypeArgument("id"), + Argument::createIntListTypeArgument("credit_note_id"), + Argument::createEnumListTypeArgument( + "order", + [ + "id", "id-reverse" + ], + "id" + ) + ); + } + + /** + * this method returns a Propel ModelCriteria + * + * @return \Propel\Runtime\ActiveQuery\ModelCriteria + */ + public function buildModelCriteria() + { + $query = new CreditNoteDetailQuery(); + + if (null !== $id = $this->getId()) { + $query->filterById($id); + } + + if (null !== $creditNoteId = $this->getCreditNoteId()) { + $query->filterByCreditNoteId($creditNoteId); + } + + $this->buildModelCriteriaOrder($query); + + return $query; + } + + /** + * @param CreditNoteDetailQuery $query + */ + protected function buildModelCriteriaOrder($query) + { + foreach ($this->getOrder() as $order) { + switch ($order) { + case "id": + $query->orderById(); + break; + case "id-reverse": + $query->orderById(Criteria::DESC); + break; + } + } + } + + /** + * @param LoopResult $loopResult + * + * @return LoopResult + */ + public function parseResults(LoopResult $loopResult) + { + /** @var \CreditNote\Model\CreditNoteDetail $entry */ + foreach ($loopResult->getResultDataCollection() as $entry) { + $row = new LoopResultRow($entry); + $row + ->set("ID", $entry->getId()) + ->set("CREDIT_NOTE_ID", $entry->getCreditNoteId()) + ->set("PRICE", $entry->getPrice()) + ->set("PRICE_WITH_TAX", $entry->getPriceWithTax()) + ->set("TAX_RULE_ID", $entry->getTaxRuleId()) + ->set("ORDER_PRODUCT_ID", $entry->getOrderProductId()) + ->set("TYPE", $entry->getType()) + ->set("QUANTITY", $entry->getQuantity()) + ->set("TITLE", $entry->getTitle()) + ; + $this->addOutputFields($row, $entry); + $loopResult->addRow($row); + } + + return $loopResult; + } +} diff --git a/local/modules/CreditNote/Loop/CreditNoteStatus.php b/local/modules/CreditNote/Loop/CreditNoteStatus.php new file mode 100644 index 000000000..96f31d71b --- /dev/null +++ b/local/modules/CreditNote/Loop/CreditNoteStatus.php @@ -0,0 +1,168 @@ + + * + * @method string[] getCode() + * @method int[] getId() + * @method int[] getPosition() + * @method int[] getCurrentStatusId() + * @method string[] getOrder() + * @method string|bool getInvoiced() + * @method string|bool getUsed() + */ +class CreditNoteStatus extends BaseI18nLoop implements PropelSearchLoopInterface +{ + protected $timestampable = true; + + protected function getArgDefinitions() + { + return new ArgumentCollection( + Argument::createAnyListTypeArgument('code'), + Argument::createIntListTypeArgument("id"), + Argument::createIntListTypeArgument("position"), + Argument::createBooleanOrBothTypeArgument("invoiced", BooleanOrBothType::ANY), + Argument::createBooleanOrBothTypeArgument("used", BooleanOrBothType::ANY), + Argument::createIntListTypeArgument("current_status_id"), + Argument::createEnumListTypeArgument( + "order", + [ + "id", "id-reverse", + "create-date", "create-date-reverse", + "code", "code-reverse", + "position", "position-reverse" + ], + "position" + ) + ); + } + + /** + * this method returns a Propel ModelCriteria + * + * @return \Propel\Runtime\ActiveQuery\ModelCriteria + */ + public function buildModelCriteria() + { + $query = new CreditNoteStatusQuery(); + + if (null !== $id = $this->getId()) { + $query->filterById($id); + } + + if (null !== $code = $this->getCode()) { + $query->filterByCode($code); + } + + if (null !== $position = $this->getPosition()) { + $query->filterByPosition($position); + } + + if (BooleanOrBothType::ANY !== $used = $this->getUsed()) { + $query->filterByUsed($used); + } + + if (BooleanOrBothType::ANY !== $invoiced = $this->getInvoiced()) { + $query->filterByInvoiced($invoiced); + } + + if (null !== $currentStatusId = $this->getCurrentStatusId()) { + $flowIds = CreditNoteStatusFlowQuery::create() + ->filterByFromStatusId($currentStatusId) + ->find()->toArray('toStatusId'); + + $flowIds = array_keys($flowIds); + + $query->filterById(array_merge($flowIds, $currentStatusId)); + } + + $this->configureI18nProcessing($query, ['TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM']); + + $this->buildModelCriteriaOrder($query); + + $query->groupById(); + + return $query; + } + + /** + * @param CreditNoteStatusQuery $query + */ + protected function buildModelCriteriaOrder($query) + { + foreach ($this->getOrder() as $order) { + switch ($order) { + case "id": + $query->orderById(); + break; + case "id-reverse": + $query->orderById(Criteria::DESC); + break; + case 'create-date': + $query->orderByCreatedAt(Criteria::ASC); + break; + case 'create-date-reverse': + $query->orderByCreatedAt(Criteria::DESC); + break; + case 'code': + $query->orderByCode(Criteria::ASC); + break; + case 'code-reverse': + $query->orderByCode(Criteria::DESC); + break; + case 'position': + $query->orderByPosition(Criteria::ASC); + break; + case 'position-reverse': + $query->orderByPosition(Criteria::DESC); + break; + } + } + } + + /** + * @param LoopResult $loopResult + * + * @return LoopResult + */ + public function parseResults(LoopResult $loopResult) + { + /** @var \CreditNote\Model\CreditNoteStatus $entry */ + foreach ($loopResult->getResultDataCollection() as $entry) { + $row = new LoopResultRow($entry); + $row + ->set("ID", $entry->getId()) + ->set("CODE", $entry->getCode()) + ->set("COLOR", $entry->getColor()) + ->set("POSITION", $entry->getPosition()) + ->set("TITLE", $entry->getVirtualColumn('i18n_TITLE')) + ->set("CHAPO", $entry->getVirtualColumn('i18n_CHAPO')) + ->set("DESCRIPTION", $entry->getVirtualColumn('i18n_DESCRIPTION')) + ->set("POSTSCRIPTUM", $entry->getVirtualColumn('i18n_POSTSCRIPTUM')) + ; + $this->addOutputFields($row, $entry); + $loopResult->addRow($row); + } + + return $loopResult; + } +} diff --git a/local/modules/CreditNote/Loop/CreditNoteType.php b/local/modules/CreditNote/Loop/CreditNoteType.php new file mode 100644 index 000000000..13e40609b --- /dev/null +++ b/local/modules/CreditNote/Loop/CreditNoteType.php @@ -0,0 +1,140 @@ + + * + * @method string[] getCode() + * @method int[] getId() + * @method int[] getPosition() + * @method string[] getOrder() + */ +class CreditNoteType extends BaseI18nLoop implements PropelSearchLoopInterface +{ + protected $timestampable = true; + + protected function getArgDefinitions() + { + return new ArgumentCollection( + Argument::createAnyListTypeArgument('code'), + Argument::createIntListTypeArgument("id"), + Argument::createIntListTypeArgument("position"), + Argument::createEnumListTypeArgument( + "order", + [ + "id", "id-reverse", + "create-date", "create-date-reverse", + "code", "code-reverse", + "position", "position-reverse" + ], + "position" + ) + ); + } + + /** + * this method returns a Propel ModelCriteria + * + * @return \Propel\Runtime\ActiveQuery\ModelCriteria + */ + public function buildModelCriteria() + { + $query = new CreditNoteTypeQuery(); + + if (null !== $id = $this->getId()) { + $query->filterById($id); + } + + if (null !== $code = $this->getCode()) { + $query->filterByCode($code); + } + + if (null !== $position = $this->getPosition()) { + $query->filterByPosition($position); + } + + $this->configureI18nProcessing($query, ['TITLE', 'CHAPO', 'DESCRIPTION', 'POSTSCRIPTUM']); + + $this->buildModelCriteriaOrder($query); + + return $query; + } + + /** + * @param CreditNoteTypeQuery $query + */ + protected function buildModelCriteriaOrder($query) + { + foreach ($this->getOrder() as $order) { + switch ($order) { + case "id": + $query->orderById(); + break; + case "id-reverse": + $query->orderById(Criteria::DESC); + break; + case 'create-date': + $query->orderByCreatedAt(Criteria::ASC); + break; + case 'create-date-reverse': + $query->orderByCreatedAt(Criteria::DESC); + break; + case 'code': + $query->orderByCode(Criteria::ASC); + break; + case 'code-reverse': + $query->orderByCode(Criteria::DESC); + break; + case 'position': + $query->orderByPosition(Criteria::ASC); + break; + case 'position-reverse': + $query->orderByPosition(Criteria::DESC); + break; + } + } + } + + /** + * @param LoopResult $loopResult + * + * @return LoopResult + */ + public function parseResults(LoopResult $loopResult) + { + /** @var \CreditNote\Model\CreditNoteType $entry */ + foreach ($loopResult->getResultDataCollection() as $entry) { + $row = new LoopResultRow($entry); + $row + ->set("ID", $entry->getId()) + ->set("CODE", $entry->getCode()) + ->set("COLOR", $entry->getColor()) + ->set("POSITION", $entry->getPosition()) + ->set("TITLE", $entry->getVirtualColumn('i18n_TITLE')) + ->set("CHAPO", $entry->getVirtualColumn('i18n_CHAPO')) + ->set("DESCRIPTION", $entry->getVirtualColumn('i18n_DESCRIPTION')) + ->set("POSTSCRIPTUM", $entry->getVirtualColumn('i18n_POSTSCRIPTUM')) + ; + $this->addOutputFields($row, $entry); + $loopResult->addRow($row); + } + + return $loopResult; + } +} diff --git a/local/modules/CreditNote/Loop/CreditNoteVersion.php b/local/modules/CreditNote/Loop/CreditNoteVersion.php new file mode 100644 index 000000000..23f185010 --- /dev/null +++ b/local/modules/CreditNote/Loop/CreditNoteVersion.php @@ -0,0 +1,148 @@ + + * + * @method string[] getRef() + * @method int[] getId() + * @method string[] getOrder() + */ +class CreditNoteVersion extends BaseLoop implements PropelSearchLoopInterface +{ + protected $timestampable = true; + + protected function getArgDefinitions() + { + return new ArgumentCollection( + Argument::createAnyListTypeArgument('ref'), + Argument::createIntListTypeArgument("id"), + Argument::createEnumListTypeArgument( + "order", + [ + "id", "id-reverse", + "create-date", "create-date-reverse" + ], + "id" + ) + ); + } + + /** + * this method returns a Propel ModelCriteria + * + * @return \Propel\Runtime\ActiveQuery\ModelCriteria + */ + public function buildModelCriteria() + { + $query = new CreditNoteVersionQuery(); + + if (null !== $id = $this->getId()) { + $query->filterById($id); + } + + if (null !== $ref = $this->getRef()) { + $query->filterByRef($ref); + } + + $this->addJoin($query); + + $this->addVirtualColumn($query); + + $this->buildModelCriteriaOrder($query); + + $query->groupById(); + + return $query; + } + + /** + * @param CreditNoteVersionQuery $query + */ + protected function buildModelCriteriaOrder($query) + { + foreach ($this->getOrder() as $order) { + switch ($order) { + case "id": + $query->orderById(); + break; + case "id-reverse": + $query->orderById(Criteria::DESC); + break; + case 'create-date': + $query->orderByCreatedAt(Criteria::ASC); + break; + case 'create-date-reverse': + $query->orderByCreatedAt(Criteria::DESC); + break; + } + } + } + + /** + * @param CreditNoteVersionQuery $query + */ + protected function addJoin($query) + { + + } + + /** + * @param CreditNoteVersionQuery $query + */ + protected function addVirtualColumn($query) + { + + } + + /** + * @param LoopResult $loopResult + * + * @return LoopResult + */ + public function parseResults(LoopResult $loopResult) + { + /** @var \CreditNote\Model\CreditNoteVersion $entry */ + foreach ($loopResult->getResultDataCollection() as $entry) { + $row = new LoopResultRow($entry); + $row + ->set("ID", $entry->getId()) + ->set("REF", $entry->getRef()) + ->set("TYPE_ID", $entry->getTypeId()) + ->set("STATUS_ID", $entry->getStatusId()) + ->set("ORDER_ID", $entry->getOrderId()) + ->set("PARENT_ID", $entry->getParentId()) + ->set("CUSTOMER_ID", $entry->getCustomerId()) + ->set("TOTAL_AMOUNT_PRICE", $entry->getTotalPriceWithTax()) + ; + $this->addOutputFields($row, $entry); + $loopResult->addRow($row); + } + + return $loopResult; + } + + /** + * @return string + */ + protected function getLocale() + { + return $this->request->getSession()->getAdminEditionLang()->getLocale(); + } +} diff --git a/local/modules/CreditNote/Loop/OrderCreditNote.php b/local/modules/CreditNote/Loop/OrderCreditNote.php new file mode 100644 index 000000000..cf71f3785 --- /dev/null +++ b/local/modules/CreditNote/Loop/OrderCreditNote.php @@ -0,0 +1,78 @@ + + * + * @method int[] getCreditNoteId() + * @method int[] getOrderId() + */ +class OrderCreditNote extends BaseI18nLoop implements PropelSearchLoopInterface +{ + protected $timestampable = true; + + protected function getArgDefinitions() + { + return new ArgumentCollection( + Argument::createIntListTypeArgument("credit_note_id"), + Argument::createIntListTypeArgument("order_id") + ); + } + + /** + * this method returns a Propel ModelCriteria + * + * @return \Propel\Runtime\ActiveQuery\ModelCriteria + */ + public function buildModelCriteria() + { + $query = new OrderCreditNoteQuery(); + + if (null !== $creditNoteId = $this->getCreditNoteId()) { + $query->filterByCreditNoteId($creditNoteId); + } + + if (null !== $orderId = $this->getOrderId()) { + $query->filterByOrderId($orderId); + } + + return $query; + } + + /** + * @param LoopResult $loopResult + * + * @return LoopResult + */ + public function parseResults(LoopResult $loopResult) + { + /** @var \CreditNote\Model\OrderCreditNote $entry */ + foreach ($loopResult->getResultDataCollection() as $entry) { + $row = new LoopResultRow($entry); + $row + ->set("ORDER_ID", $entry->getOrderId()) + ->set("CREDIT_NOTE_ID", $entry->getCreditNoteId()) + ->set("AMOUNT", $entry->getAmountPrice()) + ; + $this->addOutputFields($row, $entry); + $loopResult->addRow($row); + } + + return $loopResult; + } +} diff --git a/local/modules/CreditNote/Model/Base/CartCreditNote.php b/local/modules/CreditNote/Model/Base/CartCreditNote.php new file mode 100644 index 000000000..7a43754b4 --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CartCreditNote.php @@ -0,0 +1,1513 @@ +amount_price = '0.000000'; + } + + /** + * Initializes internal state of CreditNote\Model\Base\CartCreditNote object. + * @see applyDefaults() + */ + public function __construct() + { + $this->applyDefaultValues(); + } + + /** + * Returns whether the object has been modified. + * + * @return boolean True if the object has been modified. + */ + public function isModified() + { + return !!$this->modifiedColumns; + } + + /** + * Has specified column been modified? + * + * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID + * @return boolean True if $col has been modified. + */ + public function isColumnModified($col) + { + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); + } + + /** + * Get the columns that have been modified in this object. + * @return array A unique list of the modified column names for this object. + */ + public function getModifiedColumns() + { + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; + } + + /** + * Returns whether the object has ever been saved. This will + * be false, if the object was retrieved from storage or was created + * and then saved. + * + * @return boolean true, if the object has never been persisted. + */ + public function isNew() + { + return $this->new; + } + + /** + * Setter for the isNew attribute. This method will be called + * by Propel-generated children and objects. + * + * @param boolean $b the state of the object. + */ + public function setNew($b) + { + $this->new = (Boolean) $b; + } + + /** + * Whether this object has been deleted. + * @return boolean The deleted state of this object. + */ + public function isDeleted() + { + return $this->deleted; + } + + /** + * Specify whether this object has been deleted. + * @param boolean $b The deleted state of this object. + * @return void + */ + public function setDeleted($b) + { + $this->deleted = (Boolean) $b; + } + + /** + * Sets the modified state for the object to be false. + * @param string $col If supplied, only the specified column is reset. + * @return void + */ + public function resetModified($col = null) + { + if (null !== $col) { + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); + } + } else { + $this->modifiedColumns = array(); + } + } + + /** + * Compares this with another CartCreditNote instance. If + * obj is an instance of CartCreditNote, delegates to + * equals(CartCreditNote). Otherwise, returns false. + * + * @param mixed $obj The object to compare to. + * @return boolean Whether equal to the object specified. + */ + public function equals($obj) + { + $thisclazz = get_class($this); + if (!is_object($obj) || !($obj instanceof $thisclazz)) { + return false; + } + + if ($this === $obj) { + return true; + } + + if (null === $this->getPrimaryKey() + || null === $obj->getPrimaryKey()) { + return false; + } + + return $this->getPrimaryKey() === $obj->getPrimaryKey(); + } + + /** + * If the primary key is not null, return the hashcode of the + * primary key. Otherwise, return the hash code of the object. + * + * @return int Hashcode + */ + public function hashCode() + { + if (null !== $this->getPrimaryKey()) { + return crc32(serialize($this->getPrimaryKey())); + } + + return crc32(serialize(clone $this)); + } + + /** + * Get the associative array of the virtual columns in this object + * + * @return array + */ + public function getVirtualColumns() + { + return $this->virtualColumns; + } + + /** + * Checks the existence of a virtual column in this object + * + * @param string $name The virtual column name + * @return boolean + */ + public function hasVirtualColumn($name) + { + return array_key_exists($name, $this->virtualColumns); + } + + /** + * Get the value of a virtual column in this object + * + * @param string $name The virtual column name + * @return mixed + * + * @throws PropelException + */ + public function getVirtualColumn($name) + { + if (!$this->hasVirtualColumn($name)) { + throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name)); + } + + return $this->virtualColumns[$name]; + } + + /** + * Set the value of a virtual column in this object + * + * @param string $name The virtual column name + * @param mixed $value The value to give to the virtual column + * + * @return CartCreditNote The current object, for fluid interface + */ + public function setVirtualColumn($name, $value) + { + $this->virtualColumns[$name] = $value; + + return $this; + } + + /** + * Logs a message using Propel::log(). + * + * @param string $msg + * @param int $priority One of the Propel::LOG_* logging levels + * @return boolean + */ + protected function log($msg, $priority = Propel::LOG_INFO) + { + return Propel::log(get_class($this) . ': ' . $msg, $priority); + } + + /** + * Populate the current object from a string, using a given parser format + * + * $book = new Book(); + * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, + * or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param string $data The source data to import from + * + * @return CartCreditNote The current object, for fluid interface + */ + public function importFrom($parser, $data) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + $this->fromArray($parser->toArray($data), TableMap::TYPE_PHPNAME); + + return $this; + } + + /** + * Export the current object properties to a string, using a given parser format + * + * $book = BookQuery::create()->findPk(9012); + * echo $book->exportTo('JSON'); + * => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE. + * @return string The exported data + */ + public function exportTo($parser, $includeLazyLoadColumns = true) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true)); + } + + /** + * Clean up internal collections prior to serializing + * Avoids recursive loops that turn into segmentation faults when serializing + */ + public function __sleep() + { + $this->clearAllReferences(); + + return array_keys(get_object_vars($this)); + } + + /** + * Get the [cart_id] column value. + * + * @return int + */ + public function getCartId() + { + + return $this->cart_id; + } + + /** + * Get the [credit_note_id] column value. + * + * @return int + */ + public function getCreditNoteId() + { + + return $this->credit_note_id; + } + + /** + * Get the [amount_price] column value. + * + * @return string + */ + public function getAmountPrice() + { + + return $this->amount_price; + } + + /** + * Get the [optionally formatted] temporal [created_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getCreatedAt($format = NULL) + { + if ($format === null) { + return $this->created_at; + } else { + return $this->created_at instanceof \DateTime ? $this->created_at->format($format) : null; + } + } + + /** + * Get the [optionally formatted] temporal [updated_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getUpdatedAt($format = NULL) + { + if ($format === null) { + return $this->updated_at; + } else { + return $this->updated_at instanceof \DateTime ? $this->updated_at->format($format) : null; + } + } + + /** + * Set the value of [cart_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CartCreditNote The current object (for fluent API support) + */ + public function setCartId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->cart_id !== $v) { + $this->cart_id = $v; + $this->modifiedColumns[CartCreditNoteTableMap::CART_ID] = true; + } + + if ($this->aCart !== null && $this->aCart->getId() !== $v) { + $this->aCart = null; + } + + + return $this; + } // setCartId() + + /** + * Set the value of [credit_note_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CartCreditNote The current object (for fluent API support) + */ + public function setCreditNoteId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->credit_note_id !== $v) { + $this->credit_note_id = $v; + $this->modifiedColumns[CartCreditNoteTableMap::CREDIT_NOTE_ID] = true; + } + + if ($this->aCreditNote !== null && $this->aCreditNote->getId() !== $v) { + $this->aCreditNote = null; + } + + + return $this; + } // setCreditNoteId() + + /** + * Set the value of [amount_price] column. + * + * @param string $v new value + * @return \CreditNote\Model\CartCreditNote The current object (for fluent API support) + */ + public function setAmountPrice($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->amount_price !== $v) { + $this->amount_price = $v; + $this->modifiedColumns[CartCreditNoteTableMap::AMOUNT_PRICE] = true; + } + + + return $this; + } // setAmountPrice() + + /** + * Sets the value of [created_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CartCreditNote The current object (for fluent API support) + */ + public function setCreatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->created_at !== null || $dt !== null) { + if ($dt !== $this->created_at) { + $this->created_at = $dt; + $this->modifiedColumns[CartCreditNoteTableMap::CREATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setCreatedAt() + + /** + * Sets the value of [updated_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CartCreditNote The current object (for fluent API support) + */ + public function setUpdatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->updated_at !== null || $dt !== null) { + if ($dt !== $this->updated_at) { + $this->updated_at = $dt; + $this->modifiedColumns[CartCreditNoteTableMap::UPDATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setUpdatedAt() + + /** + * Indicates whether the columns in this object are only set to default values. + * + * This method can be used in conjunction with isModified() to indicate whether an object is both + * modified _and_ has some values set which are non-default. + * + * @return boolean Whether the columns in this object are only been set with default values. + */ + public function hasOnlyDefaultValues() + { + if ($this->amount_price !== '0.000000') { + return false; + } + + // otherwise, everything was equal, so return TRUE + return true; + } // hasOnlyDefaultValues() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (0-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param array $row The row returned by DataFetcher->fetch(). + * @param int $startcol 0-based offset column which indicates which restultset column to start with. + * @param boolean $rehydrate Whether this object is being re-hydrated from the database. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM) + { + try { + + + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CartCreditNoteTableMap::translateFieldName('CartId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->cart_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CartCreditNoteTableMap::translateFieldName('CreditNoteId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->credit_note_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CartCreditNoteTableMap::translateFieldName('AmountPrice', TableMap::TYPE_PHPNAME, $indexType)]; + $this->amount_price = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CartCreditNoteTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CartCreditNoteTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + $this->resetModified(); + + $this->setNew(false); + + if ($rehydrate) { + $this->ensureConsistency(); + } + + return $startcol + 5; // 5 = CartCreditNoteTableMap::NUM_HYDRATE_COLUMNS. + + } catch (Exception $e) { + throw new PropelException("Error populating \CreditNote\Model\CartCreditNote object", 0, $e); + } + } + + /** + * Checks and repairs the internal consistency of the object. + * + * This method is executed after an already-instantiated object is re-hydrated + * from the database. It exists to check any foreign keys to make sure that + * the objects related to the current object are correct based on foreign key. + * + * You can override this method in the stub class, but you should always invoke + * the base method from the overridden method (i.e. parent::ensureConsistency()), + * in case your model changes. + * + * @throws PropelException + */ + public function ensureConsistency() + { + if ($this->aCart !== null && $this->cart_id !== $this->aCart->getId()) { + $this->aCart = null; + } + if ($this->aCreditNote !== null && $this->credit_note_id !== $this->aCreditNote->getId()) { + $this->aCreditNote = null; + } + } // ensureConsistency + + /** + * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. + * + * This will only work if the object has been saved and has a valid primary key set. + * + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @return void + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + */ + public function reload($deep = false, ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("Cannot reload a deleted object."); + } + + if ($this->isNew()) { + throw new PropelException("Cannot reload an unsaved object."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CartCreditNoteTableMap::DATABASE_NAME); + } + + // We don't need to alter the object instance pool; we're just modifying this instance + // already in the pool. + + $dataFetcher = ChildCartCreditNoteQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con); + $row = $dataFetcher->fetch(); + $dataFetcher->close(); + if (!$row) { + throw new PropelException('Cannot find matching row in the database to reload object values.'); + } + $this->hydrate($row, 0, true, $dataFetcher->getIndexType()); // rehydrate + + if ($deep) { // also de-associate any related objects? + + $this->aCart = null; + $this->aCreditNote = null; + } // if (deep) + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param ConnectionInterface $con + * @return void + * @throws PropelException + * @see CartCreditNote::setDeleted() + * @see CartCreditNote::isDeleted() + */ + public function delete(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CartCreditNoteTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + try { + $deleteQuery = ChildCartCreditNoteQuery::create() + ->filterByPrimaryKey($this->getPrimaryKey()); + $ret = $this->preDelete($con); + if ($ret) { + $deleteQuery->delete($con); + $this->postDelete($con); + $con->commit(); + $this->setDeleted(true); + } else { + $con->commit(); + } + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Persists this object to the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All modified related objects will also be persisted in the doSave() + * method. This method wraps all precipitate database operations in a + * single transaction. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() + */ + public function save(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CartCreditNoteTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + $isInsert = $this->isNew(); + try { + $ret = $this->preSave($con); + if ($isInsert) { + $ret = $ret && $this->preInsert($con); + // timestampable behavior + if (!$this->isColumnModified(CartCreditNoteTableMap::CREATED_AT)) { + $this->setCreatedAt(time()); + } + if (!$this->isColumnModified(CartCreditNoteTableMap::UPDATED_AT)) { + $this->setUpdatedAt(time()); + } + } else { + $ret = $ret && $this->preUpdate($con); + // timestampable behavior + if ($this->isModified() && !$this->isColumnModified(CartCreditNoteTableMap::UPDATED_AT)) { + $this->setUpdatedAt(time()); + } + } + if ($ret) { + $affectedRows = $this->doSave($con); + if ($isInsert) { + $this->postInsert($con); + } else { + $this->postUpdate($con); + } + $this->postSave($con); + CartCreditNoteTableMap::addInstanceToPool($this); + } else { + $affectedRows = 0; + } + $con->commit(); + + return $affectedRows; + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Performs the work of inserting or updating the row in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() + */ + protected function doSave(ConnectionInterface $con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + // We call the save method on the following object(s) if they + // were passed to this object by their corresponding set + // method. This object relates to these object(s) by a + // foreign key reference. + + if ($this->aCart !== null) { + if ($this->aCart->isModified() || $this->aCart->isNew()) { + $affectedRows += $this->aCart->save($con); + } + $this->setCart($this->aCart); + } + + if ($this->aCreditNote !== null) { + if ($this->aCreditNote->isModified() || $this->aCreditNote->isNew()) { + $affectedRows += $this->aCreditNote->save($con); + } + $this->setCreditNote($this->aCreditNote); + } + + if ($this->isNew() || $this->isModified()) { + // persist changes + if ($this->isNew()) { + $this->doInsert($con); + } else { + $this->doUpdate($con); + } + $affectedRows += 1; + $this->resetModified(); + } + + $this->alreadyInSave = false; + + } + + return $affectedRows; + } // doSave() + + /** + * Insert the row in the database. + * + * @param ConnectionInterface $con + * + * @throws PropelException + * @see doSave() + */ + protected function doInsert(ConnectionInterface $con) + { + $modifiedColumns = array(); + $index = 0; + + + // check the columns in natural order for more readable SQL queries + if ($this->isColumnModified(CartCreditNoteTableMap::CART_ID)) { + $modifiedColumns[':p' . $index++] = 'CART_ID'; + } + if ($this->isColumnModified(CartCreditNoteTableMap::CREDIT_NOTE_ID)) { + $modifiedColumns[':p' . $index++] = 'CREDIT_NOTE_ID'; + } + if ($this->isColumnModified(CartCreditNoteTableMap::AMOUNT_PRICE)) { + $modifiedColumns[':p' . $index++] = 'AMOUNT_PRICE'; + } + if ($this->isColumnModified(CartCreditNoteTableMap::CREATED_AT)) { + $modifiedColumns[':p' . $index++] = 'CREATED_AT'; + } + if ($this->isColumnModified(CartCreditNoteTableMap::UPDATED_AT)) { + $modifiedColumns[':p' . $index++] = 'UPDATED_AT'; + } + + $sql = sprintf( + 'INSERT INTO cart_credit_note (%s) VALUES (%s)', + implode(', ', $modifiedColumns), + implode(', ', array_keys($modifiedColumns)) + ); + + try { + $stmt = $con->prepare($sql); + foreach ($modifiedColumns as $identifier => $columnName) { + switch ($columnName) { + case 'CART_ID': + $stmt->bindValue($identifier, $this->cart_id, PDO::PARAM_INT); + break; + case 'CREDIT_NOTE_ID': + $stmt->bindValue($identifier, $this->credit_note_id, PDO::PARAM_INT); + break; + case 'AMOUNT_PRICE': + $stmt->bindValue($identifier, $this->amount_price, PDO::PARAM_STR); + break; + case 'CREATED_AT': + $stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + case 'UPDATED_AT': + $stmt->bindValue($identifier, $this->updated_at ? $this->updated_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + } + } + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e); + } + + $this->setNew(false); + } + + /** + * Update the row in the database. + * + * @param ConnectionInterface $con + * + * @return Integer Number of updated rows + * @see doSave() + */ + protected function doUpdate(ConnectionInterface $con) + { + $selectCriteria = $this->buildPkeyCriteria(); + $valuesCriteria = $this->buildCriteria(); + + return $selectCriteria->doUpdate($valuesCriteria, $con); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. + */ + public function getByName($name, $type = TableMap::TYPE_PHPNAME) + { + $pos = CartCreditNoteTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + $field = $this->getByPosition($pos); + + return $field; + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch ($pos) { + case 0: + return $this->getCartId(); + break; + case 1: + return $this->getCreditNoteId(); + break; + case 2: + return $this->getAmountPrice(); + break; + case 3: + return $this->getCreatedAt(); + break; + case 4: + return $this->getUpdatedAt(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * + * @return array an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false) + { + if (isset($alreadyDumpedObjects['CartCreditNote'][serialize($this->getPrimaryKey())])) { + return '*RECURSION*'; + } + $alreadyDumpedObjects['CartCreditNote'][serialize($this->getPrimaryKey())] = true; + $keys = CartCreditNoteTableMap::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getCartId(), + $keys[1] => $this->getCreditNoteId(), + $keys[2] => $this->getAmountPrice(), + $keys[3] => $this->getCreatedAt(), + $keys[4] => $this->getUpdatedAt(), + ); + $virtualColumns = $this->virtualColumns; + foreach ($virtualColumns as $key => $virtualColumn) { + $result[$key] = $virtualColumn; + } + + if ($includeForeignObjects) { + if (null !== $this->aCart) { + $result['Cart'] = $this->aCart->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + if (null !== $this->aCreditNote) { + $result['CreditNote'] = $this->aCreditNote->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + } + + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return void + */ + public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) + { + $pos = CartCreditNoteTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch ($pos) { + case 0: + $this->setCartId($value); + break; + case 1: + $this->setCreditNoteId($value); + break; + case 2: + $this->setAmountPrice($value); + break; + case 3: + $this->setCreatedAt($value); + break; + case 4: + $this->setUpdatedAt($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * The default key type is the column's TableMap::TYPE_PHPNAME. + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) + { + $keys = CartCreditNoteTableMap::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) $this->setCartId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setCreditNoteId($arr[$keys[1]]); + if (array_key_exists($keys[2], $arr)) $this->setAmountPrice($arr[$keys[2]]); + if (array_key_exists($keys[3], $arr)) $this->setCreatedAt($arr[$keys[3]]); + if (array_key_exists($keys[4], $arr)) $this->setUpdatedAt($arr[$keys[4]]); + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(CartCreditNoteTableMap::DATABASE_NAME); + + if ($this->isColumnModified(CartCreditNoteTableMap::CART_ID)) $criteria->add(CartCreditNoteTableMap::CART_ID, $this->cart_id); + if ($this->isColumnModified(CartCreditNoteTableMap::CREDIT_NOTE_ID)) $criteria->add(CartCreditNoteTableMap::CREDIT_NOTE_ID, $this->credit_note_id); + if ($this->isColumnModified(CartCreditNoteTableMap::AMOUNT_PRICE)) $criteria->add(CartCreditNoteTableMap::AMOUNT_PRICE, $this->amount_price); + if ($this->isColumnModified(CartCreditNoteTableMap::CREATED_AT)) $criteria->add(CartCreditNoteTableMap::CREATED_AT, $this->created_at); + if ($this->isColumnModified(CartCreditNoteTableMap::UPDATED_AT)) $criteria->add(CartCreditNoteTableMap::UPDATED_AT, $this->updated_at); + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(CartCreditNoteTableMap::DATABASE_NAME); + $criteria->add(CartCreditNoteTableMap::CART_ID, $this->cart_id); + $criteria->add(CartCreditNoteTableMap::CREDIT_NOTE_ID, $this->credit_note_id); + + return $criteria; + } + + /** + * Returns the composite primary key for this object. + * The array elements will be in same order as specified in XML. + * @return array + */ + public function getPrimaryKey() + { + $pks = array(); + $pks[0] = $this->getCartId(); + $pks[1] = $this->getCreditNoteId(); + + return $pks; + } + + /** + * Set the [composite] primary key. + * + * @param array $keys The elements of the composite key (order must match the order in XML file). + * @return void + */ + public function setPrimaryKey($keys) + { + $this->setCartId($keys[0]); + $this->setCreditNoteId($keys[1]); + } + + /** + * Returns true if the primary key for this object is null. + * @return boolean + */ + public function isPrimaryKeyNull() + { + + return (null === $this->getCartId()) && (null === $this->getCreditNoteId()); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of \CreditNote\Model\CartCreditNote (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false, $makeNew = true) + { + $copyObj->setCartId($this->getCartId()); + $copyObj->setCreditNoteId($this->getCreditNoteId()); + $copyObj->setAmountPrice($this->getAmountPrice()); + $copyObj->setCreatedAt($this->getCreatedAt()); + $copyObj->setUpdatedAt($this->getUpdatedAt()); + if ($makeNew) { + $copyObj->setNew(true); + } + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \CreditNote\Model\CartCreditNote Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + + return $copyObj; + } + + /** + * Declares an association between this object and a ChildCart object. + * + * @param ChildCart $v + * @return \CreditNote\Model\CartCreditNote The current object (for fluent API support) + * @throws PropelException + */ + public function setCart(ChildCart $v = null) + { + if ($v === null) { + $this->setCartId(NULL); + } else { + $this->setCartId($v->getId()); + } + + $this->aCart = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCart object, it will not be re-added. + if ($v !== null) { + $v->addCartCreditNote($this); + } + + + return $this; + } + + + /** + * Get the associated ChildCart object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCart The associated ChildCart object. + * @throws PropelException + */ + public function getCart(ConnectionInterface $con = null) + { + if ($this->aCart === null && ($this->cart_id !== null)) { + $this->aCart = CartQuery::create()->findPk($this->cart_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCart->addCartCreditNotes($this); + */ + } + + return $this->aCart; + } + + /** + * Declares an association between this object and a ChildCreditNote object. + * + * @param ChildCreditNote $v + * @return \CreditNote\Model\CartCreditNote The current object (for fluent API support) + * @throws PropelException + */ + public function setCreditNote(ChildCreditNote $v = null) + { + if ($v === null) { + $this->setCreditNoteId(NULL); + } else { + $this->setCreditNoteId($v->getId()); + } + + $this->aCreditNote = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCreditNote object, it will not be re-added. + if ($v !== null) { + $v->addCartCreditNote($this); + } + + + return $this; + } + + + /** + * Get the associated ChildCreditNote object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCreditNote The associated ChildCreditNote object. + * @throws PropelException + */ + public function getCreditNote(ConnectionInterface $con = null) + { + if ($this->aCreditNote === null && ($this->credit_note_id !== null)) { + $this->aCreditNote = ChildCreditNoteQuery::create()->findPk($this->credit_note_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCreditNote->addCartCreditNotes($this); + */ + } + + return $this->aCreditNote; + } + + /** + * Clears the current object and sets all attributes to their default values + */ + public function clear() + { + $this->cart_id = null; + $this->credit_note_id = null; + $this->amount_price = null; + $this->created_at = null; + $this->updated_at = null; + $this->alreadyInSave = false; + $this->clearAllReferences(); + $this->applyDefaultValues(); + $this->resetModified(); + $this->setNew(true); + $this->setDeleted(false); + } + + /** + * Resets all references to other model objects or collections of model objects. + * + * This method is a user-space workaround for PHP's inability to garbage collect + * objects with circular references (even in PHP 5.3). This is currently necessary + * when using Propel in certain daemon or large-volume/high-memory operations. + * + * @param boolean $deep Whether to also clear the references on all referrer objects. + */ + public function clearAllReferences($deep = false) + { + if ($deep) { + } // if ($deep) + + $this->aCart = null; + $this->aCreditNote = null; + } + + /** + * Return the string representation of this object + * + * @return string + */ + public function __toString() + { + return (string) $this->exportTo(CartCreditNoteTableMap::DEFAULT_STRING_FORMAT); + } + + // timestampable behavior + + /** + * Mark the current object so that the update date doesn't get updated during next save + * + * @return ChildCartCreditNote The current object (for fluent API support) + */ + public function keepUpdateDateUnchanged() + { + $this->modifiedColumns[CartCreditNoteTableMap::UPDATED_AT] = true; + + return $this; + } + + /** + * Code to be run before persisting the object + * @param ConnectionInterface $con + * @return boolean + */ + public function preSave(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after persisting the object + * @param ConnectionInterface $con + */ + public function postSave(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before inserting to database + * @param ConnectionInterface $con + * @return boolean + */ + public function preInsert(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after inserting to database + * @param ConnectionInterface $con + */ + public function postInsert(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before updating the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preUpdate(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after updating the object in database + * @param ConnectionInterface $con + */ + public function postUpdate(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before deleting the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preDelete(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after deleting the object in database + * @param ConnectionInterface $con + */ + public function postDelete(ConnectionInterface $con = null) + { + + } + + + /** + * Derived method to catches calls to undefined methods. + * + * Provides magic import/export method support (fromXML()/toXML(), fromYAML()/toYAML(), etc.). + * Allows to define default __call() behavior if you overwrite __call() + * + * @param string $name + * @param mixed $params + * + * @return array|string + */ + public function __call($name, $params) + { + if (0 === strpos($name, 'get')) { + $virtualColumn = substr($name, 3); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + + $virtualColumn = lcfirst($virtualColumn); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + } + + if (0 === strpos($name, 'from')) { + $format = substr($name, 4); + + return $this->importFrom($format, reset($params)); + } + + if (0 === strpos($name, 'to')) { + $format = substr($name, 2); + $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true; + + return $this->exportTo($format, $includeLazyLoadColumns); + } + + throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name)); + } + +} diff --git a/local/modules/CreditNote/Model/Base/CartCreditNoteQuery.php b/local/modules/CreditNote/Model/Base/CartCreditNoteQuery.php new file mode 100644 index 000000000..74c9f21a4 --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CartCreditNoteQuery.php @@ -0,0 +1,774 @@ +setModelAlias($modelAlias); + } + if ($criteria instanceof Criteria) { + $query->mergeWith($criteria); + } + + return $query; + } + + /** + * Find object by primary key. + * Propel uses the instance pool to skip the database if the object exists. + * Go fast if the query is untouched. + * + * + * $obj = $c->findPk(array(12, 34), $con); + * + * + * @param array[$cart_id, $credit_note_id] $key Primary key to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ChildCartCreditNote|array|mixed the result, formatted by the current formatter + */ + public function findPk($key, $con = null) + { + if ($key === null) { + return null; + } + if ((null !== ($obj = CartCreditNoteTableMap::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) { + // the object is already in the instance pool + return $obj; + } + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CartCreditNoteTableMap::DATABASE_NAME); + } + $this->basePreSelect($con); + if ($this->formatter || $this->modelAlias || $this->with || $this->select + || $this->selectColumns || $this->asColumns || $this->selectModifiers + || $this->map || $this->having || $this->joins) { + return $this->findPkComplex($key, $con); + } else { + return $this->findPkSimple($key, $con); + } + } + + /** + * Find object by primary key using raw SQL to go fast. + * Bypass doSelect() and the object formatter by using generated code. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCartCreditNote A model object, or null if the key is not found + */ + protected function findPkSimple($key, $con) + { + $sql = 'SELECT CART_ID, CREDIT_NOTE_ID, AMOUNT_PRICE, CREATED_AT, UPDATED_AT FROM cart_credit_note WHERE CART_ID = :p0 AND CREDIT_NOTE_ID = :p1'; + try { + $stmt = $con->prepare($sql); + $stmt->bindValue(':p0', $key[0], PDO::PARAM_INT); + $stmt->bindValue(':p1', $key[1], PDO::PARAM_INT); + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e); + } + $obj = null; + if ($row = $stmt->fetch(\PDO::FETCH_NUM)) { + $obj = new ChildCartCreditNote(); + $obj->hydrate($row); + CartCreditNoteTableMap::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1]))); + } + $stmt->closeCursor(); + + return $obj; + } + + /** + * Find object by primary key. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCartCreditNote|array|mixed the result, formatted by the current formatter + */ + protected function findPkComplex($key, $con) + { + // As the query uses a PK condition, no limit(1) is necessary. + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKey($key) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher); + } + + /** + * Find objects by primary key + * + * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); + * + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter + */ + public function findPks($keys, $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getReadConnection($this->getDbName()); + } + $this->basePreSelect($con); + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKeys($keys) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->format($dataFetcher); + } + + /** + * Filter the query by primary key + * + * @param mixed $key Primary key to use for the query + * + * @return ChildCartCreditNoteQuery The current query, for fluid interface + */ + public function filterByPrimaryKey($key) + { + $this->addUsingAlias(CartCreditNoteTableMap::CART_ID, $key[0], Criteria::EQUAL); + $this->addUsingAlias(CartCreditNoteTableMap::CREDIT_NOTE_ID, $key[1], Criteria::EQUAL); + + return $this; + } + + /** + * Filter the query by a list of primary keys + * + * @param array $keys The list of primary key to use for the query + * + * @return ChildCartCreditNoteQuery The current query, for fluid interface + */ + public function filterByPrimaryKeys($keys) + { + if (empty($keys)) { + return $this->add(null, '1<>1', Criteria::CUSTOM); + } + foreach ($keys as $key) { + $cton0 = $this->getNewCriterion(CartCreditNoteTableMap::CART_ID, $key[0], Criteria::EQUAL); + $cton1 = $this->getNewCriterion(CartCreditNoteTableMap::CREDIT_NOTE_ID, $key[1], Criteria::EQUAL); + $cton0->addAnd($cton1); + $this->addOr($cton0); + } + + return $this; + } + + /** + * Filter the query on the cart_id column + * + * Example usage: + * + * $query->filterByCartId(1234); // WHERE cart_id = 1234 + * $query->filterByCartId(array(12, 34)); // WHERE cart_id IN (12, 34) + * $query->filterByCartId(array('min' => 12)); // WHERE cart_id > 12 + * + * + * @see filterByCart() + * + * @param mixed $cartId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCartCreditNoteQuery The current query, for fluid interface + */ + public function filterByCartId($cartId = null, $comparison = null) + { + if (is_array($cartId)) { + $useMinMax = false; + if (isset($cartId['min'])) { + $this->addUsingAlias(CartCreditNoteTableMap::CART_ID, $cartId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($cartId['max'])) { + $this->addUsingAlias(CartCreditNoteTableMap::CART_ID, $cartId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CartCreditNoteTableMap::CART_ID, $cartId, $comparison); + } + + /** + * Filter the query on the credit_note_id column + * + * Example usage: + * + * $query->filterByCreditNoteId(1234); // WHERE credit_note_id = 1234 + * $query->filterByCreditNoteId(array(12, 34)); // WHERE credit_note_id IN (12, 34) + * $query->filterByCreditNoteId(array('min' => 12)); // WHERE credit_note_id > 12 + * + * + * @see filterByCreditNote() + * + * @param mixed $creditNoteId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCartCreditNoteQuery The current query, for fluid interface + */ + public function filterByCreditNoteId($creditNoteId = null, $comparison = null) + { + if (is_array($creditNoteId)) { + $useMinMax = false; + if (isset($creditNoteId['min'])) { + $this->addUsingAlias(CartCreditNoteTableMap::CREDIT_NOTE_ID, $creditNoteId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($creditNoteId['max'])) { + $this->addUsingAlias(CartCreditNoteTableMap::CREDIT_NOTE_ID, $creditNoteId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CartCreditNoteTableMap::CREDIT_NOTE_ID, $creditNoteId, $comparison); + } + + /** + * Filter the query on the amount_price column + * + * Example usage: + * + * $query->filterByAmountPrice(1234); // WHERE amount_price = 1234 + * $query->filterByAmountPrice(array(12, 34)); // WHERE amount_price IN (12, 34) + * $query->filterByAmountPrice(array('min' => 12)); // WHERE amount_price > 12 + * + * + * @param mixed $amountPrice The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCartCreditNoteQuery The current query, for fluid interface + */ + public function filterByAmountPrice($amountPrice = null, $comparison = null) + { + if (is_array($amountPrice)) { + $useMinMax = false; + if (isset($amountPrice['min'])) { + $this->addUsingAlias(CartCreditNoteTableMap::AMOUNT_PRICE, $amountPrice['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($amountPrice['max'])) { + $this->addUsingAlias(CartCreditNoteTableMap::AMOUNT_PRICE, $amountPrice['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CartCreditNoteTableMap::AMOUNT_PRICE, $amountPrice, $comparison); + } + + /** + * Filter the query on the created_at column + * + * Example usage: + * + * $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14' + * $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14' + * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' + * + * + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCartCreditNoteQuery The current query, for fluid interface + */ + public function filterByCreatedAt($createdAt = null, $comparison = null) + { + if (is_array($createdAt)) { + $useMinMax = false; + if (isset($createdAt['min'])) { + $this->addUsingAlias(CartCreditNoteTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($createdAt['max'])) { + $this->addUsingAlias(CartCreditNoteTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CartCreditNoteTableMap::CREATED_AT, $createdAt, $comparison); + } + + /** + * Filter the query on the updated_at column + * + * Example usage: + * + * $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14' + * $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14' + * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' + * + * + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCartCreditNoteQuery The current query, for fluid interface + */ + public function filterByUpdatedAt($updatedAt = null, $comparison = null) + { + if (is_array($updatedAt)) { + $useMinMax = false; + if (isset($updatedAt['min'])) { + $this->addUsingAlias(CartCreditNoteTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($updatedAt['max'])) { + $this->addUsingAlias(CartCreditNoteTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CartCreditNoteTableMap::UPDATED_AT, $updatedAt, $comparison); + } + + /** + * Filter the query by a related \Thelia\Model\Cart object + * + * @param \Thelia\Model\Cart|ObjectCollection $cart The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCartCreditNoteQuery The current query, for fluid interface + */ + public function filterByCart($cart, $comparison = null) + { + if ($cart instanceof \Thelia\Model\Cart) { + return $this + ->addUsingAlias(CartCreditNoteTableMap::CART_ID, $cart->getId(), $comparison); + } elseif ($cart instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CartCreditNoteTableMap::CART_ID, $cart->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByCart() only accepts arguments of type \Thelia\Model\Cart or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the Cart relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCartCreditNoteQuery The current query, for fluid interface + */ + public function joinCart($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('Cart'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'Cart'); + } + + return $this; + } + + /** + * Use the Cart relation Cart object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \Thelia\Model\CartQuery A secondary query class using the current class as primary query + */ + public function useCartQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCart($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'Cart', '\Thelia\Model\CartQuery'); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNote object + * + * @param \CreditNote\Model\CreditNote|ObjectCollection $creditNote The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCartCreditNoteQuery The current query, for fluid interface + */ + public function filterByCreditNote($creditNote, $comparison = null) + { + if ($creditNote instanceof \CreditNote\Model\CreditNote) { + return $this + ->addUsingAlias(CartCreditNoteTableMap::CREDIT_NOTE_ID, $creditNote->getId(), $comparison); + } elseif ($creditNote instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CartCreditNoteTableMap::CREDIT_NOTE_ID, $creditNote->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByCreditNote() only accepts arguments of type \CreditNote\Model\CreditNote or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNote relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCartCreditNoteQuery The current query, for fluid interface + */ + public function joinCreditNote($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNote'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNote'); + } + + return $this; + } + + /** + * Use the CreditNote relation CreditNote object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCreditNote($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNote', '\CreditNote\Model\CreditNoteQuery'); + } + + /** + * Exclude object from result + * + * @param ChildCartCreditNote $cartCreditNote Object to remove from the list of results + * + * @return ChildCartCreditNoteQuery The current query, for fluid interface + */ + public function prune($cartCreditNote = null) + { + if ($cartCreditNote) { + $this->addCond('pruneCond0', $this->getAliasedColName(CartCreditNoteTableMap::CART_ID), $cartCreditNote->getCartId(), Criteria::NOT_EQUAL); + $this->addCond('pruneCond1', $this->getAliasedColName(CartCreditNoteTableMap::CREDIT_NOTE_ID), $cartCreditNote->getCreditNoteId(), Criteria::NOT_EQUAL); + $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR); + } + + return $this; + } + + /** + * Deletes all rows from the cart_credit_note table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public function doDeleteAll(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CartCreditNoteTableMap::DATABASE_NAME); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + $affectedRows += parent::doDeleteAll($con); + // Because this db requires some delete cascade/set null emulation, we have to + // clear the cached instance *after* the emulation has happened (since + // instances get re-added by the select statement contained therein). + CartCreditNoteTableMap::clearInstancePool(); + CartCreditNoteTableMap::clearRelatedInstancePool(); + + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $affectedRows; + } + + /** + * Performs a DELETE on the database, given a ChildCartCreditNote or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or ChildCartCreditNote object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public function delete(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CartCreditNoteTableMap::DATABASE_NAME); + } + + $criteria = $this; + + // Set the correct dbName + $criteria->setDbName(CartCreditNoteTableMap::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + + + CartCreditNoteTableMap::removeInstanceFromPool($criteria); + + $affectedRows += ModelCriteria::delete($con); + CartCreditNoteTableMap::clearRelatedInstancePool(); + $con->commit(); + + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + // timestampable behavior + + /** + * Filter by the latest updated + * + * @param int $nbDays Maximum age of the latest update in days + * + * @return ChildCartCreditNoteQuery The current query, for fluid interface + */ + public function recentlyUpdated($nbDays = 7) + { + return $this->addUsingAlias(CartCreditNoteTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL); + } + + /** + * Filter by the latest created + * + * @param int $nbDays Maximum age of in days + * + * @return ChildCartCreditNoteQuery The current query, for fluid interface + */ + public function recentlyCreated($nbDays = 7) + { + return $this->addUsingAlias(CartCreditNoteTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL); + } + + /** + * Order by update date desc + * + * @return ChildCartCreditNoteQuery The current query, for fluid interface + */ + public function lastUpdatedFirst() + { + return $this->addDescendingOrderByColumn(CartCreditNoteTableMap::UPDATED_AT); + } + + /** + * Order by update date asc + * + * @return ChildCartCreditNoteQuery The current query, for fluid interface + */ + public function firstUpdatedFirst() + { + return $this->addAscendingOrderByColumn(CartCreditNoteTableMap::UPDATED_AT); + } + + /** + * Order by create date desc + * + * @return ChildCartCreditNoteQuery The current query, for fluid interface + */ + public function lastCreatedFirst() + { + return $this->addDescendingOrderByColumn(CartCreditNoteTableMap::CREATED_AT); + } + + /** + * Order by create date asc + * + * @return ChildCartCreditNoteQuery The current query, for fluid interface + */ + public function firstCreatedFirst() + { + return $this->addAscendingOrderByColumn(CartCreditNoteTableMap::CREATED_AT); + } + +} // CartCreditNoteQuery diff --git a/local/modules/CreditNote/Model/Base/CreditNote.php b/local/modules/CreditNote/Model/Base/CreditNote.php new file mode 100644 index 000000000..7007d6775 --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CreditNote.php @@ -0,0 +1,4403 @@ +total_price = '0.000000'; + $this->total_price_with_tax = '0.000000'; + $this->discount_without_tax = '0.000000'; + $this->discount_with_tax = '0.000000'; + $this->allow_partial_use = true; + } + + /** + * Initializes internal state of CreditNote\Model\Base\CreditNote object. + * @see applyDefaults() + */ + public function __construct() + { + $this->applyDefaultValues(); + } + + /** + * Returns whether the object has been modified. + * + * @return boolean True if the object has been modified. + */ + public function isModified() + { + return !!$this->modifiedColumns; + } + + /** + * Has specified column been modified? + * + * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID + * @return boolean True if $col has been modified. + */ + public function isColumnModified($col) + { + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); + } + + /** + * Get the columns that have been modified in this object. + * @return array A unique list of the modified column names for this object. + */ + public function getModifiedColumns() + { + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; + } + + /** + * Returns whether the object has ever been saved. This will + * be false, if the object was retrieved from storage or was created + * and then saved. + * + * @return boolean true, if the object has never been persisted. + */ + public function isNew() + { + return $this->new; + } + + /** + * Setter for the isNew attribute. This method will be called + * by Propel-generated children and objects. + * + * @param boolean $b the state of the object. + */ + public function setNew($b) + { + $this->new = (Boolean) $b; + } + + /** + * Whether this object has been deleted. + * @return boolean The deleted state of this object. + */ + public function isDeleted() + { + return $this->deleted; + } + + /** + * Specify whether this object has been deleted. + * @param boolean $b The deleted state of this object. + * @return void + */ + public function setDeleted($b) + { + $this->deleted = (Boolean) $b; + } + + /** + * Sets the modified state for the object to be false. + * @param string $col If supplied, only the specified column is reset. + * @return void + */ + public function resetModified($col = null) + { + if (null !== $col) { + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); + } + } else { + $this->modifiedColumns = array(); + } + } + + /** + * Compares this with another CreditNote instance. If + * obj is an instance of CreditNote, delegates to + * equals(CreditNote). Otherwise, returns false. + * + * @param mixed $obj The object to compare to. + * @return boolean Whether equal to the object specified. + */ + public function equals($obj) + { + $thisclazz = get_class($this); + if (!is_object($obj) || !($obj instanceof $thisclazz)) { + return false; + } + + if ($this === $obj) { + return true; + } + + if (null === $this->getPrimaryKey() + || null === $obj->getPrimaryKey()) { + return false; + } + + return $this->getPrimaryKey() === $obj->getPrimaryKey(); + } + + /** + * If the primary key is not null, return the hashcode of the + * primary key. Otherwise, return the hash code of the object. + * + * @return int Hashcode + */ + public function hashCode() + { + if (null !== $this->getPrimaryKey()) { + return crc32(serialize($this->getPrimaryKey())); + } + + return crc32(serialize(clone $this)); + } + + /** + * Get the associative array of the virtual columns in this object + * + * @return array + */ + public function getVirtualColumns() + { + return $this->virtualColumns; + } + + /** + * Checks the existence of a virtual column in this object + * + * @param string $name The virtual column name + * @return boolean + */ + public function hasVirtualColumn($name) + { + return array_key_exists($name, $this->virtualColumns); + } + + /** + * Get the value of a virtual column in this object + * + * @param string $name The virtual column name + * @return mixed + * + * @throws PropelException + */ + public function getVirtualColumn($name) + { + if (!$this->hasVirtualColumn($name)) { + throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name)); + } + + return $this->virtualColumns[$name]; + } + + /** + * Set the value of a virtual column in this object + * + * @param string $name The virtual column name + * @param mixed $value The value to give to the virtual column + * + * @return CreditNote The current object, for fluid interface + */ + public function setVirtualColumn($name, $value) + { + $this->virtualColumns[$name] = $value; + + return $this; + } + + /** + * Logs a message using Propel::log(). + * + * @param string $msg + * @param int $priority One of the Propel::LOG_* logging levels + * @return boolean + */ + protected function log($msg, $priority = Propel::LOG_INFO) + { + return Propel::log(get_class($this) . ': ' . $msg, $priority); + } + + /** + * Populate the current object from a string, using a given parser format + * + * $book = new Book(); + * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, + * or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param string $data The source data to import from + * + * @return CreditNote The current object, for fluid interface + */ + public function importFrom($parser, $data) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + $this->fromArray($parser->toArray($data), TableMap::TYPE_PHPNAME); + + return $this; + } + + /** + * Export the current object properties to a string, using a given parser format + * + * $book = BookQuery::create()->findPk(9012); + * echo $book->exportTo('JSON'); + * => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE. + * @return string The exported data + */ + public function exportTo($parser, $includeLazyLoadColumns = true) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true)); + } + + /** + * Clean up internal collections prior to serializing + * Avoids recursive loops that turn into segmentation faults when serializing + */ + public function __sleep() + { + $this->clearAllReferences(); + + return array_keys(get_object_vars($this)); + } + + /** + * Get the [id] column value. + * + * @return int + */ + public function getId() + { + + return $this->id; + } + + /** + * Get the [ref] column value. + * + * @return string + */ + public function getRef() + { + + return $this->ref; + } + + /** + * Get the [invoice_ref] column value. + * + * @return string + */ + public function getInvoiceRef() + { + + return $this->invoice_ref; + } + + /** + * Get the [invoice_address_id] column value. + * + * @return int + */ + public function getInvoiceAddressId() + { + + return $this->invoice_address_id; + } + + /** + * Get the [optionally formatted] temporal [invoice_date] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getInvoiceDate($format = NULL) + { + if ($format === null) { + return $this->invoice_date; + } else { + return $this->invoice_date instanceof \DateTime ? $this->invoice_date->format($format) : null; + } + } + + /** + * Get the [order_id] column value. + * + * @return int + */ + public function getOrderId() + { + + return $this->order_id; + } + + /** + * Get the [customer_id] column value. + * + * @return int + */ + public function getCustomerId() + { + + return $this->customer_id; + } + + /** + * Get the [parent_id] column value. + * + * @return int + */ + public function getParentId() + { + + return $this->parent_id; + } + + /** + * Get the [type_id] column value. + * + * @return int + */ + public function getTypeId() + { + + return $this->type_id; + } + + /** + * Get the [status_id] column value. + * + * @return int + */ + public function getStatusId() + { + + return $this->status_id; + } + + /** + * Get the [currency_id] column value. + * + * @return int + */ + public function getCurrencyId() + { + + return $this->currency_id; + } + + /** + * Get the [currency_rate] column value. + * + * @return double + */ + public function getCurrencyRate() + { + + return $this->currency_rate; + } + + /** + * Get the [total_price] column value. + * + * @return string + */ + public function getTotalPrice() + { + + return $this->total_price; + } + + /** + * Get the [total_price_with_tax] column value. + * + * @return string + */ + public function getTotalPriceWithTax() + { + + return $this->total_price_with_tax; + } + + /** + * Get the [discount_without_tax] column value. + * + * @return string + */ + public function getDiscountWithoutTax() + { + + return $this->discount_without_tax; + } + + /** + * Get the [discount_with_tax] column value. + * + * @return string + */ + public function getDiscountWithTax() + { + + return $this->discount_with_tax; + } + + /** + * Get the [allow_partial_use] column value. + * + * @return boolean + */ + public function getAllowPartialUse() + { + + return $this->allow_partial_use; + } + + /** + * Get the [optionally formatted] temporal [created_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getCreatedAt($format = NULL) + { + if ($format === null) { + return $this->created_at; + } else { + return $this->created_at instanceof \DateTime ? $this->created_at->format($format) : null; + } + } + + /** + * Get the [optionally formatted] temporal [updated_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getUpdatedAt($format = NULL) + { + if ($format === null) { + return $this->updated_at; + } else { + return $this->updated_at instanceof \DateTime ? $this->updated_at->format($format) : null; + } + } + + /** + * Set the value of [id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function setId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->id !== $v) { + $this->id = $v; + $this->modifiedColumns[CreditNoteTableMap::ID] = true; + } + + + return $this; + } // setId() + + /** + * Set the value of [ref] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function setRef($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->ref !== $v) { + $this->ref = $v; + $this->modifiedColumns[CreditNoteTableMap::REF] = true; + } + + + return $this; + } // setRef() + + /** + * Set the value of [invoice_ref] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function setInvoiceRef($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->invoice_ref !== $v) { + $this->invoice_ref = $v; + $this->modifiedColumns[CreditNoteTableMap::INVOICE_REF] = true; + } + + + return $this; + } // setInvoiceRef() + + /** + * Set the value of [invoice_address_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function setInvoiceAddressId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->invoice_address_id !== $v) { + $this->invoice_address_id = $v; + $this->modifiedColumns[CreditNoteTableMap::INVOICE_ADDRESS_ID] = true; + } + + if ($this->aCreditNoteAddress !== null && $this->aCreditNoteAddress->getId() !== $v) { + $this->aCreditNoteAddress = null; + } + + + return $this; + } // setInvoiceAddressId() + + /** + * Sets the value of [invoice_date] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function setInvoiceDate($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->invoice_date !== null || $dt !== null) { + if ($dt !== $this->invoice_date) { + $this->invoice_date = $dt; + $this->modifiedColumns[CreditNoteTableMap::INVOICE_DATE] = true; + } + } // if either are not null + + + return $this; + } // setInvoiceDate() + + /** + * Set the value of [order_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function setOrderId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->order_id !== $v) { + $this->order_id = $v; + $this->modifiedColumns[CreditNoteTableMap::ORDER_ID] = true; + } + + if ($this->aOrder !== null && $this->aOrder->getId() !== $v) { + $this->aOrder = null; + } + + + return $this; + } // setOrderId() + + /** + * Set the value of [customer_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function setCustomerId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->customer_id !== $v) { + $this->customer_id = $v; + $this->modifiedColumns[CreditNoteTableMap::CUSTOMER_ID] = true; + } + + if ($this->aCustomer !== null && $this->aCustomer->getId() !== $v) { + $this->aCustomer = null; + } + + + return $this; + } // setCustomerId() + + /** + * Set the value of [parent_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function setParentId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->parent_id !== $v) { + $this->parent_id = $v; + $this->modifiedColumns[CreditNoteTableMap::PARENT_ID] = true; + } + + if ($this->aCreditNoteRelatedByParentId !== null && $this->aCreditNoteRelatedByParentId->getId() !== $v) { + $this->aCreditNoteRelatedByParentId = null; + } + + + return $this; + } // setParentId() + + /** + * Set the value of [type_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function setTypeId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->type_id !== $v) { + $this->type_id = $v; + $this->modifiedColumns[CreditNoteTableMap::TYPE_ID] = true; + } + + if ($this->aCreditNoteType !== null && $this->aCreditNoteType->getId() !== $v) { + $this->aCreditNoteType = null; + } + + + return $this; + } // setTypeId() + + /** + * Set the value of [status_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function setStatusId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->status_id !== $v) { + $this->status_id = $v; + $this->modifiedColumns[CreditNoteTableMap::STATUS_ID] = true; + } + + if ($this->aCreditNoteStatus !== null && $this->aCreditNoteStatus->getId() !== $v) { + $this->aCreditNoteStatus = null; + } + + + return $this; + } // setStatusId() + + /** + * Set the value of [currency_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function setCurrencyId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->currency_id !== $v) { + $this->currency_id = $v; + $this->modifiedColumns[CreditNoteTableMap::CURRENCY_ID] = true; + } + + if ($this->aCurrency !== null && $this->aCurrency->getId() !== $v) { + $this->aCurrency = null; + } + + + return $this; + } // setCurrencyId() + + /** + * Set the value of [currency_rate] column. + * + * @param double $v new value + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function setCurrencyRate($v) + { + if ($v !== null) { + $v = (double) $v; + } + + if ($this->currency_rate !== $v) { + $this->currency_rate = $v; + $this->modifiedColumns[CreditNoteTableMap::CURRENCY_RATE] = true; + } + + + return $this; + } // setCurrencyRate() + + /** + * Set the value of [total_price] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function setTotalPrice($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->total_price !== $v) { + $this->total_price = $v; + $this->modifiedColumns[CreditNoteTableMap::TOTAL_PRICE] = true; + } + + + return $this; + } // setTotalPrice() + + /** + * Set the value of [total_price_with_tax] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function setTotalPriceWithTax($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->total_price_with_tax !== $v) { + $this->total_price_with_tax = $v; + $this->modifiedColumns[CreditNoteTableMap::TOTAL_PRICE_WITH_TAX] = true; + } + + + return $this; + } // setTotalPriceWithTax() + + /** + * Set the value of [discount_without_tax] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function setDiscountWithoutTax($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->discount_without_tax !== $v) { + $this->discount_without_tax = $v; + $this->modifiedColumns[CreditNoteTableMap::DISCOUNT_WITHOUT_TAX] = true; + } + + + return $this; + } // setDiscountWithoutTax() + + /** + * Set the value of [discount_with_tax] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function setDiscountWithTax($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->discount_with_tax !== $v) { + $this->discount_with_tax = $v; + $this->modifiedColumns[CreditNoteTableMap::DISCOUNT_WITH_TAX] = true; + } + + + return $this; + } // setDiscountWithTax() + + /** + * Sets the value of the [allow_partial_use] column. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * + * @param boolean|integer|string $v The new value + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function setAllowPartialUse($v) + { + if ($v !== null) { + if (is_string($v)) { + $v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; + } else { + $v = (boolean) $v; + } + } + + if ($this->allow_partial_use !== $v) { + $this->allow_partial_use = $v; + $this->modifiedColumns[CreditNoteTableMap::ALLOW_PARTIAL_USE] = true; + } + + + return $this; + } // setAllowPartialUse() + + /** + * Sets the value of [created_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function setCreatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->created_at !== null || $dt !== null) { + if ($dt !== $this->created_at) { + $this->created_at = $dt; + $this->modifiedColumns[CreditNoteTableMap::CREATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setCreatedAt() + + /** + * Sets the value of [updated_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function setUpdatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->updated_at !== null || $dt !== null) { + if ($dt !== $this->updated_at) { + $this->updated_at = $dt; + $this->modifiedColumns[CreditNoteTableMap::UPDATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setUpdatedAt() + + /** + * Indicates whether the columns in this object are only set to default values. + * + * This method can be used in conjunction with isModified() to indicate whether an object is both + * modified _and_ has some values set which are non-default. + * + * @return boolean Whether the columns in this object are only been set with default values. + */ + public function hasOnlyDefaultValues() + { + if ($this->total_price !== '0.000000') { + return false; + } + + if ($this->total_price_with_tax !== '0.000000') { + return false; + } + + if ($this->discount_without_tax !== '0.000000') { + return false; + } + + if ($this->discount_with_tax !== '0.000000') { + return false; + } + + if ($this->allow_partial_use !== true) { + return false; + } + + // otherwise, everything was equal, so return TRUE + return true; + } // hasOnlyDefaultValues() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (0-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param array $row The row returned by DataFetcher->fetch(). + * @param int $startcol 0-based offset column which indicates which restultset column to start with. + * @param boolean $rehydrate Whether this object is being re-hydrated from the database. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM) + { + try { + + + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CreditNoteTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; + $this->id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CreditNoteTableMap::translateFieldName('Ref', TableMap::TYPE_PHPNAME, $indexType)]; + $this->ref = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CreditNoteTableMap::translateFieldName('InvoiceRef', TableMap::TYPE_PHPNAME, $indexType)]; + $this->invoice_ref = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CreditNoteTableMap::translateFieldName('InvoiceAddressId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->invoice_address_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CreditNoteTableMap::translateFieldName('InvoiceDate', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->invoice_date = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CreditNoteTableMap::translateFieldName('OrderId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->order_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CreditNoteTableMap::translateFieldName('CustomerId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->customer_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CreditNoteTableMap::translateFieldName('ParentId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->parent_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CreditNoteTableMap::translateFieldName('TypeId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->type_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : CreditNoteTableMap::translateFieldName('StatusId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->status_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : CreditNoteTableMap::translateFieldName('CurrencyId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->currency_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : CreditNoteTableMap::translateFieldName('CurrencyRate', TableMap::TYPE_PHPNAME, $indexType)]; + $this->currency_rate = (null !== $col) ? (double) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 12 + $startcol : CreditNoteTableMap::translateFieldName('TotalPrice', TableMap::TYPE_PHPNAME, $indexType)]; + $this->total_price = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : CreditNoteTableMap::translateFieldName('TotalPriceWithTax', TableMap::TYPE_PHPNAME, $indexType)]; + $this->total_price_with_tax = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : CreditNoteTableMap::translateFieldName('DiscountWithoutTax', TableMap::TYPE_PHPNAME, $indexType)]; + $this->discount_without_tax = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 15 + $startcol : CreditNoteTableMap::translateFieldName('DiscountWithTax', TableMap::TYPE_PHPNAME, $indexType)]; + $this->discount_with_tax = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 16 + $startcol : CreditNoteTableMap::translateFieldName('AllowPartialUse', TableMap::TYPE_PHPNAME, $indexType)]; + $this->allow_partial_use = (null !== $col) ? (boolean) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 17 + $startcol : CreditNoteTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 18 + $startcol : CreditNoteTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + $this->resetModified(); + + $this->setNew(false); + + if ($rehydrate) { + $this->ensureConsistency(); + } + + return $startcol + 19; // 19 = CreditNoteTableMap::NUM_HYDRATE_COLUMNS. + + } catch (Exception $e) { + throw new PropelException("Error populating \CreditNote\Model\CreditNote object", 0, $e); + } + } + + /** + * Checks and repairs the internal consistency of the object. + * + * This method is executed after an already-instantiated object is re-hydrated + * from the database. It exists to check any foreign keys to make sure that + * the objects related to the current object are correct based on foreign key. + * + * You can override this method in the stub class, but you should always invoke + * the base method from the overridden method (i.e. parent::ensureConsistency()), + * in case your model changes. + * + * @throws PropelException + */ + public function ensureConsistency() + { + if ($this->aCreditNoteAddress !== null && $this->invoice_address_id !== $this->aCreditNoteAddress->getId()) { + $this->aCreditNoteAddress = null; + } + if ($this->aOrder !== null && $this->order_id !== $this->aOrder->getId()) { + $this->aOrder = null; + } + if ($this->aCustomer !== null && $this->customer_id !== $this->aCustomer->getId()) { + $this->aCustomer = null; + } + if ($this->aCreditNoteRelatedByParentId !== null && $this->parent_id !== $this->aCreditNoteRelatedByParentId->getId()) { + $this->aCreditNoteRelatedByParentId = null; + } + if ($this->aCreditNoteType !== null && $this->type_id !== $this->aCreditNoteType->getId()) { + $this->aCreditNoteType = null; + } + if ($this->aCreditNoteStatus !== null && $this->status_id !== $this->aCreditNoteStatus->getId()) { + $this->aCreditNoteStatus = null; + } + if ($this->aCurrency !== null && $this->currency_id !== $this->aCurrency->getId()) { + $this->aCurrency = null; + } + } // ensureConsistency + + /** + * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. + * + * This will only work if the object has been saved and has a valid primary key set. + * + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @return void + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + */ + public function reload($deep = false, ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("Cannot reload a deleted object."); + } + + if ($this->isNew()) { + throw new PropelException("Cannot reload an unsaved object."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CreditNoteTableMap::DATABASE_NAME); + } + + // We don't need to alter the object instance pool; we're just modifying this instance + // already in the pool. + + $dataFetcher = ChildCreditNoteQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con); + $row = $dataFetcher->fetch(); + $dataFetcher->close(); + if (!$row) { + throw new PropelException('Cannot find matching row in the database to reload object values.'); + } + $this->hydrate($row, 0, true, $dataFetcher->getIndexType()); // rehydrate + + if ($deep) { // also de-associate any related objects? + + $this->aOrder = null; + $this->aCustomer = null; + $this->aCreditNoteRelatedByParentId = null; + $this->aCreditNoteType = null; + $this->aCreditNoteStatus = null; + $this->aCurrency = null; + $this->aCreditNoteAddress = null; + $this->collCreditNotesRelatedById = null; + + $this->collOrderCreditNotes = null; + + $this->collCartCreditNotes = null; + + $this->collCreditNoteDetails = null; + + $this->collCreditNoteComments = null; + + } // if (deep) + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param ConnectionInterface $con + * @return void + * @throws PropelException + * @see CreditNote::setDeleted() + * @see CreditNote::isDeleted() + */ + public function delete(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + try { + $deleteQuery = ChildCreditNoteQuery::create() + ->filterByPrimaryKey($this->getPrimaryKey()); + $ret = $this->preDelete($con); + if ($ret) { + $deleteQuery->delete($con); + $this->postDelete($con); + $con->commit(); + $this->setDeleted(true); + } else { + $con->commit(); + } + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Persists this object to the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All modified related objects will also be persisted in the doSave() + * method. This method wraps all precipitate database operations in a + * single transaction. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() + */ + public function save(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + $isInsert = $this->isNew(); + try { + $ret = $this->preSave($con); + if ($isInsert) { + $ret = $ret && $this->preInsert($con); + // timestampable behavior + if (!$this->isColumnModified(CreditNoteTableMap::CREATED_AT)) { + $this->setCreatedAt(time()); + } + if (!$this->isColumnModified(CreditNoteTableMap::UPDATED_AT)) { + $this->setUpdatedAt(time()); + } + } else { + $ret = $ret && $this->preUpdate($con); + // timestampable behavior + if ($this->isModified() && !$this->isColumnModified(CreditNoteTableMap::UPDATED_AT)) { + $this->setUpdatedAt(time()); + } + } + if ($ret) { + $affectedRows = $this->doSave($con); + if ($isInsert) { + $this->postInsert($con); + } else { + $this->postUpdate($con); + } + $this->postSave($con); + CreditNoteTableMap::addInstanceToPool($this); + } else { + $affectedRows = 0; + } + $con->commit(); + + return $affectedRows; + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Performs the work of inserting or updating the row in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() + */ + protected function doSave(ConnectionInterface $con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + // We call the save method on the following object(s) if they + // were passed to this object by their corresponding set + // method. This object relates to these object(s) by a + // foreign key reference. + + if ($this->aOrder !== null) { + if ($this->aOrder->isModified() || $this->aOrder->isNew()) { + $affectedRows += $this->aOrder->save($con); + } + $this->setOrder($this->aOrder); + } + + if ($this->aCustomer !== null) { + if ($this->aCustomer->isModified() || $this->aCustomer->isNew()) { + $affectedRows += $this->aCustomer->save($con); + } + $this->setCustomer($this->aCustomer); + } + + if ($this->aCreditNoteRelatedByParentId !== null) { + if ($this->aCreditNoteRelatedByParentId->isModified() || $this->aCreditNoteRelatedByParentId->isNew()) { + $affectedRows += $this->aCreditNoteRelatedByParentId->save($con); + } + $this->setCreditNoteRelatedByParentId($this->aCreditNoteRelatedByParentId); + } + + if ($this->aCreditNoteType !== null) { + if ($this->aCreditNoteType->isModified() || $this->aCreditNoteType->isNew()) { + $affectedRows += $this->aCreditNoteType->save($con); + } + $this->setCreditNoteType($this->aCreditNoteType); + } + + if ($this->aCreditNoteStatus !== null) { + if ($this->aCreditNoteStatus->isModified() || $this->aCreditNoteStatus->isNew()) { + $affectedRows += $this->aCreditNoteStatus->save($con); + } + $this->setCreditNoteStatus($this->aCreditNoteStatus); + } + + if ($this->aCurrency !== null) { + if ($this->aCurrency->isModified() || $this->aCurrency->isNew()) { + $affectedRows += $this->aCurrency->save($con); + } + $this->setCurrency($this->aCurrency); + } + + if ($this->aCreditNoteAddress !== null) { + if ($this->aCreditNoteAddress->isModified() || $this->aCreditNoteAddress->isNew()) { + $affectedRows += $this->aCreditNoteAddress->save($con); + } + $this->setCreditNoteAddress($this->aCreditNoteAddress); + } + + if ($this->isNew() || $this->isModified()) { + // persist changes + if ($this->isNew()) { + $this->doInsert($con); + } else { + $this->doUpdate($con); + } + $affectedRows += 1; + $this->resetModified(); + } + + if ($this->creditNotesRelatedByIdScheduledForDeletion !== null) { + if (!$this->creditNotesRelatedByIdScheduledForDeletion->isEmpty()) { + foreach ($this->creditNotesRelatedByIdScheduledForDeletion as $creditNoteRelatedById) { + // need to save related object because we set the relation to null + $creditNoteRelatedById->save($con); + } + $this->creditNotesRelatedByIdScheduledForDeletion = null; + } + } + + if ($this->collCreditNotesRelatedById !== null) { + foreach ($this->collCreditNotesRelatedById as $referrerFK) { + if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) { + $affectedRows += $referrerFK->save($con); + } + } + } + + if ($this->orderCreditNotesScheduledForDeletion !== null) { + if (!$this->orderCreditNotesScheduledForDeletion->isEmpty()) { + \CreditNote\Model\OrderCreditNoteQuery::create() + ->filterByPrimaryKeys($this->orderCreditNotesScheduledForDeletion->getPrimaryKeys(false)) + ->delete($con); + $this->orderCreditNotesScheduledForDeletion = null; + } + } + + if ($this->collOrderCreditNotes !== null) { + foreach ($this->collOrderCreditNotes as $referrerFK) { + if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) { + $affectedRows += $referrerFK->save($con); + } + } + } + + if ($this->cartCreditNotesScheduledForDeletion !== null) { + if (!$this->cartCreditNotesScheduledForDeletion->isEmpty()) { + \CreditNote\Model\CartCreditNoteQuery::create() + ->filterByPrimaryKeys($this->cartCreditNotesScheduledForDeletion->getPrimaryKeys(false)) + ->delete($con); + $this->cartCreditNotesScheduledForDeletion = null; + } + } + + if ($this->collCartCreditNotes !== null) { + foreach ($this->collCartCreditNotes as $referrerFK) { + if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) { + $affectedRows += $referrerFK->save($con); + } + } + } + + if ($this->creditNoteDetailsScheduledForDeletion !== null) { + if (!$this->creditNoteDetailsScheduledForDeletion->isEmpty()) { + \CreditNote\Model\CreditNoteDetailQuery::create() + ->filterByPrimaryKeys($this->creditNoteDetailsScheduledForDeletion->getPrimaryKeys(false)) + ->delete($con); + $this->creditNoteDetailsScheduledForDeletion = null; + } + } + + if ($this->collCreditNoteDetails !== null) { + foreach ($this->collCreditNoteDetails as $referrerFK) { + if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) { + $affectedRows += $referrerFK->save($con); + } + } + } + + if ($this->creditNoteCommentsScheduledForDeletion !== null) { + if (!$this->creditNoteCommentsScheduledForDeletion->isEmpty()) { + \CreditNote\Model\CreditNoteCommentQuery::create() + ->filterByPrimaryKeys($this->creditNoteCommentsScheduledForDeletion->getPrimaryKeys(false)) + ->delete($con); + $this->creditNoteCommentsScheduledForDeletion = null; + } + } + + if ($this->collCreditNoteComments !== null) { + foreach ($this->collCreditNoteComments as $referrerFK) { + if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) { + $affectedRows += $referrerFK->save($con); + } + } + } + + $this->alreadyInSave = false; + + } + + return $affectedRows; + } // doSave() + + /** + * Insert the row in the database. + * + * @param ConnectionInterface $con + * + * @throws PropelException + * @see doSave() + */ + protected function doInsert(ConnectionInterface $con) + { + $modifiedColumns = array(); + $index = 0; + + $this->modifiedColumns[CreditNoteTableMap::ID] = true; + if (null !== $this->id) { + throw new PropelException('Cannot insert a value for auto-increment primary key (' . CreditNoteTableMap::ID . ')'); + } + + // check the columns in natural order for more readable SQL queries + if ($this->isColumnModified(CreditNoteTableMap::ID)) { + $modifiedColumns[':p' . $index++] = 'ID'; + } + if ($this->isColumnModified(CreditNoteTableMap::REF)) { + $modifiedColumns[':p' . $index++] = 'REF'; + } + if ($this->isColumnModified(CreditNoteTableMap::INVOICE_REF)) { + $modifiedColumns[':p' . $index++] = 'INVOICE_REF'; + } + if ($this->isColumnModified(CreditNoteTableMap::INVOICE_ADDRESS_ID)) { + $modifiedColumns[':p' . $index++] = 'INVOICE_ADDRESS_ID'; + } + if ($this->isColumnModified(CreditNoteTableMap::INVOICE_DATE)) { + $modifiedColumns[':p' . $index++] = 'INVOICE_DATE'; + } + if ($this->isColumnModified(CreditNoteTableMap::ORDER_ID)) { + $modifiedColumns[':p' . $index++] = 'ORDER_ID'; + } + if ($this->isColumnModified(CreditNoteTableMap::CUSTOMER_ID)) { + $modifiedColumns[':p' . $index++] = 'CUSTOMER_ID'; + } + if ($this->isColumnModified(CreditNoteTableMap::PARENT_ID)) { + $modifiedColumns[':p' . $index++] = 'PARENT_ID'; + } + if ($this->isColumnModified(CreditNoteTableMap::TYPE_ID)) { + $modifiedColumns[':p' . $index++] = 'TYPE_ID'; + } + if ($this->isColumnModified(CreditNoteTableMap::STATUS_ID)) { + $modifiedColumns[':p' . $index++] = 'STATUS_ID'; + } + if ($this->isColumnModified(CreditNoteTableMap::CURRENCY_ID)) { + $modifiedColumns[':p' . $index++] = 'CURRENCY_ID'; + } + if ($this->isColumnModified(CreditNoteTableMap::CURRENCY_RATE)) { + $modifiedColumns[':p' . $index++] = 'CURRENCY_RATE'; + } + if ($this->isColumnModified(CreditNoteTableMap::TOTAL_PRICE)) { + $modifiedColumns[':p' . $index++] = 'TOTAL_PRICE'; + } + if ($this->isColumnModified(CreditNoteTableMap::TOTAL_PRICE_WITH_TAX)) { + $modifiedColumns[':p' . $index++] = 'TOTAL_PRICE_WITH_TAX'; + } + if ($this->isColumnModified(CreditNoteTableMap::DISCOUNT_WITHOUT_TAX)) { + $modifiedColumns[':p' . $index++] = 'DISCOUNT_WITHOUT_TAX'; + } + if ($this->isColumnModified(CreditNoteTableMap::DISCOUNT_WITH_TAX)) { + $modifiedColumns[':p' . $index++] = 'DISCOUNT_WITH_TAX'; + } + if ($this->isColumnModified(CreditNoteTableMap::ALLOW_PARTIAL_USE)) { + $modifiedColumns[':p' . $index++] = 'ALLOW_PARTIAL_USE'; + } + if ($this->isColumnModified(CreditNoteTableMap::CREATED_AT)) { + $modifiedColumns[':p' . $index++] = 'CREATED_AT'; + } + if ($this->isColumnModified(CreditNoteTableMap::UPDATED_AT)) { + $modifiedColumns[':p' . $index++] = 'UPDATED_AT'; + } + + $sql = sprintf( + 'INSERT INTO credit_note (%s) VALUES (%s)', + implode(', ', $modifiedColumns), + implode(', ', array_keys($modifiedColumns)) + ); + + try { + $stmt = $con->prepare($sql); + foreach ($modifiedColumns as $identifier => $columnName) { + switch ($columnName) { + case 'ID': + $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT); + break; + case 'REF': + $stmt->bindValue($identifier, $this->ref, PDO::PARAM_STR); + break; + case 'INVOICE_REF': + $stmt->bindValue($identifier, $this->invoice_ref, PDO::PARAM_STR); + break; + case 'INVOICE_ADDRESS_ID': + $stmt->bindValue($identifier, $this->invoice_address_id, PDO::PARAM_INT); + break; + case 'INVOICE_DATE': + $stmt->bindValue($identifier, $this->invoice_date ? $this->invoice_date->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + case 'ORDER_ID': + $stmt->bindValue($identifier, $this->order_id, PDO::PARAM_INT); + break; + case 'CUSTOMER_ID': + $stmt->bindValue($identifier, $this->customer_id, PDO::PARAM_INT); + break; + case 'PARENT_ID': + $stmt->bindValue($identifier, $this->parent_id, PDO::PARAM_INT); + break; + case 'TYPE_ID': + $stmt->bindValue($identifier, $this->type_id, PDO::PARAM_INT); + break; + case 'STATUS_ID': + $stmt->bindValue($identifier, $this->status_id, PDO::PARAM_INT); + break; + case 'CURRENCY_ID': + $stmt->bindValue($identifier, $this->currency_id, PDO::PARAM_INT); + break; + case 'CURRENCY_RATE': + $stmt->bindValue($identifier, $this->currency_rate, PDO::PARAM_STR); + break; + case 'TOTAL_PRICE': + $stmt->bindValue($identifier, $this->total_price, PDO::PARAM_STR); + break; + case 'TOTAL_PRICE_WITH_TAX': + $stmt->bindValue($identifier, $this->total_price_with_tax, PDO::PARAM_STR); + break; + case 'DISCOUNT_WITHOUT_TAX': + $stmt->bindValue($identifier, $this->discount_without_tax, PDO::PARAM_STR); + break; + case 'DISCOUNT_WITH_TAX': + $stmt->bindValue($identifier, $this->discount_with_tax, PDO::PARAM_STR); + break; + case 'ALLOW_PARTIAL_USE': + $stmt->bindValue($identifier, (int) $this->allow_partial_use, PDO::PARAM_INT); + break; + case 'CREATED_AT': + $stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + case 'UPDATED_AT': + $stmt->bindValue($identifier, $this->updated_at ? $this->updated_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + } + } + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e); + } + + try { + $pk = $con->lastInsertId(); + } catch (Exception $e) { + throw new PropelException('Unable to get autoincrement id.', 0, $e); + } + $this->setId($pk); + + $this->setNew(false); + } + + /** + * Update the row in the database. + * + * @param ConnectionInterface $con + * + * @return Integer Number of updated rows + * @see doSave() + */ + protected function doUpdate(ConnectionInterface $con) + { + $selectCriteria = $this->buildPkeyCriteria(); + $valuesCriteria = $this->buildCriteria(); + + return $selectCriteria->doUpdate($valuesCriteria, $con); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. + */ + public function getByName($name, $type = TableMap::TYPE_PHPNAME) + { + $pos = CreditNoteTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + $field = $this->getByPosition($pos); + + return $field; + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch ($pos) { + case 0: + return $this->getId(); + break; + case 1: + return $this->getRef(); + break; + case 2: + return $this->getInvoiceRef(); + break; + case 3: + return $this->getInvoiceAddressId(); + break; + case 4: + return $this->getInvoiceDate(); + break; + case 5: + return $this->getOrderId(); + break; + case 6: + return $this->getCustomerId(); + break; + case 7: + return $this->getParentId(); + break; + case 8: + return $this->getTypeId(); + break; + case 9: + return $this->getStatusId(); + break; + case 10: + return $this->getCurrencyId(); + break; + case 11: + return $this->getCurrencyRate(); + break; + case 12: + return $this->getTotalPrice(); + break; + case 13: + return $this->getTotalPriceWithTax(); + break; + case 14: + return $this->getDiscountWithoutTax(); + break; + case 15: + return $this->getDiscountWithTax(); + break; + case 16: + return $this->getAllowPartialUse(); + break; + case 17: + return $this->getCreatedAt(); + break; + case 18: + return $this->getUpdatedAt(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * + * @return array an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false) + { + if (isset($alreadyDumpedObjects['CreditNote'][$this->getPrimaryKey()])) { + return '*RECURSION*'; + } + $alreadyDumpedObjects['CreditNote'][$this->getPrimaryKey()] = true; + $keys = CreditNoteTableMap::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getId(), + $keys[1] => $this->getRef(), + $keys[2] => $this->getInvoiceRef(), + $keys[3] => $this->getInvoiceAddressId(), + $keys[4] => $this->getInvoiceDate(), + $keys[5] => $this->getOrderId(), + $keys[6] => $this->getCustomerId(), + $keys[7] => $this->getParentId(), + $keys[8] => $this->getTypeId(), + $keys[9] => $this->getStatusId(), + $keys[10] => $this->getCurrencyId(), + $keys[11] => $this->getCurrencyRate(), + $keys[12] => $this->getTotalPrice(), + $keys[13] => $this->getTotalPriceWithTax(), + $keys[14] => $this->getDiscountWithoutTax(), + $keys[15] => $this->getDiscountWithTax(), + $keys[16] => $this->getAllowPartialUse(), + $keys[17] => $this->getCreatedAt(), + $keys[18] => $this->getUpdatedAt(), + ); + $virtualColumns = $this->virtualColumns; + foreach ($virtualColumns as $key => $virtualColumn) { + $result[$key] = $virtualColumn; + } + + if ($includeForeignObjects) { + if (null !== $this->aOrder) { + $result['Order'] = $this->aOrder->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + if (null !== $this->aCustomer) { + $result['Customer'] = $this->aCustomer->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + if (null !== $this->aCreditNoteRelatedByParentId) { + $result['CreditNoteRelatedByParentId'] = $this->aCreditNoteRelatedByParentId->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + if (null !== $this->aCreditNoteType) { + $result['CreditNoteType'] = $this->aCreditNoteType->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + if (null !== $this->aCreditNoteStatus) { + $result['CreditNoteStatus'] = $this->aCreditNoteStatus->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + if (null !== $this->aCurrency) { + $result['Currency'] = $this->aCurrency->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + if (null !== $this->aCreditNoteAddress) { + $result['CreditNoteAddress'] = $this->aCreditNoteAddress->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + if (null !== $this->collCreditNotesRelatedById) { + $result['CreditNotesRelatedById'] = $this->collCreditNotesRelatedById->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); + } + if (null !== $this->collOrderCreditNotes) { + $result['OrderCreditNotes'] = $this->collOrderCreditNotes->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); + } + if (null !== $this->collCartCreditNotes) { + $result['CartCreditNotes'] = $this->collCartCreditNotes->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); + } + if (null !== $this->collCreditNoteDetails) { + $result['CreditNoteDetails'] = $this->collCreditNoteDetails->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); + } + if (null !== $this->collCreditNoteComments) { + $result['CreditNoteComments'] = $this->collCreditNoteComments->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); + } + } + + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return void + */ + public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) + { + $pos = CreditNoteTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch ($pos) { + case 0: + $this->setId($value); + break; + case 1: + $this->setRef($value); + break; + case 2: + $this->setInvoiceRef($value); + break; + case 3: + $this->setInvoiceAddressId($value); + break; + case 4: + $this->setInvoiceDate($value); + break; + case 5: + $this->setOrderId($value); + break; + case 6: + $this->setCustomerId($value); + break; + case 7: + $this->setParentId($value); + break; + case 8: + $this->setTypeId($value); + break; + case 9: + $this->setStatusId($value); + break; + case 10: + $this->setCurrencyId($value); + break; + case 11: + $this->setCurrencyRate($value); + break; + case 12: + $this->setTotalPrice($value); + break; + case 13: + $this->setTotalPriceWithTax($value); + break; + case 14: + $this->setDiscountWithoutTax($value); + break; + case 15: + $this->setDiscountWithTax($value); + break; + case 16: + $this->setAllowPartialUse($value); + break; + case 17: + $this->setCreatedAt($value); + break; + case 18: + $this->setUpdatedAt($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * The default key type is the column's TableMap::TYPE_PHPNAME. + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) + { + $keys = CreditNoteTableMap::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setRef($arr[$keys[1]]); + if (array_key_exists($keys[2], $arr)) $this->setInvoiceRef($arr[$keys[2]]); + if (array_key_exists($keys[3], $arr)) $this->setInvoiceAddressId($arr[$keys[3]]); + if (array_key_exists($keys[4], $arr)) $this->setInvoiceDate($arr[$keys[4]]); + if (array_key_exists($keys[5], $arr)) $this->setOrderId($arr[$keys[5]]); + if (array_key_exists($keys[6], $arr)) $this->setCustomerId($arr[$keys[6]]); + if (array_key_exists($keys[7], $arr)) $this->setParentId($arr[$keys[7]]); + if (array_key_exists($keys[8], $arr)) $this->setTypeId($arr[$keys[8]]); + if (array_key_exists($keys[9], $arr)) $this->setStatusId($arr[$keys[9]]); + if (array_key_exists($keys[10], $arr)) $this->setCurrencyId($arr[$keys[10]]); + if (array_key_exists($keys[11], $arr)) $this->setCurrencyRate($arr[$keys[11]]); + if (array_key_exists($keys[12], $arr)) $this->setTotalPrice($arr[$keys[12]]); + if (array_key_exists($keys[13], $arr)) $this->setTotalPriceWithTax($arr[$keys[13]]); + if (array_key_exists($keys[14], $arr)) $this->setDiscountWithoutTax($arr[$keys[14]]); + if (array_key_exists($keys[15], $arr)) $this->setDiscountWithTax($arr[$keys[15]]); + if (array_key_exists($keys[16], $arr)) $this->setAllowPartialUse($arr[$keys[16]]); + if (array_key_exists($keys[17], $arr)) $this->setCreatedAt($arr[$keys[17]]); + if (array_key_exists($keys[18], $arr)) $this->setUpdatedAt($arr[$keys[18]]); + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(CreditNoteTableMap::DATABASE_NAME); + + if ($this->isColumnModified(CreditNoteTableMap::ID)) $criteria->add(CreditNoteTableMap::ID, $this->id); + if ($this->isColumnModified(CreditNoteTableMap::REF)) $criteria->add(CreditNoteTableMap::REF, $this->ref); + if ($this->isColumnModified(CreditNoteTableMap::INVOICE_REF)) $criteria->add(CreditNoteTableMap::INVOICE_REF, $this->invoice_ref); + if ($this->isColumnModified(CreditNoteTableMap::INVOICE_ADDRESS_ID)) $criteria->add(CreditNoteTableMap::INVOICE_ADDRESS_ID, $this->invoice_address_id); + if ($this->isColumnModified(CreditNoteTableMap::INVOICE_DATE)) $criteria->add(CreditNoteTableMap::INVOICE_DATE, $this->invoice_date); + if ($this->isColumnModified(CreditNoteTableMap::ORDER_ID)) $criteria->add(CreditNoteTableMap::ORDER_ID, $this->order_id); + if ($this->isColumnModified(CreditNoteTableMap::CUSTOMER_ID)) $criteria->add(CreditNoteTableMap::CUSTOMER_ID, $this->customer_id); + if ($this->isColumnModified(CreditNoteTableMap::PARENT_ID)) $criteria->add(CreditNoteTableMap::PARENT_ID, $this->parent_id); + if ($this->isColumnModified(CreditNoteTableMap::TYPE_ID)) $criteria->add(CreditNoteTableMap::TYPE_ID, $this->type_id); + if ($this->isColumnModified(CreditNoteTableMap::STATUS_ID)) $criteria->add(CreditNoteTableMap::STATUS_ID, $this->status_id); + if ($this->isColumnModified(CreditNoteTableMap::CURRENCY_ID)) $criteria->add(CreditNoteTableMap::CURRENCY_ID, $this->currency_id); + if ($this->isColumnModified(CreditNoteTableMap::CURRENCY_RATE)) $criteria->add(CreditNoteTableMap::CURRENCY_RATE, $this->currency_rate); + if ($this->isColumnModified(CreditNoteTableMap::TOTAL_PRICE)) $criteria->add(CreditNoteTableMap::TOTAL_PRICE, $this->total_price); + if ($this->isColumnModified(CreditNoteTableMap::TOTAL_PRICE_WITH_TAX)) $criteria->add(CreditNoteTableMap::TOTAL_PRICE_WITH_TAX, $this->total_price_with_tax); + if ($this->isColumnModified(CreditNoteTableMap::DISCOUNT_WITHOUT_TAX)) $criteria->add(CreditNoteTableMap::DISCOUNT_WITHOUT_TAX, $this->discount_without_tax); + if ($this->isColumnModified(CreditNoteTableMap::DISCOUNT_WITH_TAX)) $criteria->add(CreditNoteTableMap::DISCOUNT_WITH_TAX, $this->discount_with_tax); + if ($this->isColumnModified(CreditNoteTableMap::ALLOW_PARTIAL_USE)) $criteria->add(CreditNoteTableMap::ALLOW_PARTIAL_USE, $this->allow_partial_use); + if ($this->isColumnModified(CreditNoteTableMap::CREATED_AT)) $criteria->add(CreditNoteTableMap::CREATED_AT, $this->created_at); + if ($this->isColumnModified(CreditNoteTableMap::UPDATED_AT)) $criteria->add(CreditNoteTableMap::UPDATED_AT, $this->updated_at); + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(CreditNoteTableMap::DATABASE_NAME); + $criteria->add(CreditNoteTableMap::ID, $this->id); + + return $criteria; + } + + /** + * Returns the primary key for this object (row). + * @return int + */ + public function getPrimaryKey() + { + return $this->getId(); + } + + /** + * Generic method to set the primary key (id column). + * + * @param int $key Primary key. + * @return void + */ + public function setPrimaryKey($key) + { + $this->setId($key); + } + + /** + * Returns true if the primary key for this object is null. + * @return boolean + */ + public function isPrimaryKeyNull() + { + + return null === $this->getId(); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of \CreditNote\Model\CreditNote (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false, $makeNew = true) + { + $copyObj->setRef($this->getRef()); + $copyObj->setInvoiceRef($this->getInvoiceRef()); + $copyObj->setInvoiceAddressId($this->getInvoiceAddressId()); + $copyObj->setInvoiceDate($this->getInvoiceDate()); + $copyObj->setOrderId($this->getOrderId()); + $copyObj->setCustomerId($this->getCustomerId()); + $copyObj->setParentId($this->getParentId()); + $copyObj->setTypeId($this->getTypeId()); + $copyObj->setStatusId($this->getStatusId()); + $copyObj->setCurrencyId($this->getCurrencyId()); + $copyObj->setCurrencyRate($this->getCurrencyRate()); + $copyObj->setTotalPrice($this->getTotalPrice()); + $copyObj->setTotalPriceWithTax($this->getTotalPriceWithTax()); + $copyObj->setDiscountWithoutTax($this->getDiscountWithoutTax()); + $copyObj->setDiscountWithTax($this->getDiscountWithTax()); + $copyObj->setAllowPartialUse($this->getAllowPartialUse()); + $copyObj->setCreatedAt($this->getCreatedAt()); + $copyObj->setUpdatedAt($this->getUpdatedAt()); + + if ($deepCopy) { + // important: temporarily setNew(false) because this affects the behavior of + // the getter/setter methods for fkey referrer objects. + $copyObj->setNew(false); + + foreach ($this->getCreditNotesRelatedById() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCreditNoteRelatedById($relObj->copy($deepCopy)); + } + } + + foreach ($this->getOrderCreditNotes() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addOrderCreditNote($relObj->copy($deepCopy)); + } + } + + foreach ($this->getCartCreditNotes() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCartCreditNote($relObj->copy($deepCopy)); + } + } + + foreach ($this->getCreditNoteDetails() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCreditNoteDetail($relObj->copy($deepCopy)); + } + } + + foreach ($this->getCreditNoteComments() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCreditNoteComment($relObj->copy($deepCopy)); + } + } + + } // if ($deepCopy) + + if ($makeNew) { + $copyObj->setNew(true); + $copyObj->setId(NULL); // this is a auto-increment column, so set to default value + } + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \CreditNote\Model\CreditNote Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + + return $copyObj; + } + + /** + * Declares an association between this object and a ChildOrder object. + * + * @param ChildOrder $v + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + * @throws PropelException + */ + public function setOrder(ChildOrder $v = null) + { + if ($v === null) { + $this->setOrderId(NULL); + } else { + $this->setOrderId($v->getId()); + } + + $this->aOrder = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildOrder object, it will not be re-added. + if ($v !== null) { + $v->addCreditNote($this); + } + + + return $this; + } + + + /** + * Get the associated ChildOrder object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildOrder The associated ChildOrder object. + * @throws PropelException + */ + public function getOrder(ConnectionInterface $con = null) + { + if ($this->aOrder === null && ($this->order_id !== null)) { + $this->aOrder = OrderQuery::create()->findPk($this->order_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aOrder->addCreditNotes($this); + */ + } + + return $this->aOrder; + } + + /** + * Declares an association between this object and a ChildCustomer object. + * + * @param ChildCustomer $v + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + * @throws PropelException + */ + public function setCustomer(ChildCustomer $v = null) + { + if ($v === null) { + $this->setCustomerId(NULL); + } else { + $this->setCustomerId($v->getId()); + } + + $this->aCustomer = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCustomer object, it will not be re-added. + if ($v !== null) { + $v->addCreditNote($this); + } + + + return $this; + } + + + /** + * Get the associated ChildCustomer object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCustomer The associated ChildCustomer object. + * @throws PropelException + */ + public function getCustomer(ConnectionInterface $con = null) + { + if ($this->aCustomer === null && ($this->customer_id !== null)) { + $this->aCustomer = CustomerQuery::create()->findPk($this->customer_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCustomer->addCreditNotes($this); + */ + } + + return $this->aCustomer; + } + + /** + * Declares an association between this object and a ChildCreditNote object. + * + * @param ChildCreditNote $v + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + * @throws PropelException + */ + public function setCreditNoteRelatedByParentId(ChildCreditNote $v = null) + { + if ($v === null) { + $this->setParentId(NULL); + } else { + $this->setParentId($v->getId()); + } + + $this->aCreditNoteRelatedByParentId = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCreditNote object, it will not be re-added. + if ($v !== null) { + $v->addCreditNoteRelatedById($this); + } + + + return $this; + } + + + /** + * Get the associated ChildCreditNote object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCreditNote The associated ChildCreditNote object. + * @throws PropelException + */ + public function getCreditNoteRelatedByParentId(ConnectionInterface $con = null) + { + if ($this->aCreditNoteRelatedByParentId === null && ($this->parent_id !== null)) { + $this->aCreditNoteRelatedByParentId = ChildCreditNoteQuery::create()->findPk($this->parent_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCreditNoteRelatedByParentId->addCreditNotesRelatedById($this); + */ + } + + return $this->aCreditNoteRelatedByParentId; + } + + /** + * Declares an association between this object and a ChildCreditNoteType object. + * + * @param ChildCreditNoteType $v + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + * @throws PropelException + */ + public function setCreditNoteType(ChildCreditNoteType $v = null) + { + if ($v === null) { + $this->setTypeId(NULL); + } else { + $this->setTypeId($v->getId()); + } + + $this->aCreditNoteType = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCreditNoteType object, it will not be re-added. + if ($v !== null) { + $v->addCreditNote($this); + } + + + return $this; + } + + + /** + * Get the associated ChildCreditNoteType object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCreditNoteType The associated ChildCreditNoteType object. + * @throws PropelException + */ + public function getCreditNoteType(ConnectionInterface $con = null) + { + if ($this->aCreditNoteType === null && ($this->type_id !== null)) { + $this->aCreditNoteType = ChildCreditNoteTypeQuery::create()->findPk($this->type_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCreditNoteType->addCreditNotes($this); + */ + } + + return $this->aCreditNoteType; + } + + /** + * Declares an association between this object and a ChildCreditNoteStatus object. + * + * @param ChildCreditNoteStatus $v + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + * @throws PropelException + */ + public function setCreditNoteStatus(ChildCreditNoteStatus $v = null) + { + if ($v === null) { + $this->setStatusId(NULL); + } else { + $this->setStatusId($v->getId()); + } + + $this->aCreditNoteStatus = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCreditNoteStatus object, it will not be re-added. + if ($v !== null) { + $v->addCreditNote($this); + } + + + return $this; + } + + + /** + * Get the associated ChildCreditNoteStatus object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCreditNoteStatus The associated ChildCreditNoteStatus object. + * @throws PropelException + */ + public function getCreditNoteStatus(ConnectionInterface $con = null) + { + if ($this->aCreditNoteStatus === null && ($this->status_id !== null)) { + $this->aCreditNoteStatus = ChildCreditNoteStatusQuery::create()->findPk($this->status_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCreditNoteStatus->addCreditNotes($this); + */ + } + + return $this->aCreditNoteStatus; + } + + /** + * Declares an association between this object and a ChildCurrency object. + * + * @param ChildCurrency $v + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + * @throws PropelException + */ + public function setCurrency(ChildCurrency $v = null) + { + if ($v === null) { + $this->setCurrencyId(NULL); + } else { + $this->setCurrencyId($v->getId()); + } + + $this->aCurrency = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCurrency object, it will not be re-added. + if ($v !== null) { + $v->addCreditNote($this); + } + + + return $this; + } + + + /** + * Get the associated ChildCurrency object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCurrency The associated ChildCurrency object. + * @throws PropelException + */ + public function getCurrency(ConnectionInterface $con = null) + { + if ($this->aCurrency === null && ($this->currency_id !== null)) { + $this->aCurrency = CurrencyQuery::create()->findPk($this->currency_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCurrency->addCreditNotes($this); + */ + } + + return $this->aCurrency; + } + + /** + * Declares an association between this object and a ChildCreditNoteAddress object. + * + * @param ChildCreditNoteAddress $v + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + * @throws PropelException + */ + public function setCreditNoteAddress(ChildCreditNoteAddress $v = null) + { + if ($v === null) { + $this->setInvoiceAddressId(NULL); + } else { + $this->setInvoiceAddressId($v->getId()); + } + + $this->aCreditNoteAddress = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCreditNoteAddress object, it will not be re-added. + if ($v !== null) { + $v->addCreditNote($this); + } + + + return $this; + } + + + /** + * Get the associated ChildCreditNoteAddress object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCreditNoteAddress The associated ChildCreditNoteAddress object. + * @throws PropelException + */ + public function getCreditNoteAddress(ConnectionInterface $con = null) + { + if ($this->aCreditNoteAddress === null && ($this->invoice_address_id !== null)) { + $this->aCreditNoteAddress = ChildCreditNoteAddressQuery::create()->findPk($this->invoice_address_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCreditNoteAddress->addCreditNotes($this); + */ + } + + return $this->aCreditNoteAddress; + } + + + /** + * Initializes a collection based on the name of a relation. + * Avoids crafting an 'init[$relationName]s' method name + * that wouldn't work when StandardEnglishPluralizer is used. + * + * @param string $relationName The name of the relation to initialize + * @return void + */ + public function initRelation($relationName) + { + if ('CreditNoteRelatedById' == $relationName) { + return $this->initCreditNotesRelatedById(); + } + if ('OrderCreditNote' == $relationName) { + return $this->initOrderCreditNotes(); + } + if ('CartCreditNote' == $relationName) { + return $this->initCartCreditNotes(); + } + if ('CreditNoteDetail' == $relationName) { + return $this->initCreditNoteDetails(); + } + if ('CreditNoteComment' == $relationName) { + return $this->initCreditNoteComments(); + } + } + + /** + * Clears out the collCreditNotesRelatedById collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCreditNotesRelatedById() + */ + public function clearCreditNotesRelatedById() + { + $this->collCreditNotesRelatedById = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Reset is the collCreditNotesRelatedById collection loaded partially. + */ + public function resetPartialCreditNotesRelatedById($v = true) + { + $this->collCreditNotesRelatedByIdPartial = $v; + } + + /** + * Initializes the collCreditNotesRelatedById collection. + * + * By default this just sets the collCreditNotesRelatedById collection to an empty array (like clearcollCreditNotesRelatedById()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty + * + * @return void + */ + public function initCreditNotesRelatedById($overrideExisting = true) + { + if (null !== $this->collCreditNotesRelatedById && !$overrideExisting) { + return; + } + $this->collCreditNotesRelatedById = new ObjectCollection(); + $this->collCreditNotesRelatedById->setModel('\CreditNote\Model\CreditNote'); + } + + /** + * Gets an array of ChildCreditNote objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this ChildCreditNote is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + * @throws PropelException + */ + public function getCreditNotesRelatedById($criteria = null, ConnectionInterface $con = null) + { + $partial = $this->collCreditNotesRelatedByIdPartial && !$this->isNew(); + if (null === $this->collCreditNotesRelatedById || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCreditNotesRelatedById) { + // return empty collection + $this->initCreditNotesRelatedById(); + } else { + $collCreditNotesRelatedById = ChildCreditNoteQuery::create(null, $criteria) + ->filterByCreditNoteRelatedByParentId($this) + ->find($con); + + if (null !== $criteria) { + if (false !== $this->collCreditNotesRelatedByIdPartial && count($collCreditNotesRelatedById)) { + $this->initCreditNotesRelatedById(false); + + foreach ($collCreditNotesRelatedById as $obj) { + if (false == $this->collCreditNotesRelatedById->contains($obj)) { + $this->collCreditNotesRelatedById->append($obj); + } + } + + $this->collCreditNotesRelatedByIdPartial = true; + } + + reset($collCreditNotesRelatedById); + + return $collCreditNotesRelatedById; + } + + if ($partial && $this->collCreditNotesRelatedById) { + foreach ($this->collCreditNotesRelatedById as $obj) { + if ($obj->isNew()) { + $collCreditNotesRelatedById[] = $obj; + } + } + } + + $this->collCreditNotesRelatedById = $collCreditNotesRelatedById; + $this->collCreditNotesRelatedByIdPartial = false; + } + } + + return $this->collCreditNotesRelatedById; + } + + /** + * Sets a collection of CreditNoteRelatedById objects related by a one-to-many relationship + * to the current object. + * It will also schedule objects for deletion based on a diff between old objects (aka persisted) + * and new objects from the given Propel collection. + * + * @param Collection $creditNotesRelatedById A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCreditNote The current object (for fluent API support) + */ + public function setCreditNotesRelatedById(Collection $creditNotesRelatedById, ConnectionInterface $con = null) + { + $creditNotesRelatedByIdToDelete = $this->getCreditNotesRelatedById(new Criteria(), $con)->diff($creditNotesRelatedById); + + + $this->creditNotesRelatedByIdScheduledForDeletion = $creditNotesRelatedByIdToDelete; + + foreach ($creditNotesRelatedByIdToDelete as $creditNoteRelatedByIdRemoved) { + $creditNoteRelatedByIdRemoved->setCreditNoteRelatedByParentId(null); + } + + $this->collCreditNotesRelatedById = null; + foreach ($creditNotesRelatedById as $creditNoteRelatedById) { + $this->addCreditNoteRelatedById($creditNoteRelatedById); + } + + $this->collCreditNotesRelatedById = $creditNotesRelatedById; + $this->collCreditNotesRelatedByIdPartial = false; + + return $this; + } + + /** + * Returns the number of related CreditNote objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CreditNote objects. + * @throws PropelException + */ + public function countCreditNotesRelatedById(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) + { + $partial = $this->collCreditNotesRelatedByIdPartial && !$this->isNew(); + if (null === $this->collCreditNotesRelatedById || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCreditNotesRelatedById) { + return 0; + } + + if ($partial && !$criteria) { + return count($this->getCreditNotesRelatedById()); + } + + $query = ChildCreditNoteQuery::create(null, $criteria); + if ($distinct) { + $query->distinct(); + } + + return $query + ->filterByCreditNoteRelatedByParentId($this) + ->count($con); + } + + return count($this->collCreditNotesRelatedById); + } + + /** + * Method called to associate a ChildCreditNote object to this object + * through the ChildCreditNote foreign key attribute. + * + * @param ChildCreditNote $l ChildCreditNote + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function addCreditNoteRelatedById(ChildCreditNote $l) + { + if ($this->collCreditNotesRelatedById === null) { + $this->initCreditNotesRelatedById(); + $this->collCreditNotesRelatedByIdPartial = true; + } + + if (!in_array($l, $this->collCreditNotesRelatedById->getArrayCopy(), true)) { // only add it if the **same** object is not already associated + $this->doAddCreditNoteRelatedById($l); + } + + return $this; + } + + /** + * @param CreditNoteRelatedById $creditNoteRelatedById The creditNoteRelatedById object to add. + */ + protected function doAddCreditNoteRelatedById($creditNoteRelatedById) + { + $this->collCreditNotesRelatedById[]= $creditNoteRelatedById; + $creditNoteRelatedById->setCreditNoteRelatedByParentId($this); + } + + /** + * @param CreditNoteRelatedById $creditNoteRelatedById The creditNoteRelatedById object to remove. + * @return ChildCreditNote The current object (for fluent API support) + */ + public function removeCreditNoteRelatedById($creditNoteRelatedById) + { + if ($this->getCreditNotesRelatedById()->contains($creditNoteRelatedById)) { + $this->collCreditNotesRelatedById->remove($this->collCreditNotesRelatedById->search($creditNoteRelatedById)); + if (null === $this->creditNotesRelatedByIdScheduledForDeletion) { + $this->creditNotesRelatedByIdScheduledForDeletion = clone $this->collCreditNotesRelatedById; + $this->creditNotesRelatedByIdScheduledForDeletion->clear(); + } + $this->creditNotesRelatedByIdScheduledForDeletion[]= $creditNoteRelatedById; + $creditNoteRelatedById->setCreditNoteRelatedByParentId(null); + } + + return $this; + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNote is new, it will return + * an empty collection; or if this CreditNote has previously + * been saved, it will retrieve related CreditNotesRelatedById from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNote. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesRelatedByIdJoinOrder($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('Order', $joinBehavior); + + return $this->getCreditNotesRelatedById($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNote is new, it will return + * an empty collection; or if this CreditNote has previously + * been saved, it will retrieve related CreditNotesRelatedById from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNote. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesRelatedByIdJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('Customer', $joinBehavior); + + return $this->getCreditNotesRelatedById($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNote is new, it will return + * an empty collection; or if this CreditNote has previously + * been saved, it will retrieve related CreditNotesRelatedById from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNote. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesRelatedByIdJoinCreditNoteType($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('CreditNoteType', $joinBehavior); + + return $this->getCreditNotesRelatedById($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNote is new, it will return + * an empty collection; or if this CreditNote has previously + * been saved, it will retrieve related CreditNotesRelatedById from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNote. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesRelatedByIdJoinCreditNoteStatus($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('CreditNoteStatus', $joinBehavior); + + return $this->getCreditNotesRelatedById($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNote is new, it will return + * an empty collection; or if this CreditNote has previously + * been saved, it will retrieve related CreditNotesRelatedById from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNote. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesRelatedByIdJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('Currency', $joinBehavior); + + return $this->getCreditNotesRelatedById($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNote is new, it will return + * an empty collection; or if this CreditNote has previously + * been saved, it will retrieve related CreditNotesRelatedById from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNote. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesRelatedByIdJoinCreditNoteAddress($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('CreditNoteAddress', $joinBehavior); + + return $this->getCreditNotesRelatedById($query, $con); + } + + /** + * Clears out the collOrderCreditNotes collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addOrderCreditNotes() + */ + public function clearOrderCreditNotes() + { + $this->collOrderCreditNotes = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Reset is the collOrderCreditNotes collection loaded partially. + */ + public function resetPartialOrderCreditNotes($v = true) + { + $this->collOrderCreditNotesPartial = $v; + } + + /** + * Initializes the collOrderCreditNotes collection. + * + * By default this just sets the collOrderCreditNotes collection to an empty array (like clearcollOrderCreditNotes()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty + * + * @return void + */ + public function initOrderCreditNotes($overrideExisting = true) + { + if (null !== $this->collOrderCreditNotes && !$overrideExisting) { + return; + } + $this->collOrderCreditNotes = new ObjectCollection(); + $this->collOrderCreditNotes->setModel('\CreditNote\Model\OrderCreditNote'); + } + + /** + * Gets an array of ChildOrderCreditNote objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this ChildCreditNote is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @return Collection|ChildOrderCreditNote[] List of ChildOrderCreditNote objects + * @throws PropelException + */ + public function getOrderCreditNotes($criteria = null, ConnectionInterface $con = null) + { + $partial = $this->collOrderCreditNotesPartial && !$this->isNew(); + if (null === $this->collOrderCreditNotes || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collOrderCreditNotes) { + // return empty collection + $this->initOrderCreditNotes(); + } else { + $collOrderCreditNotes = ChildOrderCreditNoteQuery::create(null, $criteria) + ->filterByCreditNote($this) + ->find($con); + + if (null !== $criteria) { + if (false !== $this->collOrderCreditNotesPartial && count($collOrderCreditNotes)) { + $this->initOrderCreditNotes(false); + + foreach ($collOrderCreditNotes as $obj) { + if (false == $this->collOrderCreditNotes->contains($obj)) { + $this->collOrderCreditNotes->append($obj); + } + } + + $this->collOrderCreditNotesPartial = true; + } + + reset($collOrderCreditNotes); + + return $collOrderCreditNotes; + } + + if ($partial && $this->collOrderCreditNotes) { + foreach ($this->collOrderCreditNotes as $obj) { + if ($obj->isNew()) { + $collOrderCreditNotes[] = $obj; + } + } + } + + $this->collOrderCreditNotes = $collOrderCreditNotes; + $this->collOrderCreditNotesPartial = false; + } + } + + return $this->collOrderCreditNotes; + } + + /** + * Sets a collection of OrderCreditNote objects related by a one-to-many relationship + * to the current object. + * It will also schedule objects for deletion based on a diff between old objects (aka persisted) + * and new objects from the given Propel collection. + * + * @param Collection $orderCreditNotes A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCreditNote The current object (for fluent API support) + */ + public function setOrderCreditNotes(Collection $orderCreditNotes, ConnectionInterface $con = null) + { + $orderCreditNotesToDelete = $this->getOrderCreditNotes(new Criteria(), $con)->diff($orderCreditNotes); + + + //since at least one column in the foreign key is at the same time a PK + //we can not just set a PK to NULL in the lines below. We have to store + //a backup of all values, so we are able to manipulate these items based on the onDelete value later. + $this->orderCreditNotesScheduledForDeletion = clone $orderCreditNotesToDelete; + + foreach ($orderCreditNotesToDelete as $orderCreditNoteRemoved) { + $orderCreditNoteRemoved->setCreditNote(null); + } + + $this->collOrderCreditNotes = null; + foreach ($orderCreditNotes as $orderCreditNote) { + $this->addOrderCreditNote($orderCreditNote); + } + + $this->collOrderCreditNotes = $orderCreditNotes; + $this->collOrderCreditNotesPartial = false; + + return $this; + } + + /** + * Returns the number of related OrderCreditNote objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related OrderCreditNote objects. + * @throws PropelException + */ + public function countOrderCreditNotes(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) + { + $partial = $this->collOrderCreditNotesPartial && !$this->isNew(); + if (null === $this->collOrderCreditNotes || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collOrderCreditNotes) { + return 0; + } + + if ($partial && !$criteria) { + return count($this->getOrderCreditNotes()); + } + + $query = ChildOrderCreditNoteQuery::create(null, $criteria); + if ($distinct) { + $query->distinct(); + } + + return $query + ->filterByCreditNote($this) + ->count($con); + } + + return count($this->collOrderCreditNotes); + } + + /** + * Method called to associate a ChildOrderCreditNote object to this object + * through the ChildOrderCreditNote foreign key attribute. + * + * @param ChildOrderCreditNote $l ChildOrderCreditNote + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function addOrderCreditNote(ChildOrderCreditNote $l) + { + if ($this->collOrderCreditNotes === null) { + $this->initOrderCreditNotes(); + $this->collOrderCreditNotesPartial = true; + } + + if (!in_array($l, $this->collOrderCreditNotes->getArrayCopy(), true)) { // only add it if the **same** object is not already associated + $this->doAddOrderCreditNote($l); + } + + return $this; + } + + /** + * @param OrderCreditNote $orderCreditNote The orderCreditNote object to add. + */ + protected function doAddOrderCreditNote($orderCreditNote) + { + $this->collOrderCreditNotes[]= $orderCreditNote; + $orderCreditNote->setCreditNote($this); + } + + /** + * @param OrderCreditNote $orderCreditNote The orderCreditNote object to remove. + * @return ChildCreditNote The current object (for fluent API support) + */ + public function removeOrderCreditNote($orderCreditNote) + { + if ($this->getOrderCreditNotes()->contains($orderCreditNote)) { + $this->collOrderCreditNotes->remove($this->collOrderCreditNotes->search($orderCreditNote)); + if (null === $this->orderCreditNotesScheduledForDeletion) { + $this->orderCreditNotesScheduledForDeletion = clone $this->collOrderCreditNotes; + $this->orderCreditNotesScheduledForDeletion->clear(); + } + $this->orderCreditNotesScheduledForDeletion[]= clone $orderCreditNote; + $orderCreditNote->setCreditNote(null); + } + + return $this; + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNote is new, it will return + * an empty collection; or if this CreditNote has previously + * been saved, it will retrieve related OrderCreditNotes from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNote. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildOrderCreditNote[] List of ChildOrderCreditNote objects + */ + public function getOrderCreditNotesJoinOrder($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildOrderCreditNoteQuery::create(null, $criteria); + $query->joinWith('Order', $joinBehavior); + + return $this->getOrderCreditNotes($query, $con); + } + + /** + * Clears out the collCartCreditNotes collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCartCreditNotes() + */ + public function clearCartCreditNotes() + { + $this->collCartCreditNotes = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Reset is the collCartCreditNotes collection loaded partially. + */ + public function resetPartialCartCreditNotes($v = true) + { + $this->collCartCreditNotesPartial = $v; + } + + /** + * Initializes the collCartCreditNotes collection. + * + * By default this just sets the collCartCreditNotes collection to an empty array (like clearcollCartCreditNotes()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty + * + * @return void + */ + public function initCartCreditNotes($overrideExisting = true) + { + if (null !== $this->collCartCreditNotes && !$overrideExisting) { + return; + } + $this->collCartCreditNotes = new ObjectCollection(); + $this->collCartCreditNotes->setModel('\CreditNote\Model\CartCreditNote'); + } + + /** + * Gets an array of ChildCartCreditNote objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this ChildCreditNote is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @return Collection|ChildCartCreditNote[] List of ChildCartCreditNote objects + * @throws PropelException + */ + public function getCartCreditNotes($criteria = null, ConnectionInterface $con = null) + { + $partial = $this->collCartCreditNotesPartial && !$this->isNew(); + if (null === $this->collCartCreditNotes || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCartCreditNotes) { + // return empty collection + $this->initCartCreditNotes(); + } else { + $collCartCreditNotes = ChildCartCreditNoteQuery::create(null, $criteria) + ->filterByCreditNote($this) + ->find($con); + + if (null !== $criteria) { + if (false !== $this->collCartCreditNotesPartial && count($collCartCreditNotes)) { + $this->initCartCreditNotes(false); + + foreach ($collCartCreditNotes as $obj) { + if (false == $this->collCartCreditNotes->contains($obj)) { + $this->collCartCreditNotes->append($obj); + } + } + + $this->collCartCreditNotesPartial = true; + } + + reset($collCartCreditNotes); + + return $collCartCreditNotes; + } + + if ($partial && $this->collCartCreditNotes) { + foreach ($this->collCartCreditNotes as $obj) { + if ($obj->isNew()) { + $collCartCreditNotes[] = $obj; + } + } + } + + $this->collCartCreditNotes = $collCartCreditNotes; + $this->collCartCreditNotesPartial = false; + } + } + + return $this->collCartCreditNotes; + } + + /** + * Sets a collection of CartCreditNote objects related by a one-to-many relationship + * to the current object. + * It will also schedule objects for deletion based on a diff between old objects (aka persisted) + * and new objects from the given Propel collection. + * + * @param Collection $cartCreditNotes A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCreditNote The current object (for fluent API support) + */ + public function setCartCreditNotes(Collection $cartCreditNotes, ConnectionInterface $con = null) + { + $cartCreditNotesToDelete = $this->getCartCreditNotes(new Criteria(), $con)->diff($cartCreditNotes); + + + //since at least one column in the foreign key is at the same time a PK + //we can not just set a PK to NULL in the lines below. We have to store + //a backup of all values, so we are able to manipulate these items based on the onDelete value later. + $this->cartCreditNotesScheduledForDeletion = clone $cartCreditNotesToDelete; + + foreach ($cartCreditNotesToDelete as $cartCreditNoteRemoved) { + $cartCreditNoteRemoved->setCreditNote(null); + } + + $this->collCartCreditNotes = null; + foreach ($cartCreditNotes as $cartCreditNote) { + $this->addCartCreditNote($cartCreditNote); + } + + $this->collCartCreditNotes = $cartCreditNotes; + $this->collCartCreditNotesPartial = false; + + return $this; + } + + /** + * Returns the number of related CartCreditNote objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CartCreditNote objects. + * @throws PropelException + */ + public function countCartCreditNotes(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) + { + $partial = $this->collCartCreditNotesPartial && !$this->isNew(); + if (null === $this->collCartCreditNotes || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCartCreditNotes) { + return 0; + } + + if ($partial && !$criteria) { + return count($this->getCartCreditNotes()); + } + + $query = ChildCartCreditNoteQuery::create(null, $criteria); + if ($distinct) { + $query->distinct(); + } + + return $query + ->filterByCreditNote($this) + ->count($con); + } + + return count($this->collCartCreditNotes); + } + + /** + * Method called to associate a ChildCartCreditNote object to this object + * through the ChildCartCreditNote foreign key attribute. + * + * @param ChildCartCreditNote $l ChildCartCreditNote + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function addCartCreditNote(ChildCartCreditNote $l) + { + if ($this->collCartCreditNotes === null) { + $this->initCartCreditNotes(); + $this->collCartCreditNotesPartial = true; + } + + if (!in_array($l, $this->collCartCreditNotes->getArrayCopy(), true)) { // only add it if the **same** object is not already associated + $this->doAddCartCreditNote($l); + } + + return $this; + } + + /** + * @param CartCreditNote $cartCreditNote The cartCreditNote object to add. + */ + protected function doAddCartCreditNote($cartCreditNote) + { + $this->collCartCreditNotes[]= $cartCreditNote; + $cartCreditNote->setCreditNote($this); + } + + /** + * @param CartCreditNote $cartCreditNote The cartCreditNote object to remove. + * @return ChildCreditNote The current object (for fluent API support) + */ + public function removeCartCreditNote($cartCreditNote) + { + if ($this->getCartCreditNotes()->contains($cartCreditNote)) { + $this->collCartCreditNotes->remove($this->collCartCreditNotes->search($cartCreditNote)); + if (null === $this->cartCreditNotesScheduledForDeletion) { + $this->cartCreditNotesScheduledForDeletion = clone $this->collCartCreditNotes; + $this->cartCreditNotesScheduledForDeletion->clear(); + } + $this->cartCreditNotesScheduledForDeletion[]= clone $cartCreditNote; + $cartCreditNote->setCreditNote(null); + } + + return $this; + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNote is new, it will return + * an empty collection; or if this CreditNote has previously + * been saved, it will retrieve related CartCreditNotes from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNote. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCartCreditNote[] List of ChildCartCreditNote objects + */ + public function getCartCreditNotesJoinCart($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCartCreditNoteQuery::create(null, $criteria); + $query->joinWith('Cart', $joinBehavior); + + return $this->getCartCreditNotes($query, $con); + } + + /** + * Clears out the collCreditNoteDetails collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCreditNoteDetails() + */ + public function clearCreditNoteDetails() + { + $this->collCreditNoteDetails = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Reset is the collCreditNoteDetails collection loaded partially. + */ + public function resetPartialCreditNoteDetails($v = true) + { + $this->collCreditNoteDetailsPartial = $v; + } + + /** + * Initializes the collCreditNoteDetails collection. + * + * By default this just sets the collCreditNoteDetails collection to an empty array (like clearcollCreditNoteDetails()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty + * + * @return void + */ + public function initCreditNoteDetails($overrideExisting = true) + { + if (null !== $this->collCreditNoteDetails && !$overrideExisting) { + return; + } + $this->collCreditNoteDetails = new ObjectCollection(); + $this->collCreditNoteDetails->setModel('\CreditNote\Model\CreditNoteDetail'); + } + + /** + * Gets an array of ChildCreditNoteDetail objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this ChildCreditNote is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @return Collection|ChildCreditNoteDetail[] List of ChildCreditNoteDetail objects + * @throws PropelException + */ + public function getCreditNoteDetails($criteria = null, ConnectionInterface $con = null) + { + $partial = $this->collCreditNoteDetailsPartial && !$this->isNew(); + if (null === $this->collCreditNoteDetails || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCreditNoteDetails) { + // return empty collection + $this->initCreditNoteDetails(); + } else { + $collCreditNoteDetails = ChildCreditNoteDetailQuery::create(null, $criteria) + ->filterByCreditNote($this) + ->find($con); + + if (null !== $criteria) { + if (false !== $this->collCreditNoteDetailsPartial && count($collCreditNoteDetails)) { + $this->initCreditNoteDetails(false); + + foreach ($collCreditNoteDetails as $obj) { + if (false == $this->collCreditNoteDetails->contains($obj)) { + $this->collCreditNoteDetails->append($obj); + } + } + + $this->collCreditNoteDetailsPartial = true; + } + + reset($collCreditNoteDetails); + + return $collCreditNoteDetails; + } + + if ($partial && $this->collCreditNoteDetails) { + foreach ($this->collCreditNoteDetails as $obj) { + if ($obj->isNew()) { + $collCreditNoteDetails[] = $obj; + } + } + } + + $this->collCreditNoteDetails = $collCreditNoteDetails; + $this->collCreditNoteDetailsPartial = false; + } + } + + return $this->collCreditNoteDetails; + } + + /** + * Sets a collection of CreditNoteDetail objects related by a one-to-many relationship + * to the current object. + * It will also schedule objects for deletion based on a diff between old objects (aka persisted) + * and new objects from the given Propel collection. + * + * @param Collection $creditNoteDetails A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCreditNote The current object (for fluent API support) + */ + public function setCreditNoteDetails(Collection $creditNoteDetails, ConnectionInterface $con = null) + { + $creditNoteDetailsToDelete = $this->getCreditNoteDetails(new Criteria(), $con)->diff($creditNoteDetails); + + + $this->creditNoteDetailsScheduledForDeletion = $creditNoteDetailsToDelete; + + foreach ($creditNoteDetailsToDelete as $creditNoteDetailRemoved) { + $creditNoteDetailRemoved->setCreditNote(null); + } + + $this->collCreditNoteDetails = null; + foreach ($creditNoteDetails as $creditNoteDetail) { + $this->addCreditNoteDetail($creditNoteDetail); + } + + $this->collCreditNoteDetails = $creditNoteDetails; + $this->collCreditNoteDetailsPartial = false; + + return $this; + } + + /** + * Returns the number of related CreditNoteDetail objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CreditNoteDetail objects. + * @throws PropelException + */ + public function countCreditNoteDetails(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) + { + $partial = $this->collCreditNoteDetailsPartial && !$this->isNew(); + if (null === $this->collCreditNoteDetails || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCreditNoteDetails) { + return 0; + } + + if ($partial && !$criteria) { + return count($this->getCreditNoteDetails()); + } + + $query = ChildCreditNoteDetailQuery::create(null, $criteria); + if ($distinct) { + $query->distinct(); + } + + return $query + ->filterByCreditNote($this) + ->count($con); + } + + return count($this->collCreditNoteDetails); + } + + /** + * Method called to associate a ChildCreditNoteDetail object to this object + * through the ChildCreditNoteDetail foreign key attribute. + * + * @param ChildCreditNoteDetail $l ChildCreditNoteDetail + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function addCreditNoteDetail(ChildCreditNoteDetail $l) + { + if ($this->collCreditNoteDetails === null) { + $this->initCreditNoteDetails(); + $this->collCreditNoteDetailsPartial = true; + } + + if (!in_array($l, $this->collCreditNoteDetails->getArrayCopy(), true)) { // only add it if the **same** object is not already associated + $this->doAddCreditNoteDetail($l); + } + + return $this; + } + + /** + * @param CreditNoteDetail $creditNoteDetail The creditNoteDetail object to add. + */ + protected function doAddCreditNoteDetail($creditNoteDetail) + { + $this->collCreditNoteDetails[]= $creditNoteDetail; + $creditNoteDetail->setCreditNote($this); + } + + /** + * @param CreditNoteDetail $creditNoteDetail The creditNoteDetail object to remove. + * @return ChildCreditNote The current object (for fluent API support) + */ + public function removeCreditNoteDetail($creditNoteDetail) + { + if ($this->getCreditNoteDetails()->contains($creditNoteDetail)) { + $this->collCreditNoteDetails->remove($this->collCreditNoteDetails->search($creditNoteDetail)); + if (null === $this->creditNoteDetailsScheduledForDeletion) { + $this->creditNoteDetailsScheduledForDeletion = clone $this->collCreditNoteDetails; + $this->creditNoteDetailsScheduledForDeletion->clear(); + } + $this->creditNoteDetailsScheduledForDeletion[]= clone $creditNoteDetail; + $creditNoteDetail->setCreditNote(null); + } + + return $this; + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNote is new, it will return + * an empty collection; or if this CreditNote has previously + * been saved, it will retrieve related CreditNoteDetails from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNote. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNoteDetail[] List of ChildCreditNoteDetail objects + */ + public function getCreditNoteDetailsJoinOrderProduct($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteDetailQuery::create(null, $criteria); + $query->joinWith('OrderProduct', $joinBehavior); + + return $this->getCreditNoteDetails($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNote is new, it will return + * an empty collection; or if this CreditNote has previously + * been saved, it will retrieve related CreditNoteDetails from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNote. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNoteDetail[] List of ChildCreditNoteDetail objects + */ + public function getCreditNoteDetailsJoinTaxRule($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteDetailQuery::create(null, $criteria); + $query->joinWith('TaxRule', $joinBehavior); + + return $this->getCreditNoteDetails($query, $con); + } + + /** + * Clears out the collCreditNoteComments collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCreditNoteComments() + */ + public function clearCreditNoteComments() + { + $this->collCreditNoteComments = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Reset is the collCreditNoteComments collection loaded partially. + */ + public function resetPartialCreditNoteComments($v = true) + { + $this->collCreditNoteCommentsPartial = $v; + } + + /** + * Initializes the collCreditNoteComments collection. + * + * By default this just sets the collCreditNoteComments collection to an empty array (like clearcollCreditNoteComments()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty + * + * @return void + */ + public function initCreditNoteComments($overrideExisting = true) + { + if (null !== $this->collCreditNoteComments && !$overrideExisting) { + return; + } + $this->collCreditNoteComments = new ObjectCollection(); + $this->collCreditNoteComments->setModel('\CreditNote\Model\CreditNoteComment'); + } + + /** + * Gets an array of ChildCreditNoteComment objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this ChildCreditNote is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @return Collection|ChildCreditNoteComment[] List of ChildCreditNoteComment objects + * @throws PropelException + */ + public function getCreditNoteComments($criteria = null, ConnectionInterface $con = null) + { + $partial = $this->collCreditNoteCommentsPartial && !$this->isNew(); + if (null === $this->collCreditNoteComments || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCreditNoteComments) { + // return empty collection + $this->initCreditNoteComments(); + } else { + $collCreditNoteComments = ChildCreditNoteCommentQuery::create(null, $criteria) + ->filterByCreditNote($this) + ->find($con); + + if (null !== $criteria) { + if (false !== $this->collCreditNoteCommentsPartial && count($collCreditNoteComments)) { + $this->initCreditNoteComments(false); + + foreach ($collCreditNoteComments as $obj) { + if (false == $this->collCreditNoteComments->contains($obj)) { + $this->collCreditNoteComments->append($obj); + } + } + + $this->collCreditNoteCommentsPartial = true; + } + + reset($collCreditNoteComments); + + return $collCreditNoteComments; + } + + if ($partial && $this->collCreditNoteComments) { + foreach ($this->collCreditNoteComments as $obj) { + if ($obj->isNew()) { + $collCreditNoteComments[] = $obj; + } + } + } + + $this->collCreditNoteComments = $collCreditNoteComments; + $this->collCreditNoteCommentsPartial = false; + } + } + + return $this->collCreditNoteComments; + } + + /** + * Sets a collection of CreditNoteComment objects related by a one-to-many relationship + * to the current object. + * It will also schedule objects for deletion based on a diff between old objects (aka persisted) + * and new objects from the given Propel collection. + * + * @param Collection $creditNoteComments A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCreditNote The current object (for fluent API support) + */ + public function setCreditNoteComments(Collection $creditNoteComments, ConnectionInterface $con = null) + { + $creditNoteCommentsToDelete = $this->getCreditNoteComments(new Criteria(), $con)->diff($creditNoteComments); + + + $this->creditNoteCommentsScheduledForDeletion = $creditNoteCommentsToDelete; + + foreach ($creditNoteCommentsToDelete as $creditNoteCommentRemoved) { + $creditNoteCommentRemoved->setCreditNote(null); + } + + $this->collCreditNoteComments = null; + foreach ($creditNoteComments as $creditNoteComment) { + $this->addCreditNoteComment($creditNoteComment); + } + + $this->collCreditNoteComments = $creditNoteComments; + $this->collCreditNoteCommentsPartial = false; + + return $this; + } + + /** + * Returns the number of related CreditNoteComment objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CreditNoteComment objects. + * @throws PropelException + */ + public function countCreditNoteComments(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) + { + $partial = $this->collCreditNoteCommentsPartial && !$this->isNew(); + if (null === $this->collCreditNoteComments || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCreditNoteComments) { + return 0; + } + + if ($partial && !$criteria) { + return count($this->getCreditNoteComments()); + } + + $query = ChildCreditNoteCommentQuery::create(null, $criteria); + if ($distinct) { + $query->distinct(); + } + + return $query + ->filterByCreditNote($this) + ->count($con); + } + + return count($this->collCreditNoteComments); + } + + /** + * Method called to associate a ChildCreditNoteComment object to this object + * through the ChildCreditNoteComment foreign key attribute. + * + * @param ChildCreditNoteComment $l ChildCreditNoteComment + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + */ + public function addCreditNoteComment(ChildCreditNoteComment $l) + { + if ($this->collCreditNoteComments === null) { + $this->initCreditNoteComments(); + $this->collCreditNoteCommentsPartial = true; + } + + if (!in_array($l, $this->collCreditNoteComments->getArrayCopy(), true)) { // only add it if the **same** object is not already associated + $this->doAddCreditNoteComment($l); + } + + return $this; + } + + /** + * @param CreditNoteComment $creditNoteComment The creditNoteComment object to add. + */ + protected function doAddCreditNoteComment($creditNoteComment) + { + $this->collCreditNoteComments[]= $creditNoteComment; + $creditNoteComment->setCreditNote($this); + } + + /** + * @param CreditNoteComment $creditNoteComment The creditNoteComment object to remove. + * @return ChildCreditNote The current object (for fluent API support) + */ + public function removeCreditNoteComment($creditNoteComment) + { + if ($this->getCreditNoteComments()->contains($creditNoteComment)) { + $this->collCreditNoteComments->remove($this->collCreditNoteComments->search($creditNoteComment)); + if (null === $this->creditNoteCommentsScheduledForDeletion) { + $this->creditNoteCommentsScheduledForDeletion = clone $this->collCreditNoteComments; + $this->creditNoteCommentsScheduledForDeletion->clear(); + } + $this->creditNoteCommentsScheduledForDeletion[]= clone $creditNoteComment; + $creditNoteComment->setCreditNote(null); + } + + return $this; + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNote is new, it will return + * an empty collection; or if this CreditNote has previously + * been saved, it will retrieve related CreditNoteComments from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNote. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNoteComment[] List of ChildCreditNoteComment objects + */ + public function getCreditNoteCommentsJoinAdmin($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteCommentQuery::create(null, $criteria); + $query->joinWith('Admin', $joinBehavior); + + return $this->getCreditNoteComments($query, $con); + } + + /** + * Clears the current object and sets all attributes to their default values + */ + public function clear() + { + $this->id = null; + $this->ref = null; + $this->invoice_ref = null; + $this->invoice_address_id = null; + $this->invoice_date = null; + $this->order_id = null; + $this->customer_id = null; + $this->parent_id = null; + $this->type_id = null; + $this->status_id = null; + $this->currency_id = null; + $this->currency_rate = null; + $this->total_price = null; + $this->total_price_with_tax = null; + $this->discount_without_tax = null; + $this->discount_with_tax = null; + $this->allow_partial_use = null; + $this->created_at = null; + $this->updated_at = null; + $this->alreadyInSave = false; + $this->clearAllReferences(); + $this->applyDefaultValues(); + $this->resetModified(); + $this->setNew(true); + $this->setDeleted(false); + } + + /** + * Resets all references to other model objects or collections of model objects. + * + * This method is a user-space workaround for PHP's inability to garbage collect + * objects with circular references (even in PHP 5.3). This is currently necessary + * when using Propel in certain daemon or large-volume/high-memory operations. + * + * @param boolean $deep Whether to also clear the references on all referrer objects. + */ + public function clearAllReferences($deep = false) + { + if ($deep) { + if ($this->collCreditNotesRelatedById) { + foreach ($this->collCreditNotesRelatedById as $o) { + $o->clearAllReferences($deep); + } + } + if ($this->collOrderCreditNotes) { + foreach ($this->collOrderCreditNotes as $o) { + $o->clearAllReferences($deep); + } + } + if ($this->collCartCreditNotes) { + foreach ($this->collCartCreditNotes as $o) { + $o->clearAllReferences($deep); + } + } + if ($this->collCreditNoteDetails) { + foreach ($this->collCreditNoteDetails as $o) { + $o->clearAllReferences($deep); + } + } + if ($this->collCreditNoteComments) { + foreach ($this->collCreditNoteComments as $o) { + $o->clearAllReferences($deep); + } + } + } // if ($deep) + + $this->collCreditNotesRelatedById = null; + $this->collOrderCreditNotes = null; + $this->collCartCreditNotes = null; + $this->collCreditNoteDetails = null; + $this->collCreditNoteComments = null; + $this->aOrder = null; + $this->aCustomer = null; + $this->aCreditNoteRelatedByParentId = null; + $this->aCreditNoteType = null; + $this->aCreditNoteStatus = null; + $this->aCurrency = null; + $this->aCreditNoteAddress = null; + } + + /** + * Return the string representation of this object + * + * @return string + */ + public function __toString() + { + return (string) $this->exportTo(CreditNoteTableMap::DEFAULT_STRING_FORMAT); + } + + // timestampable behavior + + /** + * Mark the current object so that the update date doesn't get updated during next save + * + * @return ChildCreditNote The current object (for fluent API support) + */ + public function keepUpdateDateUnchanged() + { + $this->modifiedColumns[CreditNoteTableMap::UPDATED_AT] = true; + + return $this; + } + + /** + * Code to be run before persisting the object + * @param ConnectionInterface $con + * @return boolean + */ + public function preSave(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after persisting the object + * @param ConnectionInterface $con + */ + public function postSave(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before inserting to database + * @param ConnectionInterface $con + * @return boolean + */ + public function preInsert(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after inserting to database + * @param ConnectionInterface $con + */ + public function postInsert(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before updating the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preUpdate(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after updating the object in database + * @param ConnectionInterface $con + */ + public function postUpdate(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before deleting the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preDelete(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after deleting the object in database + * @param ConnectionInterface $con + */ + public function postDelete(ConnectionInterface $con = null) + { + + } + + + /** + * Derived method to catches calls to undefined methods. + * + * Provides magic import/export method support (fromXML()/toXML(), fromYAML()/toYAML(), etc.). + * Allows to define default __call() behavior if you overwrite __call() + * + * @param string $name + * @param mixed $params + * + * @return array|string + */ + public function __call($name, $params) + { + if (0 === strpos($name, 'get')) { + $virtualColumn = substr($name, 3); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + + $virtualColumn = lcfirst($virtualColumn); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + } + + if (0 === strpos($name, 'from')) { + $format = substr($name, 4); + + return $this->importFrom($format, reset($params)); + } + + if (0 === strpos($name, 'to')) { + $format = substr($name, 2); + $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true; + + return $this->exportTo($format, $includeLazyLoadColumns); + } + + throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name)); + } + +} diff --git a/local/modules/CreditNote/Model/Base/CreditNoteAddress.php b/local/modules/CreditNote/Model/Base/CreditNoteAddress.php new file mode 100644 index 000000000..756f50cdd --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CreditNoteAddress.php @@ -0,0 +1,2654 @@ +modifiedColumns; + } + + /** + * Has specified column been modified? + * + * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID + * @return boolean True if $col has been modified. + */ + public function isColumnModified($col) + { + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); + } + + /** + * Get the columns that have been modified in this object. + * @return array A unique list of the modified column names for this object. + */ + public function getModifiedColumns() + { + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; + } + + /** + * Returns whether the object has ever been saved. This will + * be false, if the object was retrieved from storage or was created + * and then saved. + * + * @return boolean true, if the object has never been persisted. + */ + public function isNew() + { + return $this->new; + } + + /** + * Setter for the isNew attribute. This method will be called + * by Propel-generated children and objects. + * + * @param boolean $b the state of the object. + */ + public function setNew($b) + { + $this->new = (Boolean) $b; + } + + /** + * Whether this object has been deleted. + * @return boolean The deleted state of this object. + */ + public function isDeleted() + { + return $this->deleted; + } + + /** + * Specify whether this object has been deleted. + * @param boolean $b The deleted state of this object. + * @return void + */ + public function setDeleted($b) + { + $this->deleted = (Boolean) $b; + } + + /** + * Sets the modified state for the object to be false. + * @param string $col If supplied, only the specified column is reset. + * @return void + */ + public function resetModified($col = null) + { + if (null !== $col) { + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); + } + } else { + $this->modifiedColumns = array(); + } + } + + /** + * Compares this with another CreditNoteAddress instance. If + * obj is an instance of CreditNoteAddress, delegates to + * equals(CreditNoteAddress). Otherwise, returns false. + * + * @param mixed $obj The object to compare to. + * @return boolean Whether equal to the object specified. + */ + public function equals($obj) + { + $thisclazz = get_class($this); + if (!is_object($obj) || !($obj instanceof $thisclazz)) { + return false; + } + + if ($this === $obj) { + return true; + } + + if (null === $this->getPrimaryKey() + || null === $obj->getPrimaryKey()) { + return false; + } + + return $this->getPrimaryKey() === $obj->getPrimaryKey(); + } + + /** + * If the primary key is not null, return the hashcode of the + * primary key. Otherwise, return the hash code of the object. + * + * @return int Hashcode + */ + public function hashCode() + { + if (null !== $this->getPrimaryKey()) { + return crc32(serialize($this->getPrimaryKey())); + } + + return crc32(serialize(clone $this)); + } + + /** + * Get the associative array of the virtual columns in this object + * + * @return array + */ + public function getVirtualColumns() + { + return $this->virtualColumns; + } + + /** + * Checks the existence of a virtual column in this object + * + * @param string $name The virtual column name + * @return boolean + */ + public function hasVirtualColumn($name) + { + return array_key_exists($name, $this->virtualColumns); + } + + /** + * Get the value of a virtual column in this object + * + * @param string $name The virtual column name + * @return mixed + * + * @throws PropelException + */ + public function getVirtualColumn($name) + { + if (!$this->hasVirtualColumn($name)) { + throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name)); + } + + return $this->virtualColumns[$name]; + } + + /** + * Set the value of a virtual column in this object + * + * @param string $name The virtual column name + * @param mixed $value The value to give to the virtual column + * + * @return CreditNoteAddress The current object, for fluid interface + */ + public function setVirtualColumn($name, $value) + { + $this->virtualColumns[$name] = $value; + + return $this; + } + + /** + * Logs a message using Propel::log(). + * + * @param string $msg + * @param int $priority One of the Propel::LOG_* logging levels + * @return boolean + */ + protected function log($msg, $priority = Propel::LOG_INFO) + { + return Propel::log(get_class($this) . ': ' . $msg, $priority); + } + + /** + * Populate the current object from a string, using a given parser format + * + * $book = new Book(); + * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, + * or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param string $data The source data to import from + * + * @return CreditNoteAddress The current object, for fluid interface + */ + public function importFrom($parser, $data) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + $this->fromArray($parser->toArray($data), TableMap::TYPE_PHPNAME); + + return $this; + } + + /** + * Export the current object properties to a string, using a given parser format + * + * $book = BookQuery::create()->findPk(9012); + * echo $book->exportTo('JSON'); + * => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE. + * @return string The exported data + */ + public function exportTo($parser, $includeLazyLoadColumns = true) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true)); + } + + /** + * Clean up internal collections prior to serializing + * Avoids recursive loops that turn into segmentation faults when serializing + */ + public function __sleep() + { + $this->clearAllReferences(); + + return array_keys(get_object_vars($this)); + } + + /** + * Get the [id] column value. + * + * @return int + */ + public function getId() + { + + return $this->id; + } + + /** + * Get the [customer_title_id] column value. + * + * @return int + */ + public function getCustomerTitleId() + { + + return $this->customer_title_id; + } + + /** + * Get the [company] column value. + * + * @return string + */ + public function getCompany() + { + + return $this->company; + } + + /** + * Get the [firstname] column value. + * + * @return string + */ + public function getFirstname() + { + + return $this->firstname; + } + + /** + * Get the [lastname] column value. + * + * @return string + */ + public function getLastname() + { + + return $this->lastname; + } + + /** + * Get the [address1] column value. + * + * @return string + */ + public function getAddress1() + { + + return $this->address1; + } + + /** + * Get the [address2] column value. + * + * @return string + */ + public function getAddress2() + { + + return $this->address2; + } + + /** + * Get the [address3] column value. + * + * @return string + */ + public function getAddress3() + { + + return $this->address3; + } + + /** + * Get the [zipcode] column value. + * + * @return string + */ + public function getZipcode() + { + + return $this->zipcode; + } + + /** + * Get the [city] column value. + * + * @return string + */ + public function getCity() + { + + return $this->city; + } + + /** + * Get the [phone] column value. + * + * @return string + */ + public function getPhone() + { + + return $this->phone; + } + + /** + * Get the [cellphone] column value. + * + * @return string + */ + public function getCellphone() + { + + return $this->cellphone; + } + + /** + * Get the [country_id] column value. + * + * @return int + */ + public function getCountryId() + { + + return $this->country_id; + } + + /** + * Get the [state_id] column value. + * + * @return int + */ + public function getStateId() + { + + return $this->state_id; + } + + /** + * Get the [optionally formatted] temporal [created_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getCreatedAt($format = NULL) + { + if ($format === null) { + return $this->created_at; + } else { + return $this->created_at instanceof \DateTime ? $this->created_at->format($format) : null; + } + } + + /** + * Get the [optionally formatted] temporal [updated_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getUpdatedAt($format = NULL) + { + if ($format === null) { + return $this->updated_at; + } else { + return $this->updated_at instanceof \DateTime ? $this->updated_at->format($format) : null; + } + } + + /** + * Set the value of [id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteAddress The current object (for fluent API support) + */ + public function setId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->id !== $v) { + $this->id = $v; + $this->modifiedColumns[CreditNoteAddressTableMap::ID] = true; + } + + + return $this; + } // setId() + + /** + * Set the value of [customer_title_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteAddress The current object (for fluent API support) + */ + public function setCustomerTitleId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->customer_title_id !== $v) { + $this->customer_title_id = $v; + $this->modifiedColumns[CreditNoteAddressTableMap::CUSTOMER_TITLE_ID] = true; + } + + if ($this->aCustomerTitle !== null && $this->aCustomerTitle->getId() !== $v) { + $this->aCustomerTitle = null; + } + + + return $this; + } // setCustomerTitleId() + + /** + * Set the value of [company] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteAddress The current object (for fluent API support) + */ + public function setCompany($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->company !== $v) { + $this->company = $v; + $this->modifiedColumns[CreditNoteAddressTableMap::COMPANY] = true; + } + + + return $this; + } // setCompany() + + /** + * Set the value of [firstname] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteAddress The current object (for fluent API support) + */ + public function setFirstname($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->firstname !== $v) { + $this->firstname = $v; + $this->modifiedColumns[CreditNoteAddressTableMap::FIRSTNAME] = true; + } + + + return $this; + } // setFirstname() + + /** + * Set the value of [lastname] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteAddress The current object (for fluent API support) + */ + public function setLastname($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->lastname !== $v) { + $this->lastname = $v; + $this->modifiedColumns[CreditNoteAddressTableMap::LASTNAME] = true; + } + + + return $this; + } // setLastname() + + /** + * Set the value of [address1] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteAddress The current object (for fluent API support) + */ + public function setAddress1($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->address1 !== $v) { + $this->address1 = $v; + $this->modifiedColumns[CreditNoteAddressTableMap::ADDRESS1] = true; + } + + + return $this; + } // setAddress1() + + /** + * Set the value of [address2] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteAddress The current object (for fluent API support) + */ + public function setAddress2($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->address2 !== $v) { + $this->address2 = $v; + $this->modifiedColumns[CreditNoteAddressTableMap::ADDRESS2] = true; + } + + + return $this; + } // setAddress2() + + /** + * Set the value of [address3] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteAddress The current object (for fluent API support) + */ + public function setAddress3($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->address3 !== $v) { + $this->address3 = $v; + $this->modifiedColumns[CreditNoteAddressTableMap::ADDRESS3] = true; + } + + + return $this; + } // setAddress3() + + /** + * Set the value of [zipcode] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteAddress The current object (for fluent API support) + */ + public function setZipcode($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->zipcode !== $v) { + $this->zipcode = $v; + $this->modifiedColumns[CreditNoteAddressTableMap::ZIPCODE] = true; + } + + + return $this; + } // setZipcode() + + /** + * Set the value of [city] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteAddress The current object (for fluent API support) + */ + public function setCity($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->city !== $v) { + $this->city = $v; + $this->modifiedColumns[CreditNoteAddressTableMap::CITY] = true; + } + + + return $this; + } // setCity() + + /** + * Set the value of [phone] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteAddress The current object (for fluent API support) + */ + public function setPhone($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->phone !== $v) { + $this->phone = $v; + $this->modifiedColumns[CreditNoteAddressTableMap::PHONE] = true; + } + + + return $this; + } // setPhone() + + /** + * Set the value of [cellphone] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteAddress The current object (for fluent API support) + */ + public function setCellphone($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->cellphone !== $v) { + $this->cellphone = $v; + $this->modifiedColumns[CreditNoteAddressTableMap::CELLPHONE] = true; + } + + + return $this; + } // setCellphone() + + /** + * Set the value of [country_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteAddress The current object (for fluent API support) + */ + public function setCountryId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->country_id !== $v) { + $this->country_id = $v; + $this->modifiedColumns[CreditNoteAddressTableMap::COUNTRY_ID] = true; + } + + if ($this->aCountry !== null && $this->aCountry->getId() !== $v) { + $this->aCountry = null; + } + + + return $this; + } // setCountryId() + + /** + * Set the value of [state_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteAddress The current object (for fluent API support) + */ + public function setStateId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->state_id !== $v) { + $this->state_id = $v; + $this->modifiedColumns[CreditNoteAddressTableMap::STATE_ID] = true; + } + + if ($this->aState !== null && $this->aState->getId() !== $v) { + $this->aState = null; + } + + + return $this; + } // setStateId() + + /** + * Sets the value of [created_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CreditNoteAddress The current object (for fluent API support) + */ + public function setCreatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->created_at !== null || $dt !== null) { + if ($dt !== $this->created_at) { + $this->created_at = $dt; + $this->modifiedColumns[CreditNoteAddressTableMap::CREATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setCreatedAt() + + /** + * Sets the value of [updated_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CreditNoteAddress The current object (for fluent API support) + */ + public function setUpdatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->updated_at !== null || $dt !== null) { + if ($dt !== $this->updated_at) { + $this->updated_at = $dt; + $this->modifiedColumns[CreditNoteAddressTableMap::UPDATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setUpdatedAt() + + /** + * Indicates whether the columns in this object are only set to default values. + * + * This method can be used in conjunction with isModified() to indicate whether an object is both + * modified _and_ has some values set which are non-default. + * + * @return boolean Whether the columns in this object are only been set with default values. + */ + public function hasOnlyDefaultValues() + { + // otherwise, everything was equal, so return TRUE + return true; + } // hasOnlyDefaultValues() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (0-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param array $row The row returned by DataFetcher->fetch(). + * @param int $startcol 0-based offset column which indicates which restultset column to start with. + * @param boolean $rehydrate Whether this object is being re-hydrated from the database. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM) + { + try { + + + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CreditNoteAddressTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; + $this->id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CreditNoteAddressTableMap::translateFieldName('CustomerTitleId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->customer_title_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CreditNoteAddressTableMap::translateFieldName('Company', TableMap::TYPE_PHPNAME, $indexType)]; + $this->company = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CreditNoteAddressTableMap::translateFieldName('Firstname', TableMap::TYPE_PHPNAME, $indexType)]; + $this->firstname = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CreditNoteAddressTableMap::translateFieldName('Lastname', TableMap::TYPE_PHPNAME, $indexType)]; + $this->lastname = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CreditNoteAddressTableMap::translateFieldName('Address1', TableMap::TYPE_PHPNAME, $indexType)]; + $this->address1 = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CreditNoteAddressTableMap::translateFieldName('Address2', TableMap::TYPE_PHPNAME, $indexType)]; + $this->address2 = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CreditNoteAddressTableMap::translateFieldName('Address3', TableMap::TYPE_PHPNAME, $indexType)]; + $this->address3 = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CreditNoteAddressTableMap::translateFieldName('Zipcode', TableMap::TYPE_PHPNAME, $indexType)]; + $this->zipcode = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : CreditNoteAddressTableMap::translateFieldName('City', TableMap::TYPE_PHPNAME, $indexType)]; + $this->city = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : CreditNoteAddressTableMap::translateFieldName('Phone', TableMap::TYPE_PHPNAME, $indexType)]; + $this->phone = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : CreditNoteAddressTableMap::translateFieldName('Cellphone', TableMap::TYPE_PHPNAME, $indexType)]; + $this->cellphone = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 12 + $startcol : CreditNoteAddressTableMap::translateFieldName('CountryId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->country_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : CreditNoteAddressTableMap::translateFieldName('StateId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->state_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : CreditNoteAddressTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 15 + $startcol : CreditNoteAddressTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + $this->resetModified(); + + $this->setNew(false); + + if ($rehydrate) { + $this->ensureConsistency(); + } + + return $startcol + 16; // 16 = CreditNoteAddressTableMap::NUM_HYDRATE_COLUMNS. + + } catch (Exception $e) { + throw new PropelException("Error populating \CreditNote\Model\CreditNoteAddress object", 0, $e); + } + } + + /** + * Checks and repairs the internal consistency of the object. + * + * This method is executed after an already-instantiated object is re-hydrated + * from the database. It exists to check any foreign keys to make sure that + * the objects related to the current object are correct based on foreign key. + * + * You can override this method in the stub class, but you should always invoke + * the base method from the overridden method (i.e. parent::ensureConsistency()), + * in case your model changes. + * + * @throws PropelException + */ + public function ensureConsistency() + { + if ($this->aCustomerTitle !== null && $this->customer_title_id !== $this->aCustomerTitle->getId()) { + $this->aCustomerTitle = null; + } + if ($this->aCountry !== null && $this->country_id !== $this->aCountry->getId()) { + $this->aCountry = null; + } + if ($this->aState !== null && $this->state_id !== $this->aState->getId()) { + $this->aState = null; + } + } // ensureConsistency + + /** + * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. + * + * This will only work if the object has been saved and has a valid primary key set. + * + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @return void + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + */ + public function reload($deep = false, ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("Cannot reload a deleted object."); + } + + if ($this->isNew()) { + throw new PropelException("Cannot reload an unsaved object."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CreditNoteAddressTableMap::DATABASE_NAME); + } + + // We don't need to alter the object instance pool; we're just modifying this instance + // already in the pool. + + $dataFetcher = ChildCreditNoteAddressQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con); + $row = $dataFetcher->fetch(); + $dataFetcher->close(); + if (!$row) { + throw new PropelException('Cannot find matching row in the database to reload object values.'); + } + $this->hydrate($row, 0, true, $dataFetcher->getIndexType()); // rehydrate + + if ($deep) { // also de-associate any related objects? + + $this->aCustomerTitle = null; + $this->aCountry = null; + $this->aState = null; + $this->collCreditNotes = null; + + } // if (deep) + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param ConnectionInterface $con + * @return void + * @throws PropelException + * @see CreditNoteAddress::setDeleted() + * @see CreditNoteAddress::isDeleted() + */ + public function delete(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteAddressTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + try { + $deleteQuery = ChildCreditNoteAddressQuery::create() + ->filterByPrimaryKey($this->getPrimaryKey()); + $ret = $this->preDelete($con); + if ($ret) { + $deleteQuery->delete($con); + $this->postDelete($con); + $con->commit(); + $this->setDeleted(true); + } else { + $con->commit(); + } + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Persists this object to the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All modified related objects will also be persisted in the doSave() + * method. This method wraps all precipitate database operations in a + * single transaction. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() + */ + public function save(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteAddressTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + $isInsert = $this->isNew(); + try { + $ret = $this->preSave($con); + if ($isInsert) { + $ret = $ret && $this->preInsert($con); + // timestampable behavior + if (!$this->isColumnModified(CreditNoteAddressTableMap::CREATED_AT)) { + $this->setCreatedAt(time()); + } + if (!$this->isColumnModified(CreditNoteAddressTableMap::UPDATED_AT)) { + $this->setUpdatedAt(time()); + } + } else { + $ret = $ret && $this->preUpdate($con); + // timestampable behavior + if ($this->isModified() && !$this->isColumnModified(CreditNoteAddressTableMap::UPDATED_AT)) { + $this->setUpdatedAt(time()); + } + } + if ($ret) { + $affectedRows = $this->doSave($con); + if ($isInsert) { + $this->postInsert($con); + } else { + $this->postUpdate($con); + } + $this->postSave($con); + CreditNoteAddressTableMap::addInstanceToPool($this); + } else { + $affectedRows = 0; + } + $con->commit(); + + return $affectedRows; + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Performs the work of inserting or updating the row in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() + */ + protected function doSave(ConnectionInterface $con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + // We call the save method on the following object(s) if they + // were passed to this object by their corresponding set + // method. This object relates to these object(s) by a + // foreign key reference. + + if ($this->aCustomerTitle !== null) { + if ($this->aCustomerTitle->isModified() || $this->aCustomerTitle->isNew()) { + $affectedRows += $this->aCustomerTitle->save($con); + } + $this->setCustomerTitle($this->aCustomerTitle); + } + + if ($this->aCountry !== null) { + if ($this->aCountry->isModified() || $this->aCountry->isNew()) { + $affectedRows += $this->aCountry->save($con); + } + $this->setCountry($this->aCountry); + } + + if ($this->aState !== null) { + if ($this->aState->isModified() || $this->aState->isNew()) { + $affectedRows += $this->aState->save($con); + } + $this->setState($this->aState); + } + + if ($this->isNew() || $this->isModified()) { + // persist changes + if ($this->isNew()) { + $this->doInsert($con); + } else { + $this->doUpdate($con); + } + $affectedRows += 1; + $this->resetModified(); + } + + if ($this->creditNotesScheduledForDeletion !== null) { + if (!$this->creditNotesScheduledForDeletion->isEmpty()) { + \CreditNote\Model\CreditNoteQuery::create() + ->filterByPrimaryKeys($this->creditNotesScheduledForDeletion->getPrimaryKeys(false)) + ->delete($con); + $this->creditNotesScheduledForDeletion = null; + } + } + + if ($this->collCreditNotes !== null) { + foreach ($this->collCreditNotes as $referrerFK) { + if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) { + $affectedRows += $referrerFK->save($con); + } + } + } + + $this->alreadyInSave = false; + + } + + return $affectedRows; + } // doSave() + + /** + * Insert the row in the database. + * + * @param ConnectionInterface $con + * + * @throws PropelException + * @see doSave() + */ + protected function doInsert(ConnectionInterface $con) + { + $modifiedColumns = array(); + $index = 0; + + $this->modifiedColumns[CreditNoteAddressTableMap::ID] = true; + if (null !== $this->id) { + throw new PropelException('Cannot insert a value for auto-increment primary key (' . CreditNoteAddressTableMap::ID . ')'); + } + + // check the columns in natural order for more readable SQL queries + if ($this->isColumnModified(CreditNoteAddressTableMap::ID)) { + $modifiedColumns[':p' . $index++] = 'ID'; + } + if ($this->isColumnModified(CreditNoteAddressTableMap::CUSTOMER_TITLE_ID)) { + $modifiedColumns[':p' . $index++] = 'CUSTOMER_TITLE_ID'; + } + if ($this->isColumnModified(CreditNoteAddressTableMap::COMPANY)) { + $modifiedColumns[':p' . $index++] = 'COMPANY'; + } + if ($this->isColumnModified(CreditNoteAddressTableMap::FIRSTNAME)) { + $modifiedColumns[':p' . $index++] = 'FIRSTNAME'; + } + if ($this->isColumnModified(CreditNoteAddressTableMap::LASTNAME)) { + $modifiedColumns[':p' . $index++] = 'LASTNAME'; + } + if ($this->isColumnModified(CreditNoteAddressTableMap::ADDRESS1)) { + $modifiedColumns[':p' . $index++] = 'ADDRESS1'; + } + if ($this->isColumnModified(CreditNoteAddressTableMap::ADDRESS2)) { + $modifiedColumns[':p' . $index++] = 'ADDRESS2'; + } + if ($this->isColumnModified(CreditNoteAddressTableMap::ADDRESS3)) { + $modifiedColumns[':p' . $index++] = 'ADDRESS3'; + } + if ($this->isColumnModified(CreditNoteAddressTableMap::ZIPCODE)) { + $modifiedColumns[':p' . $index++] = 'ZIPCODE'; + } + if ($this->isColumnModified(CreditNoteAddressTableMap::CITY)) { + $modifiedColumns[':p' . $index++] = 'CITY'; + } + if ($this->isColumnModified(CreditNoteAddressTableMap::PHONE)) { + $modifiedColumns[':p' . $index++] = 'PHONE'; + } + if ($this->isColumnModified(CreditNoteAddressTableMap::CELLPHONE)) { + $modifiedColumns[':p' . $index++] = 'CELLPHONE'; + } + if ($this->isColumnModified(CreditNoteAddressTableMap::COUNTRY_ID)) { + $modifiedColumns[':p' . $index++] = 'COUNTRY_ID'; + } + if ($this->isColumnModified(CreditNoteAddressTableMap::STATE_ID)) { + $modifiedColumns[':p' . $index++] = 'STATE_ID'; + } + if ($this->isColumnModified(CreditNoteAddressTableMap::CREATED_AT)) { + $modifiedColumns[':p' . $index++] = 'CREATED_AT'; + } + if ($this->isColumnModified(CreditNoteAddressTableMap::UPDATED_AT)) { + $modifiedColumns[':p' . $index++] = 'UPDATED_AT'; + } + + $sql = sprintf( + 'INSERT INTO credit_note_address (%s) VALUES (%s)', + implode(', ', $modifiedColumns), + implode(', ', array_keys($modifiedColumns)) + ); + + try { + $stmt = $con->prepare($sql); + foreach ($modifiedColumns as $identifier => $columnName) { + switch ($columnName) { + case 'ID': + $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT); + break; + case 'CUSTOMER_TITLE_ID': + $stmt->bindValue($identifier, $this->customer_title_id, PDO::PARAM_INT); + break; + case 'COMPANY': + $stmt->bindValue($identifier, $this->company, PDO::PARAM_STR); + break; + case 'FIRSTNAME': + $stmt->bindValue($identifier, $this->firstname, PDO::PARAM_STR); + break; + case 'LASTNAME': + $stmt->bindValue($identifier, $this->lastname, PDO::PARAM_STR); + break; + case 'ADDRESS1': + $stmt->bindValue($identifier, $this->address1, PDO::PARAM_STR); + break; + case 'ADDRESS2': + $stmt->bindValue($identifier, $this->address2, PDO::PARAM_STR); + break; + case 'ADDRESS3': + $stmt->bindValue($identifier, $this->address3, PDO::PARAM_STR); + break; + case 'ZIPCODE': + $stmt->bindValue($identifier, $this->zipcode, PDO::PARAM_STR); + break; + case 'CITY': + $stmt->bindValue($identifier, $this->city, PDO::PARAM_STR); + break; + case 'PHONE': + $stmt->bindValue($identifier, $this->phone, PDO::PARAM_STR); + break; + case 'CELLPHONE': + $stmt->bindValue($identifier, $this->cellphone, PDO::PARAM_STR); + break; + case 'COUNTRY_ID': + $stmt->bindValue($identifier, $this->country_id, PDO::PARAM_INT); + break; + case 'STATE_ID': + $stmt->bindValue($identifier, $this->state_id, PDO::PARAM_INT); + break; + case 'CREATED_AT': + $stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + case 'UPDATED_AT': + $stmt->bindValue($identifier, $this->updated_at ? $this->updated_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + } + } + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e); + } + + try { + $pk = $con->lastInsertId(); + } catch (Exception $e) { + throw new PropelException('Unable to get autoincrement id.', 0, $e); + } + $this->setId($pk); + + $this->setNew(false); + } + + /** + * Update the row in the database. + * + * @param ConnectionInterface $con + * + * @return Integer Number of updated rows + * @see doSave() + */ + protected function doUpdate(ConnectionInterface $con) + { + $selectCriteria = $this->buildPkeyCriteria(); + $valuesCriteria = $this->buildCriteria(); + + return $selectCriteria->doUpdate($valuesCriteria, $con); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. + */ + public function getByName($name, $type = TableMap::TYPE_PHPNAME) + { + $pos = CreditNoteAddressTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + $field = $this->getByPosition($pos); + + return $field; + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch ($pos) { + case 0: + return $this->getId(); + break; + case 1: + return $this->getCustomerTitleId(); + break; + case 2: + return $this->getCompany(); + break; + case 3: + return $this->getFirstname(); + break; + case 4: + return $this->getLastname(); + break; + case 5: + return $this->getAddress1(); + break; + case 6: + return $this->getAddress2(); + break; + case 7: + return $this->getAddress3(); + break; + case 8: + return $this->getZipcode(); + break; + case 9: + return $this->getCity(); + break; + case 10: + return $this->getPhone(); + break; + case 11: + return $this->getCellphone(); + break; + case 12: + return $this->getCountryId(); + break; + case 13: + return $this->getStateId(); + break; + case 14: + return $this->getCreatedAt(); + break; + case 15: + return $this->getUpdatedAt(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * + * @return array an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false) + { + if (isset($alreadyDumpedObjects['CreditNoteAddress'][$this->getPrimaryKey()])) { + return '*RECURSION*'; + } + $alreadyDumpedObjects['CreditNoteAddress'][$this->getPrimaryKey()] = true; + $keys = CreditNoteAddressTableMap::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getId(), + $keys[1] => $this->getCustomerTitleId(), + $keys[2] => $this->getCompany(), + $keys[3] => $this->getFirstname(), + $keys[4] => $this->getLastname(), + $keys[5] => $this->getAddress1(), + $keys[6] => $this->getAddress2(), + $keys[7] => $this->getAddress3(), + $keys[8] => $this->getZipcode(), + $keys[9] => $this->getCity(), + $keys[10] => $this->getPhone(), + $keys[11] => $this->getCellphone(), + $keys[12] => $this->getCountryId(), + $keys[13] => $this->getStateId(), + $keys[14] => $this->getCreatedAt(), + $keys[15] => $this->getUpdatedAt(), + ); + $virtualColumns = $this->virtualColumns; + foreach ($virtualColumns as $key => $virtualColumn) { + $result[$key] = $virtualColumn; + } + + if ($includeForeignObjects) { + if (null !== $this->aCustomerTitle) { + $result['CustomerTitle'] = $this->aCustomerTitle->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + if (null !== $this->aCountry) { + $result['Country'] = $this->aCountry->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + if (null !== $this->aState) { + $result['State'] = $this->aState->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + if (null !== $this->collCreditNotes) { + $result['CreditNotes'] = $this->collCreditNotes->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); + } + } + + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return void + */ + public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) + { + $pos = CreditNoteAddressTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch ($pos) { + case 0: + $this->setId($value); + break; + case 1: + $this->setCustomerTitleId($value); + break; + case 2: + $this->setCompany($value); + break; + case 3: + $this->setFirstname($value); + break; + case 4: + $this->setLastname($value); + break; + case 5: + $this->setAddress1($value); + break; + case 6: + $this->setAddress2($value); + break; + case 7: + $this->setAddress3($value); + break; + case 8: + $this->setZipcode($value); + break; + case 9: + $this->setCity($value); + break; + case 10: + $this->setPhone($value); + break; + case 11: + $this->setCellphone($value); + break; + case 12: + $this->setCountryId($value); + break; + case 13: + $this->setStateId($value); + break; + case 14: + $this->setCreatedAt($value); + break; + case 15: + $this->setUpdatedAt($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * The default key type is the column's TableMap::TYPE_PHPNAME. + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) + { + $keys = CreditNoteAddressTableMap::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setCustomerTitleId($arr[$keys[1]]); + if (array_key_exists($keys[2], $arr)) $this->setCompany($arr[$keys[2]]); + if (array_key_exists($keys[3], $arr)) $this->setFirstname($arr[$keys[3]]); + if (array_key_exists($keys[4], $arr)) $this->setLastname($arr[$keys[4]]); + if (array_key_exists($keys[5], $arr)) $this->setAddress1($arr[$keys[5]]); + if (array_key_exists($keys[6], $arr)) $this->setAddress2($arr[$keys[6]]); + if (array_key_exists($keys[7], $arr)) $this->setAddress3($arr[$keys[7]]); + if (array_key_exists($keys[8], $arr)) $this->setZipcode($arr[$keys[8]]); + if (array_key_exists($keys[9], $arr)) $this->setCity($arr[$keys[9]]); + if (array_key_exists($keys[10], $arr)) $this->setPhone($arr[$keys[10]]); + if (array_key_exists($keys[11], $arr)) $this->setCellphone($arr[$keys[11]]); + if (array_key_exists($keys[12], $arr)) $this->setCountryId($arr[$keys[12]]); + if (array_key_exists($keys[13], $arr)) $this->setStateId($arr[$keys[13]]); + if (array_key_exists($keys[14], $arr)) $this->setCreatedAt($arr[$keys[14]]); + if (array_key_exists($keys[15], $arr)) $this->setUpdatedAt($arr[$keys[15]]); + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(CreditNoteAddressTableMap::DATABASE_NAME); + + if ($this->isColumnModified(CreditNoteAddressTableMap::ID)) $criteria->add(CreditNoteAddressTableMap::ID, $this->id); + if ($this->isColumnModified(CreditNoteAddressTableMap::CUSTOMER_TITLE_ID)) $criteria->add(CreditNoteAddressTableMap::CUSTOMER_TITLE_ID, $this->customer_title_id); + if ($this->isColumnModified(CreditNoteAddressTableMap::COMPANY)) $criteria->add(CreditNoteAddressTableMap::COMPANY, $this->company); + if ($this->isColumnModified(CreditNoteAddressTableMap::FIRSTNAME)) $criteria->add(CreditNoteAddressTableMap::FIRSTNAME, $this->firstname); + if ($this->isColumnModified(CreditNoteAddressTableMap::LASTNAME)) $criteria->add(CreditNoteAddressTableMap::LASTNAME, $this->lastname); + if ($this->isColumnModified(CreditNoteAddressTableMap::ADDRESS1)) $criteria->add(CreditNoteAddressTableMap::ADDRESS1, $this->address1); + if ($this->isColumnModified(CreditNoteAddressTableMap::ADDRESS2)) $criteria->add(CreditNoteAddressTableMap::ADDRESS2, $this->address2); + if ($this->isColumnModified(CreditNoteAddressTableMap::ADDRESS3)) $criteria->add(CreditNoteAddressTableMap::ADDRESS3, $this->address3); + if ($this->isColumnModified(CreditNoteAddressTableMap::ZIPCODE)) $criteria->add(CreditNoteAddressTableMap::ZIPCODE, $this->zipcode); + if ($this->isColumnModified(CreditNoteAddressTableMap::CITY)) $criteria->add(CreditNoteAddressTableMap::CITY, $this->city); + if ($this->isColumnModified(CreditNoteAddressTableMap::PHONE)) $criteria->add(CreditNoteAddressTableMap::PHONE, $this->phone); + if ($this->isColumnModified(CreditNoteAddressTableMap::CELLPHONE)) $criteria->add(CreditNoteAddressTableMap::CELLPHONE, $this->cellphone); + if ($this->isColumnModified(CreditNoteAddressTableMap::COUNTRY_ID)) $criteria->add(CreditNoteAddressTableMap::COUNTRY_ID, $this->country_id); + if ($this->isColumnModified(CreditNoteAddressTableMap::STATE_ID)) $criteria->add(CreditNoteAddressTableMap::STATE_ID, $this->state_id); + if ($this->isColumnModified(CreditNoteAddressTableMap::CREATED_AT)) $criteria->add(CreditNoteAddressTableMap::CREATED_AT, $this->created_at); + if ($this->isColumnModified(CreditNoteAddressTableMap::UPDATED_AT)) $criteria->add(CreditNoteAddressTableMap::UPDATED_AT, $this->updated_at); + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(CreditNoteAddressTableMap::DATABASE_NAME); + $criteria->add(CreditNoteAddressTableMap::ID, $this->id); + + return $criteria; + } + + /** + * Returns the primary key for this object (row). + * @return int + */ + public function getPrimaryKey() + { + return $this->getId(); + } + + /** + * Generic method to set the primary key (id column). + * + * @param int $key Primary key. + * @return void + */ + public function setPrimaryKey($key) + { + $this->setId($key); + } + + /** + * Returns true if the primary key for this object is null. + * @return boolean + */ + public function isPrimaryKeyNull() + { + + return null === $this->getId(); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of \CreditNote\Model\CreditNoteAddress (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false, $makeNew = true) + { + $copyObj->setCustomerTitleId($this->getCustomerTitleId()); + $copyObj->setCompany($this->getCompany()); + $copyObj->setFirstname($this->getFirstname()); + $copyObj->setLastname($this->getLastname()); + $copyObj->setAddress1($this->getAddress1()); + $copyObj->setAddress2($this->getAddress2()); + $copyObj->setAddress3($this->getAddress3()); + $copyObj->setZipcode($this->getZipcode()); + $copyObj->setCity($this->getCity()); + $copyObj->setPhone($this->getPhone()); + $copyObj->setCellphone($this->getCellphone()); + $copyObj->setCountryId($this->getCountryId()); + $copyObj->setStateId($this->getStateId()); + $copyObj->setCreatedAt($this->getCreatedAt()); + $copyObj->setUpdatedAt($this->getUpdatedAt()); + + if ($deepCopy) { + // important: temporarily setNew(false) because this affects the behavior of + // the getter/setter methods for fkey referrer objects. + $copyObj->setNew(false); + + foreach ($this->getCreditNotes() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCreditNote($relObj->copy($deepCopy)); + } + } + + } // if ($deepCopy) + + if ($makeNew) { + $copyObj->setNew(true); + $copyObj->setId(NULL); // this is a auto-increment column, so set to default value + } + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \CreditNote\Model\CreditNoteAddress Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + + return $copyObj; + } + + /** + * Declares an association between this object and a ChildCustomerTitle object. + * + * @param ChildCustomerTitle $v + * @return \CreditNote\Model\CreditNoteAddress The current object (for fluent API support) + * @throws PropelException + */ + public function setCustomerTitle(ChildCustomerTitle $v = null) + { + if ($v === null) { + $this->setCustomerTitleId(NULL); + } else { + $this->setCustomerTitleId($v->getId()); + } + + $this->aCustomerTitle = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCustomerTitle object, it will not be re-added. + if ($v !== null) { + $v->addCreditNoteAddress($this); + } + + + return $this; + } + + + /** + * Get the associated ChildCustomerTitle object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCustomerTitle The associated ChildCustomerTitle object. + * @throws PropelException + */ + public function getCustomerTitle(ConnectionInterface $con = null) + { + if ($this->aCustomerTitle === null && ($this->customer_title_id !== null)) { + $this->aCustomerTitle = CustomerTitleQuery::create()->findPk($this->customer_title_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCustomerTitle->addCreditNoteAddresses($this); + */ + } + + return $this->aCustomerTitle; + } + + /** + * Declares an association between this object and a ChildCountry object. + * + * @param ChildCountry $v + * @return \CreditNote\Model\CreditNoteAddress The current object (for fluent API support) + * @throws PropelException + */ + public function setCountry(ChildCountry $v = null) + { + if ($v === null) { + $this->setCountryId(NULL); + } else { + $this->setCountryId($v->getId()); + } + + $this->aCountry = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCountry object, it will not be re-added. + if ($v !== null) { + $v->addCreditNoteAddress($this); + } + + + return $this; + } + + + /** + * Get the associated ChildCountry object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCountry The associated ChildCountry object. + * @throws PropelException + */ + public function getCountry(ConnectionInterface $con = null) + { + if ($this->aCountry === null && ($this->country_id !== null)) { + $this->aCountry = CountryQuery::create()->findPk($this->country_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCountry->addCreditNoteAddresses($this); + */ + } + + return $this->aCountry; + } + + /** + * Declares an association between this object and a ChildState object. + * + * @param ChildState $v + * @return \CreditNote\Model\CreditNoteAddress The current object (for fluent API support) + * @throws PropelException + */ + public function setState(ChildState $v = null) + { + if ($v === null) { + $this->setStateId(NULL); + } else { + $this->setStateId($v->getId()); + } + + $this->aState = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildState object, it will not be re-added. + if ($v !== null) { + $v->addCreditNoteAddress($this); + } + + + return $this; + } + + + /** + * Get the associated ChildState object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildState The associated ChildState object. + * @throws PropelException + */ + public function getState(ConnectionInterface $con = null) + { + if ($this->aState === null && ($this->state_id !== null)) { + $this->aState = StateQuery::create()->findPk($this->state_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aState->addCreditNoteAddresses($this); + */ + } + + return $this->aState; + } + + + /** + * Initializes a collection based on the name of a relation. + * Avoids crafting an 'init[$relationName]s' method name + * that wouldn't work when StandardEnglishPluralizer is used. + * + * @param string $relationName The name of the relation to initialize + * @return void + */ + public function initRelation($relationName) + { + if ('CreditNote' == $relationName) { + return $this->initCreditNotes(); + } + } + + /** + * Clears out the collCreditNotes collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCreditNotes() + */ + public function clearCreditNotes() + { + $this->collCreditNotes = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Reset is the collCreditNotes collection loaded partially. + */ + public function resetPartialCreditNotes($v = true) + { + $this->collCreditNotesPartial = $v; + } + + /** + * Initializes the collCreditNotes collection. + * + * By default this just sets the collCreditNotes collection to an empty array (like clearcollCreditNotes()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty + * + * @return void + */ + public function initCreditNotes($overrideExisting = true) + { + if (null !== $this->collCreditNotes && !$overrideExisting) { + return; + } + $this->collCreditNotes = new ObjectCollection(); + $this->collCreditNotes->setModel('\CreditNote\Model\CreditNote'); + } + + /** + * Gets an array of ChildCreditNote objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this ChildCreditNoteAddress is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + * @throws PropelException + */ + public function getCreditNotes($criteria = null, ConnectionInterface $con = null) + { + $partial = $this->collCreditNotesPartial && !$this->isNew(); + if (null === $this->collCreditNotes || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCreditNotes) { + // return empty collection + $this->initCreditNotes(); + } else { + $collCreditNotes = ChildCreditNoteQuery::create(null, $criteria) + ->filterByCreditNoteAddress($this) + ->find($con); + + if (null !== $criteria) { + if (false !== $this->collCreditNotesPartial && count($collCreditNotes)) { + $this->initCreditNotes(false); + + foreach ($collCreditNotes as $obj) { + if (false == $this->collCreditNotes->contains($obj)) { + $this->collCreditNotes->append($obj); + } + } + + $this->collCreditNotesPartial = true; + } + + reset($collCreditNotes); + + return $collCreditNotes; + } + + if ($partial && $this->collCreditNotes) { + foreach ($this->collCreditNotes as $obj) { + if ($obj->isNew()) { + $collCreditNotes[] = $obj; + } + } + } + + $this->collCreditNotes = $collCreditNotes; + $this->collCreditNotesPartial = false; + } + } + + return $this->collCreditNotes; + } + + /** + * Sets a collection of CreditNote objects related by a one-to-many relationship + * to the current object. + * It will also schedule objects for deletion based on a diff between old objects (aka persisted) + * and new objects from the given Propel collection. + * + * @param Collection $creditNotes A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCreditNoteAddress The current object (for fluent API support) + */ + public function setCreditNotes(Collection $creditNotes, ConnectionInterface $con = null) + { + $creditNotesToDelete = $this->getCreditNotes(new Criteria(), $con)->diff($creditNotes); + + + $this->creditNotesScheduledForDeletion = $creditNotesToDelete; + + foreach ($creditNotesToDelete as $creditNoteRemoved) { + $creditNoteRemoved->setCreditNoteAddress(null); + } + + $this->collCreditNotes = null; + foreach ($creditNotes as $creditNote) { + $this->addCreditNote($creditNote); + } + + $this->collCreditNotes = $creditNotes; + $this->collCreditNotesPartial = false; + + return $this; + } + + /** + * Returns the number of related CreditNote objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CreditNote objects. + * @throws PropelException + */ + public function countCreditNotes(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) + { + $partial = $this->collCreditNotesPartial && !$this->isNew(); + if (null === $this->collCreditNotes || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCreditNotes) { + return 0; + } + + if ($partial && !$criteria) { + return count($this->getCreditNotes()); + } + + $query = ChildCreditNoteQuery::create(null, $criteria); + if ($distinct) { + $query->distinct(); + } + + return $query + ->filterByCreditNoteAddress($this) + ->count($con); + } + + return count($this->collCreditNotes); + } + + /** + * Method called to associate a ChildCreditNote object to this object + * through the ChildCreditNote foreign key attribute. + * + * @param ChildCreditNote $l ChildCreditNote + * @return \CreditNote\Model\CreditNoteAddress The current object (for fluent API support) + */ + public function addCreditNote(ChildCreditNote $l) + { + if ($this->collCreditNotes === null) { + $this->initCreditNotes(); + $this->collCreditNotesPartial = true; + } + + if (!in_array($l, $this->collCreditNotes->getArrayCopy(), true)) { // only add it if the **same** object is not already associated + $this->doAddCreditNote($l); + } + + return $this; + } + + /** + * @param CreditNote $creditNote The creditNote object to add. + */ + protected function doAddCreditNote($creditNote) + { + $this->collCreditNotes[]= $creditNote; + $creditNote->setCreditNoteAddress($this); + } + + /** + * @param CreditNote $creditNote The creditNote object to remove. + * @return ChildCreditNoteAddress The current object (for fluent API support) + */ + public function removeCreditNote($creditNote) + { + if ($this->getCreditNotes()->contains($creditNote)) { + $this->collCreditNotes->remove($this->collCreditNotes->search($creditNote)); + if (null === $this->creditNotesScheduledForDeletion) { + $this->creditNotesScheduledForDeletion = clone $this->collCreditNotes; + $this->creditNotesScheduledForDeletion->clear(); + } + $this->creditNotesScheduledForDeletion[]= clone $creditNote; + $creditNote->setCreditNoteAddress(null); + } + + return $this; + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNoteAddress is new, it will return + * an empty collection; or if this CreditNoteAddress has previously + * been saved, it will retrieve related CreditNotes from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNoteAddress. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesJoinOrder($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('Order', $joinBehavior); + + return $this->getCreditNotes($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNoteAddress is new, it will return + * an empty collection; or if this CreditNoteAddress has previously + * been saved, it will retrieve related CreditNotes from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNoteAddress. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('Customer', $joinBehavior); + + return $this->getCreditNotes($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNoteAddress is new, it will return + * an empty collection; or if this CreditNoteAddress has previously + * been saved, it will retrieve related CreditNotes from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNoteAddress. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesJoinCreditNoteRelatedByParentId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('CreditNoteRelatedByParentId', $joinBehavior); + + return $this->getCreditNotes($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNoteAddress is new, it will return + * an empty collection; or if this CreditNoteAddress has previously + * been saved, it will retrieve related CreditNotes from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNoteAddress. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesJoinCreditNoteType($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('CreditNoteType', $joinBehavior); + + return $this->getCreditNotes($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNoteAddress is new, it will return + * an empty collection; or if this CreditNoteAddress has previously + * been saved, it will retrieve related CreditNotes from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNoteAddress. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesJoinCreditNoteStatus($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('CreditNoteStatus', $joinBehavior); + + return $this->getCreditNotes($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNoteAddress is new, it will return + * an empty collection; or if this CreditNoteAddress has previously + * been saved, it will retrieve related CreditNotes from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNoteAddress. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('Currency', $joinBehavior); + + return $this->getCreditNotes($query, $con); + } + + /** + * Clears the current object and sets all attributes to their default values + */ + public function clear() + { + $this->id = null; + $this->customer_title_id = null; + $this->company = null; + $this->firstname = null; + $this->lastname = null; + $this->address1 = null; + $this->address2 = null; + $this->address3 = null; + $this->zipcode = null; + $this->city = null; + $this->phone = null; + $this->cellphone = null; + $this->country_id = null; + $this->state_id = null; + $this->created_at = null; + $this->updated_at = null; + $this->alreadyInSave = false; + $this->clearAllReferences(); + $this->resetModified(); + $this->setNew(true); + $this->setDeleted(false); + } + + /** + * Resets all references to other model objects or collections of model objects. + * + * This method is a user-space workaround for PHP's inability to garbage collect + * objects with circular references (even in PHP 5.3). This is currently necessary + * when using Propel in certain daemon or large-volume/high-memory operations. + * + * @param boolean $deep Whether to also clear the references on all referrer objects. + */ + public function clearAllReferences($deep = false) + { + if ($deep) { + if ($this->collCreditNotes) { + foreach ($this->collCreditNotes as $o) { + $o->clearAllReferences($deep); + } + } + } // if ($deep) + + $this->collCreditNotes = null; + $this->aCustomerTitle = null; + $this->aCountry = null; + $this->aState = null; + } + + /** + * Return the string representation of this object + * + * @return string + */ + public function __toString() + { + return (string) $this->exportTo(CreditNoteAddressTableMap::DEFAULT_STRING_FORMAT); + } + + // timestampable behavior + + /** + * Mark the current object so that the update date doesn't get updated during next save + * + * @return ChildCreditNoteAddress The current object (for fluent API support) + */ + public function keepUpdateDateUnchanged() + { + $this->modifiedColumns[CreditNoteAddressTableMap::UPDATED_AT] = true; + + return $this; + } + + /** + * Code to be run before persisting the object + * @param ConnectionInterface $con + * @return boolean + */ + public function preSave(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after persisting the object + * @param ConnectionInterface $con + */ + public function postSave(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before inserting to database + * @param ConnectionInterface $con + * @return boolean + */ + public function preInsert(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after inserting to database + * @param ConnectionInterface $con + */ + public function postInsert(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before updating the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preUpdate(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after updating the object in database + * @param ConnectionInterface $con + */ + public function postUpdate(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before deleting the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preDelete(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after deleting the object in database + * @param ConnectionInterface $con + */ + public function postDelete(ConnectionInterface $con = null) + { + + } + + + /** + * Derived method to catches calls to undefined methods. + * + * Provides magic import/export method support (fromXML()/toXML(), fromYAML()/toYAML(), etc.). + * Allows to define default __call() behavior if you overwrite __call() + * + * @param string $name + * @param mixed $params + * + * @return array|string + */ + public function __call($name, $params) + { + if (0 === strpos($name, 'get')) { + $virtualColumn = substr($name, 3); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + + $virtualColumn = lcfirst($virtualColumn); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + } + + if (0 === strpos($name, 'from')) { + $format = substr($name, 4); + + return $this->importFrom($format, reset($params)); + } + + if (0 === strpos($name, 'to')) { + $format = substr($name, 2); + $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true; + + return $this->exportTo($format, $includeLazyLoadColumns); + } + + throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name)); + } + +} diff --git a/local/modules/CreditNote/Model/Base/CreditNoteAddressQuery.php b/local/modules/CreditNote/Model/Base/CreditNoteAddressQuery.php new file mode 100644 index 000000000..5d3275b22 --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CreditNoteAddressQuery.php @@ -0,0 +1,1295 @@ +setModelAlias($modelAlias); + } + if ($criteria instanceof Criteria) { + $query->mergeWith($criteria); + } + + return $query; + } + + /** + * Find object by primary key. + * Propel uses the instance pool to skip the database if the object exists. + * Go fast if the query is untouched. + * + * + * $obj = $c->findPk(12, $con); + * + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ChildCreditNoteAddress|array|mixed the result, formatted by the current formatter + */ + public function findPk($key, $con = null) + { + if ($key === null) { + return null; + } + if ((null !== ($obj = CreditNoteAddressTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) { + // the object is already in the instance pool + return $obj; + } + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CreditNoteAddressTableMap::DATABASE_NAME); + } + $this->basePreSelect($con); + if ($this->formatter || $this->modelAlias || $this->with || $this->select + || $this->selectColumns || $this->asColumns || $this->selectModifiers + || $this->map || $this->having || $this->joins) { + return $this->findPkComplex($key, $con); + } else { + return $this->findPkSimple($key, $con); + } + } + + /** + * Find object by primary key using raw SQL to go fast. + * Bypass doSelect() and the object formatter by using generated code. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCreditNoteAddress A model object, or null if the key is not found + */ + protected function findPkSimple($key, $con) + { + $sql = 'SELECT ID, CUSTOMER_TITLE_ID, COMPANY, FIRSTNAME, LASTNAME, ADDRESS1, ADDRESS2, ADDRESS3, ZIPCODE, CITY, PHONE, CELLPHONE, COUNTRY_ID, STATE_ID, CREATED_AT, UPDATED_AT FROM credit_note_address WHERE ID = :p0'; + try { + $stmt = $con->prepare($sql); + $stmt->bindValue(':p0', $key, PDO::PARAM_INT); + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e); + } + $obj = null; + if ($row = $stmt->fetch(\PDO::FETCH_NUM)) { + $obj = new ChildCreditNoteAddress(); + $obj->hydrate($row); + CreditNoteAddressTableMap::addInstanceToPool($obj, (string) $key); + } + $stmt->closeCursor(); + + return $obj; + } + + /** + * Find object by primary key. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCreditNoteAddress|array|mixed the result, formatted by the current formatter + */ + protected function findPkComplex($key, $con) + { + // As the query uses a PK condition, no limit(1) is necessary. + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKey($key) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher); + } + + /** + * Find objects by primary key + * + * $objs = $c->findPks(array(12, 56, 832), $con); + * + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter + */ + public function findPks($keys, $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getReadConnection($this->getDbName()); + } + $this->basePreSelect($con); + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKeys($keys) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->format($dataFetcher); + } + + /** + * Filter the query by primary key + * + * @param mixed $key Primary key to use for the query + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByPrimaryKey($key) + { + + return $this->addUsingAlias(CreditNoteAddressTableMap::ID, $key, Criteria::EQUAL); + } + + /** + * Filter the query by a list of primary keys + * + * @param array $keys The list of primary key to use for the query + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByPrimaryKeys($keys) + { + + return $this->addUsingAlias(CreditNoteAddressTableMap::ID, $keys, Criteria::IN); + } + + /** + * Filter the query on the id column + * + * Example usage: + * + * $query->filterById(1234); // WHERE id = 1234 + * $query->filterById(array(12, 34)); // WHERE id IN (12, 34) + * $query->filterById(array('min' => 12)); // WHERE id > 12 + * + * + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterById($id = null, $comparison = null) + { + if (is_array($id)) { + $useMinMax = false; + if (isset($id['min'])) { + $this->addUsingAlias(CreditNoteAddressTableMap::ID, $id['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($id['max'])) { + $this->addUsingAlias(CreditNoteAddressTableMap::ID, $id['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteAddressTableMap::ID, $id, $comparison); + } + + /** + * Filter the query on the customer_title_id column + * + * Example usage: + * + * $query->filterByCustomerTitleId(1234); // WHERE customer_title_id = 1234 + * $query->filterByCustomerTitleId(array(12, 34)); // WHERE customer_title_id IN (12, 34) + * $query->filterByCustomerTitleId(array('min' => 12)); // WHERE customer_title_id > 12 + * + * + * @see filterByCustomerTitle() + * + * @param mixed $customerTitleId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByCustomerTitleId($customerTitleId = null, $comparison = null) + { + if (is_array($customerTitleId)) { + $useMinMax = false; + if (isset($customerTitleId['min'])) { + $this->addUsingAlias(CreditNoteAddressTableMap::CUSTOMER_TITLE_ID, $customerTitleId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($customerTitleId['max'])) { + $this->addUsingAlias(CreditNoteAddressTableMap::CUSTOMER_TITLE_ID, $customerTitleId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteAddressTableMap::CUSTOMER_TITLE_ID, $customerTitleId, $comparison); + } + + /** + * Filter the query on the company column + * + * Example usage: + * + * $query->filterByCompany('fooValue'); // WHERE company = 'fooValue' + * $query->filterByCompany('%fooValue%'); // WHERE company LIKE '%fooValue%' + * + * + * @param string $company The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByCompany($company = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($company)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $company)) { + $company = str_replace('*', '%', $company); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteAddressTableMap::COMPANY, $company, $comparison); + } + + /** + * Filter the query on the firstname column + * + * Example usage: + * + * $query->filterByFirstname('fooValue'); // WHERE firstname = 'fooValue' + * $query->filterByFirstname('%fooValue%'); // WHERE firstname LIKE '%fooValue%' + * + * + * @param string $firstname The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByFirstname($firstname = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($firstname)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $firstname)) { + $firstname = str_replace('*', '%', $firstname); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteAddressTableMap::FIRSTNAME, $firstname, $comparison); + } + + /** + * Filter the query on the lastname column + * + * Example usage: + * + * $query->filterByLastname('fooValue'); // WHERE lastname = 'fooValue' + * $query->filterByLastname('%fooValue%'); // WHERE lastname LIKE '%fooValue%' + * + * + * @param string $lastname The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByLastname($lastname = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($lastname)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $lastname)) { + $lastname = str_replace('*', '%', $lastname); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteAddressTableMap::LASTNAME, $lastname, $comparison); + } + + /** + * Filter the query on the address1 column + * + * Example usage: + * + * $query->filterByAddress1('fooValue'); // WHERE address1 = 'fooValue' + * $query->filterByAddress1('%fooValue%'); // WHERE address1 LIKE '%fooValue%' + * + * + * @param string $address1 The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByAddress1($address1 = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($address1)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $address1)) { + $address1 = str_replace('*', '%', $address1); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteAddressTableMap::ADDRESS1, $address1, $comparison); + } + + /** + * Filter the query on the address2 column + * + * Example usage: + * + * $query->filterByAddress2('fooValue'); // WHERE address2 = 'fooValue' + * $query->filterByAddress2('%fooValue%'); // WHERE address2 LIKE '%fooValue%' + * + * + * @param string $address2 The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByAddress2($address2 = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($address2)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $address2)) { + $address2 = str_replace('*', '%', $address2); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteAddressTableMap::ADDRESS2, $address2, $comparison); + } + + /** + * Filter the query on the address3 column + * + * Example usage: + * + * $query->filterByAddress3('fooValue'); // WHERE address3 = 'fooValue' + * $query->filterByAddress3('%fooValue%'); // WHERE address3 LIKE '%fooValue%' + * + * + * @param string $address3 The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByAddress3($address3 = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($address3)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $address3)) { + $address3 = str_replace('*', '%', $address3); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteAddressTableMap::ADDRESS3, $address3, $comparison); + } + + /** + * Filter the query on the zipcode column + * + * Example usage: + * + * $query->filterByZipcode('fooValue'); // WHERE zipcode = 'fooValue' + * $query->filterByZipcode('%fooValue%'); // WHERE zipcode LIKE '%fooValue%' + * + * + * @param string $zipcode The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByZipcode($zipcode = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($zipcode)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $zipcode)) { + $zipcode = str_replace('*', '%', $zipcode); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteAddressTableMap::ZIPCODE, $zipcode, $comparison); + } + + /** + * Filter the query on the city column + * + * Example usage: + * + * $query->filterByCity('fooValue'); // WHERE city = 'fooValue' + * $query->filterByCity('%fooValue%'); // WHERE city LIKE '%fooValue%' + * + * + * @param string $city The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByCity($city = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($city)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $city)) { + $city = str_replace('*', '%', $city); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteAddressTableMap::CITY, $city, $comparison); + } + + /** + * Filter the query on the phone column + * + * Example usage: + * + * $query->filterByPhone('fooValue'); // WHERE phone = 'fooValue' + * $query->filterByPhone('%fooValue%'); // WHERE phone LIKE '%fooValue%' + * + * + * @param string $phone The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByPhone($phone = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($phone)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $phone)) { + $phone = str_replace('*', '%', $phone); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteAddressTableMap::PHONE, $phone, $comparison); + } + + /** + * Filter the query on the cellphone column + * + * Example usage: + * + * $query->filterByCellphone('fooValue'); // WHERE cellphone = 'fooValue' + * $query->filterByCellphone('%fooValue%'); // WHERE cellphone LIKE '%fooValue%' + * + * + * @param string $cellphone The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByCellphone($cellphone = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($cellphone)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $cellphone)) { + $cellphone = str_replace('*', '%', $cellphone); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteAddressTableMap::CELLPHONE, $cellphone, $comparison); + } + + /** + * Filter the query on the country_id column + * + * Example usage: + * + * $query->filterByCountryId(1234); // WHERE country_id = 1234 + * $query->filterByCountryId(array(12, 34)); // WHERE country_id IN (12, 34) + * $query->filterByCountryId(array('min' => 12)); // WHERE country_id > 12 + * + * + * @see filterByCountry() + * + * @param mixed $countryId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByCountryId($countryId = null, $comparison = null) + { + if (is_array($countryId)) { + $useMinMax = false; + if (isset($countryId['min'])) { + $this->addUsingAlias(CreditNoteAddressTableMap::COUNTRY_ID, $countryId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($countryId['max'])) { + $this->addUsingAlias(CreditNoteAddressTableMap::COUNTRY_ID, $countryId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteAddressTableMap::COUNTRY_ID, $countryId, $comparison); + } + + /** + * Filter the query on the state_id column + * + * Example usage: + * + * $query->filterByStateId(1234); // WHERE state_id = 1234 + * $query->filterByStateId(array(12, 34)); // WHERE state_id IN (12, 34) + * $query->filterByStateId(array('min' => 12)); // WHERE state_id > 12 + * + * + * @see filterByState() + * + * @param mixed $stateId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByStateId($stateId = null, $comparison = null) + { + if (is_array($stateId)) { + $useMinMax = false; + if (isset($stateId['min'])) { + $this->addUsingAlias(CreditNoteAddressTableMap::STATE_ID, $stateId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($stateId['max'])) { + $this->addUsingAlias(CreditNoteAddressTableMap::STATE_ID, $stateId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteAddressTableMap::STATE_ID, $stateId, $comparison); + } + + /** + * Filter the query on the created_at column + * + * Example usage: + * + * $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14' + * $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14' + * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' + * + * + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByCreatedAt($createdAt = null, $comparison = null) + { + if (is_array($createdAt)) { + $useMinMax = false; + if (isset($createdAt['min'])) { + $this->addUsingAlias(CreditNoteAddressTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($createdAt['max'])) { + $this->addUsingAlias(CreditNoteAddressTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteAddressTableMap::CREATED_AT, $createdAt, $comparison); + } + + /** + * Filter the query on the updated_at column + * + * Example usage: + * + * $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14' + * $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14' + * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' + * + * + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByUpdatedAt($updatedAt = null, $comparison = null) + { + if (is_array($updatedAt)) { + $useMinMax = false; + if (isset($updatedAt['min'])) { + $this->addUsingAlias(CreditNoteAddressTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($updatedAt['max'])) { + $this->addUsingAlias(CreditNoteAddressTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteAddressTableMap::UPDATED_AT, $updatedAt, $comparison); + } + + /** + * Filter the query by a related \Thelia\Model\CustomerTitle object + * + * @param \Thelia\Model\CustomerTitle|ObjectCollection $customerTitle The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByCustomerTitle($customerTitle, $comparison = null) + { + if ($customerTitle instanceof \Thelia\Model\CustomerTitle) { + return $this + ->addUsingAlias(CreditNoteAddressTableMap::CUSTOMER_TITLE_ID, $customerTitle->getId(), $comparison); + } elseif ($customerTitle instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CreditNoteAddressTableMap::CUSTOMER_TITLE_ID, $customerTitle->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByCustomerTitle() only accepts arguments of type \Thelia\Model\CustomerTitle or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CustomerTitle relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function joinCustomerTitle($relationAlias = null, $joinType = Criteria::LEFT_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CustomerTitle'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CustomerTitle'); + } + + return $this; + } + + /** + * Use the CustomerTitle relation CustomerTitle object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \Thelia\Model\CustomerTitleQuery A secondary query class using the current class as primary query + */ + public function useCustomerTitleQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) + { + return $this + ->joinCustomerTitle($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CustomerTitle', '\Thelia\Model\CustomerTitleQuery'); + } + + /** + * Filter the query by a related \Thelia\Model\Country object + * + * @param \Thelia\Model\Country|ObjectCollection $country The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByCountry($country, $comparison = null) + { + if ($country instanceof \Thelia\Model\Country) { + return $this + ->addUsingAlias(CreditNoteAddressTableMap::COUNTRY_ID, $country->getId(), $comparison); + } elseif ($country instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CreditNoteAddressTableMap::COUNTRY_ID, $country->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByCountry() only accepts arguments of type \Thelia\Model\Country or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the Country relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function joinCountry($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('Country'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'Country'); + } + + return $this; + } + + /** + * Use the Country relation Country object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \Thelia\Model\CountryQuery A secondary query class using the current class as primary query + */ + public function useCountryQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCountry($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'Country', '\Thelia\Model\CountryQuery'); + } + + /** + * Filter the query by a related \Thelia\Model\State object + * + * @param \Thelia\Model\State|ObjectCollection $state The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByState($state, $comparison = null) + { + if ($state instanceof \Thelia\Model\State) { + return $this + ->addUsingAlias(CreditNoteAddressTableMap::STATE_ID, $state->getId(), $comparison); + } elseif ($state instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CreditNoteAddressTableMap::STATE_ID, $state->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByState() only accepts arguments of type \Thelia\Model\State or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the State relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function joinState($relationAlias = null, $joinType = Criteria::LEFT_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('State'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'State'); + } + + return $this; + } + + /** + * Use the State relation State object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \Thelia\Model\StateQuery A secondary query class using the current class as primary query + */ + public function useStateQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) + { + return $this + ->joinState($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'State', '\Thelia\Model\StateQuery'); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNote object + * + * @param \CreditNote\Model\CreditNote|ObjectCollection $creditNote the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function filterByCreditNote($creditNote, $comparison = null) + { + if ($creditNote instanceof \CreditNote\Model\CreditNote) { + return $this + ->addUsingAlias(CreditNoteAddressTableMap::ID, $creditNote->getInvoiceAddressId(), $comparison); + } elseif ($creditNote instanceof ObjectCollection) { + return $this + ->useCreditNoteQuery() + ->filterByPrimaryKeys($creditNote->getPrimaryKeys()) + ->endUse(); + } else { + throw new PropelException('filterByCreditNote() only accepts arguments of type \CreditNote\Model\CreditNote or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNote relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function joinCreditNote($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNote'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNote'); + } + + return $this; + } + + /** + * Use the CreditNote relation CreditNote object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCreditNote($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNote', '\CreditNote\Model\CreditNoteQuery'); + } + + /** + * Exclude object from result + * + * @param ChildCreditNoteAddress $creditNoteAddress Object to remove from the list of results + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function prune($creditNoteAddress = null) + { + if ($creditNoteAddress) { + $this->addUsingAlias(CreditNoteAddressTableMap::ID, $creditNoteAddress->getId(), Criteria::NOT_EQUAL); + } + + return $this; + } + + /** + * Deletes all rows from the credit_note_address table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public function doDeleteAll(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteAddressTableMap::DATABASE_NAME); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + $affectedRows += parent::doDeleteAll($con); + // Because this db requires some delete cascade/set null emulation, we have to + // clear the cached instance *after* the emulation has happened (since + // instances get re-added by the select statement contained therein). + CreditNoteAddressTableMap::clearInstancePool(); + CreditNoteAddressTableMap::clearRelatedInstancePool(); + + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $affectedRows; + } + + /** + * Performs a DELETE on the database, given a ChildCreditNoteAddress or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or ChildCreditNoteAddress object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public function delete(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteAddressTableMap::DATABASE_NAME); + } + + $criteria = $this; + + // Set the correct dbName + $criteria->setDbName(CreditNoteAddressTableMap::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + + + CreditNoteAddressTableMap::removeInstanceFromPool($criteria); + + $affectedRows += ModelCriteria::delete($con); + CreditNoteAddressTableMap::clearRelatedInstancePool(); + $con->commit(); + + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + // timestampable behavior + + /** + * Filter by the latest updated + * + * @param int $nbDays Maximum age of the latest update in days + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function recentlyUpdated($nbDays = 7) + { + return $this->addUsingAlias(CreditNoteAddressTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL); + } + + /** + * Filter by the latest created + * + * @param int $nbDays Maximum age of in days + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function recentlyCreated($nbDays = 7) + { + return $this->addUsingAlias(CreditNoteAddressTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL); + } + + /** + * Order by update date desc + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function lastUpdatedFirst() + { + return $this->addDescendingOrderByColumn(CreditNoteAddressTableMap::UPDATED_AT); + } + + /** + * Order by update date asc + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function firstUpdatedFirst() + { + return $this->addAscendingOrderByColumn(CreditNoteAddressTableMap::UPDATED_AT); + } + + /** + * Order by create date desc + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function lastCreatedFirst() + { + return $this->addDescendingOrderByColumn(CreditNoteAddressTableMap::CREATED_AT); + } + + /** + * Order by create date asc + * + * @return ChildCreditNoteAddressQuery The current query, for fluid interface + */ + public function firstCreatedFirst() + { + return $this->addAscendingOrderByColumn(CreditNoteAddressTableMap::CREATED_AT); + } + +} // CreditNoteAddressQuery diff --git a/local/modules/CreditNote/Model/Base/CreditNoteComment.php b/local/modules/CreditNote/Model/Base/CreditNoteComment.php new file mode 100644 index 000000000..71d476978 --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CreditNoteComment.php @@ -0,0 +1,1556 @@ +modifiedColumns; + } + + /** + * Has specified column been modified? + * + * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID + * @return boolean True if $col has been modified. + */ + public function isColumnModified($col) + { + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); + } + + /** + * Get the columns that have been modified in this object. + * @return array A unique list of the modified column names for this object. + */ + public function getModifiedColumns() + { + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; + } + + /** + * Returns whether the object has ever been saved. This will + * be false, if the object was retrieved from storage or was created + * and then saved. + * + * @return boolean true, if the object has never been persisted. + */ + public function isNew() + { + return $this->new; + } + + /** + * Setter for the isNew attribute. This method will be called + * by Propel-generated children and objects. + * + * @param boolean $b the state of the object. + */ + public function setNew($b) + { + $this->new = (Boolean) $b; + } + + /** + * Whether this object has been deleted. + * @return boolean The deleted state of this object. + */ + public function isDeleted() + { + return $this->deleted; + } + + /** + * Specify whether this object has been deleted. + * @param boolean $b The deleted state of this object. + * @return void + */ + public function setDeleted($b) + { + $this->deleted = (Boolean) $b; + } + + /** + * Sets the modified state for the object to be false. + * @param string $col If supplied, only the specified column is reset. + * @return void + */ + public function resetModified($col = null) + { + if (null !== $col) { + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); + } + } else { + $this->modifiedColumns = array(); + } + } + + /** + * Compares this with another CreditNoteComment instance. If + * obj is an instance of CreditNoteComment, delegates to + * equals(CreditNoteComment). Otherwise, returns false. + * + * @param mixed $obj The object to compare to. + * @return boolean Whether equal to the object specified. + */ + public function equals($obj) + { + $thisclazz = get_class($this); + if (!is_object($obj) || !($obj instanceof $thisclazz)) { + return false; + } + + if ($this === $obj) { + return true; + } + + if (null === $this->getPrimaryKey() + || null === $obj->getPrimaryKey()) { + return false; + } + + return $this->getPrimaryKey() === $obj->getPrimaryKey(); + } + + /** + * If the primary key is not null, return the hashcode of the + * primary key. Otherwise, return the hash code of the object. + * + * @return int Hashcode + */ + public function hashCode() + { + if (null !== $this->getPrimaryKey()) { + return crc32(serialize($this->getPrimaryKey())); + } + + return crc32(serialize(clone $this)); + } + + /** + * Get the associative array of the virtual columns in this object + * + * @return array + */ + public function getVirtualColumns() + { + return $this->virtualColumns; + } + + /** + * Checks the existence of a virtual column in this object + * + * @param string $name The virtual column name + * @return boolean + */ + public function hasVirtualColumn($name) + { + return array_key_exists($name, $this->virtualColumns); + } + + /** + * Get the value of a virtual column in this object + * + * @param string $name The virtual column name + * @return mixed + * + * @throws PropelException + */ + public function getVirtualColumn($name) + { + if (!$this->hasVirtualColumn($name)) { + throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name)); + } + + return $this->virtualColumns[$name]; + } + + /** + * Set the value of a virtual column in this object + * + * @param string $name The virtual column name + * @param mixed $value The value to give to the virtual column + * + * @return CreditNoteComment The current object, for fluid interface + */ + public function setVirtualColumn($name, $value) + { + $this->virtualColumns[$name] = $value; + + return $this; + } + + /** + * Logs a message using Propel::log(). + * + * @param string $msg + * @param int $priority One of the Propel::LOG_* logging levels + * @return boolean + */ + protected function log($msg, $priority = Propel::LOG_INFO) + { + return Propel::log(get_class($this) . ': ' . $msg, $priority); + } + + /** + * Populate the current object from a string, using a given parser format + * + * $book = new Book(); + * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, + * or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param string $data The source data to import from + * + * @return CreditNoteComment The current object, for fluid interface + */ + public function importFrom($parser, $data) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + $this->fromArray($parser->toArray($data), TableMap::TYPE_PHPNAME); + + return $this; + } + + /** + * Export the current object properties to a string, using a given parser format + * + * $book = BookQuery::create()->findPk(9012); + * echo $book->exportTo('JSON'); + * => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE. + * @return string The exported data + */ + public function exportTo($parser, $includeLazyLoadColumns = true) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true)); + } + + /** + * Clean up internal collections prior to serializing + * Avoids recursive loops that turn into segmentation faults when serializing + */ + public function __sleep() + { + $this->clearAllReferences(); + + return array_keys(get_object_vars($this)); + } + + /** + * Get the [id] column value. + * + * @return int + */ + public function getId() + { + + return $this->id; + } + + /** + * Get the [credit_note_id] column value. + * + * @return int + */ + public function getCreditNoteId() + { + + return $this->credit_note_id; + } + + /** + * Get the [admin_id] column value. + * + * @return int + */ + public function getAdminId() + { + + return $this->admin_id; + } + + /** + * Get the [comment] column value. + * + * @return string + */ + public function getComment() + { + + return $this->comment; + } + + /** + * Get the [optionally formatted] temporal [created_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getCreatedAt($format = NULL) + { + if ($format === null) { + return $this->created_at; + } else { + return $this->created_at instanceof \DateTime ? $this->created_at->format($format) : null; + } + } + + /** + * Get the [optionally formatted] temporal [updated_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getUpdatedAt($format = NULL) + { + if ($format === null) { + return $this->updated_at; + } else { + return $this->updated_at instanceof \DateTime ? $this->updated_at->format($format) : null; + } + } + + /** + * Set the value of [id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteComment The current object (for fluent API support) + */ + public function setId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->id !== $v) { + $this->id = $v; + $this->modifiedColumns[CreditNoteCommentTableMap::ID] = true; + } + + + return $this; + } // setId() + + /** + * Set the value of [credit_note_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteComment The current object (for fluent API support) + */ + public function setCreditNoteId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->credit_note_id !== $v) { + $this->credit_note_id = $v; + $this->modifiedColumns[CreditNoteCommentTableMap::CREDIT_NOTE_ID] = true; + } + + if ($this->aCreditNote !== null && $this->aCreditNote->getId() !== $v) { + $this->aCreditNote = null; + } + + + return $this; + } // setCreditNoteId() + + /** + * Set the value of [admin_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteComment The current object (for fluent API support) + */ + public function setAdminId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->admin_id !== $v) { + $this->admin_id = $v; + $this->modifiedColumns[CreditNoteCommentTableMap::ADMIN_ID] = true; + } + + if ($this->aAdmin !== null && $this->aAdmin->getId() !== $v) { + $this->aAdmin = null; + } + + + return $this; + } // setAdminId() + + /** + * Set the value of [comment] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteComment The current object (for fluent API support) + */ + public function setComment($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->comment !== $v) { + $this->comment = $v; + $this->modifiedColumns[CreditNoteCommentTableMap::COMMENT] = true; + } + + + return $this; + } // setComment() + + /** + * Sets the value of [created_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CreditNoteComment The current object (for fluent API support) + */ + public function setCreatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->created_at !== null || $dt !== null) { + if ($dt !== $this->created_at) { + $this->created_at = $dt; + $this->modifiedColumns[CreditNoteCommentTableMap::CREATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setCreatedAt() + + /** + * Sets the value of [updated_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CreditNoteComment The current object (for fluent API support) + */ + public function setUpdatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->updated_at !== null || $dt !== null) { + if ($dt !== $this->updated_at) { + $this->updated_at = $dt; + $this->modifiedColumns[CreditNoteCommentTableMap::UPDATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setUpdatedAt() + + /** + * Indicates whether the columns in this object are only set to default values. + * + * This method can be used in conjunction with isModified() to indicate whether an object is both + * modified _and_ has some values set which are non-default. + * + * @return boolean Whether the columns in this object are only been set with default values. + */ + public function hasOnlyDefaultValues() + { + // otherwise, everything was equal, so return TRUE + return true; + } // hasOnlyDefaultValues() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (0-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param array $row The row returned by DataFetcher->fetch(). + * @param int $startcol 0-based offset column which indicates which restultset column to start with. + * @param boolean $rehydrate Whether this object is being re-hydrated from the database. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM) + { + try { + + + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CreditNoteCommentTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; + $this->id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CreditNoteCommentTableMap::translateFieldName('CreditNoteId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->credit_note_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CreditNoteCommentTableMap::translateFieldName('AdminId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->admin_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CreditNoteCommentTableMap::translateFieldName('Comment', TableMap::TYPE_PHPNAME, $indexType)]; + $this->comment = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CreditNoteCommentTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CreditNoteCommentTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + $this->resetModified(); + + $this->setNew(false); + + if ($rehydrate) { + $this->ensureConsistency(); + } + + return $startcol + 6; // 6 = CreditNoteCommentTableMap::NUM_HYDRATE_COLUMNS. + + } catch (Exception $e) { + throw new PropelException("Error populating \CreditNote\Model\CreditNoteComment object", 0, $e); + } + } + + /** + * Checks and repairs the internal consistency of the object. + * + * This method is executed after an already-instantiated object is re-hydrated + * from the database. It exists to check any foreign keys to make sure that + * the objects related to the current object are correct based on foreign key. + * + * You can override this method in the stub class, but you should always invoke + * the base method from the overridden method (i.e. parent::ensureConsistency()), + * in case your model changes. + * + * @throws PropelException + */ + public function ensureConsistency() + { + if ($this->aCreditNote !== null && $this->credit_note_id !== $this->aCreditNote->getId()) { + $this->aCreditNote = null; + } + if ($this->aAdmin !== null && $this->admin_id !== $this->aAdmin->getId()) { + $this->aAdmin = null; + } + } // ensureConsistency + + /** + * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. + * + * This will only work if the object has been saved and has a valid primary key set. + * + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @return void + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + */ + public function reload($deep = false, ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("Cannot reload a deleted object."); + } + + if ($this->isNew()) { + throw new PropelException("Cannot reload an unsaved object."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CreditNoteCommentTableMap::DATABASE_NAME); + } + + // We don't need to alter the object instance pool; we're just modifying this instance + // already in the pool. + + $dataFetcher = ChildCreditNoteCommentQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con); + $row = $dataFetcher->fetch(); + $dataFetcher->close(); + if (!$row) { + throw new PropelException('Cannot find matching row in the database to reload object values.'); + } + $this->hydrate($row, 0, true, $dataFetcher->getIndexType()); // rehydrate + + if ($deep) { // also de-associate any related objects? + + $this->aCreditNote = null; + $this->aAdmin = null; + } // if (deep) + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param ConnectionInterface $con + * @return void + * @throws PropelException + * @see CreditNoteComment::setDeleted() + * @see CreditNoteComment::isDeleted() + */ + public function delete(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteCommentTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + try { + $deleteQuery = ChildCreditNoteCommentQuery::create() + ->filterByPrimaryKey($this->getPrimaryKey()); + $ret = $this->preDelete($con); + if ($ret) { + $deleteQuery->delete($con); + $this->postDelete($con); + $con->commit(); + $this->setDeleted(true); + } else { + $con->commit(); + } + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Persists this object to the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All modified related objects will also be persisted in the doSave() + * method. This method wraps all precipitate database operations in a + * single transaction. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() + */ + public function save(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteCommentTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + $isInsert = $this->isNew(); + try { + $ret = $this->preSave($con); + if ($isInsert) { + $ret = $ret && $this->preInsert($con); + // timestampable behavior + if (!$this->isColumnModified(CreditNoteCommentTableMap::CREATED_AT)) { + $this->setCreatedAt(time()); + } + if (!$this->isColumnModified(CreditNoteCommentTableMap::UPDATED_AT)) { + $this->setUpdatedAt(time()); + } + } else { + $ret = $ret && $this->preUpdate($con); + // timestampable behavior + if ($this->isModified() && !$this->isColumnModified(CreditNoteCommentTableMap::UPDATED_AT)) { + $this->setUpdatedAt(time()); + } + } + if ($ret) { + $affectedRows = $this->doSave($con); + if ($isInsert) { + $this->postInsert($con); + } else { + $this->postUpdate($con); + } + $this->postSave($con); + CreditNoteCommentTableMap::addInstanceToPool($this); + } else { + $affectedRows = 0; + } + $con->commit(); + + return $affectedRows; + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Performs the work of inserting or updating the row in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() + */ + protected function doSave(ConnectionInterface $con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + // We call the save method on the following object(s) if they + // were passed to this object by their corresponding set + // method. This object relates to these object(s) by a + // foreign key reference. + + if ($this->aCreditNote !== null) { + if ($this->aCreditNote->isModified() || $this->aCreditNote->isNew()) { + $affectedRows += $this->aCreditNote->save($con); + } + $this->setCreditNote($this->aCreditNote); + } + + if ($this->aAdmin !== null) { + if ($this->aAdmin->isModified() || $this->aAdmin->isNew()) { + $affectedRows += $this->aAdmin->save($con); + } + $this->setAdmin($this->aAdmin); + } + + if ($this->isNew() || $this->isModified()) { + // persist changes + if ($this->isNew()) { + $this->doInsert($con); + } else { + $this->doUpdate($con); + } + $affectedRows += 1; + $this->resetModified(); + } + + $this->alreadyInSave = false; + + } + + return $affectedRows; + } // doSave() + + /** + * Insert the row in the database. + * + * @param ConnectionInterface $con + * + * @throws PropelException + * @see doSave() + */ + protected function doInsert(ConnectionInterface $con) + { + $modifiedColumns = array(); + $index = 0; + + $this->modifiedColumns[CreditNoteCommentTableMap::ID] = true; + if (null !== $this->id) { + throw new PropelException('Cannot insert a value for auto-increment primary key (' . CreditNoteCommentTableMap::ID . ')'); + } + + // check the columns in natural order for more readable SQL queries + if ($this->isColumnModified(CreditNoteCommentTableMap::ID)) { + $modifiedColumns[':p' . $index++] = 'ID'; + } + if ($this->isColumnModified(CreditNoteCommentTableMap::CREDIT_NOTE_ID)) { + $modifiedColumns[':p' . $index++] = 'CREDIT_NOTE_ID'; + } + if ($this->isColumnModified(CreditNoteCommentTableMap::ADMIN_ID)) { + $modifiedColumns[':p' . $index++] = 'ADMIN_ID'; + } + if ($this->isColumnModified(CreditNoteCommentTableMap::COMMENT)) { + $modifiedColumns[':p' . $index++] = 'COMMENT'; + } + if ($this->isColumnModified(CreditNoteCommentTableMap::CREATED_AT)) { + $modifiedColumns[':p' . $index++] = 'CREATED_AT'; + } + if ($this->isColumnModified(CreditNoteCommentTableMap::UPDATED_AT)) { + $modifiedColumns[':p' . $index++] = 'UPDATED_AT'; + } + + $sql = sprintf( + 'INSERT INTO credit_note_comment (%s) VALUES (%s)', + implode(', ', $modifiedColumns), + implode(', ', array_keys($modifiedColumns)) + ); + + try { + $stmt = $con->prepare($sql); + foreach ($modifiedColumns as $identifier => $columnName) { + switch ($columnName) { + case 'ID': + $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT); + break; + case 'CREDIT_NOTE_ID': + $stmt->bindValue($identifier, $this->credit_note_id, PDO::PARAM_INT); + break; + case 'ADMIN_ID': + $stmt->bindValue($identifier, $this->admin_id, PDO::PARAM_INT); + break; + case 'COMMENT': + $stmt->bindValue($identifier, $this->comment, PDO::PARAM_STR); + break; + case 'CREATED_AT': + $stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + case 'UPDATED_AT': + $stmt->bindValue($identifier, $this->updated_at ? $this->updated_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + } + } + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e); + } + + try { + $pk = $con->lastInsertId(); + } catch (Exception $e) { + throw new PropelException('Unable to get autoincrement id.', 0, $e); + } + $this->setId($pk); + + $this->setNew(false); + } + + /** + * Update the row in the database. + * + * @param ConnectionInterface $con + * + * @return Integer Number of updated rows + * @see doSave() + */ + protected function doUpdate(ConnectionInterface $con) + { + $selectCriteria = $this->buildPkeyCriteria(); + $valuesCriteria = $this->buildCriteria(); + + return $selectCriteria->doUpdate($valuesCriteria, $con); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. + */ + public function getByName($name, $type = TableMap::TYPE_PHPNAME) + { + $pos = CreditNoteCommentTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + $field = $this->getByPosition($pos); + + return $field; + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch ($pos) { + case 0: + return $this->getId(); + break; + case 1: + return $this->getCreditNoteId(); + break; + case 2: + return $this->getAdminId(); + break; + case 3: + return $this->getComment(); + break; + case 4: + return $this->getCreatedAt(); + break; + case 5: + return $this->getUpdatedAt(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * + * @return array an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false) + { + if (isset($alreadyDumpedObjects['CreditNoteComment'][$this->getPrimaryKey()])) { + return '*RECURSION*'; + } + $alreadyDumpedObjects['CreditNoteComment'][$this->getPrimaryKey()] = true; + $keys = CreditNoteCommentTableMap::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getId(), + $keys[1] => $this->getCreditNoteId(), + $keys[2] => $this->getAdminId(), + $keys[3] => $this->getComment(), + $keys[4] => $this->getCreatedAt(), + $keys[5] => $this->getUpdatedAt(), + ); + $virtualColumns = $this->virtualColumns; + foreach ($virtualColumns as $key => $virtualColumn) { + $result[$key] = $virtualColumn; + } + + if ($includeForeignObjects) { + if (null !== $this->aCreditNote) { + $result['CreditNote'] = $this->aCreditNote->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + if (null !== $this->aAdmin) { + $result['Admin'] = $this->aAdmin->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + } + + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return void + */ + public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) + { + $pos = CreditNoteCommentTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch ($pos) { + case 0: + $this->setId($value); + break; + case 1: + $this->setCreditNoteId($value); + break; + case 2: + $this->setAdminId($value); + break; + case 3: + $this->setComment($value); + break; + case 4: + $this->setCreatedAt($value); + break; + case 5: + $this->setUpdatedAt($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * The default key type is the column's TableMap::TYPE_PHPNAME. + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) + { + $keys = CreditNoteCommentTableMap::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setCreditNoteId($arr[$keys[1]]); + if (array_key_exists($keys[2], $arr)) $this->setAdminId($arr[$keys[2]]); + if (array_key_exists($keys[3], $arr)) $this->setComment($arr[$keys[3]]); + if (array_key_exists($keys[4], $arr)) $this->setCreatedAt($arr[$keys[4]]); + if (array_key_exists($keys[5], $arr)) $this->setUpdatedAt($arr[$keys[5]]); + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(CreditNoteCommentTableMap::DATABASE_NAME); + + if ($this->isColumnModified(CreditNoteCommentTableMap::ID)) $criteria->add(CreditNoteCommentTableMap::ID, $this->id); + if ($this->isColumnModified(CreditNoteCommentTableMap::CREDIT_NOTE_ID)) $criteria->add(CreditNoteCommentTableMap::CREDIT_NOTE_ID, $this->credit_note_id); + if ($this->isColumnModified(CreditNoteCommentTableMap::ADMIN_ID)) $criteria->add(CreditNoteCommentTableMap::ADMIN_ID, $this->admin_id); + if ($this->isColumnModified(CreditNoteCommentTableMap::COMMENT)) $criteria->add(CreditNoteCommentTableMap::COMMENT, $this->comment); + if ($this->isColumnModified(CreditNoteCommentTableMap::CREATED_AT)) $criteria->add(CreditNoteCommentTableMap::CREATED_AT, $this->created_at); + if ($this->isColumnModified(CreditNoteCommentTableMap::UPDATED_AT)) $criteria->add(CreditNoteCommentTableMap::UPDATED_AT, $this->updated_at); + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(CreditNoteCommentTableMap::DATABASE_NAME); + $criteria->add(CreditNoteCommentTableMap::ID, $this->id); + + return $criteria; + } + + /** + * Returns the primary key for this object (row). + * @return int + */ + public function getPrimaryKey() + { + return $this->getId(); + } + + /** + * Generic method to set the primary key (id column). + * + * @param int $key Primary key. + * @return void + */ + public function setPrimaryKey($key) + { + $this->setId($key); + } + + /** + * Returns true if the primary key for this object is null. + * @return boolean + */ + public function isPrimaryKeyNull() + { + + return null === $this->getId(); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of \CreditNote\Model\CreditNoteComment (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false, $makeNew = true) + { + $copyObj->setCreditNoteId($this->getCreditNoteId()); + $copyObj->setAdminId($this->getAdminId()); + $copyObj->setComment($this->getComment()); + $copyObj->setCreatedAt($this->getCreatedAt()); + $copyObj->setUpdatedAt($this->getUpdatedAt()); + if ($makeNew) { + $copyObj->setNew(true); + $copyObj->setId(NULL); // this is a auto-increment column, so set to default value + } + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \CreditNote\Model\CreditNoteComment Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + + return $copyObj; + } + + /** + * Declares an association between this object and a ChildCreditNote object. + * + * @param ChildCreditNote $v + * @return \CreditNote\Model\CreditNoteComment The current object (for fluent API support) + * @throws PropelException + */ + public function setCreditNote(ChildCreditNote $v = null) + { + if ($v === null) { + $this->setCreditNoteId(NULL); + } else { + $this->setCreditNoteId($v->getId()); + } + + $this->aCreditNote = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCreditNote object, it will not be re-added. + if ($v !== null) { + $v->addCreditNoteComment($this); + } + + + return $this; + } + + + /** + * Get the associated ChildCreditNote object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCreditNote The associated ChildCreditNote object. + * @throws PropelException + */ + public function getCreditNote(ConnectionInterface $con = null) + { + if ($this->aCreditNote === null && ($this->credit_note_id !== null)) { + $this->aCreditNote = ChildCreditNoteQuery::create()->findPk($this->credit_note_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCreditNote->addCreditNoteComments($this); + */ + } + + return $this->aCreditNote; + } + + /** + * Declares an association between this object and a ChildAdmin object. + * + * @param ChildAdmin $v + * @return \CreditNote\Model\CreditNoteComment The current object (for fluent API support) + * @throws PropelException + */ + public function setAdmin(ChildAdmin $v = null) + { + if ($v === null) { + $this->setAdminId(NULL); + } else { + $this->setAdminId($v->getId()); + } + + $this->aAdmin = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildAdmin object, it will not be re-added. + if ($v !== null) { + $v->addCreditNoteComment($this); + } + + + return $this; + } + + + /** + * Get the associated ChildAdmin object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildAdmin The associated ChildAdmin object. + * @throws PropelException + */ + public function getAdmin(ConnectionInterface $con = null) + { + if ($this->aAdmin === null && ($this->admin_id !== null)) { + $this->aAdmin = AdminQuery::create()->findPk($this->admin_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aAdmin->addCreditNoteComments($this); + */ + } + + return $this->aAdmin; + } + + /** + * Clears the current object and sets all attributes to their default values + */ + public function clear() + { + $this->id = null; + $this->credit_note_id = null; + $this->admin_id = null; + $this->comment = null; + $this->created_at = null; + $this->updated_at = null; + $this->alreadyInSave = false; + $this->clearAllReferences(); + $this->resetModified(); + $this->setNew(true); + $this->setDeleted(false); + } + + /** + * Resets all references to other model objects or collections of model objects. + * + * This method is a user-space workaround for PHP's inability to garbage collect + * objects with circular references (even in PHP 5.3). This is currently necessary + * when using Propel in certain daemon or large-volume/high-memory operations. + * + * @param boolean $deep Whether to also clear the references on all referrer objects. + */ + public function clearAllReferences($deep = false) + { + if ($deep) { + } // if ($deep) + + $this->aCreditNote = null; + $this->aAdmin = null; + } + + /** + * Return the string representation of this object + * + * @return string + */ + public function __toString() + { + return (string) $this->exportTo(CreditNoteCommentTableMap::DEFAULT_STRING_FORMAT); + } + + // timestampable behavior + + /** + * Mark the current object so that the update date doesn't get updated during next save + * + * @return ChildCreditNoteComment The current object (for fluent API support) + */ + public function keepUpdateDateUnchanged() + { + $this->modifiedColumns[CreditNoteCommentTableMap::UPDATED_AT] = true; + + return $this; + } + + /** + * Code to be run before persisting the object + * @param ConnectionInterface $con + * @return boolean + */ + public function preSave(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after persisting the object + * @param ConnectionInterface $con + */ + public function postSave(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before inserting to database + * @param ConnectionInterface $con + * @return boolean + */ + public function preInsert(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after inserting to database + * @param ConnectionInterface $con + */ + public function postInsert(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before updating the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preUpdate(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after updating the object in database + * @param ConnectionInterface $con + */ + public function postUpdate(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before deleting the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preDelete(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after deleting the object in database + * @param ConnectionInterface $con + */ + public function postDelete(ConnectionInterface $con = null) + { + + } + + + /** + * Derived method to catches calls to undefined methods. + * + * Provides magic import/export method support (fromXML()/toXML(), fromYAML()/toYAML(), etc.). + * Allows to define default __call() behavior if you overwrite __call() + * + * @param string $name + * @param mixed $params + * + * @return array|string + */ + public function __call($name, $params) + { + if (0 === strpos($name, 'get')) { + $virtualColumn = substr($name, 3); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + + $virtualColumn = lcfirst($virtualColumn); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + } + + if (0 === strpos($name, 'from')) { + $format = substr($name, 4); + + return $this->importFrom($format, reset($params)); + } + + if (0 === strpos($name, 'to')) { + $format = substr($name, 2); + $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true; + + return $this->exportTo($format, $includeLazyLoadColumns); + } + + throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name)); + } + +} diff --git a/local/modules/CreditNote/Model/Base/CreditNoteCommentQuery.php b/local/modules/CreditNote/Model/Base/CreditNoteCommentQuery.php new file mode 100644 index 000000000..ce8a6e2eb --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CreditNoteCommentQuery.php @@ -0,0 +1,793 @@ +setModelAlias($modelAlias); + } + if ($criteria instanceof Criteria) { + $query->mergeWith($criteria); + } + + return $query; + } + + /** + * Find object by primary key. + * Propel uses the instance pool to skip the database if the object exists. + * Go fast if the query is untouched. + * + * + * $obj = $c->findPk(12, $con); + * + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ChildCreditNoteComment|array|mixed the result, formatted by the current formatter + */ + public function findPk($key, $con = null) + { + if ($key === null) { + return null; + } + if ((null !== ($obj = CreditNoteCommentTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) { + // the object is already in the instance pool + return $obj; + } + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CreditNoteCommentTableMap::DATABASE_NAME); + } + $this->basePreSelect($con); + if ($this->formatter || $this->modelAlias || $this->with || $this->select + || $this->selectColumns || $this->asColumns || $this->selectModifiers + || $this->map || $this->having || $this->joins) { + return $this->findPkComplex($key, $con); + } else { + return $this->findPkSimple($key, $con); + } + } + + /** + * Find object by primary key using raw SQL to go fast. + * Bypass doSelect() and the object formatter by using generated code. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCreditNoteComment A model object, or null if the key is not found + */ + protected function findPkSimple($key, $con) + { + $sql = 'SELECT ID, CREDIT_NOTE_ID, ADMIN_ID, COMMENT, CREATED_AT, UPDATED_AT FROM credit_note_comment WHERE ID = :p0'; + try { + $stmt = $con->prepare($sql); + $stmt->bindValue(':p0', $key, PDO::PARAM_INT); + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e); + } + $obj = null; + if ($row = $stmt->fetch(\PDO::FETCH_NUM)) { + $obj = new ChildCreditNoteComment(); + $obj->hydrate($row); + CreditNoteCommentTableMap::addInstanceToPool($obj, (string) $key); + } + $stmt->closeCursor(); + + return $obj; + } + + /** + * Find object by primary key. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCreditNoteComment|array|mixed the result, formatted by the current formatter + */ + protected function findPkComplex($key, $con) + { + // As the query uses a PK condition, no limit(1) is necessary. + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKey($key) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher); + } + + /** + * Find objects by primary key + * + * $objs = $c->findPks(array(12, 56, 832), $con); + * + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter + */ + public function findPks($keys, $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getReadConnection($this->getDbName()); + } + $this->basePreSelect($con); + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKeys($keys) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->format($dataFetcher); + } + + /** + * Filter the query by primary key + * + * @param mixed $key Primary key to use for the query + * + * @return ChildCreditNoteCommentQuery The current query, for fluid interface + */ + public function filterByPrimaryKey($key) + { + + return $this->addUsingAlias(CreditNoteCommentTableMap::ID, $key, Criteria::EQUAL); + } + + /** + * Filter the query by a list of primary keys + * + * @param array $keys The list of primary key to use for the query + * + * @return ChildCreditNoteCommentQuery The current query, for fluid interface + */ + public function filterByPrimaryKeys($keys) + { + + return $this->addUsingAlias(CreditNoteCommentTableMap::ID, $keys, Criteria::IN); + } + + /** + * Filter the query on the id column + * + * Example usage: + * + * $query->filterById(1234); // WHERE id = 1234 + * $query->filterById(array(12, 34)); // WHERE id IN (12, 34) + * $query->filterById(array('min' => 12)); // WHERE id > 12 + * + * + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteCommentQuery The current query, for fluid interface + */ + public function filterById($id = null, $comparison = null) + { + if (is_array($id)) { + $useMinMax = false; + if (isset($id['min'])) { + $this->addUsingAlias(CreditNoteCommentTableMap::ID, $id['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($id['max'])) { + $this->addUsingAlias(CreditNoteCommentTableMap::ID, $id['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteCommentTableMap::ID, $id, $comparison); + } + + /** + * Filter the query on the credit_note_id column + * + * Example usage: + * + * $query->filterByCreditNoteId(1234); // WHERE credit_note_id = 1234 + * $query->filterByCreditNoteId(array(12, 34)); // WHERE credit_note_id IN (12, 34) + * $query->filterByCreditNoteId(array('min' => 12)); // WHERE credit_note_id > 12 + * + * + * @see filterByCreditNote() + * + * @param mixed $creditNoteId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteCommentQuery The current query, for fluid interface + */ + public function filterByCreditNoteId($creditNoteId = null, $comparison = null) + { + if (is_array($creditNoteId)) { + $useMinMax = false; + if (isset($creditNoteId['min'])) { + $this->addUsingAlias(CreditNoteCommentTableMap::CREDIT_NOTE_ID, $creditNoteId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($creditNoteId['max'])) { + $this->addUsingAlias(CreditNoteCommentTableMap::CREDIT_NOTE_ID, $creditNoteId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteCommentTableMap::CREDIT_NOTE_ID, $creditNoteId, $comparison); + } + + /** + * Filter the query on the admin_id column + * + * Example usage: + * + * $query->filterByAdminId(1234); // WHERE admin_id = 1234 + * $query->filterByAdminId(array(12, 34)); // WHERE admin_id IN (12, 34) + * $query->filterByAdminId(array('min' => 12)); // WHERE admin_id > 12 + * + * + * @see filterByAdmin() + * + * @param mixed $adminId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteCommentQuery The current query, for fluid interface + */ + public function filterByAdminId($adminId = null, $comparison = null) + { + if (is_array($adminId)) { + $useMinMax = false; + if (isset($adminId['min'])) { + $this->addUsingAlias(CreditNoteCommentTableMap::ADMIN_ID, $adminId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($adminId['max'])) { + $this->addUsingAlias(CreditNoteCommentTableMap::ADMIN_ID, $adminId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteCommentTableMap::ADMIN_ID, $adminId, $comparison); + } + + /** + * Filter the query on the comment column + * + * Example usage: + * + * $query->filterByComment('fooValue'); // WHERE comment = 'fooValue' + * $query->filterByComment('%fooValue%'); // WHERE comment LIKE '%fooValue%' + * + * + * @param string $comment The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteCommentQuery The current query, for fluid interface + */ + public function filterByComment($comment = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($comment)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $comment)) { + $comment = str_replace('*', '%', $comment); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteCommentTableMap::COMMENT, $comment, $comparison); + } + + /** + * Filter the query on the created_at column + * + * Example usage: + * + * $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14' + * $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14' + * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' + * + * + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteCommentQuery The current query, for fluid interface + */ + public function filterByCreatedAt($createdAt = null, $comparison = null) + { + if (is_array($createdAt)) { + $useMinMax = false; + if (isset($createdAt['min'])) { + $this->addUsingAlias(CreditNoteCommentTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($createdAt['max'])) { + $this->addUsingAlias(CreditNoteCommentTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteCommentTableMap::CREATED_AT, $createdAt, $comparison); + } + + /** + * Filter the query on the updated_at column + * + * Example usage: + * + * $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14' + * $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14' + * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' + * + * + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteCommentQuery The current query, for fluid interface + */ + public function filterByUpdatedAt($updatedAt = null, $comparison = null) + { + if (is_array($updatedAt)) { + $useMinMax = false; + if (isset($updatedAt['min'])) { + $this->addUsingAlias(CreditNoteCommentTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($updatedAt['max'])) { + $this->addUsingAlias(CreditNoteCommentTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteCommentTableMap::UPDATED_AT, $updatedAt, $comparison); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNote object + * + * @param \CreditNote\Model\CreditNote|ObjectCollection $creditNote The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteCommentQuery The current query, for fluid interface + */ + public function filterByCreditNote($creditNote, $comparison = null) + { + if ($creditNote instanceof \CreditNote\Model\CreditNote) { + return $this + ->addUsingAlias(CreditNoteCommentTableMap::CREDIT_NOTE_ID, $creditNote->getId(), $comparison); + } elseif ($creditNote instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CreditNoteCommentTableMap::CREDIT_NOTE_ID, $creditNote->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByCreditNote() only accepts arguments of type \CreditNote\Model\CreditNote or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNote relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteCommentQuery The current query, for fluid interface + */ + public function joinCreditNote($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNote'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNote'); + } + + return $this; + } + + /** + * Use the CreditNote relation CreditNote object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCreditNote($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNote', '\CreditNote\Model\CreditNoteQuery'); + } + + /** + * Filter the query by a related \Thelia\Model\Admin object + * + * @param \Thelia\Model\Admin|ObjectCollection $admin The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteCommentQuery The current query, for fluid interface + */ + public function filterByAdmin($admin, $comparison = null) + { + if ($admin instanceof \Thelia\Model\Admin) { + return $this + ->addUsingAlias(CreditNoteCommentTableMap::ADMIN_ID, $admin->getId(), $comparison); + } elseif ($admin instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CreditNoteCommentTableMap::ADMIN_ID, $admin->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByAdmin() only accepts arguments of type \Thelia\Model\Admin or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the Admin relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteCommentQuery The current query, for fluid interface + */ + public function joinAdmin($relationAlias = null, $joinType = Criteria::LEFT_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('Admin'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'Admin'); + } + + return $this; + } + + /** + * Use the Admin relation Admin object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \Thelia\Model\AdminQuery A secondary query class using the current class as primary query + */ + public function useAdminQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) + { + return $this + ->joinAdmin($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'Admin', '\Thelia\Model\AdminQuery'); + } + + /** + * Exclude object from result + * + * @param ChildCreditNoteComment $creditNoteComment Object to remove from the list of results + * + * @return ChildCreditNoteCommentQuery The current query, for fluid interface + */ + public function prune($creditNoteComment = null) + { + if ($creditNoteComment) { + $this->addUsingAlias(CreditNoteCommentTableMap::ID, $creditNoteComment->getId(), Criteria::NOT_EQUAL); + } + + return $this; + } + + /** + * Deletes all rows from the credit_note_comment table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public function doDeleteAll(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteCommentTableMap::DATABASE_NAME); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + $affectedRows += parent::doDeleteAll($con); + // Because this db requires some delete cascade/set null emulation, we have to + // clear the cached instance *after* the emulation has happened (since + // instances get re-added by the select statement contained therein). + CreditNoteCommentTableMap::clearInstancePool(); + CreditNoteCommentTableMap::clearRelatedInstancePool(); + + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $affectedRows; + } + + /** + * Performs a DELETE on the database, given a ChildCreditNoteComment or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or ChildCreditNoteComment object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public function delete(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteCommentTableMap::DATABASE_NAME); + } + + $criteria = $this; + + // Set the correct dbName + $criteria->setDbName(CreditNoteCommentTableMap::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + + + CreditNoteCommentTableMap::removeInstanceFromPool($criteria); + + $affectedRows += ModelCriteria::delete($con); + CreditNoteCommentTableMap::clearRelatedInstancePool(); + $con->commit(); + + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + // timestampable behavior + + /** + * Filter by the latest updated + * + * @param int $nbDays Maximum age of the latest update in days + * + * @return ChildCreditNoteCommentQuery The current query, for fluid interface + */ + public function recentlyUpdated($nbDays = 7) + { + return $this->addUsingAlias(CreditNoteCommentTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL); + } + + /** + * Filter by the latest created + * + * @param int $nbDays Maximum age of in days + * + * @return ChildCreditNoteCommentQuery The current query, for fluid interface + */ + public function recentlyCreated($nbDays = 7) + { + return $this->addUsingAlias(CreditNoteCommentTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL); + } + + /** + * Order by update date desc + * + * @return ChildCreditNoteCommentQuery The current query, for fluid interface + */ + public function lastUpdatedFirst() + { + return $this->addDescendingOrderByColumn(CreditNoteCommentTableMap::UPDATED_AT); + } + + /** + * Order by update date asc + * + * @return ChildCreditNoteCommentQuery The current query, for fluid interface + */ + public function firstUpdatedFirst() + { + return $this->addAscendingOrderByColumn(CreditNoteCommentTableMap::UPDATED_AT); + } + + /** + * Order by create date desc + * + * @return ChildCreditNoteCommentQuery The current query, for fluid interface + */ + public function lastCreatedFirst() + { + return $this->addDescendingOrderByColumn(CreditNoteCommentTableMap::CREATED_AT); + } + + /** + * Order by create date asc + * + * @return ChildCreditNoteCommentQuery The current query, for fluid interface + */ + public function firstCreatedFirst() + { + return $this->addAscendingOrderByColumn(CreditNoteCommentTableMap::CREATED_AT); + } + +} // CreditNoteCommentQuery diff --git a/local/modules/CreditNote/Model/Base/CreditNoteDetail.php b/local/modules/CreditNote/Model/Base/CreditNoteDetail.php new file mode 100644 index 000000000..9524eaad8 --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CreditNoteDetail.php @@ -0,0 +1,1954 @@ +price = '0.000000'; + $this->price_with_tax = '0.000000'; + $this->quantity = 0; + } + + /** + * Initializes internal state of CreditNote\Model\Base\CreditNoteDetail object. + * @see applyDefaults() + */ + public function __construct() + { + $this->applyDefaultValues(); + } + + /** + * Returns whether the object has been modified. + * + * @return boolean True if the object has been modified. + */ + public function isModified() + { + return !!$this->modifiedColumns; + } + + /** + * Has specified column been modified? + * + * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID + * @return boolean True if $col has been modified. + */ + public function isColumnModified($col) + { + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); + } + + /** + * Get the columns that have been modified in this object. + * @return array A unique list of the modified column names for this object. + */ + public function getModifiedColumns() + { + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; + } + + /** + * Returns whether the object has ever been saved. This will + * be false, if the object was retrieved from storage or was created + * and then saved. + * + * @return boolean true, if the object has never been persisted. + */ + public function isNew() + { + return $this->new; + } + + /** + * Setter for the isNew attribute. This method will be called + * by Propel-generated children and objects. + * + * @param boolean $b the state of the object. + */ + public function setNew($b) + { + $this->new = (Boolean) $b; + } + + /** + * Whether this object has been deleted. + * @return boolean The deleted state of this object. + */ + public function isDeleted() + { + return $this->deleted; + } + + /** + * Specify whether this object has been deleted. + * @param boolean $b The deleted state of this object. + * @return void + */ + public function setDeleted($b) + { + $this->deleted = (Boolean) $b; + } + + /** + * Sets the modified state for the object to be false. + * @param string $col If supplied, only the specified column is reset. + * @return void + */ + public function resetModified($col = null) + { + if (null !== $col) { + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); + } + } else { + $this->modifiedColumns = array(); + } + } + + /** + * Compares this with another CreditNoteDetail instance. If + * obj is an instance of CreditNoteDetail, delegates to + * equals(CreditNoteDetail). Otherwise, returns false. + * + * @param mixed $obj The object to compare to. + * @return boolean Whether equal to the object specified. + */ + public function equals($obj) + { + $thisclazz = get_class($this); + if (!is_object($obj) || !($obj instanceof $thisclazz)) { + return false; + } + + if ($this === $obj) { + return true; + } + + if (null === $this->getPrimaryKey() + || null === $obj->getPrimaryKey()) { + return false; + } + + return $this->getPrimaryKey() === $obj->getPrimaryKey(); + } + + /** + * If the primary key is not null, return the hashcode of the + * primary key. Otherwise, return the hash code of the object. + * + * @return int Hashcode + */ + public function hashCode() + { + if (null !== $this->getPrimaryKey()) { + return crc32(serialize($this->getPrimaryKey())); + } + + return crc32(serialize(clone $this)); + } + + /** + * Get the associative array of the virtual columns in this object + * + * @return array + */ + public function getVirtualColumns() + { + return $this->virtualColumns; + } + + /** + * Checks the existence of a virtual column in this object + * + * @param string $name The virtual column name + * @return boolean + */ + public function hasVirtualColumn($name) + { + return array_key_exists($name, $this->virtualColumns); + } + + /** + * Get the value of a virtual column in this object + * + * @param string $name The virtual column name + * @return mixed + * + * @throws PropelException + */ + public function getVirtualColumn($name) + { + if (!$this->hasVirtualColumn($name)) { + throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name)); + } + + return $this->virtualColumns[$name]; + } + + /** + * Set the value of a virtual column in this object + * + * @param string $name The virtual column name + * @param mixed $value The value to give to the virtual column + * + * @return CreditNoteDetail The current object, for fluid interface + */ + public function setVirtualColumn($name, $value) + { + $this->virtualColumns[$name] = $value; + + return $this; + } + + /** + * Logs a message using Propel::log(). + * + * @param string $msg + * @param int $priority One of the Propel::LOG_* logging levels + * @return boolean + */ + protected function log($msg, $priority = Propel::LOG_INFO) + { + return Propel::log(get_class($this) . ': ' . $msg, $priority); + } + + /** + * Populate the current object from a string, using a given parser format + * + * $book = new Book(); + * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, + * or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param string $data The source data to import from + * + * @return CreditNoteDetail The current object, for fluid interface + */ + public function importFrom($parser, $data) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + $this->fromArray($parser->toArray($data), TableMap::TYPE_PHPNAME); + + return $this; + } + + /** + * Export the current object properties to a string, using a given parser format + * + * $book = BookQuery::create()->findPk(9012); + * echo $book->exportTo('JSON'); + * => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE. + * @return string The exported data + */ + public function exportTo($parser, $includeLazyLoadColumns = true) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true)); + } + + /** + * Clean up internal collections prior to serializing + * Avoids recursive loops that turn into segmentation faults when serializing + */ + public function __sleep() + { + $this->clearAllReferences(); + + return array_keys(get_object_vars($this)); + } + + /** + * Get the [id] column value. + * + * @return int + */ + public function getId() + { + + return $this->id; + } + + /** + * Get the [credit_note_id] column value. + * + * @return int + */ + public function getCreditNoteId() + { + + return $this->credit_note_id; + } + + /** + * Get the [price] column value. + * + * @return string + */ + public function getPrice() + { + + return $this->price; + } + + /** + * Get the [price_with_tax] column value. + * + * @return string + */ + public function getPriceWithTax() + { + + return $this->price_with_tax; + } + + /** + * Get the [tax_rule_id] column value. + * + * @return int + */ + public function getTaxRuleId() + { + + return $this->tax_rule_id; + } + + /** + * Get the [order_product_id] column value. + * + * @return int + */ + public function getOrderProductId() + { + + return $this->order_product_id; + } + + /** + * Get the [type] column value. + * + * @return string + */ + public function getType() + { + + return $this->type; + } + + /** + * Get the [quantity] column value. + * + * @return int + */ + public function getQuantity() + { + + return $this->quantity; + } + + /** + * Get the [title] column value. + * + * @return string + */ + public function getTitle() + { + + return $this->title; + } + + /** + * Get the [optionally formatted] temporal [created_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getCreatedAt($format = NULL) + { + if ($format === null) { + return $this->created_at; + } else { + return $this->created_at instanceof \DateTime ? $this->created_at->format($format) : null; + } + } + + /** + * Get the [optionally formatted] temporal [updated_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getUpdatedAt($format = NULL) + { + if ($format === null) { + return $this->updated_at; + } else { + return $this->updated_at instanceof \DateTime ? $this->updated_at->format($format) : null; + } + } + + /** + * Set the value of [id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteDetail The current object (for fluent API support) + */ + public function setId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->id !== $v) { + $this->id = $v; + $this->modifiedColumns[CreditNoteDetailTableMap::ID] = true; + } + + + return $this; + } // setId() + + /** + * Set the value of [credit_note_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteDetail The current object (for fluent API support) + */ + public function setCreditNoteId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->credit_note_id !== $v) { + $this->credit_note_id = $v; + $this->modifiedColumns[CreditNoteDetailTableMap::CREDIT_NOTE_ID] = true; + } + + if ($this->aCreditNote !== null && $this->aCreditNote->getId() !== $v) { + $this->aCreditNote = null; + } + + + return $this; + } // setCreditNoteId() + + /** + * Set the value of [price] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteDetail The current object (for fluent API support) + */ + public function setPrice($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->price !== $v) { + $this->price = $v; + $this->modifiedColumns[CreditNoteDetailTableMap::PRICE] = true; + } + + + return $this; + } // setPrice() + + /** + * Set the value of [price_with_tax] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteDetail The current object (for fluent API support) + */ + public function setPriceWithTax($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->price_with_tax !== $v) { + $this->price_with_tax = $v; + $this->modifiedColumns[CreditNoteDetailTableMap::PRICE_WITH_TAX] = true; + } + + + return $this; + } // setPriceWithTax() + + /** + * Set the value of [tax_rule_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteDetail The current object (for fluent API support) + */ + public function setTaxRuleId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->tax_rule_id !== $v) { + $this->tax_rule_id = $v; + $this->modifiedColumns[CreditNoteDetailTableMap::TAX_RULE_ID] = true; + } + + if ($this->aTaxRule !== null && $this->aTaxRule->getId() !== $v) { + $this->aTaxRule = null; + } + + + return $this; + } // setTaxRuleId() + + /** + * Set the value of [order_product_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteDetail The current object (for fluent API support) + */ + public function setOrderProductId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->order_product_id !== $v) { + $this->order_product_id = $v; + $this->modifiedColumns[CreditNoteDetailTableMap::ORDER_PRODUCT_ID] = true; + } + + if ($this->aOrderProduct !== null && $this->aOrderProduct->getId() !== $v) { + $this->aOrderProduct = null; + } + + + return $this; + } // setOrderProductId() + + /** + * Set the value of [type] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteDetail The current object (for fluent API support) + */ + public function setType($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->type !== $v) { + $this->type = $v; + $this->modifiedColumns[CreditNoteDetailTableMap::TYPE] = true; + } + + + return $this; + } // setType() + + /** + * Set the value of [quantity] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteDetail The current object (for fluent API support) + */ + public function setQuantity($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->quantity !== $v) { + $this->quantity = $v; + $this->modifiedColumns[CreditNoteDetailTableMap::QUANTITY] = true; + } + + + return $this; + } // setQuantity() + + /** + * Set the value of [title] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteDetail The current object (for fluent API support) + */ + public function setTitle($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->title !== $v) { + $this->title = $v; + $this->modifiedColumns[CreditNoteDetailTableMap::TITLE] = true; + } + + + return $this; + } // setTitle() + + /** + * Sets the value of [created_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CreditNoteDetail The current object (for fluent API support) + */ + public function setCreatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->created_at !== null || $dt !== null) { + if ($dt !== $this->created_at) { + $this->created_at = $dt; + $this->modifiedColumns[CreditNoteDetailTableMap::CREATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setCreatedAt() + + /** + * Sets the value of [updated_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CreditNoteDetail The current object (for fluent API support) + */ + public function setUpdatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->updated_at !== null || $dt !== null) { + if ($dt !== $this->updated_at) { + $this->updated_at = $dt; + $this->modifiedColumns[CreditNoteDetailTableMap::UPDATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setUpdatedAt() + + /** + * Indicates whether the columns in this object are only set to default values. + * + * This method can be used in conjunction with isModified() to indicate whether an object is both + * modified _and_ has some values set which are non-default. + * + * @return boolean Whether the columns in this object are only been set with default values. + */ + public function hasOnlyDefaultValues() + { + if ($this->price !== '0.000000') { + return false; + } + + if ($this->price_with_tax !== '0.000000') { + return false; + } + + if ($this->quantity !== 0) { + return false; + } + + // otherwise, everything was equal, so return TRUE + return true; + } // hasOnlyDefaultValues() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (0-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param array $row The row returned by DataFetcher->fetch(). + * @param int $startcol 0-based offset column which indicates which restultset column to start with. + * @param boolean $rehydrate Whether this object is being re-hydrated from the database. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM) + { + try { + + + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CreditNoteDetailTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; + $this->id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CreditNoteDetailTableMap::translateFieldName('CreditNoteId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->credit_note_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CreditNoteDetailTableMap::translateFieldName('Price', TableMap::TYPE_PHPNAME, $indexType)]; + $this->price = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CreditNoteDetailTableMap::translateFieldName('PriceWithTax', TableMap::TYPE_PHPNAME, $indexType)]; + $this->price_with_tax = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CreditNoteDetailTableMap::translateFieldName('TaxRuleId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->tax_rule_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CreditNoteDetailTableMap::translateFieldName('OrderProductId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->order_product_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CreditNoteDetailTableMap::translateFieldName('Type', TableMap::TYPE_PHPNAME, $indexType)]; + $this->type = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CreditNoteDetailTableMap::translateFieldName('Quantity', TableMap::TYPE_PHPNAME, $indexType)]; + $this->quantity = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CreditNoteDetailTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)]; + $this->title = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : CreditNoteDetailTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : CreditNoteDetailTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + $this->resetModified(); + + $this->setNew(false); + + if ($rehydrate) { + $this->ensureConsistency(); + } + + return $startcol + 11; // 11 = CreditNoteDetailTableMap::NUM_HYDRATE_COLUMNS. + + } catch (Exception $e) { + throw new PropelException("Error populating \CreditNote\Model\CreditNoteDetail object", 0, $e); + } + } + + /** + * Checks and repairs the internal consistency of the object. + * + * This method is executed after an already-instantiated object is re-hydrated + * from the database. It exists to check any foreign keys to make sure that + * the objects related to the current object are correct based on foreign key. + * + * You can override this method in the stub class, but you should always invoke + * the base method from the overridden method (i.e. parent::ensureConsistency()), + * in case your model changes. + * + * @throws PropelException + */ + public function ensureConsistency() + { + if ($this->aCreditNote !== null && $this->credit_note_id !== $this->aCreditNote->getId()) { + $this->aCreditNote = null; + } + if ($this->aTaxRule !== null && $this->tax_rule_id !== $this->aTaxRule->getId()) { + $this->aTaxRule = null; + } + if ($this->aOrderProduct !== null && $this->order_product_id !== $this->aOrderProduct->getId()) { + $this->aOrderProduct = null; + } + } // ensureConsistency + + /** + * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. + * + * This will only work if the object has been saved and has a valid primary key set. + * + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @return void + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + */ + public function reload($deep = false, ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("Cannot reload a deleted object."); + } + + if ($this->isNew()) { + throw new PropelException("Cannot reload an unsaved object."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CreditNoteDetailTableMap::DATABASE_NAME); + } + + // We don't need to alter the object instance pool; we're just modifying this instance + // already in the pool. + + $dataFetcher = ChildCreditNoteDetailQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con); + $row = $dataFetcher->fetch(); + $dataFetcher->close(); + if (!$row) { + throw new PropelException('Cannot find matching row in the database to reload object values.'); + } + $this->hydrate($row, 0, true, $dataFetcher->getIndexType()); // rehydrate + + if ($deep) { // also de-associate any related objects? + + $this->aCreditNote = null; + $this->aOrderProduct = null; + $this->aTaxRule = null; + } // if (deep) + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param ConnectionInterface $con + * @return void + * @throws PropelException + * @see CreditNoteDetail::setDeleted() + * @see CreditNoteDetail::isDeleted() + */ + public function delete(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteDetailTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + try { + $deleteQuery = ChildCreditNoteDetailQuery::create() + ->filterByPrimaryKey($this->getPrimaryKey()); + $ret = $this->preDelete($con); + if ($ret) { + $deleteQuery->delete($con); + $this->postDelete($con); + $con->commit(); + $this->setDeleted(true); + } else { + $con->commit(); + } + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Persists this object to the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All modified related objects will also be persisted in the doSave() + * method. This method wraps all precipitate database operations in a + * single transaction. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() + */ + public function save(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteDetailTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + $isInsert = $this->isNew(); + try { + $ret = $this->preSave($con); + if ($isInsert) { + $ret = $ret && $this->preInsert($con); + // timestampable behavior + if (!$this->isColumnModified(CreditNoteDetailTableMap::CREATED_AT)) { + $this->setCreatedAt(time()); + } + if (!$this->isColumnModified(CreditNoteDetailTableMap::UPDATED_AT)) { + $this->setUpdatedAt(time()); + } + } else { + $ret = $ret && $this->preUpdate($con); + // timestampable behavior + if ($this->isModified() && !$this->isColumnModified(CreditNoteDetailTableMap::UPDATED_AT)) { + $this->setUpdatedAt(time()); + } + } + if ($ret) { + $affectedRows = $this->doSave($con); + if ($isInsert) { + $this->postInsert($con); + } else { + $this->postUpdate($con); + } + $this->postSave($con); + CreditNoteDetailTableMap::addInstanceToPool($this); + } else { + $affectedRows = 0; + } + $con->commit(); + + return $affectedRows; + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Performs the work of inserting or updating the row in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() + */ + protected function doSave(ConnectionInterface $con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + // We call the save method on the following object(s) if they + // were passed to this object by their corresponding set + // method. This object relates to these object(s) by a + // foreign key reference. + + if ($this->aCreditNote !== null) { + if ($this->aCreditNote->isModified() || $this->aCreditNote->isNew()) { + $affectedRows += $this->aCreditNote->save($con); + } + $this->setCreditNote($this->aCreditNote); + } + + if ($this->aOrderProduct !== null) { + if ($this->aOrderProduct->isModified() || $this->aOrderProduct->isNew()) { + $affectedRows += $this->aOrderProduct->save($con); + } + $this->setOrderProduct($this->aOrderProduct); + } + + if ($this->aTaxRule !== null) { + if ($this->aTaxRule->isModified() || $this->aTaxRule->isNew()) { + $affectedRows += $this->aTaxRule->save($con); + } + $this->setTaxRule($this->aTaxRule); + } + + if ($this->isNew() || $this->isModified()) { + // persist changes + if ($this->isNew()) { + $this->doInsert($con); + } else { + $this->doUpdate($con); + } + $affectedRows += 1; + $this->resetModified(); + } + + $this->alreadyInSave = false; + + } + + return $affectedRows; + } // doSave() + + /** + * Insert the row in the database. + * + * @param ConnectionInterface $con + * + * @throws PropelException + * @see doSave() + */ + protected function doInsert(ConnectionInterface $con) + { + $modifiedColumns = array(); + $index = 0; + + $this->modifiedColumns[CreditNoteDetailTableMap::ID] = true; + if (null !== $this->id) { + throw new PropelException('Cannot insert a value for auto-increment primary key (' . CreditNoteDetailTableMap::ID . ')'); + } + + // check the columns in natural order for more readable SQL queries + if ($this->isColumnModified(CreditNoteDetailTableMap::ID)) { + $modifiedColumns[':p' . $index++] = 'ID'; + } + if ($this->isColumnModified(CreditNoteDetailTableMap::CREDIT_NOTE_ID)) { + $modifiedColumns[':p' . $index++] = 'CREDIT_NOTE_ID'; + } + if ($this->isColumnModified(CreditNoteDetailTableMap::PRICE)) { + $modifiedColumns[':p' . $index++] = 'PRICE'; + } + if ($this->isColumnModified(CreditNoteDetailTableMap::PRICE_WITH_TAX)) { + $modifiedColumns[':p' . $index++] = 'PRICE_WITH_TAX'; + } + if ($this->isColumnModified(CreditNoteDetailTableMap::TAX_RULE_ID)) { + $modifiedColumns[':p' . $index++] = 'TAX_RULE_ID'; + } + if ($this->isColumnModified(CreditNoteDetailTableMap::ORDER_PRODUCT_ID)) { + $modifiedColumns[':p' . $index++] = 'ORDER_PRODUCT_ID'; + } + if ($this->isColumnModified(CreditNoteDetailTableMap::TYPE)) { + $modifiedColumns[':p' . $index++] = 'TYPE'; + } + if ($this->isColumnModified(CreditNoteDetailTableMap::QUANTITY)) { + $modifiedColumns[':p' . $index++] = 'QUANTITY'; + } + if ($this->isColumnModified(CreditNoteDetailTableMap::TITLE)) { + $modifiedColumns[':p' . $index++] = 'TITLE'; + } + if ($this->isColumnModified(CreditNoteDetailTableMap::CREATED_AT)) { + $modifiedColumns[':p' . $index++] = 'CREATED_AT'; + } + if ($this->isColumnModified(CreditNoteDetailTableMap::UPDATED_AT)) { + $modifiedColumns[':p' . $index++] = 'UPDATED_AT'; + } + + $sql = sprintf( + 'INSERT INTO credit_note_detail (%s) VALUES (%s)', + implode(', ', $modifiedColumns), + implode(', ', array_keys($modifiedColumns)) + ); + + try { + $stmt = $con->prepare($sql); + foreach ($modifiedColumns as $identifier => $columnName) { + switch ($columnName) { + case 'ID': + $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT); + break; + case 'CREDIT_NOTE_ID': + $stmt->bindValue($identifier, $this->credit_note_id, PDO::PARAM_INT); + break; + case 'PRICE': + $stmt->bindValue($identifier, $this->price, PDO::PARAM_STR); + break; + case 'PRICE_WITH_TAX': + $stmt->bindValue($identifier, $this->price_with_tax, PDO::PARAM_STR); + break; + case 'TAX_RULE_ID': + $stmt->bindValue($identifier, $this->tax_rule_id, PDO::PARAM_INT); + break; + case 'ORDER_PRODUCT_ID': + $stmt->bindValue($identifier, $this->order_product_id, PDO::PARAM_INT); + break; + case 'TYPE': + $stmt->bindValue($identifier, $this->type, PDO::PARAM_STR); + break; + case 'QUANTITY': + $stmt->bindValue($identifier, $this->quantity, PDO::PARAM_INT); + break; + case 'TITLE': + $stmt->bindValue($identifier, $this->title, PDO::PARAM_STR); + break; + case 'CREATED_AT': + $stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + case 'UPDATED_AT': + $stmt->bindValue($identifier, $this->updated_at ? $this->updated_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + } + } + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e); + } + + try { + $pk = $con->lastInsertId(); + } catch (Exception $e) { + throw new PropelException('Unable to get autoincrement id.', 0, $e); + } + $this->setId($pk); + + $this->setNew(false); + } + + /** + * Update the row in the database. + * + * @param ConnectionInterface $con + * + * @return Integer Number of updated rows + * @see doSave() + */ + protected function doUpdate(ConnectionInterface $con) + { + $selectCriteria = $this->buildPkeyCriteria(); + $valuesCriteria = $this->buildCriteria(); + + return $selectCriteria->doUpdate($valuesCriteria, $con); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. + */ + public function getByName($name, $type = TableMap::TYPE_PHPNAME) + { + $pos = CreditNoteDetailTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + $field = $this->getByPosition($pos); + + return $field; + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch ($pos) { + case 0: + return $this->getId(); + break; + case 1: + return $this->getCreditNoteId(); + break; + case 2: + return $this->getPrice(); + break; + case 3: + return $this->getPriceWithTax(); + break; + case 4: + return $this->getTaxRuleId(); + break; + case 5: + return $this->getOrderProductId(); + break; + case 6: + return $this->getType(); + break; + case 7: + return $this->getQuantity(); + break; + case 8: + return $this->getTitle(); + break; + case 9: + return $this->getCreatedAt(); + break; + case 10: + return $this->getUpdatedAt(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * + * @return array an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false) + { + if (isset($alreadyDumpedObjects['CreditNoteDetail'][$this->getPrimaryKey()])) { + return '*RECURSION*'; + } + $alreadyDumpedObjects['CreditNoteDetail'][$this->getPrimaryKey()] = true; + $keys = CreditNoteDetailTableMap::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getId(), + $keys[1] => $this->getCreditNoteId(), + $keys[2] => $this->getPrice(), + $keys[3] => $this->getPriceWithTax(), + $keys[4] => $this->getTaxRuleId(), + $keys[5] => $this->getOrderProductId(), + $keys[6] => $this->getType(), + $keys[7] => $this->getQuantity(), + $keys[8] => $this->getTitle(), + $keys[9] => $this->getCreatedAt(), + $keys[10] => $this->getUpdatedAt(), + ); + $virtualColumns = $this->virtualColumns; + foreach ($virtualColumns as $key => $virtualColumn) { + $result[$key] = $virtualColumn; + } + + if ($includeForeignObjects) { + if (null !== $this->aCreditNote) { + $result['CreditNote'] = $this->aCreditNote->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + if (null !== $this->aOrderProduct) { + $result['OrderProduct'] = $this->aOrderProduct->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + if (null !== $this->aTaxRule) { + $result['TaxRule'] = $this->aTaxRule->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + } + + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return void + */ + public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) + { + $pos = CreditNoteDetailTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch ($pos) { + case 0: + $this->setId($value); + break; + case 1: + $this->setCreditNoteId($value); + break; + case 2: + $this->setPrice($value); + break; + case 3: + $this->setPriceWithTax($value); + break; + case 4: + $this->setTaxRuleId($value); + break; + case 5: + $this->setOrderProductId($value); + break; + case 6: + $this->setType($value); + break; + case 7: + $this->setQuantity($value); + break; + case 8: + $this->setTitle($value); + break; + case 9: + $this->setCreatedAt($value); + break; + case 10: + $this->setUpdatedAt($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * The default key type is the column's TableMap::TYPE_PHPNAME. + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) + { + $keys = CreditNoteDetailTableMap::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setCreditNoteId($arr[$keys[1]]); + if (array_key_exists($keys[2], $arr)) $this->setPrice($arr[$keys[2]]); + if (array_key_exists($keys[3], $arr)) $this->setPriceWithTax($arr[$keys[3]]); + if (array_key_exists($keys[4], $arr)) $this->setTaxRuleId($arr[$keys[4]]); + if (array_key_exists($keys[5], $arr)) $this->setOrderProductId($arr[$keys[5]]); + if (array_key_exists($keys[6], $arr)) $this->setType($arr[$keys[6]]); + if (array_key_exists($keys[7], $arr)) $this->setQuantity($arr[$keys[7]]); + if (array_key_exists($keys[8], $arr)) $this->setTitle($arr[$keys[8]]); + if (array_key_exists($keys[9], $arr)) $this->setCreatedAt($arr[$keys[9]]); + if (array_key_exists($keys[10], $arr)) $this->setUpdatedAt($arr[$keys[10]]); + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(CreditNoteDetailTableMap::DATABASE_NAME); + + if ($this->isColumnModified(CreditNoteDetailTableMap::ID)) $criteria->add(CreditNoteDetailTableMap::ID, $this->id); + if ($this->isColumnModified(CreditNoteDetailTableMap::CREDIT_NOTE_ID)) $criteria->add(CreditNoteDetailTableMap::CREDIT_NOTE_ID, $this->credit_note_id); + if ($this->isColumnModified(CreditNoteDetailTableMap::PRICE)) $criteria->add(CreditNoteDetailTableMap::PRICE, $this->price); + if ($this->isColumnModified(CreditNoteDetailTableMap::PRICE_WITH_TAX)) $criteria->add(CreditNoteDetailTableMap::PRICE_WITH_TAX, $this->price_with_tax); + if ($this->isColumnModified(CreditNoteDetailTableMap::TAX_RULE_ID)) $criteria->add(CreditNoteDetailTableMap::TAX_RULE_ID, $this->tax_rule_id); + if ($this->isColumnModified(CreditNoteDetailTableMap::ORDER_PRODUCT_ID)) $criteria->add(CreditNoteDetailTableMap::ORDER_PRODUCT_ID, $this->order_product_id); + if ($this->isColumnModified(CreditNoteDetailTableMap::TYPE)) $criteria->add(CreditNoteDetailTableMap::TYPE, $this->type); + if ($this->isColumnModified(CreditNoteDetailTableMap::QUANTITY)) $criteria->add(CreditNoteDetailTableMap::QUANTITY, $this->quantity); + if ($this->isColumnModified(CreditNoteDetailTableMap::TITLE)) $criteria->add(CreditNoteDetailTableMap::TITLE, $this->title); + if ($this->isColumnModified(CreditNoteDetailTableMap::CREATED_AT)) $criteria->add(CreditNoteDetailTableMap::CREATED_AT, $this->created_at); + if ($this->isColumnModified(CreditNoteDetailTableMap::UPDATED_AT)) $criteria->add(CreditNoteDetailTableMap::UPDATED_AT, $this->updated_at); + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(CreditNoteDetailTableMap::DATABASE_NAME); + $criteria->add(CreditNoteDetailTableMap::ID, $this->id); + + return $criteria; + } + + /** + * Returns the primary key for this object (row). + * @return int + */ + public function getPrimaryKey() + { + return $this->getId(); + } + + /** + * Generic method to set the primary key (id column). + * + * @param int $key Primary key. + * @return void + */ + public function setPrimaryKey($key) + { + $this->setId($key); + } + + /** + * Returns true if the primary key for this object is null. + * @return boolean + */ + public function isPrimaryKeyNull() + { + + return null === $this->getId(); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of \CreditNote\Model\CreditNoteDetail (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false, $makeNew = true) + { + $copyObj->setCreditNoteId($this->getCreditNoteId()); + $copyObj->setPrice($this->getPrice()); + $copyObj->setPriceWithTax($this->getPriceWithTax()); + $copyObj->setTaxRuleId($this->getTaxRuleId()); + $copyObj->setOrderProductId($this->getOrderProductId()); + $copyObj->setType($this->getType()); + $copyObj->setQuantity($this->getQuantity()); + $copyObj->setTitle($this->getTitle()); + $copyObj->setCreatedAt($this->getCreatedAt()); + $copyObj->setUpdatedAt($this->getUpdatedAt()); + if ($makeNew) { + $copyObj->setNew(true); + $copyObj->setId(NULL); // this is a auto-increment column, so set to default value + } + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \CreditNote\Model\CreditNoteDetail Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + + return $copyObj; + } + + /** + * Declares an association between this object and a ChildCreditNote object. + * + * @param ChildCreditNote $v + * @return \CreditNote\Model\CreditNoteDetail The current object (for fluent API support) + * @throws PropelException + */ + public function setCreditNote(ChildCreditNote $v = null) + { + if ($v === null) { + $this->setCreditNoteId(NULL); + } else { + $this->setCreditNoteId($v->getId()); + } + + $this->aCreditNote = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCreditNote object, it will not be re-added. + if ($v !== null) { + $v->addCreditNoteDetail($this); + } + + + return $this; + } + + + /** + * Get the associated ChildCreditNote object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCreditNote The associated ChildCreditNote object. + * @throws PropelException + */ + public function getCreditNote(ConnectionInterface $con = null) + { + if ($this->aCreditNote === null && ($this->credit_note_id !== null)) { + $this->aCreditNote = ChildCreditNoteQuery::create()->findPk($this->credit_note_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCreditNote->addCreditNoteDetails($this); + */ + } + + return $this->aCreditNote; + } + + /** + * Declares an association between this object and a ChildOrderProduct object. + * + * @param ChildOrderProduct $v + * @return \CreditNote\Model\CreditNoteDetail The current object (for fluent API support) + * @throws PropelException + */ + public function setOrderProduct(ChildOrderProduct $v = null) + { + if ($v === null) { + $this->setOrderProductId(NULL); + } else { + $this->setOrderProductId($v->getId()); + } + + $this->aOrderProduct = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildOrderProduct object, it will not be re-added. + if ($v !== null) { + $v->addCreditNoteDetail($this); + } + + + return $this; + } + + + /** + * Get the associated ChildOrderProduct object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildOrderProduct The associated ChildOrderProduct object. + * @throws PropelException + */ + public function getOrderProduct(ConnectionInterface $con = null) + { + if ($this->aOrderProduct === null && ($this->order_product_id !== null)) { + $this->aOrderProduct = OrderProductQuery::create()->findPk($this->order_product_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aOrderProduct->addCreditNoteDetails($this); + */ + } + + return $this->aOrderProduct; + } + + /** + * Declares an association between this object and a ChildTaxRule object. + * + * @param ChildTaxRule $v + * @return \CreditNote\Model\CreditNoteDetail The current object (for fluent API support) + * @throws PropelException + */ + public function setTaxRule(ChildTaxRule $v = null) + { + if ($v === null) { + $this->setTaxRuleId(NULL); + } else { + $this->setTaxRuleId($v->getId()); + } + + $this->aTaxRule = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildTaxRule object, it will not be re-added. + if ($v !== null) { + $v->addCreditNoteDetail($this); + } + + + return $this; + } + + + /** + * Get the associated ChildTaxRule object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildTaxRule The associated ChildTaxRule object. + * @throws PropelException + */ + public function getTaxRule(ConnectionInterface $con = null) + { + if ($this->aTaxRule === null && ($this->tax_rule_id !== null)) { + $this->aTaxRule = TaxRuleQuery::create()->findPk($this->tax_rule_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aTaxRule->addCreditNoteDetails($this); + */ + } + + return $this->aTaxRule; + } + + /** + * Clears the current object and sets all attributes to their default values + */ + public function clear() + { + $this->id = null; + $this->credit_note_id = null; + $this->price = null; + $this->price_with_tax = null; + $this->tax_rule_id = null; + $this->order_product_id = null; + $this->type = null; + $this->quantity = null; + $this->title = null; + $this->created_at = null; + $this->updated_at = null; + $this->alreadyInSave = false; + $this->clearAllReferences(); + $this->applyDefaultValues(); + $this->resetModified(); + $this->setNew(true); + $this->setDeleted(false); + } + + /** + * Resets all references to other model objects or collections of model objects. + * + * This method is a user-space workaround for PHP's inability to garbage collect + * objects with circular references (even in PHP 5.3). This is currently necessary + * when using Propel in certain daemon or large-volume/high-memory operations. + * + * @param boolean $deep Whether to also clear the references on all referrer objects. + */ + public function clearAllReferences($deep = false) + { + if ($deep) { + } // if ($deep) + + $this->aCreditNote = null; + $this->aOrderProduct = null; + $this->aTaxRule = null; + } + + /** + * Return the string representation of this object + * + * @return string + */ + public function __toString() + { + return (string) $this->exportTo(CreditNoteDetailTableMap::DEFAULT_STRING_FORMAT); + } + + // timestampable behavior + + /** + * Mark the current object so that the update date doesn't get updated during next save + * + * @return ChildCreditNoteDetail The current object (for fluent API support) + */ + public function keepUpdateDateUnchanged() + { + $this->modifiedColumns[CreditNoteDetailTableMap::UPDATED_AT] = true; + + return $this; + } + + /** + * Code to be run before persisting the object + * @param ConnectionInterface $con + * @return boolean + */ + public function preSave(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after persisting the object + * @param ConnectionInterface $con + */ + public function postSave(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before inserting to database + * @param ConnectionInterface $con + * @return boolean + */ + public function preInsert(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after inserting to database + * @param ConnectionInterface $con + */ + public function postInsert(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before updating the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preUpdate(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after updating the object in database + * @param ConnectionInterface $con + */ + public function postUpdate(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before deleting the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preDelete(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after deleting the object in database + * @param ConnectionInterface $con + */ + public function postDelete(ConnectionInterface $con = null) + { + + } + + + /** + * Derived method to catches calls to undefined methods. + * + * Provides magic import/export method support (fromXML()/toXML(), fromYAML()/toYAML(), etc.). + * Allows to define default __call() behavior if you overwrite __call() + * + * @param string $name + * @param mixed $params + * + * @return array|string + */ + public function __call($name, $params) + { + if (0 === strpos($name, 'get')) { + $virtualColumn = substr($name, 3); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + + $virtualColumn = lcfirst($virtualColumn); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + } + + if (0 === strpos($name, 'from')) { + $format = substr($name, 4); + + return $this->importFrom($format, reset($params)); + } + + if (0 === strpos($name, 'to')) { + $format = substr($name, 2); + $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true; + + return $this->exportTo($format, $includeLazyLoadColumns); + } + + throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name)); + } + +} diff --git a/local/modules/CreditNote/Model/Base/CreditNoteDetailQuery.php b/local/modules/CreditNote/Model/Base/CreditNoteDetailQuery.php new file mode 100644 index 000000000..306ac41a9 --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CreditNoteDetailQuery.php @@ -0,0 +1,1088 @@ +setModelAlias($modelAlias); + } + if ($criteria instanceof Criteria) { + $query->mergeWith($criteria); + } + + return $query; + } + + /** + * Find object by primary key. + * Propel uses the instance pool to skip the database if the object exists. + * Go fast if the query is untouched. + * + * + * $obj = $c->findPk(12, $con); + * + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ChildCreditNoteDetail|array|mixed the result, formatted by the current formatter + */ + public function findPk($key, $con = null) + { + if ($key === null) { + return null; + } + if ((null !== ($obj = CreditNoteDetailTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) { + // the object is already in the instance pool + return $obj; + } + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CreditNoteDetailTableMap::DATABASE_NAME); + } + $this->basePreSelect($con); + if ($this->formatter || $this->modelAlias || $this->with || $this->select + || $this->selectColumns || $this->asColumns || $this->selectModifiers + || $this->map || $this->having || $this->joins) { + return $this->findPkComplex($key, $con); + } else { + return $this->findPkSimple($key, $con); + } + } + + /** + * Find object by primary key using raw SQL to go fast. + * Bypass doSelect() and the object formatter by using generated code. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCreditNoteDetail A model object, or null if the key is not found + */ + protected function findPkSimple($key, $con) + { + $sql = 'SELECT ID, CREDIT_NOTE_ID, PRICE, PRICE_WITH_TAX, TAX_RULE_ID, ORDER_PRODUCT_ID, TYPE, QUANTITY, TITLE, CREATED_AT, UPDATED_AT FROM credit_note_detail WHERE ID = :p0'; + try { + $stmt = $con->prepare($sql); + $stmt->bindValue(':p0', $key, PDO::PARAM_INT); + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e); + } + $obj = null; + if ($row = $stmt->fetch(\PDO::FETCH_NUM)) { + $obj = new ChildCreditNoteDetail(); + $obj->hydrate($row); + CreditNoteDetailTableMap::addInstanceToPool($obj, (string) $key); + } + $stmt->closeCursor(); + + return $obj; + } + + /** + * Find object by primary key. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCreditNoteDetail|array|mixed the result, formatted by the current formatter + */ + protected function findPkComplex($key, $con) + { + // As the query uses a PK condition, no limit(1) is necessary. + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKey($key) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher); + } + + /** + * Find objects by primary key + * + * $objs = $c->findPks(array(12, 56, 832), $con); + * + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter + */ + public function findPks($keys, $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getReadConnection($this->getDbName()); + } + $this->basePreSelect($con); + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKeys($keys) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->format($dataFetcher); + } + + /** + * Filter the query by primary key + * + * @param mixed $key Primary key to use for the query + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function filterByPrimaryKey($key) + { + + return $this->addUsingAlias(CreditNoteDetailTableMap::ID, $key, Criteria::EQUAL); + } + + /** + * Filter the query by a list of primary keys + * + * @param array $keys The list of primary key to use for the query + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function filterByPrimaryKeys($keys) + { + + return $this->addUsingAlias(CreditNoteDetailTableMap::ID, $keys, Criteria::IN); + } + + /** + * Filter the query on the id column + * + * Example usage: + * + * $query->filterById(1234); // WHERE id = 1234 + * $query->filterById(array(12, 34)); // WHERE id IN (12, 34) + * $query->filterById(array('min' => 12)); // WHERE id > 12 + * + * + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function filterById($id = null, $comparison = null) + { + if (is_array($id)) { + $useMinMax = false; + if (isset($id['min'])) { + $this->addUsingAlias(CreditNoteDetailTableMap::ID, $id['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($id['max'])) { + $this->addUsingAlias(CreditNoteDetailTableMap::ID, $id['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteDetailTableMap::ID, $id, $comparison); + } + + /** + * Filter the query on the credit_note_id column + * + * Example usage: + * + * $query->filterByCreditNoteId(1234); // WHERE credit_note_id = 1234 + * $query->filterByCreditNoteId(array(12, 34)); // WHERE credit_note_id IN (12, 34) + * $query->filterByCreditNoteId(array('min' => 12)); // WHERE credit_note_id > 12 + * + * + * @see filterByCreditNote() + * + * @param mixed $creditNoteId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function filterByCreditNoteId($creditNoteId = null, $comparison = null) + { + if (is_array($creditNoteId)) { + $useMinMax = false; + if (isset($creditNoteId['min'])) { + $this->addUsingAlias(CreditNoteDetailTableMap::CREDIT_NOTE_ID, $creditNoteId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($creditNoteId['max'])) { + $this->addUsingAlias(CreditNoteDetailTableMap::CREDIT_NOTE_ID, $creditNoteId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteDetailTableMap::CREDIT_NOTE_ID, $creditNoteId, $comparison); + } + + /** + * Filter the query on the price column + * + * Example usage: + * + * $query->filterByPrice(1234); // WHERE price = 1234 + * $query->filterByPrice(array(12, 34)); // WHERE price IN (12, 34) + * $query->filterByPrice(array('min' => 12)); // WHERE price > 12 + * + * + * @param mixed $price The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function filterByPrice($price = null, $comparison = null) + { + if (is_array($price)) { + $useMinMax = false; + if (isset($price['min'])) { + $this->addUsingAlias(CreditNoteDetailTableMap::PRICE, $price['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($price['max'])) { + $this->addUsingAlias(CreditNoteDetailTableMap::PRICE, $price['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteDetailTableMap::PRICE, $price, $comparison); + } + + /** + * Filter the query on the price_with_tax column + * + * Example usage: + * + * $query->filterByPriceWithTax(1234); // WHERE price_with_tax = 1234 + * $query->filterByPriceWithTax(array(12, 34)); // WHERE price_with_tax IN (12, 34) + * $query->filterByPriceWithTax(array('min' => 12)); // WHERE price_with_tax > 12 + * + * + * @param mixed $priceWithTax The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function filterByPriceWithTax($priceWithTax = null, $comparison = null) + { + if (is_array($priceWithTax)) { + $useMinMax = false; + if (isset($priceWithTax['min'])) { + $this->addUsingAlias(CreditNoteDetailTableMap::PRICE_WITH_TAX, $priceWithTax['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($priceWithTax['max'])) { + $this->addUsingAlias(CreditNoteDetailTableMap::PRICE_WITH_TAX, $priceWithTax['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteDetailTableMap::PRICE_WITH_TAX, $priceWithTax, $comparison); + } + + /** + * Filter the query on the tax_rule_id column + * + * Example usage: + * + * $query->filterByTaxRuleId(1234); // WHERE tax_rule_id = 1234 + * $query->filterByTaxRuleId(array(12, 34)); // WHERE tax_rule_id IN (12, 34) + * $query->filterByTaxRuleId(array('min' => 12)); // WHERE tax_rule_id > 12 + * + * + * @see filterByTaxRule() + * + * @param mixed $taxRuleId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function filterByTaxRuleId($taxRuleId = null, $comparison = null) + { + if (is_array($taxRuleId)) { + $useMinMax = false; + if (isset($taxRuleId['min'])) { + $this->addUsingAlias(CreditNoteDetailTableMap::TAX_RULE_ID, $taxRuleId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($taxRuleId['max'])) { + $this->addUsingAlias(CreditNoteDetailTableMap::TAX_RULE_ID, $taxRuleId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteDetailTableMap::TAX_RULE_ID, $taxRuleId, $comparison); + } + + /** + * Filter the query on the order_product_id column + * + * Example usage: + * + * $query->filterByOrderProductId(1234); // WHERE order_product_id = 1234 + * $query->filterByOrderProductId(array(12, 34)); // WHERE order_product_id IN (12, 34) + * $query->filterByOrderProductId(array('min' => 12)); // WHERE order_product_id > 12 + * + * + * @see filterByOrderProduct() + * + * @param mixed $orderProductId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function filterByOrderProductId($orderProductId = null, $comparison = null) + { + if (is_array($orderProductId)) { + $useMinMax = false; + if (isset($orderProductId['min'])) { + $this->addUsingAlias(CreditNoteDetailTableMap::ORDER_PRODUCT_ID, $orderProductId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($orderProductId['max'])) { + $this->addUsingAlias(CreditNoteDetailTableMap::ORDER_PRODUCT_ID, $orderProductId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteDetailTableMap::ORDER_PRODUCT_ID, $orderProductId, $comparison); + } + + /** + * Filter the query on the type column + * + * Example usage: + * + * $query->filterByType('fooValue'); // WHERE type = 'fooValue' + * $query->filterByType('%fooValue%'); // WHERE type LIKE '%fooValue%' + * + * + * @param string $type The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function filterByType($type = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($type)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $type)) { + $type = str_replace('*', '%', $type); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteDetailTableMap::TYPE, $type, $comparison); + } + + /** + * Filter the query on the quantity column + * + * Example usage: + * + * $query->filterByQuantity(1234); // WHERE quantity = 1234 + * $query->filterByQuantity(array(12, 34)); // WHERE quantity IN (12, 34) + * $query->filterByQuantity(array('min' => 12)); // WHERE quantity > 12 + * + * + * @param mixed $quantity The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function filterByQuantity($quantity = null, $comparison = null) + { + if (is_array($quantity)) { + $useMinMax = false; + if (isset($quantity['min'])) { + $this->addUsingAlias(CreditNoteDetailTableMap::QUANTITY, $quantity['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($quantity['max'])) { + $this->addUsingAlias(CreditNoteDetailTableMap::QUANTITY, $quantity['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteDetailTableMap::QUANTITY, $quantity, $comparison); + } + + /** + * Filter the query on the title column + * + * Example usage: + * + * $query->filterByTitle('fooValue'); // WHERE title = 'fooValue' + * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' + * + * + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function filterByTitle($title = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($title)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $title)) { + $title = str_replace('*', '%', $title); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteDetailTableMap::TITLE, $title, $comparison); + } + + /** + * Filter the query on the created_at column + * + * Example usage: + * + * $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14' + * $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14' + * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' + * + * + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function filterByCreatedAt($createdAt = null, $comparison = null) + { + if (is_array($createdAt)) { + $useMinMax = false; + if (isset($createdAt['min'])) { + $this->addUsingAlias(CreditNoteDetailTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($createdAt['max'])) { + $this->addUsingAlias(CreditNoteDetailTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteDetailTableMap::CREATED_AT, $createdAt, $comparison); + } + + /** + * Filter the query on the updated_at column + * + * Example usage: + * + * $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14' + * $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14' + * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' + * + * + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function filterByUpdatedAt($updatedAt = null, $comparison = null) + { + if (is_array($updatedAt)) { + $useMinMax = false; + if (isset($updatedAt['min'])) { + $this->addUsingAlias(CreditNoteDetailTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($updatedAt['max'])) { + $this->addUsingAlias(CreditNoteDetailTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteDetailTableMap::UPDATED_AT, $updatedAt, $comparison); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNote object + * + * @param \CreditNote\Model\CreditNote|ObjectCollection $creditNote The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function filterByCreditNote($creditNote, $comparison = null) + { + if ($creditNote instanceof \CreditNote\Model\CreditNote) { + return $this + ->addUsingAlias(CreditNoteDetailTableMap::CREDIT_NOTE_ID, $creditNote->getId(), $comparison); + } elseif ($creditNote instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CreditNoteDetailTableMap::CREDIT_NOTE_ID, $creditNote->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByCreditNote() only accepts arguments of type \CreditNote\Model\CreditNote or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNote relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function joinCreditNote($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNote'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNote'); + } + + return $this; + } + + /** + * Use the CreditNote relation CreditNote object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCreditNote($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNote', '\CreditNote\Model\CreditNoteQuery'); + } + + /** + * Filter the query by a related \Thelia\Model\OrderProduct object + * + * @param \Thelia\Model\OrderProduct|ObjectCollection $orderProduct The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function filterByOrderProduct($orderProduct, $comparison = null) + { + if ($orderProduct instanceof \Thelia\Model\OrderProduct) { + return $this + ->addUsingAlias(CreditNoteDetailTableMap::ORDER_PRODUCT_ID, $orderProduct->getId(), $comparison); + } elseif ($orderProduct instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CreditNoteDetailTableMap::ORDER_PRODUCT_ID, $orderProduct->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByOrderProduct() only accepts arguments of type \Thelia\Model\OrderProduct or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the OrderProduct relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function joinOrderProduct($relationAlias = null, $joinType = Criteria::LEFT_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('OrderProduct'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'OrderProduct'); + } + + return $this; + } + + /** + * Use the OrderProduct relation OrderProduct object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \Thelia\Model\OrderProductQuery A secondary query class using the current class as primary query + */ + public function useOrderProductQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) + { + return $this + ->joinOrderProduct($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'OrderProduct', '\Thelia\Model\OrderProductQuery'); + } + + /** + * Filter the query by a related \Thelia\Model\TaxRule object + * + * @param \Thelia\Model\TaxRule|ObjectCollection $taxRule The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function filterByTaxRule($taxRule, $comparison = null) + { + if ($taxRule instanceof \Thelia\Model\TaxRule) { + return $this + ->addUsingAlias(CreditNoteDetailTableMap::TAX_RULE_ID, $taxRule->getId(), $comparison); + } elseif ($taxRule instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CreditNoteDetailTableMap::TAX_RULE_ID, $taxRule->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByTaxRule() only accepts arguments of type \Thelia\Model\TaxRule or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the TaxRule relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function joinTaxRule($relationAlias = null, $joinType = Criteria::LEFT_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('TaxRule'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'TaxRule'); + } + + return $this; + } + + /** + * Use the TaxRule relation TaxRule object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \Thelia\Model\TaxRuleQuery A secondary query class using the current class as primary query + */ + public function useTaxRuleQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) + { + return $this + ->joinTaxRule($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'TaxRule', '\Thelia\Model\TaxRuleQuery'); + } + + /** + * Exclude object from result + * + * @param ChildCreditNoteDetail $creditNoteDetail Object to remove from the list of results + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function prune($creditNoteDetail = null) + { + if ($creditNoteDetail) { + $this->addUsingAlias(CreditNoteDetailTableMap::ID, $creditNoteDetail->getId(), Criteria::NOT_EQUAL); + } + + return $this; + } + + /** + * Deletes all rows from the credit_note_detail table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public function doDeleteAll(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteDetailTableMap::DATABASE_NAME); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + $affectedRows += parent::doDeleteAll($con); + // Because this db requires some delete cascade/set null emulation, we have to + // clear the cached instance *after* the emulation has happened (since + // instances get re-added by the select statement contained therein). + CreditNoteDetailTableMap::clearInstancePool(); + CreditNoteDetailTableMap::clearRelatedInstancePool(); + + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $affectedRows; + } + + /** + * Performs a DELETE on the database, given a ChildCreditNoteDetail or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or ChildCreditNoteDetail object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public function delete(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteDetailTableMap::DATABASE_NAME); + } + + $criteria = $this; + + // Set the correct dbName + $criteria->setDbName(CreditNoteDetailTableMap::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + + + CreditNoteDetailTableMap::removeInstanceFromPool($criteria); + + $affectedRows += ModelCriteria::delete($con); + CreditNoteDetailTableMap::clearRelatedInstancePool(); + $con->commit(); + + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + // timestampable behavior + + /** + * Filter by the latest updated + * + * @param int $nbDays Maximum age of the latest update in days + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function recentlyUpdated($nbDays = 7) + { + return $this->addUsingAlias(CreditNoteDetailTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL); + } + + /** + * Filter by the latest created + * + * @param int $nbDays Maximum age of in days + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function recentlyCreated($nbDays = 7) + { + return $this->addUsingAlias(CreditNoteDetailTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL); + } + + /** + * Order by update date desc + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function lastUpdatedFirst() + { + return $this->addDescendingOrderByColumn(CreditNoteDetailTableMap::UPDATED_AT); + } + + /** + * Order by update date asc + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function firstUpdatedFirst() + { + return $this->addAscendingOrderByColumn(CreditNoteDetailTableMap::UPDATED_AT); + } + + /** + * Order by create date desc + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function lastCreatedFirst() + { + return $this->addDescendingOrderByColumn(CreditNoteDetailTableMap::CREATED_AT); + } + + /** + * Order by create date asc + * + * @return ChildCreditNoteDetailQuery The current query, for fluid interface + */ + public function firstCreatedFirst() + { + return $this->addAscendingOrderByColumn(CreditNoteDetailTableMap::CREATED_AT); + } + +} // CreditNoteDetailQuery diff --git a/local/modules/CreditNote/Model/Base/CreditNoteQuery.php b/local/modules/CreditNote/Model/Base/CreditNoteQuery.php new file mode 100644 index 000000000..6a164c418 --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CreditNoteQuery.php @@ -0,0 +1,2146 @@ +setModelAlias($modelAlias); + } + if ($criteria instanceof Criteria) { + $query->mergeWith($criteria); + } + + return $query; + } + + /** + * Find object by primary key. + * Propel uses the instance pool to skip the database if the object exists. + * Go fast if the query is untouched. + * + * + * $obj = $c->findPk(12, $con); + * + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ChildCreditNote|array|mixed the result, formatted by the current formatter + */ + public function findPk($key, $con = null) + { + if ($key === null) { + return null; + } + if ((null !== ($obj = CreditNoteTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) { + // the object is already in the instance pool + return $obj; + } + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CreditNoteTableMap::DATABASE_NAME); + } + $this->basePreSelect($con); + if ($this->formatter || $this->modelAlias || $this->with || $this->select + || $this->selectColumns || $this->asColumns || $this->selectModifiers + || $this->map || $this->having || $this->joins) { + return $this->findPkComplex($key, $con); + } else { + return $this->findPkSimple($key, $con); + } + } + + /** + * Find object by primary key using raw SQL to go fast. + * Bypass doSelect() and the object formatter by using generated code. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCreditNote A model object, or null if the key is not found + */ + protected function findPkSimple($key, $con) + { + $sql = 'SELECT ID, REF, INVOICE_REF, INVOICE_ADDRESS_ID, INVOICE_DATE, ORDER_ID, CUSTOMER_ID, PARENT_ID, TYPE_ID, STATUS_ID, CURRENCY_ID, CURRENCY_RATE, TOTAL_PRICE, TOTAL_PRICE_WITH_TAX, DISCOUNT_WITHOUT_TAX, DISCOUNT_WITH_TAX, ALLOW_PARTIAL_USE, CREATED_AT, UPDATED_AT FROM credit_note WHERE ID = :p0'; + try { + $stmt = $con->prepare($sql); + $stmt->bindValue(':p0', $key, PDO::PARAM_INT); + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e); + } + $obj = null; + if ($row = $stmt->fetch(\PDO::FETCH_NUM)) { + $obj = new ChildCreditNote(); + $obj->hydrate($row); + CreditNoteTableMap::addInstanceToPool($obj, (string) $key); + } + $stmt->closeCursor(); + + return $obj; + } + + /** + * Find object by primary key. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCreditNote|array|mixed the result, formatted by the current formatter + */ + protected function findPkComplex($key, $con) + { + // As the query uses a PK condition, no limit(1) is necessary. + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKey($key) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher); + } + + /** + * Find objects by primary key + * + * $objs = $c->findPks(array(12, 56, 832), $con); + * + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter + */ + public function findPks($keys, $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getReadConnection($this->getDbName()); + } + $this->basePreSelect($con); + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKeys($keys) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->format($dataFetcher); + } + + /** + * Filter the query by primary key + * + * @param mixed $key Primary key to use for the query + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByPrimaryKey($key) + { + + return $this->addUsingAlias(CreditNoteTableMap::ID, $key, Criteria::EQUAL); + } + + /** + * Filter the query by a list of primary keys + * + * @param array $keys The list of primary key to use for the query + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByPrimaryKeys($keys) + { + + return $this->addUsingAlias(CreditNoteTableMap::ID, $keys, Criteria::IN); + } + + /** + * Filter the query on the id column + * + * Example usage: + * + * $query->filterById(1234); // WHERE id = 1234 + * $query->filterById(array(12, 34)); // WHERE id IN (12, 34) + * $query->filterById(array('min' => 12)); // WHERE id > 12 + * + * + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterById($id = null, $comparison = null) + { + if (is_array($id)) { + $useMinMax = false; + if (isset($id['min'])) { + $this->addUsingAlias(CreditNoteTableMap::ID, $id['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($id['max'])) { + $this->addUsingAlias(CreditNoteTableMap::ID, $id['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTableMap::ID, $id, $comparison); + } + + /** + * Filter the query on the ref column + * + * Example usage: + * + * $query->filterByRef('fooValue'); // WHERE ref = 'fooValue' + * $query->filterByRef('%fooValue%'); // WHERE ref LIKE '%fooValue%' + * + * + * @param string $ref The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByRef($ref = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($ref)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $ref)) { + $ref = str_replace('*', '%', $ref); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteTableMap::REF, $ref, $comparison); + } + + /** + * Filter the query on the invoice_ref column + * + * Example usage: + * + * $query->filterByInvoiceRef('fooValue'); // WHERE invoice_ref = 'fooValue' + * $query->filterByInvoiceRef('%fooValue%'); // WHERE invoice_ref LIKE '%fooValue%' + * + * + * @param string $invoiceRef The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByInvoiceRef($invoiceRef = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($invoiceRef)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $invoiceRef)) { + $invoiceRef = str_replace('*', '%', $invoiceRef); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteTableMap::INVOICE_REF, $invoiceRef, $comparison); + } + + /** + * Filter the query on the invoice_address_id column + * + * Example usage: + * + * $query->filterByInvoiceAddressId(1234); // WHERE invoice_address_id = 1234 + * $query->filterByInvoiceAddressId(array(12, 34)); // WHERE invoice_address_id IN (12, 34) + * $query->filterByInvoiceAddressId(array('min' => 12)); // WHERE invoice_address_id > 12 + * + * + * @see filterByCreditNoteAddress() + * + * @param mixed $invoiceAddressId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByInvoiceAddressId($invoiceAddressId = null, $comparison = null) + { + if (is_array($invoiceAddressId)) { + $useMinMax = false; + if (isset($invoiceAddressId['min'])) { + $this->addUsingAlias(CreditNoteTableMap::INVOICE_ADDRESS_ID, $invoiceAddressId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($invoiceAddressId['max'])) { + $this->addUsingAlias(CreditNoteTableMap::INVOICE_ADDRESS_ID, $invoiceAddressId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTableMap::INVOICE_ADDRESS_ID, $invoiceAddressId, $comparison); + } + + /** + * Filter the query on the invoice_date column + * + * Example usage: + * + * $query->filterByInvoiceDate('2011-03-14'); // WHERE invoice_date = '2011-03-14' + * $query->filterByInvoiceDate('now'); // WHERE invoice_date = '2011-03-14' + * $query->filterByInvoiceDate(array('max' => 'yesterday')); // WHERE invoice_date > '2011-03-13' + * + * + * @param mixed $invoiceDate The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByInvoiceDate($invoiceDate = null, $comparison = null) + { + if (is_array($invoiceDate)) { + $useMinMax = false; + if (isset($invoiceDate['min'])) { + $this->addUsingAlias(CreditNoteTableMap::INVOICE_DATE, $invoiceDate['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($invoiceDate['max'])) { + $this->addUsingAlias(CreditNoteTableMap::INVOICE_DATE, $invoiceDate['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTableMap::INVOICE_DATE, $invoiceDate, $comparison); + } + + /** + * Filter the query on the order_id column + * + * Example usage: + * + * $query->filterByOrderId(1234); // WHERE order_id = 1234 + * $query->filterByOrderId(array(12, 34)); // WHERE order_id IN (12, 34) + * $query->filterByOrderId(array('min' => 12)); // WHERE order_id > 12 + * + * + * @see filterByOrder() + * + * @param mixed $orderId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByOrderId($orderId = null, $comparison = null) + { + if (is_array($orderId)) { + $useMinMax = false; + if (isset($orderId['min'])) { + $this->addUsingAlias(CreditNoteTableMap::ORDER_ID, $orderId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($orderId['max'])) { + $this->addUsingAlias(CreditNoteTableMap::ORDER_ID, $orderId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTableMap::ORDER_ID, $orderId, $comparison); + } + + /** + * Filter the query on the customer_id column + * + * Example usage: + * + * $query->filterByCustomerId(1234); // WHERE customer_id = 1234 + * $query->filterByCustomerId(array(12, 34)); // WHERE customer_id IN (12, 34) + * $query->filterByCustomerId(array('min' => 12)); // WHERE customer_id > 12 + * + * + * @see filterByCustomer() + * + * @param mixed $customerId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByCustomerId($customerId = null, $comparison = null) + { + if (is_array($customerId)) { + $useMinMax = false; + if (isset($customerId['min'])) { + $this->addUsingAlias(CreditNoteTableMap::CUSTOMER_ID, $customerId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($customerId['max'])) { + $this->addUsingAlias(CreditNoteTableMap::CUSTOMER_ID, $customerId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTableMap::CUSTOMER_ID, $customerId, $comparison); + } + + /** + * Filter the query on the parent_id column + * + * Example usage: + * + * $query->filterByParentId(1234); // WHERE parent_id = 1234 + * $query->filterByParentId(array(12, 34)); // WHERE parent_id IN (12, 34) + * $query->filterByParentId(array('min' => 12)); // WHERE parent_id > 12 + * + * + * @see filterByCreditNoteRelatedByParentId() + * + * @param mixed $parentId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByParentId($parentId = null, $comparison = null) + { + if (is_array($parentId)) { + $useMinMax = false; + if (isset($parentId['min'])) { + $this->addUsingAlias(CreditNoteTableMap::PARENT_ID, $parentId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($parentId['max'])) { + $this->addUsingAlias(CreditNoteTableMap::PARENT_ID, $parentId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTableMap::PARENT_ID, $parentId, $comparison); + } + + /** + * Filter the query on the type_id column + * + * Example usage: + * + * $query->filterByTypeId(1234); // WHERE type_id = 1234 + * $query->filterByTypeId(array(12, 34)); // WHERE type_id IN (12, 34) + * $query->filterByTypeId(array('min' => 12)); // WHERE type_id > 12 + * + * + * @see filterByCreditNoteType() + * + * @param mixed $typeId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByTypeId($typeId = null, $comparison = null) + { + if (is_array($typeId)) { + $useMinMax = false; + if (isset($typeId['min'])) { + $this->addUsingAlias(CreditNoteTableMap::TYPE_ID, $typeId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($typeId['max'])) { + $this->addUsingAlias(CreditNoteTableMap::TYPE_ID, $typeId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTableMap::TYPE_ID, $typeId, $comparison); + } + + /** + * Filter the query on the status_id column + * + * Example usage: + * + * $query->filterByStatusId(1234); // WHERE status_id = 1234 + * $query->filterByStatusId(array(12, 34)); // WHERE status_id IN (12, 34) + * $query->filterByStatusId(array('min' => 12)); // WHERE status_id > 12 + * + * + * @see filterByCreditNoteStatus() + * + * @param mixed $statusId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByStatusId($statusId = null, $comparison = null) + { + if (is_array($statusId)) { + $useMinMax = false; + if (isset($statusId['min'])) { + $this->addUsingAlias(CreditNoteTableMap::STATUS_ID, $statusId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($statusId['max'])) { + $this->addUsingAlias(CreditNoteTableMap::STATUS_ID, $statusId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTableMap::STATUS_ID, $statusId, $comparison); + } + + /** + * Filter the query on the currency_id column + * + * Example usage: + * + * $query->filterByCurrencyId(1234); // WHERE currency_id = 1234 + * $query->filterByCurrencyId(array(12, 34)); // WHERE currency_id IN (12, 34) + * $query->filterByCurrencyId(array('min' => 12)); // WHERE currency_id > 12 + * + * + * @see filterByCurrency() + * + * @param mixed $currencyId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByCurrencyId($currencyId = null, $comparison = null) + { + if (is_array($currencyId)) { + $useMinMax = false; + if (isset($currencyId['min'])) { + $this->addUsingAlias(CreditNoteTableMap::CURRENCY_ID, $currencyId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($currencyId['max'])) { + $this->addUsingAlias(CreditNoteTableMap::CURRENCY_ID, $currencyId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTableMap::CURRENCY_ID, $currencyId, $comparison); + } + + /** + * Filter the query on the currency_rate column + * + * Example usage: + * + * $query->filterByCurrencyRate(1234); // WHERE currency_rate = 1234 + * $query->filterByCurrencyRate(array(12, 34)); // WHERE currency_rate IN (12, 34) + * $query->filterByCurrencyRate(array('min' => 12)); // WHERE currency_rate > 12 + * + * + * @param mixed $currencyRate The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByCurrencyRate($currencyRate = null, $comparison = null) + { + if (is_array($currencyRate)) { + $useMinMax = false; + if (isset($currencyRate['min'])) { + $this->addUsingAlias(CreditNoteTableMap::CURRENCY_RATE, $currencyRate['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($currencyRate['max'])) { + $this->addUsingAlias(CreditNoteTableMap::CURRENCY_RATE, $currencyRate['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTableMap::CURRENCY_RATE, $currencyRate, $comparison); + } + + /** + * Filter the query on the total_price column + * + * Example usage: + * + * $query->filterByTotalPrice(1234); // WHERE total_price = 1234 + * $query->filterByTotalPrice(array(12, 34)); // WHERE total_price IN (12, 34) + * $query->filterByTotalPrice(array('min' => 12)); // WHERE total_price > 12 + * + * + * @param mixed $totalPrice The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByTotalPrice($totalPrice = null, $comparison = null) + { + if (is_array($totalPrice)) { + $useMinMax = false; + if (isset($totalPrice['min'])) { + $this->addUsingAlias(CreditNoteTableMap::TOTAL_PRICE, $totalPrice['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($totalPrice['max'])) { + $this->addUsingAlias(CreditNoteTableMap::TOTAL_PRICE, $totalPrice['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTableMap::TOTAL_PRICE, $totalPrice, $comparison); + } + + /** + * Filter the query on the total_price_with_tax column + * + * Example usage: + * + * $query->filterByTotalPriceWithTax(1234); // WHERE total_price_with_tax = 1234 + * $query->filterByTotalPriceWithTax(array(12, 34)); // WHERE total_price_with_tax IN (12, 34) + * $query->filterByTotalPriceWithTax(array('min' => 12)); // WHERE total_price_with_tax > 12 + * + * + * @param mixed $totalPriceWithTax The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByTotalPriceWithTax($totalPriceWithTax = null, $comparison = null) + { + if (is_array($totalPriceWithTax)) { + $useMinMax = false; + if (isset($totalPriceWithTax['min'])) { + $this->addUsingAlias(CreditNoteTableMap::TOTAL_PRICE_WITH_TAX, $totalPriceWithTax['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($totalPriceWithTax['max'])) { + $this->addUsingAlias(CreditNoteTableMap::TOTAL_PRICE_WITH_TAX, $totalPriceWithTax['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTableMap::TOTAL_PRICE_WITH_TAX, $totalPriceWithTax, $comparison); + } + + /** + * Filter the query on the discount_without_tax column + * + * Example usage: + * + * $query->filterByDiscountWithoutTax(1234); // WHERE discount_without_tax = 1234 + * $query->filterByDiscountWithoutTax(array(12, 34)); // WHERE discount_without_tax IN (12, 34) + * $query->filterByDiscountWithoutTax(array('min' => 12)); // WHERE discount_without_tax > 12 + * + * + * @param mixed $discountWithoutTax The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByDiscountWithoutTax($discountWithoutTax = null, $comparison = null) + { + if (is_array($discountWithoutTax)) { + $useMinMax = false; + if (isset($discountWithoutTax['min'])) { + $this->addUsingAlias(CreditNoteTableMap::DISCOUNT_WITHOUT_TAX, $discountWithoutTax['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($discountWithoutTax['max'])) { + $this->addUsingAlias(CreditNoteTableMap::DISCOUNT_WITHOUT_TAX, $discountWithoutTax['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTableMap::DISCOUNT_WITHOUT_TAX, $discountWithoutTax, $comparison); + } + + /** + * Filter the query on the discount_with_tax column + * + * Example usage: + * + * $query->filterByDiscountWithTax(1234); // WHERE discount_with_tax = 1234 + * $query->filterByDiscountWithTax(array(12, 34)); // WHERE discount_with_tax IN (12, 34) + * $query->filterByDiscountWithTax(array('min' => 12)); // WHERE discount_with_tax > 12 + * + * + * @param mixed $discountWithTax The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByDiscountWithTax($discountWithTax = null, $comparison = null) + { + if (is_array($discountWithTax)) { + $useMinMax = false; + if (isset($discountWithTax['min'])) { + $this->addUsingAlias(CreditNoteTableMap::DISCOUNT_WITH_TAX, $discountWithTax['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($discountWithTax['max'])) { + $this->addUsingAlias(CreditNoteTableMap::DISCOUNT_WITH_TAX, $discountWithTax['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTableMap::DISCOUNT_WITH_TAX, $discountWithTax, $comparison); + } + + /** + * Filter the query on the allow_partial_use column + * + * Example usage: + * + * $query->filterByAllowPartialUse(true); // WHERE allow_partial_use = true + * $query->filterByAllowPartialUse('yes'); // WHERE allow_partial_use = true + * + * + * @param boolean|string $allowPartialUse The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByAllowPartialUse($allowPartialUse = null, $comparison = null) + { + if (is_string($allowPartialUse)) { + $allow_partial_use = in_array(strtolower($allowPartialUse), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; + } + + return $this->addUsingAlias(CreditNoteTableMap::ALLOW_PARTIAL_USE, $allowPartialUse, $comparison); + } + + /** + * Filter the query on the created_at column + * + * Example usage: + * + * $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14' + * $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14' + * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' + * + * + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByCreatedAt($createdAt = null, $comparison = null) + { + if (is_array($createdAt)) { + $useMinMax = false; + if (isset($createdAt['min'])) { + $this->addUsingAlias(CreditNoteTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($createdAt['max'])) { + $this->addUsingAlias(CreditNoteTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTableMap::CREATED_AT, $createdAt, $comparison); + } + + /** + * Filter the query on the updated_at column + * + * Example usage: + * + * $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14' + * $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14' + * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' + * + * + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByUpdatedAt($updatedAt = null, $comparison = null) + { + if (is_array($updatedAt)) { + $useMinMax = false; + if (isset($updatedAt['min'])) { + $this->addUsingAlias(CreditNoteTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($updatedAt['max'])) { + $this->addUsingAlias(CreditNoteTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTableMap::UPDATED_AT, $updatedAt, $comparison); + } + + /** + * Filter the query by a related \Thelia\Model\Order object + * + * @param \Thelia\Model\Order|ObjectCollection $order The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByOrder($order, $comparison = null) + { + if ($order instanceof \Thelia\Model\Order) { + return $this + ->addUsingAlias(CreditNoteTableMap::ORDER_ID, $order->getId(), $comparison); + } elseif ($order instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CreditNoteTableMap::ORDER_ID, $order->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByOrder() only accepts arguments of type \Thelia\Model\Order or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the Order relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function joinOrder($relationAlias = null, $joinType = Criteria::LEFT_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('Order'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'Order'); + } + + return $this; + } + + /** + * Use the Order relation Order object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query + */ + public function useOrderQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) + { + return $this + ->joinOrder($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'Order', '\Thelia\Model\OrderQuery'); + } + + /** + * Filter the query by a related \Thelia\Model\Customer object + * + * @param \Thelia\Model\Customer|ObjectCollection $customer The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByCustomer($customer, $comparison = null) + { + if ($customer instanceof \Thelia\Model\Customer) { + return $this + ->addUsingAlias(CreditNoteTableMap::CUSTOMER_ID, $customer->getId(), $comparison); + } elseif ($customer instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CreditNoteTableMap::CUSTOMER_ID, $customer->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByCustomer() only accepts arguments of type \Thelia\Model\Customer or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the Customer relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function joinCustomer($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('Customer'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'Customer'); + } + + return $this; + } + + /** + * Use the Customer relation Customer object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \Thelia\Model\CustomerQuery A secondary query class using the current class as primary query + */ + public function useCustomerQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCustomer($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'Customer', '\Thelia\Model\CustomerQuery'); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNote object + * + * @param \CreditNote\Model\CreditNote|ObjectCollection $creditNote The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByCreditNoteRelatedByParentId($creditNote, $comparison = null) + { + if ($creditNote instanceof \CreditNote\Model\CreditNote) { + return $this + ->addUsingAlias(CreditNoteTableMap::PARENT_ID, $creditNote->getId(), $comparison); + } elseif ($creditNote instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CreditNoteTableMap::PARENT_ID, $creditNote->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByCreditNoteRelatedByParentId() only accepts arguments of type \CreditNote\Model\CreditNote or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNoteRelatedByParentId relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function joinCreditNoteRelatedByParentId($relationAlias = null, $joinType = Criteria::LEFT_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNoteRelatedByParentId'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNoteRelatedByParentId'); + } + + return $this; + } + + /** + * Use the CreditNoteRelatedByParentId relation CreditNote object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteRelatedByParentIdQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) + { + return $this + ->joinCreditNoteRelatedByParentId($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNoteRelatedByParentId', '\CreditNote\Model\CreditNoteQuery'); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNoteType object + * + * @param \CreditNote\Model\CreditNoteType|ObjectCollection $creditNoteType The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByCreditNoteType($creditNoteType, $comparison = null) + { + if ($creditNoteType instanceof \CreditNote\Model\CreditNoteType) { + return $this + ->addUsingAlias(CreditNoteTableMap::TYPE_ID, $creditNoteType->getId(), $comparison); + } elseif ($creditNoteType instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CreditNoteTableMap::TYPE_ID, $creditNoteType->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByCreditNoteType() only accepts arguments of type \CreditNote\Model\CreditNoteType or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNoteType relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function joinCreditNoteType($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNoteType'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNoteType'); + } + + return $this; + } + + /** + * Use the CreditNoteType relation CreditNoteType object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteTypeQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteTypeQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCreditNoteType($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNoteType', '\CreditNote\Model\CreditNoteTypeQuery'); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNoteStatus object + * + * @param \CreditNote\Model\CreditNoteStatus|ObjectCollection $creditNoteStatus The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByCreditNoteStatus($creditNoteStatus, $comparison = null) + { + if ($creditNoteStatus instanceof \CreditNote\Model\CreditNoteStatus) { + return $this + ->addUsingAlias(CreditNoteTableMap::STATUS_ID, $creditNoteStatus->getId(), $comparison); + } elseif ($creditNoteStatus instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CreditNoteTableMap::STATUS_ID, $creditNoteStatus->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByCreditNoteStatus() only accepts arguments of type \CreditNote\Model\CreditNoteStatus or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNoteStatus relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function joinCreditNoteStatus($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNoteStatus'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNoteStatus'); + } + + return $this; + } + + /** + * Use the CreditNoteStatus relation CreditNoteStatus object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteStatusQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteStatusQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCreditNoteStatus($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNoteStatus', '\CreditNote\Model\CreditNoteStatusQuery'); + } + + /** + * Filter the query by a related \Thelia\Model\Currency object + * + * @param \Thelia\Model\Currency|ObjectCollection $currency The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByCurrency($currency, $comparison = null) + { + if ($currency instanceof \Thelia\Model\Currency) { + return $this + ->addUsingAlias(CreditNoteTableMap::CURRENCY_ID, $currency->getId(), $comparison); + } elseif ($currency instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CreditNoteTableMap::CURRENCY_ID, $currency->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByCurrency() only accepts arguments of type \Thelia\Model\Currency or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the Currency relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function joinCurrency($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('Currency'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'Currency'); + } + + return $this; + } + + /** + * Use the Currency relation Currency object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \Thelia\Model\CurrencyQuery A secondary query class using the current class as primary query + */ + public function useCurrencyQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCurrency($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'Currency', '\Thelia\Model\CurrencyQuery'); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNoteAddress object + * + * @param \CreditNote\Model\CreditNoteAddress|ObjectCollection $creditNoteAddress The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByCreditNoteAddress($creditNoteAddress, $comparison = null) + { + if ($creditNoteAddress instanceof \CreditNote\Model\CreditNoteAddress) { + return $this + ->addUsingAlias(CreditNoteTableMap::INVOICE_ADDRESS_ID, $creditNoteAddress->getId(), $comparison); + } elseif ($creditNoteAddress instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CreditNoteTableMap::INVOICE_ADDRESS_ID, $creditNoteAddress->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByCreditNoteAddress() only accepts arguments of type \CreditNote\Model\CreditNoteAddress or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNoteAddress relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function joinCreditNoteAddress($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNoteAddress'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNoteAddress'); + } + + return $this; + } + + /** + * Use the CreditNoteAddress relation CreditNoteAddress object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteAddressQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteAddressQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCreditNoteAddress($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNoteAddress', '\CreditNote\Model\CreditNoteAddressQuery'); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNote object + * + * @param \CreditNote\Model\CreditNote|ObjectCollection $creditNote the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByCreditNoteRelatedById($creditNote, $comparison = null) + { + if ($creditNote instanceof \CreditNote\Model\CreditNote) { + return $this + ->addUsingAlias(CreditNoteTableMap::ID, $creditNote->getParentId(), $comparison); + } elseif ($creditNote instanceof ObjectCollection) { + return $this + ->useCreditNoteRelatedByIdQuery() + ->filterByPrimaryKeys($creditNote->getPrimaryKeys()) + ->endUse(); + } else { + throw new PropelException('filterByCreditNoteRelatedById() only accepts arguments of type \CreditNote\Model\CreditNote or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNoteRelatedById relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function joinCreditNoteRelatedById($relationAlias = null, $joinType = Criteria::LEFT_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNoteRelatedById'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNoteRelatedById'); + } + + return $this; + } + + /** + * Use the CreditNoteRelatedById relation CreditNote object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteRelatedByIdQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN) + { + return $this + ->joinCreditNoteRelatedById($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNoteRelatedById', '\CreditNote\Model\CreditNoteQuery'); + } + + /** + * Filter the query by a related \CreditNote\Model\OrderCreditNote object + * + * @param \CreditNote\Model\OrderCreditNote|ObjectCollection $orderCreditNote the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByOrderCreditNote($orderCreditNote, $comparison = null) + { + if ($orderCreditNote instanceof \CreditNote\Model\OrderCreditNote) { + return $this + ->addUsingAlias(CreditNoteTableMap::ID, $orderCreditNote->getCreditNoteId(), $comparison); + } elseif ($orderCreditNote instanceof ObjectCollection) { + return $this + ->useOrderCreditNoteQuery() + ->filterByPrimaryKeys($orderCreditNote->getPrimaryKeys()) + ->endUse(); + } else { + throw new PropelException('filterByOrderCreditNote() only accepts arguments of type \CreditNote\Model\OrderCreditNote or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the OrderCreditNote relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function joinOrderCreditNote($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('OrderCreditNote'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'OrderCreditNote'); + } + + return $this; + } + + /** + * Use the OrderCreditNote relation OrderCreditNote object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\OrderCreditNoteQuery A secondary query class using the current class as primary query + */ + public function useOrderCreditNoteQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinOrderCreditNote($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'OrderCreditNote', '\CreditNote\Model\OrderCreditNoteQuery'); + } + + /** + * Filter the query by a related \CreditNote\Model\CartCreditNote object + * + * @param \CreditNote\Model\CartCreditNote|ObjectCollection $cartCreditNote the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByCartCreditNote($cartCreditNote, $comparison = null) + { + if ($cartCreditNote instanceof \CreditNote\Model\CartCreditNote) { + return $this + ->addUsingAlias(CreditNoteTableMap::ID, $cartCreditNote->getCreditNoteId(), $comparison); + } elseif ($cartCreditNote instanceof ObjectCollection) { + return $this + ->useCartCreditNoteQuery() + ->filterByPrimaryKeys($cartCreditNote->getPrimaryKeys()) + ->endUse(); + } else { + throw new PropelException('filterByCartCreditNote() only accepts arguments of type \CreditNote\Model\CartCreditNote or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CartCreditNote relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function joinCartCreditNote($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CartCreditNote'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CartCreditNote'); + } + + return $this; + } + + /** + * Use the CartCreditNote relation CartCreditNote object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CartCreditNoteQuery A secondary query class using the current class as primary query + */ + public function useCartCreditNoteQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCartCreditNote($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CartCreditNote', '\CreditNote\Model\CartCreditNoteQuery'); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNoteDetail object + * + * @param \CreditNote\Model\CreditNoteDetail|ObjectCollection $creditNoteDetail the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByCreditNoteDetail($creditNoteDetail, $comparison = null) + { + if ($creditNoteDetail instanceof \CreditNote\Model\CreditNoteDetail) { + return $this + ->addUsingAlias(CreditNoteTableMap::ID, $creditNoteDetail->getCreditNoteId(), $comparison); + } elseif ($creditNoteDetail instanceof ObjectCollection) { + return $this + ->useCreditNoteDetailQuery() + ->filterByPrimaryKeys($creditNoteDetail->getPrimaryKeys()) + ->endUse(); + } else { + throw new PropelException('filterByCreditNoteDetail() only accepts arguments of type \CreditNote\Model\CreditNoteDetail or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNoteDetail relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function joinCreditNoteDetail($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNoteDetail'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNoteDetail'); + } + + return $this; + } + + /** + * Use the CreditNoteDetail relation CreditNoteDetail object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteDetailQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteDetailQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCreditNoteDetail($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNoteDetail', '\CreditNote\Model\CreditNoteDetailQuery'); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNoteComment object + * + * @param \CreditNote\Model\CreditNoteComment|ObjectCollection $creditNoteComment the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function filterByCreditNoteComment($creditNoteComment, $comparison = null) + { + if ($creditNoteComment instanceof \CreditNote\Model\CreditNoteComment) { + return $this + ->addUsingAlias(CreditNoteTableMap::ID, $creditNoteComment->getCreditNoteId(), $comparison); + } elseif ($creditNoteComment instanceof ObjectCollection) { + return $this + ->useCreditNoteCommentQuery() + ->filterByPrimaryKeys($creditNoteComment->getPrimaryKeys()) + ->endUse(); + } else { + throw new PropelException('filterByCreditNoteComment() only accepts arguments of type \CreditNote\Model\CreditNoteComment or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNoteComment relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function joinCreditNoteComment($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNoteComment'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNoteComment'); + } + + return $this; + } + + /** + * Use the CreditNoteComment relation CreditNoteComment object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteCommentQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteCommentQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCreditNoteComment($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNoteComment', '\CreditNote\Model\CreditNoteCommentQuery'); + } + + /** + * Exclude object from result + * + * @param ChildCreditNote $creditNote Object to remove from the list of results + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function prune($creditNote = null) + { + if ($creditNote) { + $this->addUsingAlias(CreditNoteTableMap::ID, $creditNote->getId(), Criteria::NOT_EQUAL); + } + + return $this; + } + + /** + * Deletes all rows from the credit_note table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public function doDeleteAll(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteTableMap::DATABASE_NAME); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + $affectedRows += parent::doDeleteAll($con); + // Because this db requires some delete cascade/set null emulation, we have to + // clear the cached instance *after* the emulation has happened (since + // instances get re-added by the select statement contained therein). + CreditNoteTableMap::clearInstancePool(); + CreditNoteTableMap::clearRelatedInstancePool(); + + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $affectedRows; + } + + /** + * Performs a DELETE on the database, given a ChildCreditNote or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or ChildCreditNote object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public function delete(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteTableMap::DATABASE_NAME); + } + + $criteria = $this; + + // Set the correct dbName + $criteria->setDbName(CreditNoteTableMap::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + + + CreditNoteTableMap::removeInstanceFromPool($criteria); + + $affectedRows += ModelCriteria::delete($con); + CreditNoteTableMap::clearRelatedInstancePool(); + $con->commit(); + + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + // timestampable behavior + + /** + * Filter by the latest updated + * + * @param int $nbDays Maximum age of the latest update in days + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function recentlyUpdated($nbDays = 7) + { + return $this->addUsingAlias(CreditNoteTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL); + } + + /** + * Filter by the latest created + * + * @param int $nbDays Maximum age of in days + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function recentlyCreated($nbDays = 7) + { + return $this->addUsingAlias(CreditNoteTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL); + } + + /** + * Order by update date desc + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function lastUpdatedFirst() + { + return $this->addDescendingOrderByColumn(CreditNoteTableMap::UPDATED_AT); + } + + /** + * Order by update date asc + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function firstUpdatedFirst() + { + return $this->addAscendingOrderByColumn(CreditNoteTableMap::UPDATED_AT); + } + + /** + * Order by create date desc + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function lastCreatedFirst() + { + return $this->addDescendingOrderByColumn(CreditNoteTableMap::CREATED_AT); + } + + /** + * Order by create date asc + * + * @return ChildCreditNoteQuery The current query, for fluid interface + */ + public function firstCreatedFirst() + { + return $this->addAscendingOrderByColumn(CreditNoteTableMap::CREATED_AT); + } + +} // CreditNoteQuery diff --git a/local/modules/CreditNote/Model/Base/CreditNoteStatus.php b/local/modules/CreditNote/Model/Base/CreditNoteStatus.php new file mode 100644 index 000000000..8f9110e9c --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CreditNoteStatus.php @@ -0,0 +1,3020 @@ +invoiced = false; + $this->used = false; + } + + /** + * Initializes internal state of CreditNote\Model\Base\CreditNoteStatus object. + * @see applyDefaults() + */ + public function __construct() + { + $this->applyDefaultValues(); + } + + /** + * Returns whether the object has been modified. + * + * @return boolean True if the object has been modified. + */ + public function isModified() + { + return !!$this->modifiedColumns; + } + + /** + * Has specified column been modified? + * + * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID + * @return boolean True if $col has been modified. + */ + public function isColumnModified($col) + { + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); + } + + /** + * Get the columns that have been modified in this object. + * @return array A unique list of the modified column names for this object. + */ + public function getModifiedColumns() + { + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; + } + + /** + * Returns whether the object has ever been saved. This will + * be false, if the object was retrieved from storage or was created + * and then saved. + * + * @return boolean true, if the object has never been persisted. + */ + public function isNew() + { + return $this->new; + } + + /** + * Setter for the isNew attribute. This method will be called + * by Propel-generated children and objects. + * + * @param boolean $b the state of the object. + */ + public function setNew($b) + { + $this->new = (Boolean) $b; + } + + /** + * Whether this object has been deleted. + * @return boolean The deleted state of this object. + */ + public function isDeleted() + { + return $this->deleted; + } + + /** + * Specify whether this object has been deleted. + * @param boolean $b The deleted state of this object. + * @return void + */ + public function setDeleted($b) + { + $this->deleted = (Boolean) $b; + } + + /** + * Sets the modified state for the object to be false. + * @param string $col If supplied, only the specified column is reset. + * @return void + */ + public function resetModified($col = null) + { + if (null !== $col) { + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); + } + } else { + $this->modifiedColumns = array(); + } + } + + /** + * Compares this with another CreditNoteStatus instance. If + * obj is an instance of CreditNoteStatus, delegates to + * equals(CreditNoteStatus). Otherwise, returns false. + * + * @param mixed $obj The object to compare to. + * @return boolean Whether equal to the object specified. + */ + public function equals($obj) + { + $thisclazz = get_class($this); + if (!is_object($obj) || !($obj instanceof $thisclazz)) { + return false; + } + + if ($this === $obj) { + return true; + } + + if (null === $this->getPrimaryKey() + || null === $obj->getPrimaryKey()) { + return false; + } + + return $this->getPrimaryKey() === $obj->getPrimaryKey(); + } + + /** + * If the primary key is not null, return the hashcode of the + * primary key. Otherwise, return the hash code of the object. + * + * @return int Hashcode + */ + public function hashCode() + { + if (null !== $this->getPrimaryKey()) { + return crc32(serialize($this->getPrimaryKey())); + } + + return crc32(serialize(clone $this)); + } + + /** + * Get the associative array of the virtual columns in this object + * + * @return array + */ + public function getVirtualColumns() + { + return $this->virtualColumns; + } + + /** + * Checks the existence of a virtual column in this object + * + * @param string $name The virtual column name + * @return boolean + */ + public function hasVirtualColumn($name) + { + return array_key_exists($name, $this->virtualColumns); + } + + /** + * Get the value of a virtual column in this object + * + * @param string $name The virtual column name + * @return mixed + * + * @throws PropelException + */ + public function getVirtualColumn($name) + { + if (!$this->hasVirtualColumn($name)) { + throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name)); + } + + return $this->virtualColumns[$name]; + } + + /** + * Set the value of a virtual column in this object + * + * @param string $name The virtual column name + * @param mixed $value The value to give to the virtual column + * + * @return CreditNoteStatus The current object, for fluid interface + */ + public function setVirtualColumn($name, $value) + { + $this->virtualColumns[$name] = $value; + + return $this; + } + + /** + * Logs a message using Propel::log(). + * + * @param string $msg + * @param int $priority One of the Propel::LOG_* logging levels + * @return boolean + */ + protected function log($msg, $priority = Propel::LOG_INFO) + { + return Propel::log(get_class($this) . ': ' . $msg, $priority); + } + + /** + * Populate the current object from a string, using a given parser format + * + * $book = new Book(); + * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, + * or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param string $data The source data to import from + * + * @return CreditNoteStatus The current object, for fluid interface + */ + public function importFrom($parser, $data) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + $this->fromArray($parser->toArray($data), TableMap::TYPE_PHPNAME); + + return $this; + } + + /** + * Export the current object properties to a string, using a given parser format + * + * $book = BookQuery::create()->findPk(9012); + * echo $book->exportTo('JSON'); + * => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE. + * @return string The exported data + */ + public function exportTo($parser, $includeLazyLoadColumns = true) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true)); + } + + /** + * Clean up internal collections prior to serializing + * Avoids recursive loops that turn into segmentation faults when serializing + */ + public function __sleep() + { + $this->clearAllReferences(); + + return array_keys(get_object_vars($this)); + } + + /** + * Get the [id] column value. + * + * @return int + */ + public function getId() + { + + return $this->id; + } + + /** + * Get the [code] column value. + * + * @return string + */ + public function getCode() + { + + return $this->code; + } + + /** + * Get the [color] column value. + * + * @return string + */ + public function getColor() + { + + return $this->color; + } + + /** + * Get the [invoiced] column value. + * + * @return boolean + */ + public function getInvoiced() + { + + return $this->invoiced; + } + + /** + * Get the [used] column value. + * + * @return boolean + */ + public function getUsed() + { + + return $this->used; + } + + /** + * Get the [position] column value. + * + * @return int + */ + public function getPosition() + { + + return $this->position; + } + + /** + * Get the [optionally formatted] temporal [created_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getCreatedAt($format = NULL) + { + if ($format === null) { + return $this->created_at; + } else { + return $this->created_at instanceof \DateTime ? $this->created_at->format($format) : null; + } + } + + /** + * Get the [optionally formatted] temporal [updated_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getUpdatedAt($format = NULL) + { + if ($format === null) { + return $this->updated_at; + } else { + return $this->updated_at instanceof \DateTime ? $this->updated_at->format($format) : null; + } + } + + /** + * Set the value of [id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteStatus The current object (for fluent API support) + */ + public function setId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->id !== $v) { + $this->id = $v; + $this->modifiedColumns[CreditNoteStatusTableMap::ID] = true; + } + + + return $this; + } // setId() + + /** + * Set the value of [code] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteStatus The current object (for fluent API support) + */ + public function setCode($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->code !== $v) { + $this->code = $v; + $this->modifiedColumns[CreditNoteStatusTableMap::CODE] = true; + } + + + return $this; + } // setCode() + + /** + * Set the value of [color] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteStatus The current object (for fluent API support) + */ + public function setColor($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->color !== $v) { + $this->color = $v; + $this->modifiedColumns[CreditNoteStatusTableMap::COLOR] = true; + } + + + return $this; + } // setColor() + + /** + * Sets the value of the [invoiced] column. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * + * @param boolean|integer|string $v The new value + * @return \CreditNote\Model\CreditNoteStatus The current object (for fluent API support) + */ + public function setInvoiced($v) + { + if ($v !== null) { + if (is_string($v)) { + $v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; + } else { + $v = (boolean) $v; + } + } + + if ($this->invoiced !== $v) { + $this->invoiced = $v; + $this->modifiedColumns[CreditNoteStatusTableMap::INVOICED] = true; + } + + + return $this; + } // setInvoiced() + + /** + * Sets the value of the [used] column. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * + * @param boolean|integer|string $v The new value + * @return \CreditNote\Model\CreditNoteStatus The current object (for fluent API support) + */ + public function setUsed($v) + { + if ($v !== null) { + if (is_string($v)) { + $v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; + } else { + $v = (boolean) $v; + } + } + + if ($this->used !== $v) { + $this->used = $v; + $this->modifiedColumns[CreditNoteStatusTableMap::USED] = true; + } + + + return $this; + } // setUsed() + + /** + * Set the value of [position] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteStatus The current object (for fluent API support) + */ + public function setPosition($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->position !== $v) { + $this->position = $v; + $this->modifiedColumns[CreditNoteStatusTableMap::POSITION] = true; + } + + + return $this; + } // setPosition() + + /** + * Sets the value of [created_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CreditNoteStatus The current object (for fluent API support) + */ + public function setCreatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->created_at !== null || $dt !== null) { + if ($dt !== $this->created_at) { + $this->created_at = $dt; + $this->modifiedColumns[CreditNoteStatusTableMap::CREATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setCreatedAt() + + /** + * Sets the value of [updated_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CreditNoteStatus The current object (for fluent API support) + */ + public function setUpdatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->updated_at !== null || $dt !== null) { + if ($dt !== $this->updated_at) { + $this->updated_at = $dt; + $this->modifiedColumns[CreditNoteStatusTableMap::UPDATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setUpdatedAt() + + /** + * Indicates whether the columns in this object are only set to default values. + * + * This method can be used in conjunction with isModified() to indicate whether an object is both + * modified _and_ has some values set which are non-default. + * + * @return boolean Whether the columns in this object are only been set with default values. + */ + public function hasOnlyDefaultValues() + { + if ($this->invoiced !== false) { + return false; + } + + if ($this->used !== false) { + return false; + } + + // otherwise, everything was equal, so return TRUE + return true; + } // hasOnlyDefaultValues() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (0-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param array $row The row returned by DataFetcher->fetch(). + * @param int $startcol 0-based offset column which indicates which restultset column to start with. + * @param boolean $rehydrate Whether this object is being re-hydrated from the database. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM) + { + try { + + + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CreditNoteStatusTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; + $this->id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CreditNoteStatusTableMap::translateFieldName('Code', TableMap::TYPE_PHPNAME, $indexType)]; + $this->code = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CreditNoteStatusTableMap::translateFieldName('Color', TableMap::TYPE_PHPNAME, $indexType)]; + $this->color = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CreditNoteStatusTableMap::translateFieldName('Invoiced', TableMap::TYPE_PHPNAME, $indexType)]; + $this->invoiced = (null !== $col) ? (boolean) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CreditNoteStatusTableMap::translateFieldName('Used', TableMap::TYPE_PHPNAME, $indexType)]; + $this->used = (null !== $col) ? (boolean) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CreditNoteStatusTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)]; + $this->position = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CreditNoteStatusTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CreditNoteStatusTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + $this->resetModified(); + + $this->setNew(false); + + if ($rehydrate) { + $this->ensureConsistency(); + } + + return $startcol + 8; // 8 = CreditNoteStatusTableMap::NUM_HYDRATE_COLUMNS. + + } catch (Exception $e) { + throw new PropelException("Error populating \CreditNote\Model\CreditNoteStatus object", 0, $e); + } + } + + /** + * Checks and repairs the internal consistency of the object. + * + * This method is executed after an already-instantiated object is re-hydrated + * from the database. It exists to check any foreign keys to make sure that + * the objects related to the current object are correct based on foreign key. + * + * You can override this method in the stub class, but you should always invoke + * the base method from the overridden method (i.e. parent::ensureConsistency()), + * in case your model changes. + * + * @throws PropelException + */ + public function ensureConsistency() + { + } // ensureConsistency + + /** + * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. + * + * This will only work if the object has been saved and has a valid primary key set. + * + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @return void + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + */ + public function reload($deep = false, ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("Cannot reload a deleted object."); + } + + if ($this->isNew()) { + throw new PropelException("Cannot reload an unsaved object."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CreditNoteStatusTableMap::DATABASE_NAME); + } + + // We don't need to alter the object instance pool; we're just modifying this instance + // already in the pool. + + $dataFetcher = ChildCreditNoteStatusQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con); + $row = $dataFetcher->fetch(); + $dataFetcher->close(); + if (!$row) { + throw new PropelException('Cannot find matching row in the database to reload object values.'); + } + $this->hydrate($row, 0, true, $dataFetcher->getIndexType()); // rehydrate + + if ($deep) { // also de-associate any related objects? + + $this->collCreditNotes = null; + + $this->collCreditNoteStatusFlowsRelatedByFromStatusId = null; + + $this->collCreditNoteStatusFlowsRelatedByToStatusId = null; + + $this->collCreditNoteStatusI18ns = null; + + } // if (deep) + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param ConnectionInterface $con + * @return void + * @throws PropelException + * @see CreditNoteStatus::setDeleted() + * @see CreditNoteStatus::isDeleted() + */ + public function delete(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteStatusTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + try { + $deleteQuery = ChildCreditNoteStatusQuery::create() + ->filterByPrimaryKey($this->getPrimaryKey()); + $ret = $this->preDelete($con); + if ($ret) { + $deleteQuery->delete($con); + $this->postDelete($con); + $con->commit(); + $this->setDeleted(true); + } else { + $con->commit(); + } + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Persists this object to the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All modified related objects will also be persisted in the doSave() + * method. This method wraps all precipitate database operations in a + * single transaction. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() + */ + public function save(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteStatusTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + $isInsert = $this->isNew(); + try { + $ret = $this->preSave($con); + if ($isInsert) { + $ret = $ret && $this->preInsert($con); + // timestampable behavior + if (!$this->isColumnModified(CreditNoteStatusTableMap::CREATED_AT)) { + $this->setCreatedAt(time()); + } + if (!$this->isColumnModified(CreditNoteStatusTableMap::UPDATED_AT)) { + $this->setUpdatedAt(time()); + } + } else { + $ret = $ret && $this->preUpdate($con); + // timestampable behavior + if ($this->isModified() && !$this->isColumnModified(CreditNoteStatusTableMap::UPDATED_AT)) { + $this->setUpdatedAt(time()); + } + } + if ($ret) { + $affectedRows = $this->doSave($con); + if ($isInsert) { + $this->postInsert($con); + } else { + $this->postUpdate($con); + } + $this->postSave($con); + CreditNoteStatusTableMap::addInstanceToPool($this); + } else { + $affectedRows = 0; + } + $con->commit(); + + return $affectedRows; + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Performs the work of inserting or updating the row in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() + */ + protected function doSave(ConnectionInterface $con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + if ($this->isNew() || $this->isModified()) { + // persist changes + if ($this->isNew()) { + $this->doInsert($con); + } else { + $this->doUpdate($con); + } + $affectedRows += 1; + $this->resetModified(); + } + + if ($this->creditNotesScheduledForDeletion !== null) { + if (!$this->creditNotesScheduledForDeletion->isEmpty()) { + \CreditNote\Model\CreditNoteQuery::create() + ->filterByPrimaryKeys($this->creditNotesScheduledForDeletion->getPrimaryKeys(false)) + ->delete($con); + $this->creditNotesScheduledForDeletion = null; + } + } + + if ($this->collCreditNotes !== null) { + foreach ($this->collCreditNotes as $referrerFK) { + if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) { + $affectedRows += $referrerFK->save($con); + } + } + } + + if ($this->creditNoteStatusFlowsRelatedByFromStatusIdScheduledForDeletion !== null) { + if (!$this->creditNoteStatusFlowsRelatedByFromStatusIdScheduledForDeletion->isEmpty()) { + \CreditNote\Model\CreditNoteStatusFlowQuery::create() + ->filterByPrimaryKeys($this->creditNoteStatusFlowsRelatedByFromStatusIdScheduledForDeletion->getPrimaryKeys(false)) + ->delete($con); + $this->creditNoteStatusFlowsRelatedByFromStatusIdScheduledForDeletion = null; + } + } + + if ($this->collCreditNoteStatusFlowsRelatedByFromStatusId !== null) { + foreach ($this->collCreditNoteStatusFlowsRelatedByFromStatusId as $referrerFK) { + if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) { + $affectedRows += $referrerFK->save($con); + } + } + } + + if ($this->creditNoteStatusFlowsRelatedByToStatusIdScheduledForDeletion !== null) { + if (!$this->creditNoteStatusFlowsRelatedByToStatusIdScheduledForDeletion->isEmpty()) { + \CreditNote\Model\CreditNoteStatusFlowQuery::create() + ->filterByPrimaryKeys($this->creditNoteStatusFlowsRelatedByToStatusIdScheduledForDeletion->getPrimaryKeys(false)) + ->delete($con); + $this->creditNoteStatusFlowsRelatedByToStatusIdScheduledForDeletion = null; + } + } + + if ($this->collCreditNoteStatusFlowsRelatedByToStatusId !== null) { + foreach ($this->collCreditNoteStatusFlowsRelatedByToStatusId as $referrerFK) { + if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) { + $affectedRows += $referrerFK->save($con); + } + } + } + + if ($this->creditNoteStatusI18nsScheduledForDeletion !== null) { + if (!$this->creditNoteStatusI18nsScheduledForDeletion->isEmpty()) { + \CreditNote\Model\CreditNoteStatusI18nQuery::create() + ->filterByPrimaryKeys($this->creditNoteStatusI18nsScheduledForDeletion->getPrimaryKeys(false)) + ->delete($con); + $this->creditNoteStatusI18nsScheduledForDeletion = null; + } + } + + if ($this->collCreditNoteStatusI18ns !== null) { + foreach ($this->collCreditNoteStatusI18ns as $referrerFK) { + if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) { + $affectedRows += $referrerFK->save($con); + } + } + } + + $this->alreadyInSave = false; + + } + + return $affectedRows; + } // doSave() + + /** + * Insert the row in the database. + * + * @param ConnectionInterface $con + * + * @throws PropelException + * @see doSave() + */ + protected function doInsert(ConnectionInterface $con) + { + $modifiedColumns = array(); + $index = 0; + + $this->modifiedColumns[CreditNoteStatusTableMap::ID] = true; + if (null !== $this->id) { + throw new PropelException('Cannot insert a value for auto-increment primary key (' . CreditNoteStatusTableMap::ID . ')'); + } + + // check the columns in natural order for more readable SQL queries + if ($this->isColumnModified(CreditNoteStatusTableMap::ID)) { + $modifiedColumns[':p' . $index++] = 'ID'; + } + if ($this->isColumnModified(CreditNoteStatusTableMap::CODE)) { + $modifiedColumns[':p' . $index++] = 'CODE'; + } + if ($this->isColumnModified(CreditNoteStatusTableMap::COLOR)) { + $modifiedColumns[':p' . $index++] = 'COLOR'; + } + if ($this->isColumnModified(CreditNoteStatusTableMap::INVOICED)) { + $modifiedColumns[':p' . $index++] = 'INVOICED'; + } + if ($this->isColumnModified(CreditNoteStatusTableMap::USED)) { + $modifiedColumns[':p' . $index++] = 'USED'; + } + if ($this->isColumnModified(CreditNoteStatusTableMap::POSITION)) { + $modifiedColumns[':p' . $index++] = 'POSITION'; + } + if ($this->isColumnModified(CreditNoteStatusTableMap::CREATED_AT)) { + $modifiedColumns[':p' . $index++] = 'CREATED_AT'; + } + if ($this->isColumnModified(CreditNoteStatusTableMap::UPDATED_AT)) { + $modifiedColumns[':p' . $index++] = 'UPDATED_AT'; + } + + $sql = sprintf( + 'INSERT INTO credit_note_status (%s) VALUES (%s)', + implode(', ', $modifiedColumns), + implode(', ', array_keys($modifiedColumns)) + ); + + try { + $stmt = $con->prepare($sql); + foreach ($modifiedColumns as $identifier => $columnName) { + switch ($columnName) { + case 'ID': + $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT); + break; + case 'CODE': + $stmt->bindValue($identifier, $this->code, PDO::PARAM_STR); + break; + case 'COLOR': + $stmt->bindValue($identifier, $this->color, PDO::PARAM_STR); + break; + case 'INVOICED': + $stmt->bindValue($identifier, (int) $this->invoiced, PDO::PARAM_INT); + break; + case 'USED': + $stmt->bindValue($identifier, (int) $this->used, PDO::PARAM_INT); + break; + case 'POSITION': + $stmt->bindValue($identifier, $this->position, PDO::PARAM_INT); + break; + case 'CREATED_AT': + $stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + case 'UPDATED_AT': + $stmt->bindValue($identifier, $this->updated_at ? $this->updated_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + } + } + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e); + } + + try { + $pk = $con->lastInsertId(); + } catch (Exception $e) { + throw new PropelException('Unable to get autoincrement id.', 0, $e); + } + $this->setId($pk); + + $this->setNew(false); + } + + /** + * Update the row in the database. + * + * @param ConnectionInterface $con + * + * @return Integer Number of updated rows + * @see doSave() + */ + protected function doUpdate(ConnectionInterface $con) + { + $selectCriteria = $this->buildPkeyCriteria(); + $valuesCriteria = $this->buildCriteria(); + + return $selectCriteria->doUpdate($valuesCriteria, $con); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. + */ + public function getByName($name, $type = TableMap::TYPE_PHPNAME) + { + $pos = CreditNoteStatusTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + $field = $this->getByPosition($pos); + + return $field; + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch ($pos) { + case 0: + return $this->getId(); + break; + case 1: + return $this->getCode(); + break; + case 2: + return $this->getColor(); + break; + case 3: + return $this->getInvoiced(); + break; + case 4: + return $this->getUsed(); + break; + case 5: + return $this->getPosition(); + break; + case 6: + return $this->getCreatedAt(); + break; + case 7: + return $this->getUpdatedAt(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * + * @return array an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false) + { + if (isset($alreadyDumpedObjects['CreditNoteStatus'][$this->getPrimaryKey()])) { + return '*RECURSION*'; + } + $alreadyDumpedObjects['CreditNoteStatus'][$this->getPrimaryKey()] = true; + $keys = CreditNoteStatusTableMap::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getId(), + $keys[1] => $this->getCode(), + $keys[2] => $this->getColor(), + $keys[3] => $this->getInvoiced(), + $keys[4] => $this->getUsed(), + $keys[5] => $this->getPosition(), + $keys[6] => $this->getCreatedAt(), + $keys[7] => $this->getUpdatedAt(), + ); + $virtualColumns = $this->virtualColumns; + foreach ($virtualColumns as $key => $virtualColumn) { + $result[$key] = $virtualColumn; + } + + if ($includeForeignObjects) { + if (null !== $this->collCreditNotes) { + $result['CreditNotes'] = $this->collCreditNotes->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); + } + if (null !== $this->collCreditNoteStatusFlowsRelatedByFromStatusId) { + $result['CreditNoteStatusFlowsRelatedByFromStatusId'] = $this->collCreditNoteStatusFlowsRelatedByFromStatusId->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); + } + if (null !== $this->collCreditNoteStatusFlowsRelatedByToStatusId) { + $result['CreditNoteStatusFlowsRelatedByToStatusId'] = $this->collCreditNoteStatusFlowsRelatedByToStatusId->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); + } + if (null !== $this->collCreditNoteStatusI18ns) { + $result['CreditNoteStatusI18ns'] = $this->collCreditNoteStatusI18ns->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); + } + } + + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return void + */ + public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) + { + $pos = CreditNoteStatusTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch ($pos) { + case 0: + $this->setId($value); + break; + case 1: + $this->setCode($value); + break; + case 2: + $this->setColor($value); + break; + case 3: + $this->setInvoiced($value); + break; + case 4: + $this->setUsed($value); + break; + case 5: + $this->setPosition($value); + break; + case 6: + $this->setCreatedAt($value); + break; + case 7: + $this->setUpdatedAt($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * The default key type is the column's TableMap::TYPE_PHPNAME. + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) + { + $keys = CreditNoteStatusTableMap::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setCode($arr[$keys[1]]); + if (array_key_exists($keys[2], $arr)) $this->setColor($arr[$keys[2]]); + if (array_key_exists($keys[3], $arr)) $this->setInvoiced($arr[$keys[3]]); + if (array_key_exists($keys[4], $arr)) $this->setUsed($arr[$keys[4]]); + if (array_key_exists($keys[5], $arr)) $this->setPosition($arr[$keys[5]]); + if (array_key_exists($keys[6], $arr)) $this->setCreatedAt($arr[$keys[6]]); + if (array_key_exists($keys[7], $arr)) $this->setUpdatedAt($arr[$keys[7]]); + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(CreditNoteStatusTableMap::DATABASE_NAME); + + if ($this->isColumnModified(CreditNoteStatusTableMap::ID)) $criteria->add(CreditNoteStatusTableMap::ID, $this->id); + if ($this->isColumnModified(CreditNoteStatusTableMap::CODE)) $criteria->add(CreditNoteStatusTableMap::CODE, $this->code); + if ($this->isColumnModified(CreditNoteStatusTableMap::COLOR)) $criteria->add(CreditNoteStatusTableMap::COLOR, $this->color); + if ($this->isColumnModified(CreditNoteStatusTableMap::INVOICED)) $criteria->add(CreditNoteStatusTableMap::INVOICED, $this->invoiced); + if ($this->isColumnModified(CreditNoteStatusTableMap::USED)) $criteria->add(CreditNoteStatusTableMap::USED, $this->used); + if ($this->isColumnModified(CreditNoteStatusTableMap::POSITION)) $criteria->add(CreditNoteStatusTableMap::POSITION, $this->position); + if ($this->isColumnModified(CreditNoteStatusTableMap::CREATED_AT)) $criteria->add(CreditNoteStatusTableMap::CREATED_AT, $this->created_at); + if ($this->isColumnModified(CreditNoteStatusTableMap::UPDATED_AT)) $criteria->add(CreditNoteStatusTableMap::UPDATED_AT, $this->updated_at); + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(CreditNoteStatusTableMap::DATABASE_NAME); + $criteria->add(CreditNoteStatusTableMap::ID, $this->id); + + return $criteria; + } + + /** + * Returns the primary key for this object (row). + * @return int + */ + public function getPrimaryKey() + { + return $this->getId(); + } + + /** + * Generic method to set the primary key (id column). + * + * @param int $key Primary key. + * @return void + */ + public function setPrimaryKey($key) + { + $this->setId($key); + } + + /** + * Returns true if the primary key for this object is null. + * @return boolean + */ + public function isPrimaryKeyNull() + { + + return null === $this->getId(); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of \CreditNote\Model\CreditNoteStatus (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false, $makeNew = true) + { + $copyObj->setCode($this->getCode()); + $copyObj->setColor($this->getColor()); + $copyObj->setInvoiced($this->getInvoiced()); + $copyObj->setUsed($this->getUsed()); + $copyObj->setPosition($this->getPosition()); + $copyObj->setCreatedAt($this->getCreatedAt()); + $copyObj->setUpdatedAt($this->getUpdatedAt()); + + if ($deepCopy) { + // important: temporarily setNew(false) because this affects the behavior of + // the getter/setter methods for fkey referrer objects. + $copyObj->setNew(false); + + foreach ($this->getCreditNotes() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCreditNote($relObj->copy($deepCopy)); + } + } + + foreach ($this->getCreditNoteStatusFlowsRelatedByFromStatusId() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCreditNoteStatusFlowRelatedByFromStatusId($relObj->copy($deepCopy)); + } + } + + foreach ($this->getCreditNoteStatusFlowsRelatedByToStatusId() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCreditNoteStatusFlowRelatedByToStatusId($relObj->copy($deepCopy)); + } + } + + foreach ($this->getCreditNoteStatusI18ns() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCreditNoteStatusI18n($relObj->copy($deepCopy)); + } + } + + } // if ($deepCopy) + + if ($makeNew) { + $copyObj->setNew(true); + $copyObj->setId(NULL); // this is a auto-increment column, so set to default value + } + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \CreditNote\Model\CreditNoteStatus Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + + return $copyObj; + } + + + /** + * Initializes a collection based on the name of a relation. + * Avoids crafting an 'init[$relationName]s' method name + * that wouldn't work when StandardEnglishPluralizer is used. + * + * @param string $relationName The name of the relation to initialize + * @return void + */ + public function initRelation($relationName) + { + if ('CreditNote' == $relationName) { + return $this->initCreditNotes(); + } + if ('CreditNoteStatusFlowRelatedByFromStatusId' == $relationName) { + return $this->initCreditNoteStatusFlowsRelatedByFromStatusId(); + } + if ('CreditNoteStatusFlowRelatedByToStatusId' == $relationName) { + return $this->initCreditNoteStatusFlowsRelatedByToStatusId(); + } + if ('CreditNoteStatusI18n' == $relationName) { + return $this->initCreditNoteStatusI18ns(); + } + } + + /** + * Clears out the collCreditNotes collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCreditNotes() + */ + public function clearCreditNotes() + { + $this->collCreditNotes = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Reset is the collCreditNotes collection loaded partially. + */ + public function resetPartialCreditNotes($v = true) + { + $this->collCreditNotesPartial = $v; + } + + /** + * Initializes the collCreditNotes collection. + * + * By default this just sets the collCreditNotes collection to an empty array (like clearcollCreditNotes()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty + * + * @return void + */ + public function initCreditNotes($overrideExisting = true) + { + if (null !== $this->collCreditNotes && !$overrideExisting) { + return; + } + $this->collCreditNotes = new ObjectCollection(); + $this->collCreditNotes->setModel('\CreditNote\Model\CreditNote'); + } + + /** + * Gets an array of ChildCreditNote objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this ChildCreditNoteStatus is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + * @throws PropelException + */ + public function getCreditNotes($criteria = null, ConnectionInterface $con = null) + { + $partial = $this->collCreditNotesPartial && !$this->isNew(); + if (null === $this->collCreditNotes || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCreditNotes) { + // return empty collection + $this->initCreditNotes(); + } else { + $collCreditNotes = ChildCreditNoteQuery::create(null, $criteria) + ->filterByCreditNoteStatus($this) + ->find($con); + + if (null !== $criteria) { + if (false !== $this->collCreditNotesPartial && count($collCreditNotes)) { + $this->initCreditNotes(false); + + foreach ($collCreditNotes as $obj) { + if (false == $this->collCreditNotes->contains($obj)) { + $this->collCreditNotes->append($obj); + } + } + + $this->collCreditNotesPartial = true; + } + + reset($collCreditNotes); + + return $collCreditNotes; + } + + if ($partial && $this->collCreditNotes) { + foreach ($this->collCreditNotes as $obj) { + if ($obj->isNew()) { + $collCreditNotes[] = $obj; + } + } + } + + $this->collCreditNotes = $collCreditNotes; + $this->collCreditNotesPartial = false; + } + } + + return $this->collCreditNotes; + } + + /** + * Sets a collection of CreditNote objects related by a one-to-many relationship + * to the current object. + * It will also schedule objects for deletion based on a diff between old objects (aka persisted) + * and new objects from the given Propel collection. + * + * @param Collection $creditNotes A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCreditNoteStatus The current object (for fluent API support) + */ + public function setCreditNotes(Collection $creditNotes, ConnectionInterface $con = null) + { + $creditNotesToDelete = $this->getCreditNotes(new Criteria(), $con)->diff($creditNotes); + + + $this->creditNotesScheduledForDeletion = $creditNotesToDelete; + + foreach ($creditNotesToDelete as $creditNoteRemoved) { + $creditNoteRemoved->setCreditNoteStatus(null); + } + + $this->collCreditNotes = null; + foreach ($creditNotes as $creditNote) { + $this->addCreditNote($creditNote); + } + + $this->collCreditNotes = $creditNotes; + $this->collCreditNotesPartial = false; + + return $this; + } + + /** + * Returns the number of related CreditNote objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CreditNote objects. + * @throws PropelException + */ + public function countCreditNotes(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) + { + $partial = $this->collCreditNotesPartial && !$this->isNew(); + if (null === $this->collCreditNotes || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCreditNotes) { + return 0; + } + + if ($partial && !$criteria) { + return count($this->getCreditNotes()); + } + + $query = ChildCreditNoteQuery::create(null, $criteria); + if ($distinct) { + $query->distinct(); + } + + return $query + ->filterByCreditNoteStatus($this) + ->count($con); + } + + return count($this->collCreditNotes); + } + + /** + * Method called to associate a ChildCreditNote object to this object + * through the ChildCreditNote foreign key attribute. + * + * @param ChildCreditNote $l ChildCreditNote + * @return \CreditNote\Model\CreditNoteStatus The current object (for fluent API support) + */ + public function addCreditNote(ChildCreditNote $l) + { + if ($this->collCreditNotes === null) { + $this->initCreditNotes(); + $this->collCreditNotesPartial = true; + } + + if (!in_array($l, $this->collCreditNotes->getArrayCopy(), true)) { // only add it if the **same** object is not already associated + $this->doAddCreditNote($l); + } + + return $this; + } + + /** + * @param CreditNote $creditNote The creditNote object to add. + */ + protected function doAddCreditNote($creditNote) + { + $this->collCreditNotes[]= $creditNote; + $creditNote->setCreditNoteStatus($this); + } + + /** + * @param CreditNote $creditNote The creditNote object to remove. + * @return ChildCreditNoteStatus The current object (for fluent API support) + */ + public function removeCreditNote($creditNote) + { + if ($this->getCreditNotes()->contains($creditNote)) { + $this->collCreditNotes->remove($this->collCreditNotes->search($creditNote)); + if (null === $this->creditNotesScheduledForDeletion) { + $this->creditNotesScheduledForDeletion = clone $this->collCreditNotes; + $this->creditNotesScheduledForDeletion->clear(); + } + $this->creditNotesScheduledForDeletion[]= clone $creditNote; + $creditNote->setCreditNoteStatus(null); + } + + return $this; + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNoteStatus is new, it will return + * an empty collection; or if this CreditNoteStatus has previously + * been saved, it will retrieve related CreditNotes from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNoteStatus. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesJoinOrder($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('Order', $joinBehavior); + + return $this->getCreditNotes($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNoteStatus is new, it will return + * an empty collection; or if this CreditNoteStatus has previously + * been saved, it will retrieve related CreditNotes from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNoteStatus. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('Customer', $joinBehavior); + + return $this->getCreditNotes($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNoteStatus is new, it will return + * an empty collection; or if this CreditNoteStatus has previously + * been saved, it will retrieve related CreditNotes from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNoteStatus. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesJoinCreditNoteRelatedByParentId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('CreditNoteRelatedByParentId', $joinBehavior); + + return $this->getCreditNotes($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNoteStatus is new, it will return + * an empty collection; or if this CreditNoteStatus has previously + * been saved, it will retrieve related CreditNotes from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNoteStatus. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesJoinCreditNoteType($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('CreditNoteType', $joinBehavior); + + return $this->getCreditNotes($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNoteStatus is new, it will return + * an empty collection; or if this CreditNoteStatus has previously + * been saved, it will retrieve related CreditNotes from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNoteStatus. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('Currency', $joinBehavior); + + return $this->getCreditNotes($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNoteStatus is new, it will return + * an empty collection; or if this CreditNoteStatus has previously + * been saved, it will retrieve related CreditNotes from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNoteStatus. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesJoinCreditNoteAddress($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('CreditNoteAddress', $joinBehavior); + + return $this->getCreditNotes($query, $con); + } + + /** + * Clears out the collCreditNoteStatusFlowsRelatedByFromStatusId collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCreditNoteStatusFlowsRelatedByFromStatusId() + */ + public function clearCreditNoteStatusFlowsRelatedByFromStatusId() + { + $this->collCreditNoteStatusFlowsRelatedByFromStatusId = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Reset is the collCreditNoteStatusFlowsRelatedByFromStatusId collection loaded partially. + */ + public function resetPartialCreditNoteStatusFlowsRelatedByFromStatusId($v = true) + { + $this->collCreditNoteStatusFlowsRelatedByFromStatusIdPartial = $v; + } + + /** + * Initializes the collCreditNoteStatusFlowsRelatedByFromStatusId collection. + * + * By default this just sets the collCreditNoteStatusFlowsRelatedByFromStatusId collection to an empty array (like clearcollCreditNoteStatusFlowsRelatedByFromStatusId()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty + * + * @return void + */ + public function initCreditNoteStatusFlowsRelatedByFromStatusId($overrideExisting = true) + { + if (null !== $this->collCreditNoteStatusFlowsRelatedByFromStatusId && !$overrideExisting) { + return; + } + $this->collCreditNoteStatusFlowsRelatedByFromStatusId = new ObjectCollection(); + $this->collCreditNoteStatusFlowsRelatedByFromStatusId->setModel('\CreditNote\Model\CreditNoteStatusFlow'); + } + + /** + * Gets an array of ChildCreditNoteStatusFlow objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this ChildCreditNoteStatus is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @return Collection|ChildCreditNoteStatusFlow[] List of ChildCreditNoteStatusFlow objects + * @throws PropelException + */ + public function getCreditNoteStatusFlowsRelatedByFromStatusId($criteria = null, ConnectionInterface $con = null) + { + $partial = $this->collCreditNoteStatusFlowsRelatedByFromStatusIdPartial && !$this->isNew(); + if (null === $this->collCreditNoteStatusFlowsRelatedByFromStatusId || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCreditNoteStatusFlowsRelatedByFromStatusId) { + // return empty collection + $this->initCreditNoteStatusFlowsRelatedByFromStatusId(); + } else { + $collCreditNoteStatusFlowsRelatedByFromStatusId = ChildCreditNoteStatusFlowQuery::create(null, $criteria) + ->filterByCreditNoteStatusRelatedByFromStatusId($this) + ->find($con); + + if (null !== $criteria) { + if (false !== $this->collCreditNoteStatusFlowsRelatedByFromStatusIdPartial && count($collCreditNoteStatusFlowsRelatedByFromStatusId)) { + $this->initCreditNoteStatusFlowsRelatedByFromStatusId(false); + + foreach ($collCreditNoteStatusFlowsRelatedByFromStatusId as $obj) { + if (false == $this->collCreditNoteStatusFlowsRelatedByFromStatusId->contains($obj)) { + $this->collCreditNoteStatusFlowsRelatedByFromStatusId->append($obj); + } + } + + $this->collCreditNoteStatusFlowsRelatedByFromStatusIdPartial = true; + } + + reset($collCreditNoteStatusFlowsRelatedByFromStatusId); + + return $collCreditNoteStatusFlowsRelatedByFromStatusId; + } + + if ($partial && $this->collCreditNoteStatusFlowsRelatedByFromStatusId) { + foreach ($this->collCreditNoteStatusFlowsRelatedByFromStatusId as $obj) { + if ($obj->isNew()) { + $collCreditNoteStatusFlowsRelatedByFromStatusId[] = $obj; + } + } + } + + $this->collCreditNoteStatusFlowsRelatedByFromStatusId = $collCreditNoteStatusFlowsRelatedByFromStatusId; + $this->collCreditNoteStatusFlowsRelatedByFromStatusIdPartial = false; + } + } + + return $this->collCreditNoteStatusFlowsRelatedByFromStatusId; + } + + /** + * Sets a collection of CreditNoteStatusFlowRelatedByFromStatusId objects related by a one-to-many relationship + * to the current object. + * It will also schedule objects for deletion based on a diff between old objects (aka persisted) + * and new objects from the given Propel collection. + * + * @param Collection $creditNoteStatusFlowsRelatedByFromStatusId A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCreditNoteStatus The current object (for fluent API support) + */ + public function setCreditNoteStatusFlowsRelatedByFromStatusId(Collection $creditNoteStatusFlowsRelatedByFromStatusId, ConnectionInterface $con = null) + { + $creditNoteStatusFlowsRelatedByFromStatusIdToDelete = $this->getCreditNoteStatusFlowsRelatedByFromStatusId(new Criteria(), $con)->diff($creditNoteStatusFlowsRelatedByFromStatusId); + + + $this->creditNoteStatusFlowsRelatedByFromStatusIdScheduledForDeletion = $creditNoteStatusFlowsRelatedByFromStatusIdToDelete; + + foreach ($creditNoteStatusFlowsRelatedByFromStatusIdToDelete as $creditNoteStatusFlowRelatedByFromStatusIdRemoved) { + $creditNoteStatusFlowRelatedByFromStatusIdRemoved->setCreditNoteStatusRelatedByFromStatusId(null); + } + + $this->collCreditNoteStatusFlowsRelatedByFromStatusId = null; + foreach ($creditNoteStatusFlowsRelatedByFromStatusId as $creditNoteStatusFlowRelatedByFromStatusId) { + $this->addCreditNoteStatusFlowRelatedByFromStatusId($creditNoteStatusFlowRelatedByFromStatusId); + } + + $this->collCreditNoteStatusFlowsRelatedByFromStatusId = $creditNoteStatusFlowsRelatedByFromStatusId; + $this->collCreditNoteStatusFlowsRelatedByFromStatusIdPartial = false; + + return $this; + } + + /** + * Returns the number of related CreditNoteStatusFlow objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CreditNoteStatusFlow objects. + * @throws PropelException + */ + public function countCreditNoteStatusFlowsRelatedByFromStatusId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) + { + $partial = $this->collCreditNoteStatusFlowsRelatedByFromStatusIdPartial && !$this->isNew(); + if (null === $this->collCreditNoteStatusFlowsRelatedByFromStatusId || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCreditNoteStatusFlowsRelatedByFromStatusId) { + return 0; + } + + if ($partial && !$criteria) { + return count($this->getCreditNoteStatusFlowsRelatedByFromStatusId()); + } + + $query = ChildCreditNoteStatusFlowQuery::create(null, $criteria); + if ($distinct) { + $query->distinct(); + } + + return $query + ->filterByCreditNoteStatusRelatedByFromStatusId($this) + ->count($con); + } + + return count($this->collCreditNoteStatusFlowsRelatedByFromStatusId); + } + + /** + * Method called to associate a ChildCreditNoteStatusFlow object to this object + * through the ChildCreditNoteStatusFlow foreign key attribute. + * + * @param ChildCreditNoteStatusFlow $l ChildCreditNoteStatusFlow + * @return \CreditNote\Model\CreditNoteStatus The current object (for fluent API support) + */ + public function addCreditNoteStatusFlowRelatedByFromStatusId(ChildCreditNoteStatusFlow $l) + { + if ($this->collCreditNoteStatusFlowsRelatedByFromStatusId === null) { + $this->initCreditNoteStatusFlowsRelatedByFromStatusId(); + $this->collCreditNoteStatusFlowsRelatedByFromStatusIdPartial = true; + } + + if (!in_array($l, $this->collCreditNoteStatusFlowsRelatedByFromStatusId->getArrayCopy(), true)) { // only add it if the **same** object is not already associated + $this->doAddCreditNoteStatusFlowRelatedByFromStatusId($l); + } + + return $this; + } + + /** + * @param CreditNoteStatusFlowRelatedByFromStatusId $creditNoteStatusFlowRelatedByFromStatusId The creditNoteStatusFlowRelatedByFromStatusId object to add. + */ + protected function doAddCreditNoteStatusFlowRelatedByFromStatusId($creditNoteStatusFlowRelatedByFromStatusId) + { + $this->collCreditNoteStatusFlowsRelatedByFromStatusId[]= $creditNoteStatusFlowRelatedByFromStatusId; + $creditNoteStatusFlowRelatedByFromStatusId->setCreditNoteStatusRelatedByFromStatusId($this); + } + + /** + * @param CreditNoteStatusFlowRelatedByFromStatusId $creditNoteStatusFlowRelatedByFromStatusId The creditNoteStatusFlowRelatedByFromStatusId object to remove. + * @return ChildCreditNoteStatus The current object (for fluent API support) + */ + public function removeCreditNoteStatusFlowRelatedByFromStatusId($creditNoteStatusFlowRelatedByFromStatusId) + { + if ($this->getCreditNoteStatusFlowsRelatedByFromStatusId()->contains($creditNoteStatusFlowRelatedByFromStatusId)) { + $this->collCreditNoteStatusFlowsRelatedByFromStatusId->remove($this->collCreditNoteStatusFlowsRelatedByFromStatusId->search($creditNoteStatusFlowRelatedByFromStatusId)); + if (null === $this->creditNoteStatusFlowsRelatedByFromStatusIdScheduledForDeletion) { + $this->creditNoteStatusFlowsRelatedByFromStatusIdScheduledForDeletion = clone $this->collCreditNoteStatusFlowsRelatedByFromStatusId; + $this->creditNoteStatusFlowsRelatedByFromStatusIdScheduledForDeletion->clear(); + } + $this->creditNoteStatusFlowsRelatedByFromStatusIdScheduledForDeletion[]= clone $creditNoteStatusFlowRelatedByFromStatusId; + $creditNoteStatusFlowRelatedByFromStatusId->setCreditNoteStatusRelatedByFromStatusId(null); + } + + return $this; + } + + /** + * Clears out the collCreditNoteStatusFlowsRelatedByToStatusId collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCreditNoteStatusFlowsRelatedByToStatusId() + */ + public function clearCreditNoteStatusFlowsRelatedByToStatusId() + { + $this->collCreditNoteStatusFlowsRelatedByToStatusId = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Reset is the collCreditNoteStatusFlowsRelatedByToStatusId collection loaded partially. + */ + public function resetPartialCreditNoteStatusFlowsRelatedByToStatusId($v = true) + { + $this->collCreditNoteStatusFlowsRelatedByToStatusIdPartial = $v; + } + + /** + * Initializes the collCreditNoteStatusFlowsRelatedByToStatusId collection. + * + * By default this just sets the collCreditNoteStatusFlowsRelatedByToStatusId collection to an empty array (like clearcollCreditNoteStatusFlowsRelatedByToStatusId()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty + * + * @return void + */ + public function initCreditNoteStatusFlowsRelatedByToStatusId($overrideExisting = true) + { + if (null !== $this->collCreditNoteStatusFlowsRelatedByToStatusId && !$overrideExisting) { + return; + } + $this->collCreditNoteStatusFlowsRelatedByToStatusId = new ObjectCollection(); + $this->collCreditNoteStatusFlowsRelatedByToStatusId->setModel('\CreditNote\Model\CreditNoteStatusFlow'); + } + + /** + * Gets an array of ChildCreditNoteStatusFlow objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this ChildCreditNoteStatus is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @return Collection|ChildCreditNoteStatusFlow[] List of ChildCreditNoteStatusFlow objects + * @throws PropelException + */ + public function getCreditNoteStatusFlowsRelatedByToStatusId($criteria = null, ConnectionInterface $con = null) + { + $partial = $this->collCreditNoteStatusFlowsRelatedByToStatusIdPartial && !$this->isNew(); + if (null === $this->collCreditNoteStatusFlowsRelatedByToStatusId || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCreditNoteStatusFlowsRelatedByToStatusId) { + // return empty collection + $this->initCreditNoteStatusFlowsRelatedByToStatusId(); + } else { + $collCreditNoteStatusFlowsRelatedByToStatusId = ChildCreditNoteStatusFlowQuery::create(null, $criteria) + ->filterByCreditNoteStatusRelatedByToStatusId($this) + ->find($con); + + if (null !== $criteria) { + if (false !== $this->collCreditNoteStatusFlowsRelatedByToStatusIdPartial && count($collCreditNoteStatusFlowsRelatedByToStatusId)) { + $this->initCreditNoteStatusFlowsRelatedByToStatusId(false); + + foreach ($collCreditNoteStatusFlowsRelatedByToStatusId as $obj) { + if (false == $this->collCreditNoteStatusFlowsRelatedByToStatusId->contains($obj)) { + $this->collCreditNoteStatusFlowsRelatedByToStatusId->append($obj); + } + } + + $this->collCreditNoteStatusFlowsRelatedByToStatusIdPartial = true; + } + + reset($collCreditNoteStatusFlowsRelatedByToStatusId); + + return $collCreditNoteStatusFlowsRelatedByToStatusId; + } + + if ($partial && $this->collCreditNoteStatusFlowsRelatedByToStatusId) { + foreach ($this->collCreditNoteStatusFlowsRelatedByToStatusId as $obj) { + if ($obj->isNew()) { + $collCreditNoteStatusFlowsRelatedByToStatusId[] = $obj; + } + } + } + + $this->collCreditNoteStatusFlowsRelatedByToStatusId = $collCreditNoteStatusFlowsRelatedByToStatusId; + $this->collCreditNoteStatusFlowsRelatedByToStatusIdPartial = false; + } + } + + return $this->collCreditNoteStatusFlowsRelatedByToStatusId; + } + + /** + * Sets a collection of CreditNoteStatusFlowRelatedByToStatusId objects related by a one-to-many relationship + * to the current object. + * It will also schedule objects for deletion based on a diff between old objects (aka persisted) + * and new objects from the given Propel collection. + * + * @param Collection $creditNoteStatusFlowsRelatedByToStatusId A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCreditNoteStatus The current object (for fluent API support) + */ + public function setCreditNoteStatusFlowsRelatedByToStatusId(Collection $creditNoteStatusFlowsRelatedByToStatusId, ConnectionInterface $con = null) + { + $creditNoteStatusFlowsRelatedByToStatusIdToDelete = $this->getCreditNoteStatusFlowsRelatedByToStatusId(new Criteria(), $con)->diff($creditNoteStatusFlowsRelatedByToStatusId); + + + $this->creditNoteStatusFlowsRelatedByToStatusIdScheduledForDeletion = $creditNoteStatusFlowsRelatedByToStatusIdToDelete; + + foreach ($creditNoteStatusFlowsRelatedByToStatusIdToDelete as $creditNoteStatusFlowRelatedByToStatusIdRemoved) { + $creditNoteStatusFlowRelatedByToStatusIdRemoved->setCreditNoteStatusRelatedByToStatusId(null); + } + + $this->collCreditNoteStatusFlowsRelatedByToStatusId = null; + foreach ($creditNoteStatusFlowsRelatedByToStatusId as $creditNoteStatusFlowRelatedByToStatusId) { + $this->addCreditNoteStatusFlowRelatedByToStatusId($creditNoteStatusFlowRelatedByToStatusId); + } + + $this->collCreditNoteStatusFlowsRelatedByToStatusId = $creditNoteStatusFlowsRelatedByToStatusId; + $this->collCreditNoteStatusFlowsRelatedByToStatusIdPartial = false; + + return $this; + } + + /** + * Returns the number of related CreditNoteStatusFlow objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CreditNoteStatusFlow objects. + * @throws PropelException + */ + public function countCreditNoteStatusFlowsRelatedByToStatusId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) + { + $partial = $this->collCreditNoteStatusFlowsRelatedByToStatusIdPartial && !$this->isNew(); + if (null === $this->collCreditNoteStatusFlowsRelatedByToStatusId || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCreditNoteStatusFlowsRelatedByToStatusId) { + return 0; + } + + if ($partial && !$criteria) { + return count($this->getCreditNoteStatusFlowsRelatedByToStatusId()); + } + + $query = ChildCreditNoteStatusFlowQuery::create(null, $criteria); + if ($distinct) { + $query->distinct(); + } + + return $query + ->filterByCreditNoteStatusRelatedByToStatusId($this) + ->count($con); + } + + return count($this->collCreditNoteStatusFlowsRelatedByToStatusId); + } + + /** + * Method called to associate a ChildCreditNoteStatusFlow object to this object + * through the ChildCreditNoteStatusFlow foreign key attribute. + * + * @param ChildCreditNoteStatusFlow $l ChildCreditNoteStatusFlow + * @return \CreditNote\Model\CreditNoteStatus The current object (for fluent API support) + */ + public function addCreditNoteStatusFlowRelatedByToStatusId(ChildCreditNoteStatusFlow $l) + { + if ($this->collCreditNoteStatusFlowsRelatedByToStatusId === null) { + $this->initCreditNoteStatusFlowsRelatedByToStatusId(); + $this->collCreditNoteStatusFlowsRelatedByToStatusIdPartial = true; + } + + if (!in_array($l, $this->collCreditNoteStatusFlowsRelatedByToStatusId->getArrayCopy(), true)) { // only add it if the **same** object is not already associated + $this->doAddCreditNoteStatusFlowRelatedByToStatusId($l); + } + + return $this; + } + + /** + * @param CreditNoteStatusFlowRelatedByToStatusId $creditNoteStatusFlowRelatedByToStatusId The creditNoteStatusFlowRelatedByToStatusId object to add. + */ + protected function doAddCreditNoteStatusFlowRelatedByToStatusId($creditNoteStatusFlowRelatedByToStatusId) + { + $this->collCreditNoteStatusFlowsRelatedByToStatusId[]= $creditNoteStatusFlowRelatedByToStatusId; + $creditNoteStatusFlowRelatedByToStatusId->setCreditNoteStatusRelatedByToStatusId($this); + } + + /** + * @param CreditNoteStatusFlowRelatedByToStatusId $creditNoteStatusFlowRelatedByToStatusId The creditNoteStatusFlowRelatedByToStatusId object to remove. + * @return ChildCreditNoteStatus The current object (for fluent API support) + */ + public function removeCreditNoteStatusFlowRelatedByToStatusId($creditNoteStatusFlowRelatedByToStatusId) + { + if ($this->getCreditNoteStatusFlowsRelatedByToStatusId()->contains($creditNoteStatusFlowRelatedByToStatusId)) { + $this->collCreditNoteStatusFlowsRelatedByToStatusId->remove($this->collCreditNoteStatusFlowsRelatedByToStatusId->search($creditNoteStatusFlowRelatedByToStatusId)); + if (null === $this->creditNoteStatusFlowsRelatedByToStatusIdScheduledForDeletion) { + $this->creditNoteStatusFlowsRelatedByToStatusIdScheduledForDeletion = clone $this->collCreditNoteStatusFlowsRelatedByToStatusId; + $this->creditNoteStatusFlowsRelatedByToStatusIdScheduledForDeletion->clear(); + } + $this->creditNoteStatusFlowsRelatedByToStatusIdScheduledForDeletion[]= clone $creditNoteStatusFlowRelatedByToStatusId; + $creditNoteStatusFlowRelatedByToStatusId->setCreditNoteStatusRelatedByToStatusId(null); + } + + return $this; + } + + /** + * Clears out the collCreditNoteStatusI18ns collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCreditNoteStatusI18ns() + */ + public function clearCreditNoteStatusI18ns() + { + $this->collCreditNoteStatusI18ns = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Reset is the collCreditNoteStatusI18ns collection loaded partially. + */ + public function resetPartialCreditNoteStatusI18ns($v = true) + { + $this->collCreditNoteStatusI18nsPartial = $v; + } + + /** + * Initializes the collCreditNoteStatusI18ns collection. + * + * By default this just sets the collCreditNoteStatusI18ns collection to an empty array (like clearcollCreditNoteStatusI18ns()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty + * + * @return void + */ + public function initCreditNoteStatusI18ns($overrideExisting = true) + { + if (null !== $this->collCreditNoteStatusI18ns && !$overrideExisting) { + return; + } + $this->collCreditNoteStatusI18ns = new ObjectCollection(); + $this->collCreditNoteStatusI18ns->setModel('\CreditNote\Model\CreditNoteStatusI18n'); + } + + /** + * Gets an array of ChildCreditNoteStatusI18n objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this ChildCreditNoteStatus is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @return Collection|ChildCreditNoteStatusI18n[] List of ChildCreditNoteStatusI18n objects + * @throws PropelException + */ + public function getCreditNoteStatusI18ns($criteria = null, ConnectionInterface $con = null) + { + $partial = $this->collCreditNoteStatusI18nsPartial && !$this->isNew(); + if (null === $this->collCreditNoteStatusI18ns || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCreditNoteStatusI18ns) { + // return empty collection + $this->initCreditNoteStatusI18ns(); + } else { + $collCreditNoteStatusI18ns = ChildCreditNoteStatusI18nQuery::create(null, $criteria) + ->filterByCreditNoteStatus($this) + ->find($con); + + if (null !== $criteria) { + if (false !== $this->collCreditNoteStatusI18nsPartial && count($collCreditNoteStatusI18ns)) { + $this->initCreditNoteStatusI18ns(false); + + foreach ($collCreditNoteStatusI18ns as $obj) { + if (false == $this->collCreditNoteStatusI18ns->contains($obj)) { + $this->collCreditNoteStatusI18ns->append($obj); + } + } + + $this->collCreditNoteStatusI18nsPartial = true; + } + + reset($collCreditNoteStatusI18ns); + + return $collCreditNoteStatusI18ns; + } + + if ($partial && $this->collCreditNoteStatusI18ns) { + foreach ($this->collCreditNoteStatusI18ns as $obj) { + if ($obj->isNew()) { + $collCreditNoteStatusI18ns[] = $obj; + } + } + } + + $this->collCreditNoteStatusI18ns = $collCreditNoteStatusI18ns; + $this->collCreditNoteStatusI18nsPartial = false; + } + } + + return $this->collCreditNoteStatusI18ns; + } + + /** + * Sets a collection of CreditNoteStatusI18n objects related by a one-to-many relationship + * to the current object. + * It will also schedule objects for deletion based on a diff between old objects (aka persisted) + * and new objects from the given Propel collection. + * + * @param Collection $creditNoteStatusI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCreditNoteStatus The current object (for fluent API support) + */ + public function setCreditNoteStatusI18ns(Collection $creditNoteStatusI18ns, ConnectionInterface $con = null) + { + $creditNoteStatusI18nsToDelete = $this->getCreditNoteStatusI18ns(new Criteria(), $con)->diff($creditNoteStatusI18ns); + + + //since at least one column in the foreign key is at the same time a PK + //we can not just set a PK to NULL in the lines below. We have to store + //a backup of all values, so we are able to manipulate these items based on the onDelete value later. + $this->creditNoteStatusI18nsScheduledForDeletion = clone $creditNoteStatusI18nsToDelete; + + foreach ($creditNoteStatusI18nsToDelete as $creditNoteStatusI18nRemoved) { + $creditNoteStatusI18nRemoved->setCreditNoteStatus(null); + } + + $this->collCreditNoteStatusI18ns = null; + foreach ($creditNoteStatusI18ns as $creditNoteStatusI18n) { + $this->addCreditNoteStatusI18n($creditNoteStatusI18n); + } + + $this->collCreditNoteStatusI18ns = $creditNoteStatusI18ns; + $this->collCreditNoteStatusI18nsPartial = false; + + return $this; + } + + /** + * Returns the number of related CreditNoteStatusI18n objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CreditNoteStatusI18n objects. + * @throws PropelException + */ + public function countCreditNoteStatusI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) + { + $partial = $this->collCreditNoteStatusI18nsPartial && !$this->isNew(); + if (null === $this->collCreditNoteStatusI18ns || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCreditNoteStatusI18ns) { + return 0; + } + + if ($partial && !$criteria) { + return count($this->getCreditNoteStatusI18ns()); + } + + $query = ChildCreditNoteStatusI18nQuery::create(null, $criteria); + if ($distinct) { + $query->distinct(); + } + + return $query + ->filterByCreditNoteStatus($this) + ->count($con); + } + + return count($this->collCreditNoteStatusI18ns); + } + + /** + * Method called to associate a ChildCreditNoteStatusI18n object to this object + * through the ChildCreditNoteStatusI18n foreign key attribute. + * + * @param ChildCreditNoteStatusI18n $l ChildCreditNoteStatusI18n + * @return \CreditNote\Model\CreditNoteStatus The current object (for fluent API support) + */ + public function addCreditNoteStatusI18n(ChildCreditNoteStatusI18n $l) + { + if ($l && $locale = $l->getLocale()) { + $this->setLocale($locale); + $this->currentTranslations[$locale] = $l; + } + if ($this->collCreditNoteStatusI18ns === null) { + $this->initCreditNoteStatusI18ns(); + $this->collCreditNoteStatusI18nsPartial = true; + } + + if (!in_array($l, $this->collCreditNoteStatusI18ns->getArrayCopy(), true)) { // only add it if the **same** object is not already associated + $this->doAddCreditNoteStatusI18n($l); + } + + return $this; + } + + /** + * @param CreditNoteStatusI18n $creditNoteStatusI18n The creditNoteStatusI18n object to add. + */ + protected function doAddCreditNoteStatusI18n($creditNoteStatusI18n) + { + $this->collCreditNoteStatusI18ns[]= $creditNoteStatusI18n; + $creditNoteStatusI18n->setCreditNoteStatus($this); + } + + /** + * @param CreditNoteStatusI18n $creditNoteStatusI18n The creditNoteStatusI18n object to remove. + * @return ChildCreditNoteStatus The current object (for fluent API support) + */ + public function removeCreditNoteStatusI18n($creditNoteStatusI18n) + { + if ($this->getCreditNoteStatusI18ns()->contains($creditNoteStatusI18n)) { + $this->collCreditNoteStatusI18ns->remove($this->collCreditNoteStatusI18ns->search($creditNoteStatusI18n)); + if (null === $this->creditNoteStatusI18nsScheduledForDeletion) { + $this->creditNoteStatusI18nsScheduledForDeletion = clone $this->collCreditNoteStatusI18ns; + $this->creditNoteStatusI18nsScheduledForDeletion->clear(); + } + $this->creditNoteStatusI18nsScheduledForDeletion[]= clone $creditNoteStatusI18n; + $creditNoteStatusI18n->setCreditNoteStatus(null); + } + + return $this; + } + + /** + * Clears the current object and sets all attributes to their default values + */ + public function clear() + { + $this->id = null; + $this->code = null; + $this->color = null; + $this->invoiced = null; + $this->used = null; + $this->position = null; + $this->created_at = null; + $this->updated_at = null; + $this->alreadyInSave = false; + $this->clearAllReferences(); + $this->applyDefaultValues(); + $this->resetModified(); + $this->setNew(true); + $this->setDeleted(false); + } + + /** + * Resets all references to other model objects or collections of model objects. + * + * This method is a user-space workaround for PHP's inability to garbage collect + * objects with circular references (even in PHP 5.3). This is currently necessary + * when using Propel in certain daemon or large-volume/high-memory operations. + * + * @param boolean $deep Whether to also clear the references on all referrer objects. + */ + public function clearAllReferences($deep = false) + { + if ($deep) { + if ($this->collCreditNotes) { + foreach ($this->collCreditNotes as $o) { + $o->clearAllReferences($deep); + } + } + if ($this->collCreditNoteStatusFlowsRelatedByFromStatusId) { + foreach ($this->collCreditNoteStatusFlowsRelatedByFromStatusId as $o) { + $o->clearAllReferences($deep); + } + } + if ($this->collCreditNoteStatusFlowsRelatedByToStatusId) { + foreach ($this->collCreditNoteStatusFlowsRelatedByToStatusId as $o) { + $o->clearAllReferences($deep); + } + } + if ($this->collCreditNoteStatusI18ns) { + foreach ($this->collCreditNoteStatusI18ns as $o) { + $o->clearAllReferences($deep); + } + } + } // if ($deep) + + // i18n behavior + $this->currentLocale = 'en_US'; + $this->currentTranslations = null; + + $this->collCreditNotes = null; + $this->collCreditNoteStatusFlowsRelatedByFromStatusId = null; + $this->collCreditNoteStatusFlowsRelatedByToStatusId = null; + $this->collCreditNoteStatusI18ns = null; + } + + /** + * Return the string representation of this object + * + * @return string + */ + public function __toString() + { + return (string) $this->exportTo(CreditNoteStatusTableMap::DEFAULT_STRING_FORMAT); + } + + // i18n behavior + + /** + * Sets the locale for translations + * + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * + * @return ChildCreditNoteStatus The current object (for fluent API support) + */ + public function setLocale($locale = 'en_US') + { + $this->currentLocale = $locale; + + return $this; + } + + /** + * Gets the locale for translations + * + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + */ + public function getLocale() + { + return $this->currentLocale; + } + + /** + * Returns the current translation for a given locale + * + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object + * + * @return ChildCreditNoteStatusI18n */ + public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) + { + if (!isset($this->currentTranslations[$locale])) { + if (null !== $this->collCreditNoteStatusI18ns) { + foreach ($this->collCreditNoteStatusI18ns as $translation) { + if ($translation->getLocale() == $locale) { + $this->currentTranslations[$locale] = $translation; + + return $translation; + } + } + } + if ($this->isNew()) { + $translation = new ChildCreditNoteStatusI18n(); + $translation->setLocale($locale); + } else { + $translation = ChildCreditNoteStatusI18nQuery::create() + ->filterByPrimaryKey(array($this->getPrimaryKey(), $locale)) + ->findOneOrCreate($con); + $this->currentTranslations[$locale] = $translation; + } + $this->addCreditNoteStatusI18n($translation); + } + + return $this->currentTranslations[$locale]; + } + + /** + * Remove the translation for a given locale + * + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object + * + * @return ChildCreditNoteStatus The current object (for fluent API support) + */ + public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) + { + if (!$this->isNew()) { + ChildCreditNoteStatusI18nQuery::create() + ->filterByPrimaryKey(array($this->getPrimaryKey(), $locale)) + ->delete($con); + } + if (isset($this->currentTranslations[$locale])) { + unset($this->currentTranslations[$locale]); + } + foreach ($this->collCreditNoteStatusI18ns as $key => $translation) { + if ($translation->getLocale() == $locale) { + unset($this->collCreditNoteStatusI18ns[$key]); + break; + } + } + + return $this; + } + + /** + * Returns the current translation + * + * @param ConnectionInterface $con an optional connection object + * + * @return ChildCreditNoteStatusI18n */ + public function getCurrentTranslation(ConnectionInterface $con = null) + { + return $this->getTranslation($this->getLocale(), $con); + } + + + /** + * Get the [title] column value. + * + * @return string + */ + public function getTitle() + { + return $this->getCurrentTranslation()->getTitle(); + } + + + /** + * Set the value of [title] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteStatusI18n The current object (for fluent API support) + */ + public function setTitle($v) + { $this->getCurrentTranslation()->setTitle($v); + + return $this; + } + + + /** + * Get the [description] column value. + * + * @return string + */ + public function getDescription() + { + return $this->getCurrentTranslation()->getDescription(); + } + + + /** + * Set the value of [description] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteStatusI18n The current object (for fluent API support) + */ + public function setDescription($v) + { $this->getCurrentTranslation()->setDescription($v); + + return $this; + } + + + /** + * Get the [chapo] column value. + * + * @return string + */ + public function getChapo() + { + return $this->getCurrentTranslation()->getChapo(); + } + + + /** + * Set the value of [chapo] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteStatusI18n The current object (for fluent API support) + */ + public function setChapo($v) + { $this->getCurrentTranslation()->setChapo($v); + + return $this; + } + + + /** + * Get the [postscriptum] column value. + * + * @return string + */ + public function getPostscriptum() + { + return $this->getCurrentTranslation()->getPostscriptum(); + } + + + /** + * Set the value of [postscriptum] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteStatusI18n The current object (for fluent API support) + */ + public function setPostscriptum($v) + { $this->getCurrentTranslation()->setPostscriptum($v); + + return $this; + } + + // timestampable behavior + + /** + * Mark the current object so that the update date doesn't get updated during next save + * + * @return ChildCreditNoteStatus The current object (for fluent API support) + */ + public function keepUpdateDateUnchanged() + { + $this->modifiedColumns[CreditNoteStatusTableMap::UPDATED_AT] = true; + + return $this; + } + + /** + * Code to be run before persisting the object + * @param ConnectionInterface $con + * @return boolean + */ + public function preSave(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after persisting the object + * @param ConnectionInterface $con + */ + public function postSave(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before inserting to database + * @param ConnectionInterface $con + * @return boolean + */ + public function preInsert(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after inserting to database + * @param ConnectionInterface $con + */ + public function postInsert(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before updating the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preUpdate(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after updating the object in database + * @param ConnectionInterface $con + */ + public function postUpdate(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before deleting the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preDelete(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after deleting the object in database + * @param ConnectionInterface $con + */ + public function postDelete(ConnectionInterface $con = null) + { + + } + + + /** + * Derived method to catches calls to undefined methods. + * + * Provides magic import/export method support (fromXML()/toXML(), fromYAML()/toYAML(), etc.). + * Allows to define default __call() behavior if you overwrite __call() + * + * @param string $name + * @param mixed $params + * + * @return array|string + */ + public function __call($name, $params) + { + if (0 === strpos($name, 'get')) { + $virtualColumn = substr($name, 3); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + + $virtualColumn = lcfirst($virtualColumn); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + } + + if (0 === strpos($name, 'from')) { + $format = substr($name, 4); + + return $this->importFrom($format, reset($params)); + } + + if (0 === strpos($name, 'to')) { + $format = substr($name, 2); + $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true; + + return $this->exportTo($format, $includeLazyLoadColumns); + } + + throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name)); + } + +} diff --git a/local/modules/CreditNote/Model/Base/CreditNoteStatusFlow.php b/local/modules/CreditNote/Model/Base/CreditNoteStatusFlow.php new file mode 100644 index 000000000..ad7d91ae9 --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CreditNoteStatusFlow.php @@ -0,0 +1,1639 @@ +root = false; + } + + /** + * Initializes internal state of CreditNote\Model\Base\CreditNoteStatusFlow object. + * @see applyDefaults() + */ + public function __construct() + { + $this->applyDefaultValues(); + } + + /** + * Returns whether the object has been modified. + * + * @return boolean True if the object has been modified. + */ + public function isModified() + { + return !!$this->modifiedColumns; + } + + /** + * Has specified column been modified? + * + * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID + * @return boolean True if $col has been modified. + */ + public function isColumnModified($col) + { + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); + } + + /** + * Get the columns that have been modified in this object. + * @return array A unique list of the modified column names for this object. + */ + public function getModifiedColumns() + { + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; + } + + /** + * Returns whether the object has ever been saved. This will + * be false, if the object was retrieved from storage or was created + * and then saved. + * + * @return boolean true, if the object has never been persisted. + */ + public function isNew() + { + return $this->new; + } + + /** + * Setter for the isNew attribute. This method will be called + * by Propel-generated children and objects. + * + * @param boolean $b the state of the object. + */ + public function setNew($b) + { + $this->new = (Boolean) $b; + } + + /** + * Whether this object has been deleted. + * @return boolean The deleted state of this object. + */ + public function isDeleted() + { + return $this->deleted; + } + + /** + * Specify whether this object has been deleted. + * @param boolean $b The deleted state of this object. + * @return void + */ + public function setDeleted($b) + { + $this->deleted = (Boolean) $b; + } + + /** + * Sets the modified state for the object to be false. + * @param string $col If supplied, only the specified column is reset. + * @return void + */ + public function resetModified($col = null) + { + if (null !== $col) { + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); + } + } else { + $this->modifiedColumns = array(); + } + } + + /** + * Compares this with another CreditNoteStatusFlow instance. If + * obj is an instance of CreditNoteStatusFlow, delegates to + * equals(CreditNoteStatusFlow). Otherwise, returns false. + * + * @param mixed $obj The object to compare to. + * @return boolean Whether equal to the object specified. + */ + public function equals($obj) + { + $thisclazz = get_class($this); + if (!is_object($obj) || !($obj instanceof $thisclazz)) { + return false; + } + + if ($this === $obj) { + return true; + } + + if (null === $this->getPrimaryKey() + || null === $obj->getPrimaryKey()) { + return false; + } + + return $this->getPrimaryKey() === $obj->getPrimaryKey(); + } + + /** + * If the primary key is not null, return the hashcode of the + * primary key. Otherwise, return the hash code of the object. + * + * @return int Hashcode + */ + public function hashCode() + { + if (null !== $this->getPrimaryKey()) { + return crc32(serialize($this->getPrimaryKey())); + } + + return crc32(serialize(clone $this)); + } + + /** + * Get the associative array of the virtual columns in this object + * + * @return array + */ + public function getVirtualColumns() + { + return $this->virtualColumns; + } + + /** + * Checks the existence of a virtual column in this object + * + * @param string $name The virtual column name + * @return boolean + */ + public function hasVirtualColumn($name) + { + return array_key_exists($name, $this->virtualColumns); + } + + /** + * Get the value of a virtual column in this object + * + * @param string $name The virtual column name + * @return mixed + * + * @throws PropelException + */ + public function getVirtualColumn($name) + { + if (!$this->hasVirtualColumn($name)) { + throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name)); + } + + return $this->virtualColumns[$name]; + } + + /** + * Set the value of a virtual column in this object + * + * @param string $name The virtual column name + * @param mixed $value The value to give to the virtual column + * + * @return CreditNoteStatusFlow The current object, for fluid interface + */ + public function setVirtualColumn($name, $value) + { + $this->virtualColumns[$name] = $value; + + return $this; + } + + /** + * Logs a message using Propel::log(). + * + * @param string $msg + * @param int $priority One of the Propel::LOG_* logging levels + * @return boolean + */ + protected function log($msg, $priority = Propel::LOG_INFO) + { + return Propel::log(get_class($this) . ': ' . $msg, $priority); + } + + /** + * Populate the current object from a string, using a given parser format + * + * $book = new Book(); + * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, + * or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param string $data The source data to import from + * + * @return CreditNoteStatusFlow The current object, for fluid interface + */ + public function importFrom($parser, $data) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + $this->fromArray($parser->toArray($data), TableMap::TYPE_PHPNAME); + + return $this; + } + + /** + * Export the current object properties to a string, using a given parser format + * + * $book = BookQuery::create()->findPk(9012); + * echo $book->exportTo('JSON'); + * => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE. + * @return string The exported data + */ + public function exportTo($parser, $includeLazyLoadColumns = true) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true)); + } + + /** + * Clean up internal collections prior to serializing + * Avoids recursive loops that turn into segmentation faults when serializing + */ + public function __sleep() + { + $this->clearAllReferences(); + + return array_keys(get_object_vars($this)); + } + + /** + * Get the [id] column value. + * + * @return int + */ + public function getId() + { + + return $this->id; + } + + /** + * Get the [from_status_id] column value. + * + * @return int + */ + public function getFromStatusId() + { + + return $this->from_status_id; + } + + /** + * Get the [to_status_id] column value. + * + * @return int + */ + public function getToStatusId() + { + + return $this->to_status_id; + } + + /** + * Get the [priority] column value. + * + * @return int + */ + public function getPriority() + { + + return $this->priority; + } + + /** + * Get the [root] column value. + * + * @return boolean + */ + public function getRoot() + { + + return $this->root; + } + + /** + * Get the [optionally formatted] temporal [created_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getCreatedAt($format = NULL) + { + if ($format === null) { + return $this->created_at; + } else { + return $this->created_at instanceof \DateTime ? $this->created_at->format($format) : null; + } + } + + /** + * Get the [optionally formatted] temporal [updated_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getUpdatedAt($format = NULL) + { + if ($format === null) { + return $this->updated_at; + } else { + return $this->updated_at instanceof \DateTime ? $this->updated_at->format($format) : null; + } + } + + /** + * Set the value of [id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteStatusFlow The current object (for fluent API support) + */ + public function setId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->id !== $v) { + $this->id = $v; + $this->modifiedColumns[CreditNoteStatusFlowTableMap::ID] = true; + } + + + return $this; + } // setId() + + /** + * Set the value of [from_status_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteStatusFlow The current object (for fluent API support) + */ + public function setFromStatusId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->from_status_id !== $v) { + $this->from_status_id = $v; + $this->modifiedColumns[CreditNoteStatusFlowTableMap::FROM_STATUS_ID] = true; + } + + if ($this->aCreditNoteStatusRelatedByFromStatusId !== null && $this->aCreditNoteStatusRelatedByFromStatusId->getId() !== $v) { + $this->aCreditNoteStatusRelatedByFromStatusId = null; + } + + + return $this; + } // setFromStatusId() + + /** + * Set the value of [to_status_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteStatusFlow The current object (for fluent API support) + */ + public function setToStatusId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->to_status_id !== $v) { + $this->to_status_id = $v; + $this->modifiedColumns[CreditNoteStatusFlowTableMap::TO_STATUS_ID] = true; + } + + if ($this->aCreditNoteStatusRelatedByToStatusId !== null && $this->aCreditNoteStatusRelatedByToStatusId->getId() !== $v) { + $this->aCreditNoteStatusRelatedByToStatusId = null; + } + + + return $this; + } // setToStatusId() + + /** + * Set the value of [priority] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteStatusFlow The current object (for fluent API support) + */ + public function setPriority($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->priority !== $v) { + $this->priority = $v; + $this->modifiedColumns[CreditNoteStatusFlowTableMap::PRIORITY] = true; + } + + + return $this; + } // setPriority() + + /** + * Sets the value of the [root] column. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * + * @param boolean|integer|string $v The new value + * @return \CreditNote\Model\CreditNoteStatusFlow The current object (for fluent API support) + */ + public function setRoot($v) + { + if ($v !== null) { + if (is_string($v)) { + $v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; + } else { + $v = (boolean) $v; + } + } + + if ($this->root !== $v) { + $this->root = $v; + $this->modifiedColumns[CreditNoteStatusFlowTableMap::ROOT] = true; + } + + + return $this; + } // setRoot() + + /** + * Sets the value of [created_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CreditNoteStatusFlow The current object (for fluent API support) + */ + public function setCreatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->created_at !== null || $dt !== null) { + if ($dt !== $this->created_at) { + $this->created_at = $dt; + $this->modifiedColumns[CreditNoteStatusFlowTableMap::CREATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setCreatedAt() + + /** + * Sets the value of [updated_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CreditNoteStatusFlow The current object (for fluent API support) + */ + public function setUpdatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->updated_at !== null || $dt !== null) { + if ($dt !== $this->updated_at) { + $this->updated_at = $dt; + $this->modifiedColumns[CreditNoteStatusFlowTableMap::UPDATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setUpdatedAt() + + /** + * Indicates whether the columns in this object are only set to default values. + * + * This method can be used in conjunction with isModified() to indicate whether an object is both + * modified _and_ has some values set which are non-default. + * + * @return boolean Whether the columns in this object are only been set with default values. + */ + public function hasOnlyDefaultValues() + { + if ($this->root !== false) { + return false; + } + + // otherwise, everything was equal, so return TRUE + return true; + } // hasOnlyDefaultValues() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (0-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param array $row The row returned by DataFetcher->fetch(). + * @param int $startcol 0-based offset column which indicates which restultset column to start with. + * @param boolean $rehydrate Whether this object is being re-hydrated from the database. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM) + { + try { + + + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CreditNoteStatusFlowTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; + $this->id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CreditNoteStatusFlowTableMap::translateFieldName('FromStatusId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->from_status_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CreditNoteStatusFlowTableMap::translateFieldName('ToStatusId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->to_status_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CreditNoteStatusFlowTableMap::translateFieldName('Priority', TableMap::TYPE_PHPNAME, $indexType)]; + $this->priority = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CreditNoteStatusFlowTableMap::translateFieldName('Root', TableMap::TYPE_PHPNAME, $indexType)]; + $this->root = (null !== $col) ? (boolean) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CreditNoteStatusFlowTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CreditNoteStatusFlowTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + $this->resetModified(); + + $this->setNew(false); + + if ($rehydrate) { + $this->ensureConsistency(); + } + + return $startcol + 7; // 7 = CreditNoteStatusFlowTableMap::NUM_HYDRATE_COLUMNS. + + } catch (Exception $e) { + throw new PropelException("Error populating \CreditNote\Model\CreditNoteStatusFlow object", 0, $e); + } + } + + /** + * Checks and repairs the internal consistency of the object. + * + * This method is executed after an already-instantiated object is re-hydrated + * from the database. It exists to check any foreign keys to make sure that + * the objects related to the current object are correct based on foreign key. + * + * You can override this method in the stub class, but you should always invoke + * the base method from the overridden method (i.e. parent::ensureConsistency()), + * in case your model changes. + * + * @throws PropelException + */ + public function ensureConsistency() + { + if ($this->aCreditNoteStatusRelatedByFromStatusId !== null && $this->from_status_id !== $this->aCreditNoteStatusRelatedByFromStatusId->getId()) { + $this->aCreditNoteStatusRelatedByFromStatusId = null; + } + if ($this->aCreditNoteStatusRelatedByToStatusId !== null && $this->to_status_id !== $this->aCreditNoteStatusRelatedByToStatusId->getId()) { + $this->aCreditNoteStatusRelatedByToStatusId = null; + } + } // ensureConsistency + + /** + * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. + * + * This will only work if the object has been saved and has a valid primary key set. + * + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @return void + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + */ + public function reload($deep = false, ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("Cannot reload a deleted object."); + } + + if ($this->isNew()) { + throw new PropelException("Cannot reload an unsaved object."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CreditNoteStatusFlowTableMap::DATABASE_NAME); + } + + // We don't need to alter the object instance pool; we're just modifying this instance + // already in the pool. + + $dataFetcher = ChildCreditNoteStatusFlowQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con); + $row = $dataFetcher->fetch(); + $dataFetcher->close(); + if (!$row) { + throw new PropelException('Cannot find matching row in the database to reload object values.'); + } + $this->hydrate($row, 0, true, $dataFetcher->getIndexType()); // rehydrate + + if ($deep) { // also de-associate any related objects? + + $this->aCreditNoteStatusRelatedByFromStatusId = null; + $this->aCreditNoteStatusRelatedByToStatusId = null; + } // if (deep) + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param ConnectionInterface $con + * @return void + * @throws PropelException + * @see CreditNoteStatusFlow::setDeleted() + * @see CreditNoteStatusFlow::isDeleted() + */ + public function delete(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteStatusFlowTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + try { + $deleteQuery = ChildCreditNoteStatusFlowQuery::create() + ->filterByPrimaryKey($this->getPrimaryKey()); + $ret = $this->preDelete($con); + if ($ret) { + $deleteQuery->delete($con); + $this->postDelete($con); + $con->commit(); + $this->setDeleted(true); + } else { + $con->commit(); + } + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Persists this object to the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All modified related objects will also be persisted in the doSave() + * method. This method wraps all precipitate database operations in a + * single transaction. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() + */ + public function save(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteStatusFlowTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + $isInsert = $this->isNew(); + try { + $ret = $this->preSave($con); + if ($isInsert) { + $ret = $ret && $this->preInsert($con); + // timestampable behavior + if (!$this->isColumnModified(CreditNoteStatusFlowTableMap::CREATED_AT)) { + $this->setCreatedAt(time()); + } + if (!$this->isColumnModified(CreditNoteStatusFlowTableMap::UPDATED_AT)) { + $this->setUpdatedAt(time()); + } + } else { + $ret = $ret && $this->preUpdate($con); + // timestampable behavior + if ($this->isModified() && !$this->isColumnModified(CreditNoteStatusFlowTableMap::UPDATED_AT)) { + $this->setUpdatedAt(time()); + } + } + if ($ret) { + $affectedRows = $this->doSave($con); + if ($isInsert) { + $this->postInsert($con); + } else { + $this->postUpdate($con); + } + $this->postSave($con); + CreditNoteStatusFlowTableMap::addInstanceToPool($this); + } else { + $affectedRows = 0; + } + $con->commit(); + + return $affectedRows; + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Performs the work of inserting or updating the row in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() + */ + protected function doSave(ConnectionInterface $con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + // We call the save method on the following object(s) if they + // were passed to this object by their corresponding set + // method. This object relates to these object(s) by a + // foreign key reference. + + if ($this->aCreditNoteStatusRelatedByFromStatusId !== null) { + if ($this->aCreditNoteStatusRelatedByFromStatusId->isModified() || $this->aCreditNoteStatusRelatedByFromStatusId->isNew()) { + $affectedRows += $this->aCreditNoteStatusRelatedByFromStatusId->save($con); + } + $this->setCreditNoteStatusRelatedByFromStatusId($this->aCreditNoteStatusRelatedByFromStatusId); + } + + if ($this->aCreditNoteStatusRelatedByToStatusId !== null) { + if ($this->aCreditNoteStatusRelatedByToStatusId->isModified() || $this->aCreditNoteStatusRelatedByToStatusId->isNew()) { + $affectedRows += $this->aCreditNoteStatusRelatedByToStatusId->save($con); + } + $this->setCreditNoteStatusRelatedByToStatusId($this->aCreditNoteStatusRelatedByToStatusId); + } + + if ($this->isNew() || $this->isModified()) { + // persist changes + if ($this->isNew()) { + $this->doInsert($con); + } else { + $this->doUpdate($con); + } + $affectedRows += 1; + $this->resetModified(); + } + + $this->alreadyInSave = false; + + } + + return $affectedRows; + } // doSave() + + /** + * Insert the row in the database. + * + * @param ConnectionInterface $con + * + * @throws PropelException + * @see doSave() + */ + protected function doInsert(ConnectionInterface $con) + { + $modifiedColumns = array(); + $index = 0; + + $this->modifiedColumns[CreditNoteStatusFlowTableMap::ID] = true; + if (null !== $this->id) { + throw new PropelException('Cannot insert a value for auto-increment primary key (' . CreditNoteStatusFlowTableMap::ID . ')'); + } + + // check the columns in natural order for more readable SQL queries + if ($this->isColumnModified(CreditNoteStatusFlowTableMap::ID)) { + $modifiedColumns[':p' . $index++] = 'ID'; + } + if ($this->isColumnModified(CreditNoteStatusFlowTableMap::FROM_STATUS_ID)) { + $modifiedColumns[':p' . $index++] = 'FROM_STATUS_ID'; + } + if ($this->isColumnModified(CreditNoteStatusFlowTableMap::TO_STATUS_ID)) { + $modifiedColumns[':p' . $index++] = 'TO_STATUS_ID'; + } + if ($this->isColumnModified(CreditNoteStatusFlowTableMap::PRIORITY)) { + $modifiedColumns[':p' . $index++] = 'PRIORITY'; + } + if ($this->isColumnModified(CreditNoteStatusFlowTableMap::ROOT)) { + $modifiedColumns[':p' . $index++] = 'ROOT'; + } + if ($this->isColumnModified(CreditNoteStatusFlowTableMap::CREATED_AT)) { + $modifiedColumns[':p' . $index++] = 'CREATED_AT'; + } + if ($this->isColumnModified(CreditNoteStatusFlowTableMap::UPDATED_AT)) { + $modifiedColumns[':p' . $index++] = 'UPDATED_AT'; + } + + $sql = sprintf( + 'INSERT INTO credit_note_status_flow (%s) VALUES (%s)', + implode(', ', $modifiedColumns), + implode(', ', array_keys($modifiedColumns)) + ); + + try { + $stmt = $con->prepare($sql); + foreach ($modifiedColumns as $identifier => $columnName) { + switch ($columnName) { + case 'ID': + $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT); + break; + case 'FROM_STATUS_ID': + $stmt->bindValue($identifier, $this->from_status_id, PDO::PARAM_INT); + break; + case 'TO_STATUS_ID': + $stmt->bindValue($identifier, $this->to_status_id, PDO::PARAM_INT); + break; + case 'PRIORITY': + $stmt->bindValue($identifier, $this->priority, PDO::PARAM_INT); + break; + case 'ROOT': + $stmt->bindValue($identifier, (int) $this->root, PDO::PARAM_INT); + break; + case 'CREATED_AT': + $stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + case 'UPDATED_AT': + $stmt->bindValue($identifier, $this->updated_at ? $this->updated_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + } + } + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e); + } + + try { + $pk = $con->lastInsertId(); + } catch (Exception $e) { + throw new PropelException('Unable to get autoincrement id.', 0, $e); + } + $this->setId($pk); + + $this->setNew(false); + } + + /** + * Update the row in the database. + * + * @param ConnectionInterface $con + * + * @return Integer Number of updated rows + * @see doSave() + */ + protected function doUpdate(ConnectionInterface $con) + { + $selectCriteria = $this->buildPkeyCriteria(); + $valuesCriteria = $this->buildCriteria(); + + return $selectCriteria->doUpdate($valuesCriteria, $con); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. + */ + public function getByName($name, $type = TableMap::TYPE_PHPNAME) + { + $pos = CreditNoteStatusFlowTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + $field = $this->getByPosition($pos); + + return $field; + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch ($pos) { + case 0: + return $this->getId(); + break; + case 1: + return $this->getFromStatusId(); + break; + case 2: + return $this->getToStatusId(); + break; + case 3: + return $this->getPriority(); + break; + case 4: + return $this->getRoot(); + break; + case 5: + return $this->getCreatedAt(); + break; + case 6: + return $this->getUpdatedAt(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * + * @return array an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false) + { + if (isset($alreadyDumpedObjects['CreditNoteStatusFlow'][$this->getPrimaryKey()])) { + return '*RECURSION*'; + } + $alreadyDumpedObjects['CreditNoteStatusFlow'][$this->getPrimaryKey()] = true; + $keys = CreditNoteStatusFlowTableMap::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getId(), + $keys[1] => $this->getFromStatusId(), + $keys[2] => $this->getToStatusId(), + $keys[3] => $this->getPriority(), + $keys[4] => $this->getRoot(), + $keys[5] => $this->getCreatedAt(), + $keys[6] => $this->getUpdatedAt(), + ); + $virtualColumns = $this->virtualColumns; + foreach ($virtualColumns as $key => $virtualColumn) { + $result[$key] = $virtualColumn; + } + + if ($includeForeignObjects) { + if (null !== $this->aCreditNoteStatusRelatedByFromStatusId) { + $result['CreditNoteStatusRelatedByFromStatusId'] = $this->aCreditNoteStatusRelatedByFromStatusId->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + if (null !== $this->aCreditNoteStatusRelatedByToStatusId) { + $result['CreditNoteStatusRelatedByToStatusId'] = $this->aCreditNoteStatusRelatedByToStatusId->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + } + + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return void + */ + public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) + { + $pos = CreditNoteStatusFlowTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch ($pos) { + case 0: + $this->setId($value); + break; + case 1: + $this->setFromStatusId($value); + break; + case 2: + $this->setToStatusId($value); + break; + case 3: + $this->setPriority($value); + break; + case 4: + $this->setRoot($value); + break; + case 5: + $this->setCreatedAt($value); + break; + case 6: + $this->setUpdatedAt($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * The default key type is the column's TableMap::TYPE_PHPNAME. + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) + { + $keys = CreditNoteStatusFlowTableMap::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setFromStatusId($arr[$keys[1]]); + if (array_key_exists($keys[2], $arr)) $this->setToStatusId($arr[$keys[2]]); + if (array_key_exists($keys[3], $arr)) $this->setPriority($arr[$keys[3]]); + if (array_key_exists($keys[4], $arr)) $this->setRoot($arr[$keys[4]]); + if (array_key_exists($keys[5], $arr)) $this->setCreatedAt($arr[$keys[5]]); + if (array_key_exists($keys[6], $arr)) $this->setUpdatedAt($arr[$keys[6]]); + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(CreditNoteStatusFlowTableMap::DATABASE_NAME); + + if ($this->isColumnModified(CreditNoteStatusFlowTableMap::ID)) $criteria->add(CreditNoteStatusFlowTableMap::ID, $this->id); + if ($this->isColumnModified(CreditNoteStatusFlowTableMap::FROM_STATUS_ID)) $criteria->add(CreditNoteStatusFlowTableMap::FROM_STATUS_ID, $this->from_status_id); + if ($this->isColumnModified(CreditNoteStatusFlowTableMap::TO_STATUS_ID)) $criteria->add(CreditNoteStatusFlowTableMap::TO_STATUS_ID, $this->to_status_id); + if ($this->isColumnModified(CreditNoteStatusFlowTableMap::PRIORITY)) $criteria->add(CreditNoteStatusFlowTableMap::PRIORITY, $this->priority); + if ($this->isColumnModified(CreditNoteStatusFlowTableMap::ROOT)) $criteria->add(CreditNoteStatusFlowTableMap::ROOT, $this->root); + if ($this->isColumnModified(CreditNoteStatusFlowTableMap::CREATED_AT)) $criteria->add(CreditNoteStatusFlowTableMap::CREATED_AT, $this->created_at); + if ($this->isColumnModified(CreditNoteStatusFlowTableMap::UPDATED_AT)) $criteria->add(CreditNoteStatusFlowTableMap::UPDATED_AT, $this->updated_at); + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(CreditNoteStatusFlowTableMap::DATABASE_NAME); + $criteria->add(CreditNoteStatusFlowTableMap::ID, $this->id); + + return $criteria; + } + + /** + * Returns the primary key for this object (row). + * @return int + */ + public function getPrimaryKey() + { + return $this->getId(); + } + + /** + * Generic method to set the primary key (id column). + * + * @param int $key Primary key. + * @return void + */ + public function setPrimaryKey($key) + { + $this->setId($key); + } + + /** + * Returns true if the primary key for this object is null. + * @return boolean + */ + public function isPrimaryKeyNull() + { + + return null === $this->getId(); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of \CreditNote\Model\CreditNoteStatusFlow (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false, $makeNew = true) + { + $copyObj->setFromStatusId($this->getFromStatusId()); + $copyObj->setToStatusId($this->getToStatusId()); + $copyObj->setPriority($this->getPriority()); + $copyObj->setRoot($this->getRoot()); + $copyObj->setCreatedAt($this->getCreatedAt()); + $copyObj->setUpdatedAt($this->getUpdatedAt()); + if ($makeNew) { + $copyObj->setNew(true); + $copyObj->setId(NULL); // this is a auto-increment column, so set to default value + } + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \CreditNote\Model\CreditNoteStatusFlow Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + + return $copyObj; + } + + /** + * Declares an association between this object and a ChildCreditNoteStatus object. + * + * @param ChildCreditNoteStatus $v + * @return \CreditNote\Model\CreditNoteStatusFlow The current object (for fluent API support) + * @throws PropelException + */ + public function setCreditNoteStatusRelatedByFromStatusId(ChildCreditNoteStatus $v = null) + { + if ($v === null) { + $this->setFromStatusId(NULL); + } else { + $this->setFromStatusId($v->getId()); + } + + $this->aCreditNoteStatusRelatedByFromStatusId = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCreditNoteStatus object, it will not be re-added. + if ($v !== null) { + $v->addCreditNoteStatusFlowRelatedByFromStatusId($this); + } + + + return $this; + } + + + /** + * Get the associated ChildCreditNoteStatus object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCreditNoteStatus The associated ChildCreditNoteStatus object. + * @throws PropelException + */ + public function getCreditNoteStatusRelatedByFromStatusId(ConnectionInterface $con = null) + { + if ($this->aCreditNoteStatusRelatedByFromStatusId === null && ($this->from_status_id !== null)) { + $this->aCreditNoteStatusRelatedByFromStatusId = ChildCreditNoteStatusQuery::create()->findPk($this->from_status_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCreditNoteStatusRelatedByFromStatusId->addCreditNoteStatusFlowsRelatedByFromStatusId($this); + */ + } + + return $this->aCreditNoteStatusRelatedByFromStatusId; + } + + /** + * Declares an association between this object and a ChildCreditNoteStatus object. + * + * @param ChildCreditNoteStatus $v + * @return \CreditNote\Model\CreditNoteStatusFlow The current object (for fluent API support) + * @throws PropelException + */ + public function setCreditNoteStatusRelatedByToStatusId(ChildCreditNoteStatus $v = null) + { + if ($v === null) { + $this->setToStatusId(NULL); + } else { + $this->setToStatusId($v->getId()); + } + + $this->aCreditNoteStatusRelatedByToStatusId = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCreditNoteStatus object, it will not be re-added. + if ($v !== null) { + $v->addCreditNoteStatusFlowRelatedByToStatusId($this); + } + + + return $this; + } + + + /** + * Get the associated ChildCreditNoteStatus object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCreditNoteStatus The associated ChildCreditNoteStatus object. + * @throws PropelException + */ + public function getCreditNoteStatusRelatedByToStatusId(ConnectionInterface $con = null) + { + if ($this->aCreditNoteStatusRelatedByToStatusId === null && ($this->to_status_id !== null)) { + $this->aCreditNoteStatusRelatedByToStatusId = ChildCreditNoteStatusQuery::create()->findPk($this->to_status_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCreditNoteStatusRelatedByToStatusId->addCreditNoteStatusFlowsRelatedByToStatusId($this); + */ + } + + return $this->aCreditNoteStatusRelatedByToStatusId; + } + + /** + * Clears the current object and sets all attributes to their default values + */ + public function clear() + { + $this->id = null; + $this->from_status_id = null; + $this->to_status_id = null; + $this->priority = null; + $this->root = null; + $this->created_at = null; + $this->updated_at = null; + $this->alreadyInSave = false; + $this->clearAllReferences(); + $this->applyDefaultValues(); + $this->resetModified(); + $this->setNew(true); + $this->setDeleted(false); + } + + /** + * Resets all references to other model objects or collections of model objects. + * + * This method is a user-space workaround for PHP's inability to garbage collect + * objects with circular references (even in PHP 5.3). This is currently necessary + * when using Propel in certain daemon or large-volume/high-memory operations. + * + * @param boolean $deep Whether to also clear the references on all referrer objects. + */ + public function clearAllReferences($deep = false) + { + if ($deep) { + } // if ($deep) + + $this->aCreditNoteStatusRelatedByFromStatusId = null; + $this->aCreditNoteStatusRelatedByToStatusId = null; + } + + /** + * Return the string representation of this object + * + * @return string + */ + public function __toString() + { + return (string) $this->exportTo(CreditNoteStatusFlowTableMap::DEFAULT_STRING_FORMAT); + } + + // timestampable behavior + + /** + * Mark the current object so that the update date doesn't get updated during next save + * + * @return ChildCreditNoteStatusFlow The current object (for fluent API support) + */ + public function keepUpdateDateUnchanged() + { + $this->modifiedColumns[CreditNoteStatusFlowTableMap::UPDATED_AT] = true; + + return $this; + } + + /** + * Code to be run before persisting the object + * @param ConnectionInterface $con + * @return boolean + */ + public function preSave(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after persisting the object + * @param ConnectionInterface $con + */ + public function postSave(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before inserting to database + * @param ConnectionInterface $con + * @return boolean + */ + public function preInsert(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after inserting to database + * @param ConnectionInterface $con + */ + public function postInsert(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before updating the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preUpdate(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after updating the object in database + * @param ConnectionInterface $con + */ + public function postUpdate(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before deleting the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preDelete(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after deleting the object in database + * @param ConnectionInterface $con + */ + public function postDelete(ConnectionInterface $con = null) + { + + } + + + /** + * Derived method to catches calls to undefined methods. + * + * Provides magic import/export method support (fromXML()/toXML(), fromYAML()/toYAML(), etc.). + * Allows to define default __call() behavior if you overwrite __call() + * + * @param string $name + * @param mixed $params + * + * @return array|string + */ + public function __call($name, $params) + { + if (0 === strpos($name, 'get')) { + $virtualColumn = substr($name, 3); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + + $virtualColumn = lcfirst($virtualColumn); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + } + + if (0 === strpos($name, 'from')) { + $format = substr($name, 4); + + return $this->importFrom($format, reset($params)); + } + + if (0 === strpos($name, 'to')) { + $format = substr($name, 2); + $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true; + + return $this->exportTo($format, $includeLazyLoadColumns); + } + + throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name)); + } + +} diff --git a/local/modules/CreditNote/Model/Base/CreditNoteStatusFlowQuery.php b/local/modules/CreditNote/Model/Base/CreditNoteStatusFlowQuery.php new file mode 100644 index 000000000..047402c19 --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CreditNoteStatusFlowQuery.php @@ -0,0 +1,835 @@ +setModelAlias($modelAlias); + } + if ($criteria instanceof Criteria) { + $query->mergeWith($criteria); + } + + return $query; + } + + /** + * Find object by primary key. + * Propel uses the instance pool to skip the database if the object exists. + * Go fast if the query is untouched. + * + * + * $obj = $c->findPk(12, $con); + * + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ChildCreditNoteStatusFlow|array|mixed the result, formatted by the current formatter + */ + public function findPk($key, $con = null) + { + if ($key === null) { + return null; + } + if ((null !== ($obj = CreditNoteStatusFlowTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) { + // the object is already in the instance pool + return $obj; + } + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CreditNoteStatusFlowTableMap::DATABASE_NAME); + } + $this->basePreSelect($con); + if ($this->formatter || $this->modelAlias || $this->with || $this->select + || $this->selectColumns || $this->asColumns || $this->selectModifiers + || $this->map || $this->having || $this->joins) { + return $this->findPkComplex($key, $con); + } else { + return $this->findPkSimple($key, $con); + } + } + + /** + * Find object by primary key using raw SQL to go fast. + * Bypass doSelect() and the object formatter by using generated code. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCreditNoteStatusFlow A model object, or null if the key is not found + */ + protected function findPkSimple($key, $con) + { + $sql = 'SELECT ID, FROM_STATUS_ID, TO_STATUS_ID, PRIORITY, ROOT, CREATED_AT, UPDATED_AT FROM credit_note_status_flow WHERE ID = :p0'; + try { + $stmt = $con->prepare($sql); + $stmt->bindValue(':p0', $key, PDO::PARAM_INT); + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e); + } + $obj = null; + if ($row = $stmt->fetch(\PDO::FETCH_NUM)) { + $obj = new ChildCreditNoteStatusFlow(); + $obj->hydrate($row); + CreditNoteStatusFlowTableMap::addInstanceToPool($obj, (string) $key); + } + $stmt->closeCursor(); + + return $obj; + } + + /** + * Find object by primary key. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCreditNoteStatusFlow|array|mixed the result, formatted by the current formatter + */ + protected function findPkComplex($key, $con) + { + // As the query uses a PK condition, no limit(1) is necessary. + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKey($key) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher); + } + + /** + * Find objects by primary key + * + * $objs = $c->findPks(array(12, 56, 832), $con); + * + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter + */ + public function findPks($keys, $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getReadConnection($this->getDbName()); + } + $this->basePreSelect($con); + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKeys($keys) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->format($dataFetcher); + } + + /** + * Filter the query by primary key + * + * @param mixed $key Primary key to use for the query + * + * @return ChildCreditNoteStatusFlowQuery The current query, for fluid interface + */ + public function filterByPrimaryKey($key) + { + + return $this->addUsingAlias(CreditNoteStatusFlowTableMap::ID, $key, Criteria::EQUAL); + } + + /** + * Filter the query by a list of primary keys + * + * @param array $keys The list of primary key to use for the query + * + * @return ChildCreditNoteStatusFlowQuery The current query, for fluid interface + */ + public function filterByPrimaryKeys($keys) + { + + return $this->addUsingAlias(CreditNoteStatusFlowTableMap::ID, $keys, Criteria::IN); + } + + /** + * Filter the query on the id column + * + * Example usage: + * + * $query->filterById(1234); // WHERE id = 1234 + * $query->filterById(array(12, 34)); // WHERE id IN (12, 34) + * $query->filterById(array('min' => 12)); // WHERE id > 12 + * + * + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusFlowQuery The current query, for fluid interface + */ + public function filterById($id = null, $comparison = null) + { + if (is_array($id)) { + $useMinMax = false; + if (isset($id['min'])) { + $this->addUsingAlias(CreditNoteStatusFlowTableMap::ID, $id['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($id['max'])) { + $this->addUsingAlias(CreditNoteStatusFlowTableMap::ID, $id['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteStatusFlowTableMap::ID, $id, $comparison); + } + + /** + * Filter the query on the from_status_id column + * + * Example usage: + * + * $query->filterByFromStatusId(1234); // WHERE from_status_id = 1234 + * $query->filterByFromStatusId(array(12, 34)); // WHERE from_status_id IN (12, 34) + * $query->filterByFromStatusId(array('min' => 12)); // WHERE from_status_id > 12 + * + * + * @see filterByCreditNoteStatusRelatedByFromStatusId() + * + * @param mixed $fromStatusId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusFlowQuery The current query, for fluid interface + */ + public function filterByFromStatusId($fromStatusId = null, $comparison = null) + { + if (is_array($fromStatusId)) { + $useMinMax = false; + if (isset($fromStatusId['min'])) { + $this->addUsingAlias(CreditNoteStatusFlowTableMap::FROM_STATUS_ID, $fromStatusId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($fromStatusId['max'])) { + $this->addUsingAlias(CreditNoteStatusFlowTableMap::FROM_STATUS_ID, $fromStatusId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteStatusFlowTableMap::FROM_STATUS_ID, $fromStatusId, $comparison); + } + + /** + * Filter the query on the to_status_id column + * + * Example usage: + * + * $query->filterByToStatusId(1234); // WHERE to_status_id = 1234 + * $query->filterByToStatusId(array(12, 34)); // WHERE to_status_id IN (12, 34) + * $query->filterByToStatusId(array('min' => 12)); // WHERE to_status_id > 12 + * + * + * @see filterByCreditNoteStatusRelatedByToStatusId() + * + * @param mixed $toStatusId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusFlowQuery The current query, for fluid interface + */ + public function filterByToStatusId($toStatusId = null, $comparison = null) + { + if (is_array($toStatusId)) { + $useMinMax = false; + if (isset($toStatusId['min'])) { + $this->addUsingAlias(CreditNoteStatusFlowTableMap::TO_STATUS_ID, $toStatusId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($toStatusId['max'])) { + $this->addUsingAlias(CreditNoteStatusFlowTableMap::TO_STATUS_ID, $toStatusId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteStatusFlowTableMap::TO_STATUS_ID, $toStatusId, $comparison); + } + + /** + * Filter the query on the priority column + * + * Example usage: + * + * $query->filterByPriority(1234); // WHERE priority = 1234 + * $query->filterByPriority(array(12, 34)); // WHERE priority IN (12, 34) + * $query->filterByPriority(array('min' => 12)); // WHERE priority > 12 + * + * + * @param mixed $priority The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusFlowQuery The current query, for fluid interface + */ + public function filterByPriority($priority = null, $comparison = null) + { + if (is_array($priority)) { + $useMinMax = false; + if (isset($priority['min'])) { + $this->addUsingAlias(CreditNoteStatusFlowTableMap::PRIORITY, $priority['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($priority['max'])) { + $this->addUsingAlias(CreditNoteStatusFlowTableMap::PRIORITY, $priority['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteStatusFlowTableMap::PRIORITY, $priority, $comparison); + } + + /** + * Filter the query on the root column + * + * Example usage: + * + * $query->filterByRoot(true); // WHERE root = true + * $query->filterByRoot('yes'); // WHERE root = true + * + * + * @param boolean|string $root The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusFlowQuery The current query, for fluid interface + */ + public function filterByRoot($root = null, $comparison = null) + { + if (is_string($root)) { + $root = in_array(strtolower($root), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; + } + + return $this->addUsingAlias(CreditNoteStatusFlowTableMap::ROOT, $root, $comparison); + } + + /** + * Filter the query on the created_at column + * + * Example usage: + * + * $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14' + * $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14' + * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' + * + * + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusFlowQuery The current query, for fluid interface + */ + public function filterByCreatedAt($createdAt = null, $comparison = null) + { + if (is_array($createdAt)) { + $useMinMax = false; + if (isset($createdAt['min'])) { + $this->addUsingAlias(CreditNoteStatusFlowTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($createdAt['max'])) { + $this->addUsingAlias(CreditNoteStatusFlowTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteStatusFlowTableMap::CREATED_AT, $createdAt, $comparison); + } + + /** + * Filter the query on the updated_at column + * + * Example usage: + * + * $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14' + * $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14' + * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' + * + * + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusFlowQuery The current query, for fluid interface + */ + public function filterByUpdatedAt($updatedAt = null, $comparison = null) + { + if (is_array($updatedAt)) { + $useMinMax = false; + if (isset($updatedAt['min'])) { + $this->addUsingAlias(CreditNoteStatusFlowTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($updatedAt['max'])) { + $this->addUsingAlias(CreditNoteStatusFlowTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteStatusFlowTableMap::UPDATED_AT, $updatedAt, $comparison); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNoteStatus object + * + * @param \CreditNote\Model\CreditNoteStatus|ObjectCollection $creditNoteStatus The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusFlowQuery The current query, for fluid interface + */ + public function filterByCreditNoteStatusRelatedByFromStatusId($creditNoteStatus, $comparison = null) + { + if ($creditNoteStatus instanceof \CreditNote\Model\CreditNoteStatus) { + return $this + ->addUsingAlias(CreditNoteStatusFlowTableMap::FROM_STATUS_ID, $creditNoteStatus->getId(), $comparison); + } elseif ($creditNoteStatus instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CreditNoteStatusFlowTableMap::FROM_STATUS_ID, $creditNoteStatus->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByCreditNoteStatusRelatedByFromStatusId() only accepts arguments of type \CreditNote\Model\CreditNoteStatus or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNoteStatusRelatedByFromStatusId relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteStatusFlowQuery The current query, for fluid interface + */ + public function joinCreditNoteStatusRelatedByFromStatusId($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNoteStatusRelatedByFromStatusId'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNoteStatusRelatedByFromStatusId'); + } + + return $this; + } + + /** + * Use the CreditNoteStatusRelatedByFromStatusId relation CreditNoteStatus object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteStatusQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteStatusRelatedByFromStatusIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCreditNoteStatusRelatedByFromStatusId($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNoteStatusRelatedByFromStatusId', '\CreditNote\Model\CreditNoteStatusQuery'); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNoteStatus object + * + * @param \CreditNote\Model\CreditNoteStatus|ObjectCollection $creditNoteStatus The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusFlowQuery The current query, for fluid interface + */ + public function filterByCreditNoteStatusRelatedByToStatusId($creditNoteStatus, $comparison = null) + { + if ($creditNoteStatus instanceof \CreditNote\Model\CreditNoteStatus) { + return $this + ->addUsingAlias(CreditNoteStatusFlowTableMap::TO_STATUS_ID, $creditNoteStatus->getId(), $comparison); + } elseif ($creditNoteStatus instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CreditNoteStatusFlowTableMap::TO_STATUS_ID, $creditNoteStatus->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByCreditNoteStatusRelatedByToStatusId() only accepts arguments of type \CreditNote\Model\CreditNoteStatus or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNoteStatusRelatedByToStatusId relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteStatusFlowQuery The current query, for fluid interface + */ + public function joinCreditNoteStatusRelatedByToStatusId($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNoteStatusRelatedByToStatusId'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNoteStatusRelatedByToStatusId'); + } + + return $this; + } + + /** + * Use the CreditNoteStatusRelatedByToStatusId relation CreditNoteStatus object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteStatusQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteStatusRelatedByToStatusIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCreditNoteStatusRelatedByToStatusId($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNoteStatusRelatedByToStatusId', '\CreditNote\Model\CreditNoteStatusQuery'); + } + + /** + * Exclude object from result + * + * @param ChildCreditNoteStatusFlow $creditNoteStatusFlow Object to remove from the list of results + * + * @return ChildCreditNoteStatusFlowQuery The current query, for fluid interface + */ + public function prune($creditNoteStatusFlow = null) + { + if ($creditNoteStatusFlow) { + $this->addUsingAlias(CreditNoteStatusFlowTableMap::ID, $creditNoteStatusFlow->getId(), Criteria::NOT_EQUAL); + } + + return $this; + } + + /** + * Deletes all rows from the credit_note_status_flow table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public function doDeleteAll(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteStatusFlowTableMap::DATABASE_NAME); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + $affectedRows += parent::doDeleteAll($con); + // Because this db requires some delete cascade/set null emulation, we have to + // clear the cached instance *after* the emulation has happened (since + // instances get re-added by the select statement contained therein). + CreditNoteStatusFlowTableMap::clearInstancePool(); + CreditNoteStatusFlowTableMap::clearRelatedInstancePool(); + + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $affectedRows; + } + + /** + * Performs a DELETE on the database, given a ChildCreditNoteStatusFlow or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or ChildCreditNoteStatusFlow object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public function delete(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteStatusFlowTableMap::DATABASE_NAME); + } + + $criteria = $this; + + // Set the correct dbName + $criteria->setDbName(CreditNoteStatusFlowTableMap::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + + + CreditNoteStatusFlowTableMap::removeInstanceFromPool($criteria); + + $affectedRows += ModelCriteria::delete($con); + CreditNoteStatusFlowTableMap::clearRelatedInstancePool(); + $con->commit(); + + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + // timestampable behavior + + /** + * Filter by the latest updated + * + * @param int $nbDays Maximum age of the latest update in days + * + * @return ChildCreditNoteStatusFlowQuery The current query, for fluid interface + */ + public function recentlyUpdated($nbDays = 7) + { + return $this->addUsingAlias(CreditNoteStatusFlowTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL); + } + + /** + * Filter by the latest created + * + * @param int $nbDays Maximum age of in days + * + * @return ChildCreditNoteStatusFlowQuery The current query, for fluid interface + */ + public function recentlyCreated($nbDays = 7) + { + return $this->addUsingAlias(CreditNoteStatusFlowTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL); + } + + /** + * Order by update date desc + * + * @return ChildCreditNoteStatusFlowQuery The current query, for fluid interface + */ + public function lastUpdatedFirst() + { + return $this->addDescendingOrderByColumn(CreditNoteStatusFlowTableMap::UPDATED_AT); + } + + /** + * Order by update date asc + * + * @return ChildCreditNoteStatusFlowQuery The current query, for fluid interface + */ + public function firstUpdatedFirst() + { + return $this->addAscendingOrderByColumn(CreditNoteStatusFlowTableMap::UPDATED_AT); + } + + /** + * Order by create date desc + * + * @return ChildCreditNoteStatusFlowQuery The current query, for fluid interface + */ + public function lastCreatedFirst() + { + return $this->addDescendingOrderByColumn(CreditNoteStatusFlowTableMap::CREATED_AT); + } + + /** + * Order by create date asc + * + * @return ChildCreditNoteStatusFlowQuery The current query, for fluid interface + */ + public function firstCreatedFirst() + { + return $this->addAscendingOrderByColumn(CreditNoteStatusFlowTableMap::CREATED_AT); + } + +} // CreditNoteStatusFlowQuery diff --git a/local/modules/CreditNote/Model/Base/CreditNoteStatusI18n.php b/local/modules/CreditNote/Model/Base/CreditNoteStatusI18n.php new file mode 100644 index 000000000..392fd6f04 --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CreditNoteStatusI18n.php @@ -0,0 +1,1442 @@ +locale = 'en_US'; + } + + /** + * Initializes internal state of CreditNote\Model\Base\CreditNoteStatusI18n object. + * @see applyDefaults() + */ + public function __construct() + { + $this->applyDefaultValues(); + } + + /** + * Returns whether the object has been modified. + * + * @return boolean True if the object has been modified. + */ + public function isModified() + { + return !!$this->modifiedColumns; + } + + /** + * Has specified column been modified? + * + * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID + * @return boolean True if $col has been modified. + */ + public function isColumnModified($col) + { + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); + } + + /** + * Get the columns that have been modified in this object. + * @return array A unique list of the modified column names for this object. + */ + public function getModifiedColumns() + { + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; + } + + /** + * Returns whether the object has ever been saved. This will + * be false, if the object was retrieved from storage or was created + * and then saved. + * + * @return boolean true, if the object has never been persisted. + */ + public function isNew() + { + return $this->new; + } + + /** + * Setter for the isNew attribute. This method will be called + * by Propel-generated children and objects. + * + * @param boolean $b the state of the object. + */ + public function setNew($b) + { + $this->new = (Boolean) $b; + } + + /** + * Whether this object has been deleted. + * @return boolean The deleted state of this object. + */ + public function isDeleted() + { + return $this->deleted; + } + + /** + * Specify whether this object has been deleted. + * @param boolean $b The deleted state of this object. + * @return void + */ + public function setDeleted($b) + { + $this->deleted = (Boolean) $b; + } + + /** + * Sets the modified state for the object to be false. + * @param string $col If supplied, only the specified column is reset. + * @return void + */ + public function resetModified($col = null) + { + if (null !== $col) { + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); + } + } else { + $this->modifiedColumns = array(); + } + } + + /** + * Compares this with another CreditNoteStatusI18n instance. If + * obj is an instance of CreditNoteStatusI18n, delegates to + * equals(CreditNoteStatusI18n). Otherwise, returns false. + * + * @param mixed $obj The object to compare to. + * @return boolean Whether equal to the object specified. + */ + public function equals($obj) + { + $thisclazz = get_class($this); + if (!is_object($obj) || !($obj instanceof $thisclazz)) { + return false; + } + + if ($this === $obj) { + return true; + } + + if (null === $this->getPrimaryKey() + || null === $obj->getPrimaryKey()) { + return false; + } + + return $this->getPrimaryKey() === $obj->getPrimaryKey(); + } + + /** + * If the primary key is not null, return the hashcode of the + * primary key. Otherwise, return the hash code of the object. + * + * @return int Hashcode + */ + public function hashCode() + { + if (null !== $this->getPrimaryKey()) { + return crc32(serialize($this->getPrimaryKey())); + } + + return crc32(serialize(clone $this)); + } + + /** + * Get the associative array of the virtual columns in this object + * + * @return array + */ + public function getVirtualColumns() + { + return $this->virtualColumns; + } + + /** + * Checks the existence of a virtual column in this object + * + * @param string $name The virtual column name + * @return boolean + */ + public function hasVirtualColumn($name) + { + return array_key_exists($name, $this->virtualColumns); + } + + /** + * Get the value of a virtual column in this object + * + * @param string $name The virtual column name + * @return mixed + * + * @throws PropelException + */ + public function getVirtualColumn($name) + { + if (!$this->hasVirtualColumn($name)) { + throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name)); + } + + return $this->virtualColumns[$name]; + } + + /** + * Set the value of a virtual column in this object + * + * @param string $name The virtual column name + * @param mixed $value The value to give to the virtual column + * + * @return CreditNoteStatusI18n The current object, for fluid interface + */ + public function setVirtualColumn($name, $value) + { + $this->virtualColumns[$name] = $value; + + return $this; + } + + /** + * Logs a message using Propel::log(). + * + * @param string $msg + * @param int $priority One of the Propel::LOG_* logging levels + * @return boolean + */ + protected function log($msg, $priority = Propel::LOG_INFO) + { + return Propel::log(get_class($this) . ': ' . $msg, $priority); + } + + /** + * Populate the current object from a string, using a given parser format + * + * $book = new Book(); + * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, + * or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param string $data The source data to import from + * + * @return CreditNoteStatusI18n The current object, for fluid interface + */ + public function importFrom($parser, $data) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + $this->fromArray($parser->toArray($data), TableMap::TYPE_PHPNAME); + + return $this; + } + + /** + * Export the current object properties to a string, using a given parser format + * + * $book = BookQuery::create()->findPk(9012); + * echo $book->exportTo('JSON'); + * => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE. + * @return string The exported data + */ + public function exportTo($parser, $includeLazyLoadColumns = true) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true)); + } + + /** + * Clean up internal collections prior to serializing + * Avoids recursive loops that turn into segmentation faults when serializing + */ + public function __sleep() + { + $this->clearAllReferences(); + + return array_keys(get_object_vars($this)); + } + + /** + * Get the [id] column value. + * + * @return int + */ + public function getId() + { + + return $this->id; + } + + /** + * Get the [locale] column value. + * + * @return string + */ + public function getLocale() + { + + return $this->locale; + } + + /** + * Get the [title] column value. + * + * @return string + */ + public function getTitle() + { + + return $this->title; + } + + /** + * Get the [description] column value. + * + * @return string + */ + public function getDescription() + { + + return $this->description; + } + + /** + * Get the [chapo] column value. + * + * @return string + */ + public function getChapo() + { + + return $this->chapo; + } + + /** + * Get the [postscriptum] column value. + * + * @return string + */ + public function getPostscriptum() + { + + return $this->postscriptum; + } + + /** + * Set the value of [id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteStatusI18n The current object (for fluent API support) + */ + public function setId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->id !== $v) { + $this->id = $v; + $this->modifiedColumns[CreditNoteStatusI18nTableMap::ID] = true; + } + + if ($this->aCreditNoteStatus !== null && $this->aCreditNoteStatus->getId() !== $v) { + $this->aCreditNoteStatus = null; + } + + + return $this; + } // setId() + + /** + * Set the value of [locale] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteStatusI18n The current object (for fluent API support) + */ + public function setLocale($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->locale !== $v) { + $this->locale = $v; + $this->modifiedColumns[CreditNoteStatusI18nTableMap::LOCALE] = true; + } + + + return $this; + } // setLocale() + + /** + * Set the value of [title] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteStatusI18n The current object (for fluent API support) + */ + public function setTitle($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->title !== $v) { + $this->title = $v; + $this->modifiedColumns[CreditNoteStatusI18nTableMap::TITLE] = true; + } + + + return $this; + } // setTitle() + + /** + * Set the value of [description] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteStatusI18n The current object (for fluent API support) + */ + public function setDescription($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->description !== $v) { + $this->description = $v; + $this->modifiedColumns[CreditNoteStatusI18nTableMap::DESCRIPTION] = true; + } + + + return $this; + } // setDescription() + + /** + * Set the value of [chapo] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteStatusI18n The current object (for fluent API support) + */ + public function setChapo($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->chapo !== $v) { + $this->chapo = $v; + $this->modifiedColumns[CreditNoteStatusI18nTableMap::CHAPO] = true; + } + + + return $this; + } // setChapo() + + /** + * Set the value of [postscriptum] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteStatusI18n The current object (for fluent API support) + */ + public function setPostscriptum($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->postscriptum !== $v) { + $this->postscriptum = $v; + $this->modifiedColumns[CreditNoteStatusI18nTableMap::POSTSCRIPTUM] = true; + } + + + return $this; + } // setPostscriptum() + + /** + * Indicates whether the columns in this object are only set to default values. + * + * This method can be used in conjunction with isModified() to indicate whether an object is both + * modified _and_ has some values set which are non-default. + * + * @return boolean Whether the columns in this object are only been set with default values. + */ + public function hasOnlyDefaultValues() + { + if ($this->locale !== 'en_US') { + return false; + } + + // otherwise, everything was equal, so return TRUE + return true; + } // hasOnlyDefaultValues() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (0-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param array $row The row returned by DataFetcher->fetch(). + * @param int $startcol 0-based offset column which indicates which restultset column to start with. + * @param boolean $rehydrate Whether this object is being re-hydrated from the database. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM) + { + try { + + + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CreditNoteStatusI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; + $this->id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CreditNoteStatusI18nTableMap::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)]; + $this->locale = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CreditNoteStatusI18nTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)]; + $this->title = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CreditNoteStatusI18nTableMap::translateFieldName('Description', TableMap::TYPE_PHPNAME, $indexType)]; + $this->description = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CreditNoteStatusI18nTableMap::translateFieldName('Chapo', TableMap::TYPE_PHPNAME, $indexType)]; + $this->chapo = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CreditNoteStatusI18nTableMap::translateFieldName('Postscriptum', TableMap::TYPE_PHPNAME, $indexType)]; + $this->postscriptum = (null !== $col) ? (string) $col : null; + $this->resetModified(); + + $this->setNew(false); + + if ($rehydrate) { + $this->ensureConsistency(); + } + + return $startcol + 6; // 6 = CreditNoteStatusI18nTableMap::NUM_HYDRATE_COLUMNS. + + } catch (Exception $e) { + throw new PropelException("Error populating \CreditNote\Model\CreditNoteStatusI18n object", 0, $e); + } + } + + /** + * Checks and repairs the internal consistency of the object. + * + * This method is executed after an already-instantiated object is re-hydrated + * from the database. It exists to check any foreign keys to make sure that + * the objects related to the current object are correct based on foreign key. + * + * You can override this method in the stub class, but you should always invoke + * the base method from the overridden method (i.e. parent::ensureConsistency()), + * in case your model changes. + * + * @throws PropelException + */ + public function ensureConsistency() + { + if ($this->aCreditNoteStatus !== null && $this->id !== $this->aCreditNoteStatus->getId()) { + $this->aCreditNoteStatus = null; + } + } // ensureConsistency + + /** + * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. + * + * This will only work if the object has been saved and has a valid primary key set. + * + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @return void + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + */ + public function reload($deep = false, ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("Cannot reload a deleted object."); + } + + if ($this->isNew()) { + throw new PropelException("Cannot reload an unsaved object."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CreditNoteStatusI18nTableMap::DATABASE_NAME); + } + + // We don't need to alter the object instance pool; we're just modifying this instance + // already in the pool. + + $dataFetcher = ChildCreditNoteStatusI18nQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con); + $row = $dataFetcher->fetch(); + $dataFetcher->close(); + if (!$row) { + throw new PropelException('Cannot find matching row in the database to reload object values.'); + } + $this->hydrate($row, 0, true, $dataFetcher->getIndexType()); // rehydrate + + if ($deep) { // also de-associate any related objects? + + $this->aCreditNoteStatus = null; + } // if (deep) + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param ConnectionInterface $con + * @return void + * @throws PropelException + * @see CreditNoteStatusI18n::setDeleted() + * @see CreditNoteStatusI18n::isDeleted() + */ + public function delete(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteStatusI18nTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + try { + $deleteQuery = ChildCreditNoteStatusI18nQuery::create() + ->filterByPrimaryKey($this->getPrimaryKey()); + $ret = $this->preDelete($con); + if ($ret) { + $deleteQuery->delete($con); + $this->postDelete($con); + $con->commit(); + $this->setDeleted(true); + } else { + $con->commit(); + } + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Persists this object to the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All modified related objects will also be persisted in the doSave() + * method. This method wraps all precipitate database operations in a + * single transaction. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() + */ + public function save(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteStatusI18nTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + $isInsert = $this->isNew(); + try { + $ret = $this->preSave($con); + if ($isInsert) { + $ret = $ret && $this->preInsert($con); + } else { + $ret = $ret && $this->preUpdate($con); + } + if ($ret) { + $affectedRows = $this->doSave($con); + if ($isInsert) { + $this->postInsert($con); + } else { + $this->postUpdate($con); + } + $this->postSave($con); + CreditNoteStatusI18nTableMap::addInstanceToPool($this); + } else { + $affectedRows = 0; + } + $con->commit(); + + return $affectedRows; + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Performs the work of inserting or updating the row in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() + */ + protected function doSave(ConnectionInterface $con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + // We call the save method on the following object(s) if they + // were passed to this object by their corresponding set + // method. This object relates to these object(s) by a + // foreign key reference. + + if ($this->aCreditNoteStatus !== null) { + if ($this->aCreditNoteStatus->isModified() || $this->aCreditNoteStatus->isNew()) { + $affectedRows += $this->aCreditNoteStatus->save($con); + } + $this->setCreditNoteStatus($this->aCreditNoteStatus); + } + + if ($this->isNew() || $this->isModified()) { + // persist changes + if ($this->isNew()) { + $this->doInsert($con); + } else { + $this->doUpdate($con); + } + $affectedRows += 1; + $this->resetModified(); + } + + $this->alreadyInSave = false; + + } + + return $affectedRows; + } // doSave() + + /** + * Insert the row in the database. + * + * @param ConnectionInterface $con + * + * @throws PropelException + * @see doSave() + */ + protected function doInsert(ConnectionInterface $con) + { + $modifiedColumns = array(); + $index = 0; + + + // check the columns in natural order for more readable SQL queries + if ($this->isColumnModified(CreditNoteStatusI18nTableMap::ID)) { + $modifiedColumns[':p' . $index++] = 'ID'; + } + if ($this->isColumnModified(CreditNoteStatusI18nTableMap::LOCALE)) { + $modifiedColumns[':p' . $index++] = 'LOCALE'; + } + if ($this->isColumnModified(CreditNoteStatusI18nTableMap::TITLE)) { + $modifiedColumns[':p' . $index++] = 'TITLE'; + } + if ($this->isColumnModified(CreditNoteStatusI18nTableMap::DESCRIPTION)) { + $modifiedColumns[':p' . $index++] = 'DESCRIPTION'; + } + if ($this->isColumnModified(CreditNoteStatusI18nTableMap::CHAPO)) { + $modifiedColumns[':p' . $index++] = 'CHAPO'; + } + if ($this->isColumnModified(CreditNoteStatusI18nTableMap::POSTSCRIPTUM)) { + $modifiedColumns[':p' . $index++] = 'POSTSCRIPTUM'; + } + + $sql = sprintf( + 'INSERT INTO credit_note_status_i18n (%s) VALUES (%s)', + implode(', ', $modifiedColumns), + implode(', ', array_keys($modifiedColumns)) + ); + + try { + $stmt = $con->prepare($sql); + foreach ($modifiedColumns as $identifier => $columnName) { + switch ($columnName) { + case 'ID': + $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT); + break; + case 'LOCALE': + $stmt->bindValue($identifier, $this->locale, PDO::PARAM_STR); + break; + case 'TITLE': + $stmt->bindValue($identifier, $this->title, PDO::PARAM_STR); + break; + case 'DESCRIPTION': + $stmt->bindValue($identifier, $this->description, PDO::PARAM_STR); + break; + case 'CHAPO': + $stmt->bindValue($identifier, $this->chapo, PDO::PARAM_STR); + break; + case 'POSTSCRIPTUM': + $stmt->bindValue($identifier, $this->postscriptum, PDO::PARAM_STR); + break; + } + } + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e); + } + + $this->setNew(false); + } + + /** + * Update the row in the database. + * + * @param ConnectionInterface $con + * + * @return Integer Number of updated rows + * @see doSave() + */ + protected function doUpdate(ConnectionInterface $con) + { + $selectCriteria = $this->buildPkeyCriteria(); + $valuesCriteria = $this->buildCriteria(); + + return $selectCriteria->doUpdate($valuesCriteria, $con); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. + */ + public function getByName($name, $type = TableMap::TYPE_PHPNAME) + { + $pos = CreditNoteStatusI18nTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + $field = $this->getByPosition($pos); + + return $field; + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch ($pos) { + case 0: + return $this->getId(); + break; + case 1: + return $this->getLocale(); + break; + case 2: + return $this->getTitle(); + break; + case 3: + return $this->getDescription(); + break; + case 4: + return $this->getChapo(); + break; + case 5: + return $this->getPostscriptum(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * + * @return array an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false) + { + if (isset($alreadyDumpedObjects['CreditNoteStatusI18n'][serialize($this->getPrimaryKey())])) { + return '*RECURSION*'; + } + $alreadyDumpedObjects['CreditNoteStatusI18n'][serialize($this->getPrimaryKey())] = true; + $keys = CreditNoteStatusI18nTableMap::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getId(), + $keys[1] => $this->getLocale(), + $keys[2] => $this->getTitle(), + $keys[3] => $this->getDescription(), + $keys[4] => $this->getChapo(), + $keys[5] => $this->getPostscriptum(), + ); + $virtualColumns = $this->virtualColumns; + foreach ($virtualColumns as $key => $virtualColumn) { + $result[$key] = $virtualColumn; + } + + if ($includeForeignObjects) { + if (null !== $this->aCreditNoteStatus) { + $result['CreditNoteStatus'] = $this->aCreditNoteStatus->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + } + + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return void + */ + public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) + { + $pos = CreditNoteStatusI18nTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch ($pos) { + case 0: + $this->setId($value); + break; + case 1: + $this->setLocale($value); + break; + case 2: + $this->setTitle($value); + break; + case 3: + $this->setDescription($value); + break; + case 4: + $this->setChapo($value); + break; + case 5: + $this->setPostscriptum($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * The default key type is the column's TableMap::TYPE_PHPNAME. + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) + { + $keys = CreditNoteStatusI18nTableMap::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setLocale($arr[$keys[1]]); + if (array_key_exists($keys[2], $arr)) $this->setTitle($arr[$keys[2]]); + if (array_key_exists($keys[3], $arr)) $this->setDescription($arr[$keys[3]]); + if (array_key_exists($keys[4], $arr)) $this->setChapo($arr[$keys[4]]); + if (array_key_exists($keys[5], $arr)) $this->setPostscriptum($arr[$keys[5]]); + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(CreditNoteStatusI18nTableMap::DATABASE_NAME); + + if ($this->isColumnModified(CreditNoteStatusI18nTableMap::ID)) $criteria->add(CreditNoteStatusI18nTableMap::ID, $this->id); + if ($this->isColumnModified(CreditNoteStatusI18nTableMap::LOCALE)) $criteria->add(CreditNoteStatusI18nTableMap::LOCALE, $this->locale); + if ($this->isColumnModified(CreditNoteStatusI18nTableMap::TITLE)) $criteria->add(CreditNoteStatusI18nTableMap::TITLE, $this->title); + if ($this->isColumnModified(CreditNoteStatusI18nTableMap::DESCRIPTION)) $criteria->add(CreditNoteStatusI18nTableMap::DESCRIPTION, $this->description); + if ($this->isColumnModified(CreditNoteStatusI18nTableMap::CHAPO)) $criteria->add(CreditNoteStatusI18nTableMap::CHAPO, $this->chapo); + if ($this->isColumnModified(CreditNoteStatusI18nTableMap::POSTSCRIPTUM)) $criteria->add(CreditNoteStatusI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(CreditNoteStatusI18nTableMap::DATABASE_NAME); + $criteria->add(CreditNoteStatusI18nTableMap::ID, $this->id); + $criteria->add(CreditNoteStatusI18nTableMap::LOCALE, $this->locale); + + return $criteria; + } + + /** + * Returns the composite primary key for this object. + * The array elements will be in same order as specified in XML. + * @return array + */ + public function getPrimaryKey() + { + $pks = array(); + $pks[0] = $this->getId(); + $pks[1] = $this->getLocale(); + + return $pks; + } + + /** + * Set the [composite] primary key. + * + * @param array $keys The elements of the composite key (order must match the order in XML file). + * @return void + */ + public function setPrimaryKey($keys) + { + $this->setId($keys[0]); + $this->setLocale($keys[1]); + } + + /** + * Returns true if the primary key for this object is null. + * @return boolean + */ + public function isPrimaryKeyNull() + { + + return (null === $this->getId()) && (null === $this->getLocale()); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of \CreditNote\Model\CreditNoteStatusI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false, $makeNew = true) + { + $copyObj->setId($this->getId()); + $copyObj->setLocale($this->getLocale()); + $copyObj->setTitle($this->getTitle()); + $copyObj->setDescription($this->getDescription()); + $copyObj->setChapo($this->getChapo()); + $copyObj->setPostscriptum($this->getPostscriptum()); + if ($makeNew) { + $copyObj->setNew(true); + } + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \CreditNote\Model\CreditNoteStatusI18n Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + + return $copyObj; + } + + /** + * Declares an association between this object and a ChildCreditNoteStatus object. + * + * @param ChildCreditNoteStatus $v + * @return \CreditNote\Model\CreditNoteStatusI18n The current object (for fluent API support) + * @throws PropelException + */ + public function setCreditNoteStatus(ChildCreditNoteStatus $v = null) + { + if ($v === null) { + $this->setId(NULL); + } else { + $this->setId($v->getId()); + } + + $this->aCreditNoteStatus = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCreditNoteStatus object, it will not be re-added. + if ($v !== null) { + $v->addCreditNoteStatusI18n($this); + } + + + return $this; + } + + + /** + * Get the associated ChildCreditNoteStatus object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCreditNoteStatus The associated ChildCreditNoteStatus object. + * @throws PropelException + */ + public function getCreditNoteStatus(ConnectionInterface $con = null) + { + if ($this->aCreditNoteStatus === null && ($this->id !== null)) { + $this->aCreditNoteStatus = ChildCreditNoteStatusQuery::create()->findPk($this->id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCreditNoteStatus->addCreditNoteStatusI18ns($this); + */ + } + + return $this->aCreditNoteStatus; + } + + /** + * Clears the current object and sets all attributes to their default values + */ + public function clear() + { + $this->id = null; + $this->locale = null; + $this->title = null; + $this->description = null; + $this->chapo = null; + $this->postscriptum = null; + $this->alreadyInSave = false; + $this->clearAllReferences(); + $this->applyDefaultValues(); + $this->resetModified(); + $this->setNew(true); + $this->setDeleted(false); + } + + /** + * Resets all references to other model objects or collections of model objects. + * + * This method is a user-space workaround for PHP's inability to garbage collect + * objects with circular references (even in PHP 5.3). This is currently necessary + * when using Propel in certain daemon or large-volume/high-memory operations. + * + * @param boolean $deep Whether to also clear the references on all referrer objects. + */ + public function clearAllReferences($deep = false) + { + if ($deep) { + } // if ($deep) + + $this->aCreditNoteStatus = null; + } + + /** + * Return the string representation of this object + * + * @return string + */ + public function __toString() + { + return (string) $this->exportTo(CreditNoteStatusI18nTableMap::DEFAULT_STRING_FORMAT); + } + + /** + * Code to be run before persisting the object + * @param ConnectionInterface $con + * @return boolean + */ + public function preSave(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after persisting the object + * @param ConnectionInterface $con + */ + public function postSave(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before inserting to database + * @param ConnectionInterface $con + * @return boolean + */ + public function preInsert(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after inserting to database + * @param ConnectionInterface $con + */ + public function postInsert(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before updating the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preUpdate(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after updating the object in database + * @param ConnectionInterface $con + */ + public function postUpdate(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before deleting the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preDelete(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after deleting the object in database + * @param ConnectionInterface $con + */ + public function postDelete(ConnectionInterface $con = null) + { + + } + + + /** + * Derived method to catches calls to undefined methods. + * + * Provides magic import/export method support (fromXML()/toXML(), fromYAML()/toYAML(), etc.). + * Allows to define default __call() behavior if you overwrite __call() + * + * @param string $name + * @param mixed $params + * + * @return array|string + */ + public function __call($name, $params) + { + if (0 === strpos($name, 'get')) { + $virtualColumn = substr($name, 3); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + + $virtualColumn = lcfirst($virtualColumn); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + } + + if (0 === strpos($name, 'from')) { + $format = substr($name, 4); + + return $this->importFrom($format, reset($params)); + } + + if (0 === strpos($name, 'to')) { + $format = substr($name, 2); + $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true; + + return $this->exportTo($format, $includeLazyLoadColumns); + } + + throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name)); + } + +} diff --git a/local/modules/CreditNote/Model/Base/CreditNoteStatusI18nQuery.php b/local/modules/CreditNote/Model/Base/CreditNoteStatusI18nQuery.php new file mode 100644 index 000000000..7bcb56362 --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CreditNoteStatusI18nQuery.php @@ -0,0 +1,607 @@ +setModelAlias($modelAlias); + } + if ($criteria instanceof Criteria) { + $query->mergeWith($criteria); + } + + return $query; + } + + /** + * Find object by primary key. + * Propel uses the instance pool to skip the database if the object exists. + * Go fast if the query is untouched. + * + * + * $obj = $c->findPk(array(12, 34), $con); + * + * + * @param array[$id, $locale] $key Primary key to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ChildCreditNoteStatusI18n|array|mixed the result, formatted by the current formatter + */ + public function findPk($key, $con = null) + { + if ($key === null) { + return null; + } + if ((null !== ($obj = CreditNoteStatusI18nTableMap::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) { + // the object is already in the instance pool + return $obj; + } + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CreditNoteStatusI18nTableMap::DATABASE_NAME); + } + $this->basePreSelect($con); + if ($this->formatter || $this->modelAlias || $this->with || $this->select + || $this->selectColumns || $this->asColumns || $this->selectModifiers + || $this->map || $this->having || $this->joins) { + return $this->findPkComplex($key, $con); + } else { + return $this->findPkSimple($key, $con); + } + } + + /** + * Find object by primary key using raw SQL to go fast. + * Bypass doSelect() and the object formatter by using generated code. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCreditNoteStatusI18n A model object, or null if the key is not found + */ + protected function findPkSimple($key, $con) + { + $sql = 'SELECT ID, LOCALE, TITLE, DESCRIPTION, CHAPO, POSTSCRIPTUM FROM credit_note_status_i18n WHERE ID = :p0 AND LOCALE = :p1'; + try { + $stmt = $con->prepare($sql); + $stmt->bindValue(':p0', $key[0], PDO::PARAM_INT); + $stmt->bindValue(':p1', $key[1], PDO::PARAM_STR); + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e); + } + $obj = null; + if ($row = $stmt->fetch(\PDO::FETCH_NUM)) { + $obj = new ChildCreditNoteStatusI18n(); + $obj->hydrate($row); + CreditNoteStatusI18nTableMap::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1]))); + } + $stmt->closeCursor(); + + return $obj; + } + + /** + * Find object by primary key. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCreditNoteStatusI18n|array|mixed the result, formatted by the current formatter + */ + protected function findPkComplex($key, $con) + { + // As the query uses a PK condition, no limit(1) is necessary. + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKey($key) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher); + } + + /** + * Find objects by primary key + * + * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); + * + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter + */ + public function findPks($keys, $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getReadConnection($this->getDbName()); + } + $this->basePreSelect($con); + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKeys($keys) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->format($dataFetcher); + } + + /** + * Filter the query by primary key + * + * @param mixed $key Primary key to use for the query + * + * @return ChildCreditNoteStatusI18nQuery The current query, for fluid interface + */ + public function filterByPrimaryKey($key) + { + $this->addUsingAlias(CreditNoteStatusI18nTableMap::ID, $key[0], Criteria::EQUAL); + $this->addUsingAlias(CreditNoteStatusI18nTableMap::LOCALE, $key[1], Criteria::EQUAL); + + return $this; + } + + /** + * Filter the query by a list of primary keys + * + * @param array $keys The list of primary key to use for the query + * + * @return ChildCreditNoteStatusI18nQuery The current query, for fluid interface + */ + public function filterByPrimaryKeys($keys) + { + if (empty($keys)) { + return $this->add(null, '1<>1', Criteria::CUSTOM); + } + foreach ($keys as $key) { + $cton0 = $this->getNewCriterion(CreditNoteStatusI18nTableMap::ID, $key[0], Criteria::EQUAL); + $cton1 = $this->getNewCriterion(CreditNoteStatusI18nTableMap::LOCALE, $key[1], Criteria::EQUAL); + $cton0->addAnd($cton1); + $this->addOr($cton0); + } + + return $this; + } + + /** + * Filter the query on the id column + * + * Example usage: + * + * $query->filterById(1234); // WHERE id = 1234 + * $query->filterById(array(12, 34)); // WHERE id IN (12, 34) + * $query->filterById(array('min' => 12)); // WHERE id > 12 + * + * + * @see filterByCreditNoteStatus() + * + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusI18nQuery The current query, for fluid interface + */ + public function filterById($id = null, $comparison = null) + { + if (is_array($id)) { + $useMinMax = false; + if (isset($id['min'])) { + $this->addUsingAlias(CreditNoteStatusI18nTableMap::ID, $id['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($id['max'])) { + $this->addUsingAlias(CreditNoteStatusI18nTableMap::ID, $id['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteStatusI18nTableMap::ID, $id, $comparison); + } + + /** + * Filter the query on the locale column + * + * Example usage: + * + * $query->filterByLocale('fooValue'); // WHERE locale = 'fooValue' + * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' + * + * + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusI18nQuery The current query, for fluid interface + */ + public function filterByLocale($locale = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($locale)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $locale)) { + $locale = str_replace('*', '%', $locale); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteStatusI18nTableMap::LOCALE, $locale, $comparison); + } + + /** + * Filter the query on the title column + * + * Example usage: + * + * $query->filterByTitle('fooValue'); // WHERE title = 'fooValue' + * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' + * + * + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusI18nQuery The current query, for fluid interface + */ + public function filterByTitle($title = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($title)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $title)) { + $title = str_replace('*', '%', $title); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteStatusI18nTableMap::TITLE, $title, $comparison); + } + + /** + * Filter the query on the description column + * + * Example usage: + * + * $query->filterByDescription('fooValue'); // WHERE description = 'fooValue' + * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' + * + * + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusI18nQuery The current query, for fluid interface + */ + public function filterByDescription($description = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($description)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $description)) { + $description = str_replace('*', '%', $description); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteStatusI18nTableMap::DESCRIPTION, $description, $comparison); + } + + /** + * Filter the query on the chapo column + * + * Example usage: + * + * $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue' + * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' + * + * + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusI18nQuery The current query, for fluid interface + */ + public function filterByChapo($chapo = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($chapo)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $chapo)) { + $chapo = str_replace('*', '%', $chapo); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteStatusI18nTableMap::CHAPO, $chapo, $comparison); + } + + /** + * Filter the query on the postscriptum column + * + * Example usage: + * + * $query->filterByPostscriptum('fooValue'); // WHERE postscriptum = 'fooValue' + * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' + * + * + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusI18nQuery The current query, for fluid interface + */ + public function filterByPostscriptum($postscriptum = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($postscriptum)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $postscriptum)) { + $postscriptum = str_replace('*', '%', $postscriptum); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteStatusI18nTableMap::POSTSCRIPTUM, $postscriptum, $comparison); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNoteStatus object + * + * @param \CreditNote\Model\CreditNoteStatus|ObjectCollection $creditNoteStatus The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusI18nQuery The current query, for fluid interface + */ + public function filterByCreditNoteStatus($creditNoteStatus, $comparison = null) + { + if ($creditNoteStatus instanceof \CreditNote\Model\CreditNoteStatus) { + return $this + ->addUsingAlias(CreditNoteStatusI18nTableMap::ID, $creditNoteStatus->getId(), $comparison); + } elseif ($creditNoteStatus instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CreditNoteStatusI18nTableMap::ID, $creditNoteStatus->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByCreditNoteStatus() only accepts arguments of type \CreditNote\Model\CreditNoteStatus or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNoteStatus relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteStatusI18nQuery The current query, for fluid interface + */ + public function joinCreditNoteStatus($relationAlias = null, $joinType = 'LEFT JOIN') + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNoteStatus'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNoteStatus'); + } + + return $this; + } + + /** + * Use the CreditNoteStatus relation CreditNoteStatus object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteStatusQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteStatusQuery($relationAlias = null, $joinType = 'LEFT JOIN') + { + return $this + ->joinCreditNoteStatus($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNoteStatus', '\CreditNote\Model\CreditNoteStatusQuery'); + } + + /** + * Exclude object from result + * + * @param ChildCreditNoteStatusI18n $creditNoteStatusI18n Object to remove from the list of results + * + * @return ChildCreditNoteStatusI18nQuery The current query, for fluid interface + */ + public function prune($creditNoteStatusI18n = null) + { + if ($creditNoteStatusI18n) { + $this->addCond('pruneCond0', $this->getAliasedColName(CreditNoteStatusI18nTableMap::ID), $creditNoteStatusI18n->getId(), Criteria::NOT_EQUAL); + $this->addCond('pruneCond1', $this->getAliasedColName(CreditNoteStatusI18nTableMap::LOCALE), $creditNoteStatusI18n->getLocale(), Criteria::NOT_EQUAL); + $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR); + } + + return $this; + } + + /** + * Deletes all rows from the credit_note_status_i18n table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public function doDeleteAll(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteStatusI18nTableMap::DATABASE_NAME); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + $affectedRows += parent::doDeleteAll($con); + // Because this db requires some delete cascade/set null emulation, we have to + // clear the cached instance *after* the emulation has happened (since + // instances get re-added by the select statement contained therein). + CreditNoteStatusI18nTableMap::clearInstancePool(); + CreditNoteStatusI18nTableMap::clearRelatedInstancePool(); + + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $affectedRows; + } + + /** + * Performs a DELETE on the database, given a ChildCreditNoteStatusI18n or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or ChildCreditNoteStatusI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public function delete(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteStatusI18nTableMap::DATABASE_NAME); + } + + $criteria = $this; + + // Set the correct dbName + $criteria->setDbName(CreditNoteStatusI18nTableMap::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + + + CreditNoteStatusI18nTableMap::removeInstanceFromPool($criteria); + + $affectedRows += ModelCriteria::delete($con); + CreditNoteStatusI18nTableMap::clearRelatedInstancePool(); + $con->commit(); + + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + +} // CreditNoteStatusI18nQuery diff --git a/local/modules/CreditNote/Model/Base/CreditNoteStatusQuery.php b/local/modules/CreditNote/Model/Base/CreditNoteStatusQuery.php new file mode 100644 index 000000000..30f4e66e4 --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CreditNoteStatusQuery.php @@ -0,0 +1,1046 @@ +setModelAlias($modelAlias); + } + if ($criteria instanceof Criteria) { + $query->mergeWith($criteria); + } + + return $query; + } + + /** + * Find object by primary key. + * Propel uses the instance pool to skip the database if the object exists. + * Go fast if the query is untouched. + * + * + * $obj = $c->findPk(12, $con); + * + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ChildCreditNoteStatus|array|mixed the result, formatted by the current formatter + */ + public function findPk($key, $con = null) + { + if ($key === null) { + return null; + } + if ((null !== ($obj = CreditNoteStatusTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) { + // the object is already in the instance pool + return $obj; + } + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CreditNoteStatusTableMap::DATABASE_NAME); + } + $this->basePreSelect($con); + if ($this->formatter || $this->modelAlias || $this->with || $this->select + || $this->selectColumns || $this->asColumns || $this->selectModifiers + || $this->map || $this->having || $this->joins) { + return $this->findPkComplex($key, $con); + } else { + return $this->findPkSimple($key, $con); + } + } + + /** + * Find object by primary key using raw SQL to go fast. + * Bypass doSelect() and the object formatter by using generated code. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCreditNoteStatus A model object, or null if the key is not found + */ + protected function findPkSimple($key, $con) + { + $sql = 'SELECT ID, CODE, COLOR, INVOICED, USED, POSITION, CREATED_AT, UPDATED_AT FROM credit_note_status WHERE ID = :p0'; + try { + $stmt = $con->prepare($sql); + $stmt->bindValue(':p0', $key, PDO::PARAM_INT); + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e); + } + $obj = null; + if ($row = $stmt->fetch(\PDO::FETCH_NUM)) { + $obj = new ChildCreditNoteStatus(); + $obj->hydrate($row); + CreditNoteStatusTableMap::addInstanceToPool($obj, (string) $key); + } + $stmt->closeCursor(); + + return $obj; + } + + /** + * Find object by primary key. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCreditNoteStatus|array|mixed the result, formatted by the current formatter + */ + protected function findPkComplex($key, $con) + { + // As the query uses a PK condition, no limit(1) is necessary. + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKey($key) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher); + } + + /** + * Find objects by primary key + * + * $objs = $c->findPks(array(12, 56, 832), $con); + * + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter + */ + public function findPks($keys, $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getReadConnection($this->getDbName()); + } + $this->basePreSelect($con); + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKeys($keys) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->format($dataFetcher); + } + + /** + * Filter the query by primary key + * + * @param mixed $key Primary key to use for the query + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function filterByPrimaryKey($key) + { + + return $this->addUsingAlias(CreditNoteStatusTableMap::ID, $key, Criteria::EQUAL); + } + + /** + * Filter the query by a list of primary keys + * + * @param array $keys The list of primary key to use for the query + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function filterByPrimaryKeys($keys) + { + + return $this->addUsingAlias(CreditNoteStatusTableMap::ID, $keys, Criteria::IN); + } + + /** + * Filter the query on the id column + * + * Example usage: + * + * $query->filterById(1234); // WHERE id = 1234 + * $query->filterById(array(12, 34)); // WHERE id IN (12, 34) + * $query->filterById(array('min' => 12)); // WHERE id > 12 + * + * + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function filterById($id = null, $comparison = null) + { + if (is_array($id)) { + $useMinMax = false; + if (isset($id['min'])) { + $this->addUsingAlias(CreditNoteStatusTableMap::ID, $id['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($id['max'])) { + $this->addUsingAlias(CreditNoteStatusTableMap::ID, $id['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteStatusTableMap::ID, $id, $comparison); + } + + /** + * Filter the query on the code column + * + * Example usage: + * + * $query->filterByCode('fooValue'); // WHERE code = 'fooValue' + * $query->filterByCode('%fooValue%'); // WHERE code LIKE '%fooValue%' + * + * + * @param string $code The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function filterByCode($code = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($code)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $code)) { + $code = str_replace('*', '%', $code); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteStatusTableMap::CODE, $code, $comparison); + } + + /** + * Filter the query on the color column + * + * Example usage: + * + * $query->filterByColor('fooValue'); // WHERE color = 'fooValue' + * $query->filterByColor('%fooValue%'); // WHERE color LIKE '%fooValue%' + * + * + * @param string $color The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function filterByColor($color = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($color)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $color)) { + $color = str_replace('*', '%', $color); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteStatusTableMap::COLOR, $color, $comparison); + } + + /** + * Filter the query on the invoiced column + * + * Example usage: + * + * $query->filterByInvoiced(true); // WHERE invoiced = true + * $query->filterByInvoiced('yes'); // WHERE invoiced = true + * + * + * @param boolean|string $invoiced The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function filterByInvoiced($invoiced = null, $comparison = null) + { + if (is_string($invoiced)) { + $invoiced = in_array(strtolower($invoiced), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; + } + + return $this->addUsingAlias(CreditNoteStatusTableMap::INVOICED, $invoiced, $comparison); + } + + /** + * Filter the query on the used column + * + * Example usage: + * + * $query->filterByUsed(true); // WHERE used = true + * $query->filterByUsed('yes'); // WHERE used = true + * + * + * @param boolean|string $used The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function filterByUsed($used = null, $comparison = null) + { + if (is_string($used)) { + $used = in_array(strtolower($used), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; + } + + return $this->addUsingAlias(CreditNoteStatusTableMap::USED, $used, $comparison); + } + + /** + * Filter the query on the position column + * + * Example usage: + * + * $query->filterByPosition(1234); // WHERE position = 1234 + * $query->filterByPosition(array(12, 34)); // WHERE position IN (12, 34) + * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 + * + * + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function filterByPosition($position = null, $comparison = null) + { + if (is_array($position)) { + $useMinMax = false; + if (isset($position['min'])) { + $this->addUsingAlias(CreditNoteStatusTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($position['max'])) { + $this->addUsingAlias(CreditNoteStatusTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteStatusTableMap::POSITION, $position, $comparison); + } + + /** + * Filter the query on the created_at column + * + * Example usage: + * + * $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14' + * $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14' + * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' + * + * + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function filterByCreatedAt($createdAt = null, $comparison = null) + { + if (is_array($createdAt)) { + $useMinMax = false; + if (isset($createdAt['min'])) { + $this->addUsingAlias(CreditNoteStatusTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($createdAt['max'])) { + $this->addUsingAlias(CreditNoteStatusTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteStatusTableMap::CREATED_AT, $createdAt, $comparison); + } + + /** + * Filter the query on the updated_at column + * + * Example usage: + * + * $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14' + * $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14' + * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' + * + * + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function filterByUpdatedAt($updatedAt = null, $comparison = null) + { + if (is_array($updatedAt)) { + $useMinMax = false; + if (isset($updatedAt['min'])) { + $this->addUsingAlias(CreditNoteStatusTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($updatedAt['max'])) { + $this->addUsingAlias(CreditNoteStatusTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteStatusTableMap::UPDATED_AT, $updatedAt, $comparison); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNote object + * + * @param \CreditNote\Model\CreditNote|ObjectCollection $creditNote the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function filterByCreditNote($creditNote, $comparison = null) + { + if ($creditNote instanceof \CreditNote\Model\CreditNote) { + return $this + ->addUsingAlias(CreditNoteStatusTableMap::ID, $creditNote->getStatusId(), $comparison); + } elseif ($creditNote instanceof ObjectCollection) { + return $this + ->useCreditNoteQuery() + ->filterByPrimaryKeys($creditNote->getPrimaryKeys()) + ->endUse(); + } else { + throw new PropelException('filterByCreditNote() only accepts arguments of type \CreditNote\Model\CreditNote or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNote relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function joinCreditNote($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNote'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNote'); + } + + return $this; + } + + /** + * Use the CreditNote relation CreditNote object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCreditNote($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNote', '\CreditNote\Model\CreditNoteQuery'); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNoteStatusFlow object + * + * @param \CreditNote\Model\CreditNoteStatusFlow|ObjectCollection $creditNoteStatusFlow the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function filterByCreditNoteStatusFlowRelatedByFromStatusId($creditNoteStatusFlow, $comparison = null) + { + if ($creditNoteStatusFlow instanceof \CreditNote\Model\CreditNoteStatusFlow) { + return $this + ->addUsingAlias(CreditNoteStatusTableMap::ID, $creditNoteStatusFlow->getFromStatusId(), $comparison); + } elseif ($creditNoteStatusFlow instanceof ObjectCollection) { + return $this + ->useCreditNoteStatusFlowRelatedByFromStatusIdQuery() + ->filterByPrimaryKeys($creditNoteStatusFlow->getPrimaryKeys()) + ->endUse(); + } else { + throw new PropelException('filterByCreditNoteStatusFlowRelatedByFromStatusId() only accepts arguments of type \CreditNote\Model\CreditNoteStatusFlow or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNoteStatusFlowRelatedByFromStatusId relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function joinCreditNoteStatusFlowRelatedByFromStatusId($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNoteStatusFlowRelatedByFromStatusId'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNoteStatusFlowRelatedByFromStatusId'); + } + + return $this; + } + + /** + * Use the CreditNoteStatusFlowRelatedByFromStatusId relation CreditNoteStatusFlow object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteStatusFlowQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteStatusFlowRelatedByFromStatusIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCreditNoteStatusFlowRelatedByFromStatusId($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNoteStatusFlowRelatedByFromStatusId', '\CreditNote\Model\CreditNoteStatusFlowQuery'); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNoteStatusFlow object + * + * @param \CreditNote\Model\CreditNoteStatusFlow|ObjectCollection $creditNoteStatusFlow the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function filterByCreditNoteStatusFlowRelatedByToStatusId($creditNoteStatusFlow, $comparison = null) + { + if ($creditNoteStatusFlow instanceof \CreditNote\Model\CreditNoteStatusFlow) { + return $this + ->addUsingAlias(CreditNoteStatusTableMap::ID, $creditNoteStatusFlow->getToStatusId(), $comparison); + } elseif ($creditNoteStatusFlow instanceof ObjectCollection) { + return $this + ->useCreditNoteStatusFlowRelatedByToStatusIdQuery() + ->filterByPrimaryKeys($creditNoteStatusFlow->getPrimaryKeys()) + ->endUse(); + } else { + throw new PropelException('filterByCreditNoteStatusFlowRelatedByToStatusId() only accepts arguments of type \CreditNote\Model\CreditNoteStatusFlow or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNoteStatusFlowRelatedByToStatusId relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function joinCreditNoteStatusFlowRelatedByToStatusId($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNoteStatusFlowRelatedByToStatusId'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNoteStatusFlowRelatedByToStatusId'); + } + + return $this; + } + + /** + * Use the CreditNoteStatusFlowRelatedByToStatusId relation CreditNoteStatusFlow object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteStatusFlowQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteStatusFlowRelatedByToStatusIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCreditNoteStatusFlowRelatedByToStatusId($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNoteStatusFlowRelatedByToStatusId', '\CreditNote\Model\CreditNoteStatusFlowQuery'); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNoteStatusI18n object + * + * @param \CreditNote\Model\CreditNoteStatusI18n|ObjectCollection $creditNoteStatusI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function filterByCreditNoteStatusI18n($creditNoteStatusI18n, $comparison = null) + { + if ($creditNoteStatusI18n instanceof \CreditNote\Model\CreditNoteStatusI18n) { + return $this + ->addUsingAlias(CreditNoteStatusTableMap::ID, $creditNoteStatusI18n->getId(), $comparison); + } elseif ($creditNoteStatusI18n instanceof ObjectCollection) { + return $this + ->useCreditNoteStatusI18nQuery() + ->filterByPrimaryKeys($creditNoteStatusI18n->getPrimaryKeys()) + ->endUse(); + } else { + throw new PropelException('filterByCreditNoteStatusI18n() only accepts arguments of type \CreditNote\Model\CreditNoteStatusI18n or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNoteStatusI18n relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function joinCreditNoteStatusI18n($relationAlias = null, $joinType = 'LEFT JOIN') + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNoteStatusI18n'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNoteStatusI18n'); + } + + return $this; + } + + /** + * Use the CreditNoteStatusI18n relation CreditNoteStatusI18n object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteStatusI18nQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteStatusI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') + { + return $this + ->joinCreditNoteStatusI18n($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNoteStatusI18n', '\CreditNote\Model\CreditNoteStatusI18nQuery'); + } + + /** + * Exclude object from result + * + * @param ChildCreditNoteStatus $creditNoteStatus Object to remove from the list of results + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function prune($creditNoteStatus = null) + { + if ($creditNoteStatus) { + $this->addUsingAlias(CreditNoteStatusTableMap::ID, $creditNoteStatus->getId(), Criteria::NOT_EQUAL); + } + + return $this; + } + + /** + * Deletes all rows from the credit_note_status table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public function doDeleteAll(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteStatusTableMap::DATABASE_NAME); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + $affectedRows += parent::doDeleteAll($con); + // Because this db requires some delete cascade/set null emulation, we have to + // clear the cached instance *after* the emulation has happened (since + // instances get re-added by the select statement contained therein). + CreditNoteStatusTableMap::clearInstancePool(); + CreditNoteStatusTableMap::clearRelatedInstancePool(); + + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $affectedRows; + } + + /** + * Performs a DELETE on the database, given a ChildCreditNoteStatus or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or ChildCreditNoteStatus object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public function delete(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteStatusTableMap::DATABASE_NAME); + } + + $criteria = $this; + + // Set the correct dbName + $criteria->setDbName(CreditNoteStatusTableMap::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + + + CreditNoteStatusTableMap::removeInstanceFromPool($criteria); + + $affectedRows += ModelCriteria::delete($con); + CreditNoteStatusTableMap::clearRelatedInstancePool(); + $con->commit(); + + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + // i18n behavior + + /** + * Adds a JOIN clause to the query using the i18n relation + * + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) + { + $relationName = $relationAlias ? $relationAlias : 'CreditNoteStatusI18n'; + + return $this + ->joinCreditNoteStatusI18n($relationAlias, $joinType) + ->addJoinCondition($relationName, $relationName . '.Locale = ?', $locale); + } + + /** + * Adds a JOIN clause to the query and hydrates the related I18n object. + * Shortcut for $c->joinI18n($locale)->with() + * + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) + { + $this + ->joinI18n($locale, null, $joinType) + ->with('CreditNoteStatusI18n'); + $this->with['CreditNoteStatusI18n']->setIsWithOneToMany(false); + + return $this; + } + + /** + * Use the I18n relation query object + * + * @see useQuery() + * + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * + * @return ChildCreditNoteStatusI18nQuery A secondary query class using the current class as primary query + */ + public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) + { + return $this + ->joinI18n($locale, $relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNoteStatusI18n', '\CreditNote\Model\CreditNoteStatusI18nQuery'); + } + + // timestampable behavior + + /** + * Filter by the latest updated + * + * @param int $nbDays Maximum age of the latest update in days + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function recentlyUpdated($nbDays = 7) + { + return $this->addUsingAlias(CreditNoteStatusTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL); + } + + /** + * Filter by the latest created + * + * @param int $nbDays Maximum age of in days + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function recentlyCreated($nbDays = 7) + { + return $this->addUsingAlias(CreditNoteStatusTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL); + } + + /** + * Order by update date desc + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function lastUpdatedFirst() + { + return $this->addDescendingOrderByColumn(CreditNoteStatusTableMap::UPDATED_AT); + } + + /** + * Order by update date asc + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function firstUpdatedFirst() + { + return $this->addAscendingOrderByColumn(CreditNoteStatusTableMap::UPDATED_AT); + } + + /** + * Order by create date desc + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function lastCreatedFirst() + { + return $this->addDescendingOrderByColumn(CreditNoteStatusTableMap::CREATED_AT); + } + + /** + * Order by create date asc + * + * @return ChildCreditNoteStatusQuery The current query, for fluid interface + */ + public function firstCreatedFirst() + { + return $this->addAscendingOrderByColumn(CreditNoteStatusTableMap::CREATED_AT); + } + +} // CreditNoteStatusQuery diff --git a/local/modules/CreditNote/Model/Base/CreditNoteType.php b/local/modules/CreditNote/Model/Base/CreditNoteType.php new file mode 100644 index 000000000..2bed29737 --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CreditNoteType.php @@ -0,0 +1,2412 @@ +required_order = false; + } + + /** + * Initializes internal state of CreditNote\Model\Base\CreditNoteType object. + * @see applyDefaults() + */ + public function __construct() + { + $this->applyDefaultValues(); + } + + /** + * Returns whether the object has been modified. + * + * @return boolean True if the object has been modified. + */ + public function isModified() + { + return !!$this->modifiedColumns; + } + + /** + * Has specified column been modified? + * + * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID + * @return boolean True if $col has been modified. + */ + public function isColumnModified($col) + { + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); + } + + /** + * Get the columns that have been modified in this object. + * @return array A unique list of the modified column names for this object. + */ + public function getModifiedColumns() + { + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; + } + + /** + * Returns whether the object has ever been saved. This will + * be false, if the object was retrieved from storage or was created + * and then saved. + * + * @return boolean true, if the object has never been persisted. + */ + public function isNew() + { + return $this->new; + } + + /** + * Setter for the isNew attribute. This method will be called + * by Propel-generated children and objects. + * + * @param boolean $b the state of the object. + */ + public function setNew($b) + { + $this->new = (Boolean) $b; + } + + /** + * Whether this object has been deleted. + * @return boolean The deleted state of this object. + */ + public function isDeleted() + { + return $this->deleted; + } + + /** + * Specify whether this object has been deleted. + * @param boolean $b The deleted state of this object. + * @return void + */ + public function setDeleted($b) + { + $this->deleted = (Boolean) $b; + } + + /** + * Sets the modified state for the object to be false. + * @param string $col If supplied, only the specified column is reset. + * @return void + */ + public function resetModified($col = null) + { + if (null !== $col) { + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); + } + } else { + $this->modifiedColumns = array(); + } + } + + /** + * Compares this with another CreditNoteType instance. If + * obj is an instance of CreditNoteType, delegates to + * equals(CreditNoteType). Otherwise, returns false. + * + * @param mixed $obj The object to compare to. + * @return boolean Whether equal to the object specified. + */ + public function equals($obj) + { + $thisclazz = get_class($this); + if (!is_object($obj) || !($obj instanceof $thisclazz)) { + return false; + } + + if ($this === $obj) { + return true; + } + + if (null === $this->getPrimaryKey() + || null === $obj->getPrimaryKey()) { + return false; + } + + return $this->getPrimaryKey() === $obj->getPrimaryKey(); + } + + /** + * If the primary key is not null, return the hashcode of the + * primary key. Otherwise, return the hash code of the object. + * + * @return int Hashcode + */ + public function hashCode() + { + if (null !== $this->getPrimaryKey()) { + return crc32(serialize($this->getPrimaryKey())); + } + + return crc32(serialize(clone $this)); + } + + /** + * Get the associative array of the virtual columns in this object + * + * @return array + */ + public function getVirtualColumns() + { + return $this->virtualColumns; + } + + /** + * Checks the existence of a virtual column in this object + * + * @param string $name The virtual column name + * @return boolean + */ + public function hasVirtualColumn($name) + { + return array_key_exists($name, $this->virtualColumns); + } + + /** + * Get the value of a virtual column in this object + * + * @param string $name The virtual column name + * @return mixed + * + * @throws PropelException + */ + public function getVirtualColumn($name) + { + if (!$this->hasVirtualColumn($name)) { + throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name)); + } + + return $this->virtualColumns[$name]; + } + + /** + * Set the value of a virtual column in this object + * + * @param string $name The virtual column name + * @param mixed $value The value to give to the virtual column + * + * @return CreditNoteType The current object, for fluid interface + */ + public function setVirtualColumn($name, $value) + { + $this->virtualColumns[$name] = $value; + + return $this; + } + + /** + * Logs a message using Propel::log(). + * + * @param string $msg + * @param int $priority One of the Propel::LOG_* logging levels + * @return boolean + */ + protected function log($msg, $priority = Propel::LOG_INFO) + { + return Propel::log(get_class($this) . ': ' . $msg, $priority); + } + + /** + * Populate the current object from a string, using a given parser format + * + * $book = new Book(); + * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, + * or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param string $data The source data to import from + * + * @return CreditNoteType The current object, for fluid interface + */ + public function importFrom($parser, $data) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + $this->fromArray($parser->toArray($data), TableMap::TYPE_PHPNAME); + + return $this; + } + + /** + * Export the current object properties to a string, using a given parser format + * + * $book = BookQuery::create()->findPk(9012); + * echo $book->exportTo('JSON'); + * => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE. + * @return string The exported data + */ + public function exportTo($parser, $includeLazyLoadColumns = true) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true)); + } + + /** + * Clean up internal collections prior to serializing + * Avoids recursive loops that turn into segmentation faults when serializing + */ + public function __sleep() + { + $this->clearAllReferences(); + + return array_keys(get_object_vars($this)); + } + + /** + * Get the [id] column value. + * + * @return int + */ + public function getId() + { + + return $this->id; + } + + /** + * Get the [code] column value. + * + * @return string + */ + public function getCode() + { + + return $this->code; + } + + /** + * Get the [color] column value. + * + * @return string + */ + public function getColor() + { + + return $this->color; + } + + /** + * Get the [position] column value. + * + * @return int + */ + public function getPosition() + { + + return $this->position; + } + + /** + * Get the [required_order] column value. + * + * @return boolean + */ + public function getRequiredOrder() + { + + return $this->required_order; + } + + /** + * Get the [optionally formatted] temporal [created_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getCreatedAt($format = NULL) + { + if ($format === null) { + return $this->created_at; + } else { + return $this->created_at instanceof \DateTime ? $this->created_at->format($format) : null; + } + } + + /** + * Get the [optionally formatted] temporal [updated_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getUpdatedAt($format = NULL) + { + if ($format === null) { + return $this->updated_at; + } else { + return $this->updated_at instanceof \DateTime ? $this->updated_at->format($format) : null; + } + } + + /** + * Set the value of [id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteType The current object (for fluent API support) + */ + public function setId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->id !== $v) { + $this->id = $v; + $this->modifiedColumns[CreditNoteTypeTableMap::ID] = true; + } + + + return $this; + } // setId() + + /** + * Set the value of [code] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteType The current object (for fluent API support) + */ + public function setCode($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->code !== $v) { + $this->code = $v; + $this->modifiedColumns[CreditNoteTypeTableMap::CODE] = true; + } + + + return $this; + } // setCode() + + /** + * Set the value of [color] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteType The current object (for fluent API support) + */ + public function setColor($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->color !== $v) { + $this->color = $v; + $this->modifiedColumns[CreditNoteTypeTableMap::COLOR] = true; + } + + + return $this; + } // setColor() + + /** + * Set the value of [position] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteType The current object (for fluent API support) + */ + public function setPosition($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->position !== $v) { + $this->position = $v; + $this->modifiedColumns[CreditNoteTypeTableMap::POSITION] = true; + } + + + return $this; + } // setPosition() + + /** + * Sets the value of the [required_order] column. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * + * @param boolean|integer|string $v The new value + * @return \CreditNote\Model\CreditNoteType The current object (for fluent API support) + */ + public function setRequiredOrder($v) + { + if ($v !== null) { + if (is_string($v)) { + $v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; + } else { + $v = (boolean) $v; + } + } + + if ($this->required_order !== $v) { + $this->required_order = $v; + $this->modifiedColumns[CreditNoteTypeTableMap::REQUIRED_ORDER] = true; + } + + + return $this; + } // setRequiredOrder() + + /** + * Sets the value of [created_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CreditNoteType The current object (for fluent API support) + */ + public function setCreatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->created_at !== null || $dt !== null) { + if ($dt !== $this->created_at) { + $this->created_at = $dt; + $this->modifiedColumns[CreditNoteTypeTableMap::CREATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setCreatedAt() + + /** + * Sets the value of [updated_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CreditNoteType The current object (for fluent API support) + */ + public function setUpdatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->updated_at !== null || $dt !== null) { + if ($dt !== $this->updated_at) { + $this->updated_at = $dt; + $this->modifiedColumns[CreditNoteTypeTableMap::UPDATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setUpdatedAt() + + /** + * Indicates whether the columns in this object are only set to default values. + * + * This method can be used in conjunction with isModified() to indicate whether an object is both + * modified _and_ has some values set which are non-default. + * + * @return boolean Whether the columns in this object are only been set with default values. + */ + public function hasOnlyDefaultValues() + { + if ($this->required_order !== false) { + return false; + } + + // otherwise, everything was equal, so return TRUE + return true; + } // hasOnlyDefaultValues() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (0-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param array $row The row returned by DataFetcher->fetch(). + * @param int $startcol 0-based offset column which indicates which restultset column to start with. + * @param boolean $rehydrate Whether this object is being re-hydrated from the database. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM) + { + try { + + + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CreditNoteTypeTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; + $this->id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CreditNoteTypeTableMap::translateFieldName('Code', TableMap::TYPE_PHPNAME, $indexType)]; + $this->code = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CreditNoteTypeTableMap::translateFieldName('Color', TableMap::TYPE_PHPNAME, $indexType)]; + $this->color = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CreditNoteTypeTableMap::translateFieldName('Position', TableMap::TYPE_PHPNAME, $indexType)]; + $this->position = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CreditNoteTypeTableMap::translateFieldName('RequiredOrder', TableMap::TYPE_PHPNAME, $indexType)]; + $this->required_order = (null !== $col) ? (boolean) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CreditNoteTypeTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CreditNoteTypeTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + $this->resetModified(); + + $this->setNew(false); + + if ($rehydrate) { + $this->ensureConsistency(); + } + + return $startcol + 7; // 7 = CreditNoteTypeTableMap::NUM_HYDRATE_COLUMNS. + + } catch (Exception $e) { + throw new PropelException("Error populating \CreditNote\Model\CreditNoteType object", 0, $e); + } + } + + /** + * Checks and repairs the internal consistency of the object. + * + * This method is executed after an already-instantiated object is re-hydrated + * from the database. It exists to check any foreign keys to make sure that + * the objects related to the current object are correct based on foreign key. + * + * You can override this method in the stub class, but you should always invoke + * the base method from the overridden method (i.e. parent::ensureConsistency()), + * in case your model changes. + * + * @throws PropelException + */ + public function ensureConsistency() + { + } // ensureConsistency + + /** + * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. + * + * This will only work if the object has been saved and has a valid primary key set. + * + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @return void + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + */ + public function reload($deep = false, ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("Cannot reload a deleted object."); + } + + if ($this->isNew()) { + throw new PropelException("Cannot reload an unsaved object."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CreditNoteTypeTableMap::DATABASE_NAME); + } + + // We don't need to alter the object instance pool; we're just modifying this instance + // already in the pool. + + $dataFetcher = ChildCreditNoteTypeQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con); + $row = $dataFetcher->fetch(); + $dataFetcher->close(); + if (!$row) { + throw new PropelException('Cannot find matching row in the database to reload object values.'); + } + $this->hydrate($row, 0, true, $dataFetcher->getIndexType()); // rehydrate + + if ($deep) { // also de-associate any related objects? + + $this->collCreditNotes = null; + + $this->collCreditNoteTypeI18ns = null; + + } // if (deep) + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param ConnectionInterface $con + * @return void + * @throws PropelException + * @see CreditNoteType::setDeleted() + * @see CreditNoteType::isDeleted() + */ + public function delete(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteTypeTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + try { + $deleteQuery = ChildCreditNoteTypeQuery::create() + ->filterByPrimaryKey($this->getPrimaryKey()); + $ret = $this->preDelete($con); + if ($ret) { + $deleteQuery->delete($con); + $this->postDelete($con); + $con->commit(); + $this->setDeleted(true); + } else { + $con->commit(); + } + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Persists this object to the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All modified related objects will also be persisted in the doSave() + * method. This method wraps all precipitate database operations in a + * single transaction. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() + */ + public function save(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteTypeTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + $isInsert = $this->isNew(); + try { + $ret = $this->preSave($con); + if ($isInsert) { + $ret = $ret && $this->preInsert($con); + // timestampable behavior + if (!$this->isColumnModified(CreditNoteTypeTableMap::CREATED_AT)) { + $this->setCreatedAt(time()); + } + if (!$this->isColumnModified(CreditNoteTypeTableMap::UPDATED_AT)) { + $this->setUpdatedAt(time()); + } + } else { + $ret = $ret && $this->preUpdate($con); + // timestampable behavior + if ($this->isModified() && !$this->isColumnModified(CreditNoteTypeTableMap::UPDATED_AT)) { + $this->setUpdatedAt(time()); + } + } + if ($ret) { + $affectedRows = $this->doSave($con); + if ($isInsert) { + $this->postInsert($con); + } else { + $this->postUpdate($con); + } + $this->postSave($con); + CreditNoteTypeTableMap::addInstanceToPool($this); + } else { + $affectedRows = 0; + } + $con->commit(); + + return $affectedRows; + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Performs the work of inserting or updating the row in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() + */ + protected function doSave(ConnectionInterface $con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + if ($this->isNew() || $this->isModified()) { + // persist changes + if ($this->isNew()) { + $this->doInsert($con); + } else { + $this->doUpdate($con); + } + $affectedRows += 1; + $this->resetModified(); + } + + if ($this->creditNotesScheduledForDeletion !== null) { + if (!$this->creditNotesScheduledForDeletion->isEmpty()) { + \CreditNote\Model\CreditNoteQuery::create() + ->filterByPrimaryKeys($this->creditNotesScheduledForDeletion->getPrimaryKeys(false)) + ->delete($con); + $this->creditNotesScheduledForDeletion = null; + } + } + + if ($this->collCreditNotes !== null) { + foreach ($this->collCreditNotes as $referrerFK) { + if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) { + $affectedRows += $referrerFK->save($con); + } + } + } + + if ($this->creditNoteTypeI18nsScheduledForDeletion !== null) { + if (!$this->creditNoteTypeI18nsScheduledForDeletion->isEmpty()) { + \CreditNote\Model\CreditNoteTypeI18nQuery::create() + ->filterByPrimaryKeys($this->creditNoteTypeI18nsScheduledForDeletion->getPrimaryKeys(false)) + ->delete($con); + $this->creditNoteTypeI18nsScheduledForDeletion = null; + } + } + + if ($this->collCreditNoteTypeI18ns !== null) { + foreach ($this->collCreditNoteTypeI18ns as $referrerFK) { + if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) { + $affectedRows += $referrerFK->save($con); + } + } + } + + $this->alreadyInSave = false; + + } + + return $affectedRows; + } // doSave() + + /** + * Insert the row in the database. + * + * @param ConnectionInterface $con + * + * @throws PropelException + * @see doSave() + */ + protected function doInsert(ConnectionInterface $con) + { + $modifiedColumns = array(); + $index = 0; + + $this->modifiedColumns[CreditNoteTypeTableMap::ID] = true; + if (null !== $this->id) { + throw new PropelException('Cannot insert a value for auto-increment primary key (' . CreditNoteTypeTableMap::ID . ')'); + } + + // check the columns in natural order for more readable SQL queries + if ($this->isColumnModified(CreditNoteTypeTableMap::ID)) { + $modifiedColumns[':p' . $index++] = 'ID'; + } + if ($this->isColumnModified(CreditNoteTypeTableMap::CODE)) { + $modifiedColumns[':p' . $index++] = 'CODE'; + } + if ($this->isColumnModified(CreditNoteTypeTableMap::COLOR)) { + $modifiedColumns[':p' . $index++] = 'COLOR'; + } + if ($this->isColumnModified(CreditNoteTypeTableMap::POSITION)) { + $modifiedColumns[':p' . $index++] = 'POSITION'; + } + if ($this->isColumnModified(CreditNoteTypeTableMap::REQUIRED_ORDER)) { + $modifiedColumns[':p' . $index++] = 'REQUIRED_ORDER'; + } + if ($this->isColumnModified(CreditNoteTypeTableMap::CREATED_AT)) { + $modifiedColumns[':p' . $index++] = 'CREATED_AT'; + } + if ($this->isColumnModified(CreditNoteTypeTableMap::UPDATED_AT)) { + $modifiedColumns[':p' . $index++] = 'UPDATED_AT'; + } + + $sql = sprintf( + 'INSERT INTO credit_note_type (%s) VALUES (%s)', + implode(', ', $modifiedColumns), + implode(', ', array_keys($modifiedColumns)) + ); + + try { + $stmt = $con->prepare($sql); + foreach ($modifiedColumns as $identifier => $columnName) { + switch ($columnName) { + case 'ID': + $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT); + break; + case 'CODE': + $stmt->bindValue($identifier, $this->code, PDO::PARAM_STR); + break; + case 'COLOR': + $stmt->bindValue($identifier, $this->color, PDO::PARAM_STR); + break; + case 'POSITION': + $stmt->bindValue($identifier, $this->position, PDO::PARAM_INT); + break; + case 'REQUIRED_ORDER': + $stmt->bindValue($identifier, (int) $this->required_order, PDO::PARAM_INT); + break; + case 'CREATED_AT': + $stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + case 'UPDATED_AT': + $stmt->bindValue($identifier, $this->updated_at ? $this->updated_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + } + } + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e); + } + + try { + $pk = $con->lastInsertId(); + } catch (Exception $e) { + throw new PropelException('Unable to get autoincrement id.', 0, $e); + } + $this->setId($pk); + + $this->setNew(false); + } + + /** + * Update the row in the database. + * + * @param ConnectionInterface $con + * + * @return Integer Number of updated rows + * @see doSave() + */ + protected function doUpdate(ConnectionInterface $con) + { + $selectCriteria = $this->buildPkeyCriteria(); + $valuesCriteria = $this->buildCriteria(); + + return $selectCriteria->doUpdate($valuesCriteria, $con); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. + */ + public function getByName($name, $type = TableMap::TYPE_PHPNAME) + { + $pos = CreditNoteTypeTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + $field = $this->getByPosition($pos); + + return $field; + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch ($pos) { + case 0: + return $this->getId(); + break; + case 1: + return $this->getCode(); + break; + case 2: + return $this->getColor(); + break; + case 3: + return $this->getPosition(); + break; + case 4: + return $this->getRequiredOrder(); + break; + case 5: + return $this->getCreatedAt(); + break; + case 6: + return $this->getUpdatedAt(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * + * @return array an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false) + { + if (isset($alreadyDumpedObjects['CreditNoteType'][$this->getPrimaryKey()])) { + return '*RECURSION*'; + } + $alreadyDumpedObjects['CreditNoteType'][$this->getPrimaryKey()] = true; + $keys = CreditNoteTypeTableMap::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getId(), + $keys[1] => $this->getCode(), + $keys[2] => $this->getColor(), + $keys[3] => $this->getPosition(), + $keys[4] => $this->getRequiredOrder(), + $keys[5] => $this->getCreatedAt(), + $keys[6] => $this->getUpdatedAt(), + ); + $virtualColumns = $this->virtualColumns; + foreach ($virtualColumns as $key => $virtualColumn) { + $result[$key] = $virtualColumn; + } + + if ($includeForeignObjects) { + if (null !== $this->collCreditNotes) { + $result['CreditNotes'] = $this->collCreditNotes->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); + } + if (null !== $this->collCreditNoteTypeI18ns) { + $result['CreditNoteTypeI18ns'] = $this->collCreditNoteTypeI18ns->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects); + } + } + + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return void + */ + public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) + { + $pos = CreditNoteTypeTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch ($pos) { + case 0: + $this->setId($value); + break; + case 1: + $this->setCode($value); + break; + case 2: + $this->setColor($value); + break; + case 3: + $this->setPosition($value); + break; + case 4: + $this->setRequiredOrder($value); + break; + case 5: + $this->setCreatedAt($value); + break; + case 6: + $this->setUpdatedAt($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * The default key type is the column's TableMap::TYPE_PHPNAME. + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) + { + $keys = CreditNoteTypeTableMap::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setCode($arr[$keys[1]]); + if (array_key_exists($keys[2], $arr)) $this->setColor($arr[$keys[2]]); + if (array_key_exists($keys[3], $arr)) $this->setPosition($arr[$keys[3]]); + if (array_key_exists($keys[4], $arr)) $this->setRequiredOrder($arr[$keys[4]]); + if (array_key_exists($keys[5], $arr)) $this->setCreatedAt($arr[$keys[5]]); + if (array_key_exists($keys[6], $arr)) $this->setUpdatedAt($arr[$keys[6]]); + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(CreditNoteTypeTableMap::DATABASE_NAME); + + if ($this->isColumnModified(CreditNoteTypeTableMap::ID)) $criteria->add(CreditNoteTypeTableMap::ID, $this->id); + if ($this->isColumnModified(CreditNoteTypeTableMap::CODE)) $criteria->add(CreditNoteTypeTableMap::CODE, $this->code); + if ($this->isColumnModified(CreditNoteTypeTableMap::COLOR)) $criteria->add(CreditNoteTypeTableMap::COLOR, $this->color); + if ($this->isColumnModified(CreditNoteTypeTableMap::POSITION)) $criteria->add(CreditNoteTypeTableMap::POSITION, $this->position); + if ($this->isColumnModified(CreditNoteTypeTableMap::REQUIRED_ORDER)) $criteria->add(CreditNoteTypeTableMap::REQUIRED_ORDER, $this->required_order); + if ($this->isColumnModified(CreditNoteTypeTableMap::CREATED_AT)) $criteria->add(CreditNoteTypeTableMap::CREATED_AT, $this->created_at); + if ($this->isColumnModified(CreditNoteTypeTableMap::UPDATED_AT)) $criteria->add(CreditNoteTypeTableMap::UPDATED_AT, $this->updated_at); + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(CreditNoteTypeTableMap::DATABASE_NAME); + $criteria->add(CreditNoteTypeTableMap::ID, $this->id); + + return $criteria; + } + + /** + * Returns the primary key for this object (row). + * @return int + */ + public function getPrimaryKey() + { + return $this->getId(); + } + + /** + * Generic method to set the primary key (id column). + * + * @param int $key Primary key. + * @return void + */ + public function setPrimaryKey($key) + { + $this->setId($key); + } + + /** + * Returns true if the primary key for this object is null. + * @return boolean + */ + public function isPrimaryKeyNull() + { + + return null === $this->getId(); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of \CreditNote\Model\CreditNoteType (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false, $makeNew = true) + { + $copyObj->setCode($this->getCode()); + $copyObj->setColor($this->getColor()); + $copyObj->setPosition($this->getPosition()); + $copyObj->setRequiredOrder($this->getRequiredOrder()); + $copyObj->setCreatedAt($this->getCreatedAt()); + $copyObj->setUpdatedAt($this->getUpdatedAt()); + + if ($deepCopy) { + // important: temporarily setNew(false) because this affects the behavior of + // the getter/setter methods for fkey referrer objects. + $copyObj->setNew(false); + + foreach ($this->getCreditNotes() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCreditNote($relObj->copy($deepCopy)); + } + } + + foreach ($this->getCreditNoteTypeI18ns() as $relObj) { + if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves + $copyObj->addCreditNoteTypeI18n($relObj->copy($deepCopy)); + } + } + + } // if ($deepCopy) + + if ($makeNew) { + $copyObj->setNew(true); + $copyObj->setId(NULL); // this is a auto-increment column, so set to default value + } + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \CreditNote\Model\CreditNoteType Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + + return $copyObj; + } + + + /** + * Initializes a collection based on the name of a relation. + * Avoids crafting an 'init[$relationName]s' method name + * that wouldn't work when StandardEnglishPluralizer is used. + * + * @param string $relationName The name of the relation to initialize + * @return void + */ + public function initRelation($relationName) + { + if ('CreditNote' == $relationName) { + return $this->initCreditNotes(); + } + if ('CreditNoteTypeI18n' == $relationName) { + return $this->initCreditNoteTypeI18ns(); + } + } + + /** + * Clears out the collCreditNotes collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCreditNotes() + */ + public function clearCreditNotes() + { + $this->collCreditNotes = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Reset is the collCreditNotes collection loaded partially. + */ + public function resetPartialCreditNotes($v = true) + { + $this->collCreditNotesPartial = $v; + } + + /** + * Initializes the collCreditNotes collection. + * + * By default this just sets the collCreditNotes collection to an empty array (like clearcollCreditNotes()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty + * + * @return void + */ + public function initCreditNotes($overrideExisting = true) + { + if (null !== $this->collCreditNotes && !$overrideExisting) { + return; + } + $this->collCreditNotes = new ObjectCollection(); + $this->collCreditNotes->setModel('\CreditNote\Model\CreditNote'); + } + + /** + * Gets an array of ChildCreditNote objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this ChildCreditNoteType is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + * @throws PropelException + */ + public function getCreditNotes($criteria = null, ConnectionInterface $con = null) + { + $partial = $this->collCreditNotesPartial && !$this->isNew(); + if (null === $this->collCreditNotes || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCreditNotes) { + // return empty collection + $this->initCreditNotes(); + } else { + $collCreditNotes = ChildCreditNoteQuery::create(null, $criteria) + ->filterByCreditNoteType($this) + ->find($con); + + if (null !== $criteria) { + if (false !== $this->collCreditNotesPartial && count($collCreditNotes)) { + $this->initCreditNotes(false); + + foreach ($collCreditNotes as $obj) { + if (false == $this->collCreditNotes->contains($obj)) { + $this->collCreditNotes->append($obj); + } + } + + $this->collCreditNotesPartial = true; + } + + reset($collCreditNotes); + + return $collCreditNotes; + } + + if ($partial && $this->collCreditNotes) { + foreach ($this->collCreditNotes as $obj) { + if ($obj->isNew()) { + $collCreditNotes[] = $obj; + } + } + } + + $this->collCreditNotes = $collCreditNotes; + $this->collCreditNotesPartial = false; + } + } + + return $this->collCreditNotes; + } + + /** + * Sets a collection of CreditNote objects related by a one-to-many relationship + * to the current object. + * It will also schedule objects for deletion based on a diff between old objects (aka persisted) + * and new objects from the given Propel collection. + * + * @param Collection $creditNotes A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCreditNoteType The current object (for fluent API support) + */ + public function setCreditNotes(Collection $creditNotes, ConnectionInterface $con = null) + { + $creditNotesToDelete = $this->getCreditNotes(new Criteria(), $con)->diff($creditNotes); + + + $this->creditNotesScheduledForDeletion = $creditNotesToDelete; + + foreach ($creditNotesToDelete as $creditNoteRemoved) { + $creditNoteRemoved->setCreditNoteType(null); + } + + $this->collCreditNotes = null; + foreach ($creditNotes as $creditNote) { + $this->addCreditNote($creditNote); + } + + $this->collCreditNotes = $creditNotes; + $this->collCreditNotesPartial = false; + + return $this; + } + + /** + * Returns the number of related CreditNote objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CreditNote objects. + * @throws PropelException + */ + public function countCreditNotes(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) + { + $partial = $this->collCreditNotesPartial && !$this->isNew(); + if (null === $this->collCreditNotes || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCreditNotes) { + return 0; + } + + if ($partial && !$criteria) { + return count($this->getCreditNotes()); + } + + $query = ChildCreditNoteQuery::create(null, $criteria); + if ($distinct) { + $query->distinct(); + } + + return $query + ->filterByCreditNoteType($this) + ->count($con); + } + + return count($this->collCreditNotes); + } + + /** + * Method called to associate a ChildCreditNote object to this object + * through the ChildCreditNote foreign key attribute. + * + * @param ChildCreditNote $l ChildCreditNote + * @return \CreditNote\Model\CreditNoteType The current object (for fluent API support) + */ + public function addCreditNote(ChildCreditNote $l) + { + if ($this->collCreditNotes === null) { + $this->initCreditNotes(); + $this->collCreditNotesPartial = true; + } + + if (!in_array($l, $this->collCreditNotes->getArrayCopy(), true)) { // only add it if the **same** object is not already associated + $this->doAddCreditNote($l); + } + + return $this; + } + + /** + * @param CreditNote $creditNote The creditNote object to add. + */ + protected function doAddCreditNote($creditNote) + { + $this->collCreditNotes[]= $creditNote; + $creditNote->setCreditNoteType($this); + } + + /** + * @param CreditNote $creditNote The creditNote object to remove. + * @return ChildCreditNoteType The current object (for fluent API support) + */ + public function removeCreditNote($creditNote) + { + if ($this->getCreditNotes()->contains($creditNote)) { + $this->collCreditNotes->remove($this->collCreditNotes->search($creditNote)); + if (null === $this->creditNotesScheduledForDeletion) { + $this->creditNotesScheduledForDeletion = clone $this->collCreditNotes; + $this->creditNotesScheduledForDeletion->clear(); + } + $this->creditNotesScheduledForDeletion[]= clone $creditNote; + $creditNote->setCreditNoteType(null); + } + + return $this; + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNoteType is new, it will return + * an empty collection; or if this CreditNoteType has previously + * been saved, it will retrieve related CreditNotes from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNoteType. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesJoinOrder($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('Order', $joinBehavior); + + return $this->getCreditNotes($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNoteType is new, it will return + * an empty collection; or if this CreditNoteType has previously + * been saved, it will retrieve related CreditNotes from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNoteType. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesJoinCustomer($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('Customer', $joinBehavior); + + return $this->getCreditNotes($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNoteType is new, it will return + * an empty collection; or if this CreditNoteType has previously + * been saved, it will retrieve related CreditNotes from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNoteType. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesJoinCreditNoteRelatedByParentId($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('CreditNoteRelatedByParentId', $joinBehavior); + + return $this->getCreditNotes($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNoteType is new, it will return + * an empty collection; or if this CreditNoteType has previously + * been saved, it will retrieve related CreditNotes from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNoteType. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesJoinCreditNoteStatus($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('CreditNoteStatus', $joinBehavior); + + return $this->getCreditNotes($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNoteType is new, it will return + * an empty collection; or if this CreditNoteType has previously + * been saved, it will retrieve related CreditNotes from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNoteType. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesJoinCurrency($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('Currency', $joinBehavior); + + return $this->getCreditNotes($query, $con); + } + + + /** + * If this collection has already been initialized with + * an identical criteria, it returns the collection. + * Otherwise if this CreditNoteType is new, it will return + * an empty collection; or if this CreditNoteType has previously + * been saved, it will retrieve related CreditNotes from storage. + * + * This method is protected by default in order to keep the public + * api reasonable. You can provide public methods for those you + * actually need in CreditNoteType. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) + * @return Collection|ChildCreditNote[] List of ChildCreditNote objects + */ + public function getCreditNotesJoinCreditNoteAddress($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN) + { + $query = ChildCreditNoteQuery::create(null, $criteria); + $query->joinWith('CreditNoteAddress', $joinBehavior); + + return $this->getCreditNotes($query, $con); + } + + /** + * Clears out the collCreditNoteTypeI18ns collection + * + * This does not modify the database; however, it will remove any associated objects, causing + * them to be refetched by subsequent calls to accessor method. + * + * @return void + * @see addCreditNoteTypeI18ns() + */ + public function clearCreditNoteTypeI18ns() + { + $this->collCreditNoteTypeI18ns = null; // important to set this to NULL since that means it is uninitialized + } + + /** + * Reset is the collCreditNoteTypeI18ns collection loaded partially. + */ + public function resetPartialCreditNoteTypeI18ns($v = true) + { + $this->collCreditNoteTypeI18nsPartial = $v; + } + + /** + * Initializes the collCreditNoteTypeI18ns collection. + * + * By default this just sets the collCreditNoteTypeI18ns collection to an empty array (like clearcollCreditNoteTypeI18ns()); + * however, you may wish to override this method in your stub class to provide setting appropriate + * to your application -- for example, setting the initial array to the values stored in database. + * + * @param boolean $overrideExisting If set to true, the method call initializes + * the collection even if it is not empty + * + * @return void + */ + public function initCreditNoteTypeI18ns($overrideExisting = true) + { + if (null !== $this->collCreditNoteTypeI18ns && !$overrideExisting) { + return; + } + $this->collCreditNoteTypeI18ns = new ObjectCollection(); + $this->collCreditNoteTypeI18ns->setModel('\CreditNote\Model\CreditNoteTypeI18n'); + } + + /** + * Gets an array of ChildCreditNoteTypeI18n objects which contain a foreign key that references this object. + * + * If the $criteria is not null, it is used to always fetch the results from the database. + * Otherwise the results are fetched from the database the first time, then cached. + * Next time the same method is called without $criteria, the cached collection is returned. + * If this ChildCreditNoteType is new, it will return + * an empty collection or the current collection; the criteria is ignored on a new object. + * + * @param Criteria $criteria optional Criteria object to narrow the query + * @param ConnectionInterface $con optional connection object + * @return Collection|ChildCreditNoteTypeI18n[] List of ChildCreditNoteTypeI18n objects + * @throws PropelException + */ + public function getCreditNoteTypeI18ns($criteria = null, ConnectionInterface $con = null) + { + $partial = $this->collCreditNoteTypeI18nsPartial && !$this->isNew(); + if (null === $this->collCreditNoteTypeI18ns || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCreditNoteTypeI18ns) { + // return empty collection + $this->initCreditNoteTypeI18ns(); + } else { + $collCreditNoteTypeI18ns = ChildCreditNoteTypeI18nQuery::create(null, $criteria) + ->filterByCreditNoteType($this) + ->find($con); + + if (null !== $criteria) { + if (false !== $this->collCreditNoteTypeI18nsPartial && count($collCreditNoteTypeI18ns)) { + $this->initCreditNoteTypeI18ns(false); + + foreach ($collCreditNoteTypeI18ns as $obj) { + if (false == $this->collCreditNoteTypeI18ns->contains($obj)) { + $this->collCreditNoteTypeI18ns->append($obj); + } + } + + $this->collCreditNoteTypeI18nsPartial = true; + } + + reset($collCreditNoteTypeI18ns); + + return $collCreditNoteTypeI18ns; + } + + if ($partial && $this->collCreditNoteTypeI18ns) { + foreach ($this->collCreditNoteTypeI18ns as $obj) { + if ($obj->isNew()) { + $collCreditNoteTypeI18ns[] = $obj; + } + } + } + + $this->collCreditNoteTypeI18ns = $collCreditNoteTypeI18ns; + $this->collCreditNoteTypeI18nsPartial = false; + } + } + + return $this->collCreditNoteTypeI18ns; + } + + /** + * Sets a collection of CreditNoteTypeI18n objects related by a one-to-many relationship + * to the current object. + * It will also schedule objects for deletion based on a diff between old objects (aka persisted) + * and new objects from the given Propel collection. + * + * @param Collection $creditNoteTypeI18ns A Propel collection. + * @param ConnectionInterface $con Optional connection object + * @return ChildCreditNoteType The current object (for fluent API support) + */ + public function setCreditNoteTypeI18ns(Collection $creditNoteTypeI18ns, ConnectionInterface $con = null) + { + $creditNoteTypeI18nsToDelete = $this->getCreditNoteTypeI18ns(new Criteria(), $con)->diff($creditNoteTypeI18ns); + + + //since at least one column in the foreign key is at the same time a PK + //we can not just set a PK to NULL in the lines below. We have to store + //a backup of all values, so we are able to manipulate these items based on the onDelete value later. + $this->creditNoteTypeI18nsScheduledForDeletion = clone $creditNoteTypeI18nsToDelete; + + foreach ($creditNoteTypeI18nsToDelete as $creditNoteTypeI18nRemoved) { + $creditNoteTypeI18nRemoved->setCreditNoteType(null); + } + + $this->collCreditNoteTypeI18ns = null; + foreach ($creditNoteTypeI18ns as $creditNoteTypeI18n) { + $this->addCreditNoteTypeI18n($creditNoteTypeI18n); + } + + $this->collCreditNoteTypeI18ns = $creditNoteTypeI18ns; + $this->collCreditNoteTypeI18nsPartial = false; + + return $this; + } + + /** + * Returns the number of related CreditNoteTypeI18n objects. + * + * @param Criteria $criteria + * @param boolean $distinct + * @param ConnectionInterface $con + * @return int Count of related CreditNoteTypeI18n objects. + * @throws PropelException + */ + public function countCreditNoteTypeI18ns(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) + { + $partial = $this->collCreditNoteTypeI18nsPartial && !$this->isNew(); + if (null === $this->collCreditNoteTypeI18ns || null !== $criteria || $partial) { + if ($this->isNew() && null === $this->collCreditNoteTypeI18ns) { + return 0; + } + + if ($partial && !$criteria) { + return count($this->getCreditNoteTypeI18ns()); + } + + $query = ChildCreditNoteTypeI18nQuery::create(null, $criteria); + if ($distinct) { + $query->distinct(); + } + + return $query + ->filterByCreditNoteType($this) + ->count($con); + } + + return count($this->collCreditNoteTypeI18ns); + } + + /** + * Method called to associate a ChildCreditNoteTypeI18n object to this object + * through the ChildCreditNoteTypeI18n foreign key attribute. + * + * @param ChildCreditNoteTypeI18n $l ChildCreditNoteTypeI18n + * @return \CreditNote\Model\CreditNoteType The current object (for fluent API support) + */ + public function addCreditNoteTypeI18n(ChildCreditNoteTypeI18n $l) + { + if ($l && $locale = $l->getLocale()) { + $this->setLocale($locale); + $this->currentTranslations[$locale] = $l; + } + if ($this->collCreditNoteTypeI18ns === null) { + $this->initCreditNoteTypeI18ns(); + $this->collCreditNoteTypeI18nsPartial = true; + } + + if (!in_array($l, $this->collCreditNoteTypeI18ns->getArrayCopy(), true)) { // only add it if the **same** object is not already associated + $this->doAddCreditNoteTypeI18n($l); + } + + return $this; + } + + /** + * @param CreditNoteTypeI18n $creditNoteTypeI18n The creditNoteTypeI18n object to add. + */ + protected function doAddCreditNoteTypeI18n($creditNoteTypeI18n) + { + $this->collCreditNoteTypeI18ns[]= $creditNoteTypeI18n; + $creditNoteTypeI18n->setCreditNoteType($this); + } + + /** + * @param CreditNoteTypeI18n $creditNoteTypeI18n The creditNoteTypeI18n object to remove. + * @return ChildCreditNoteType The current object (for fluent API support) + */ + public function removeCreditNoteTypeI18n($creditNoteTypeI18n) + { + if ($this->getCreditNoteTypeI18ns()->contains($creditNoteTypeI18n)) { + $this->collCreditNoteTypeI18ns->remove($this->collCreditNoteTypeI18ns->search($creditNoteTypeI18n)); + if (null === $this->creditNoteTypeI18nsScheduledForDeletion) { + $this->creditNoteTypeI18nsScheduledForDeletion = clone $this->collCreditNoteTypeI18ns; + $this->creditNoteTypeI18nsScheduledForDeletion->clear(); + } + $this->creditNoteTypeI18nsScheduledForDeletion[]= clone $creditNoteTypeI18n; + $creditNoteTypeI18n->setCreditNoteType(null); + } + + return $this; + } + + /** + * Clears the current object and sets all attributes to their default values + */ + public function clear() + { + $this->id = null; + $this->code = null; + $this->color = null; + $this->position = null; + $this->required_order = null; + $this->created_at = null; + $this->updated_at = null; + $this->alreadyInSave = false; + $this->clearAllReferences(); + $this->applyDefaultValues(); + $this->resetModified(); + $this->setNew(true); + $this->setDeleted(false); + } + + /** + * Resets all references to other model objects or collections of model objects. + * + * This method is a user-space workaround for PHP's inability to garbage collect + * objects with circular references (even in PHP 5.3). This is currently necessary + * when using Propel in certain daemon or large-volume/high-memory operations. + * + * @param boolean $deep Whether to also clear the references on all referrer objects. + */ + public function clearAllReferences($deep = false) + { + if ($deep) { + if ($this->collCreditNotes) { + foreach ($this->collCreditNotes as $o) { + $o->clearAllReferences($deep); + } + } + if ($this->collCreditNoteTypeI18ns) { + foreach ($this->collCreditNoteTypeI18ns as $o) { + $o->clearAllReferences($deep); + } + } + } // if ($deep) + + // i18n behavior + $this->currentLocale = 'en_US'; + $this->currentTranslations = null; + + $this->collCreditNotes = null; + $this->collCreditNoteTypeI18ns = null; + } + + /** + * Return the string representation of this object + * + * @return string + */ + public function __toString() + { + return (string) $this->exportTo(CreditNoteTypeTableMap::DEFAULT_STRING_FORMAT); + } + + // i18n behavior + + /** + * Sets the locale for translations + * + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * + * @return ChildCreditNoteType The current object (for fluent API support) + */ + public function setLocale($locale = 'en_US') + { + $this->currentLocale = $locale; + + return $this; + } + + /** + * Gets the locale for translations + * + * @return string $locale Locale to use for the translation, e.g. 'fr_FR' + */ + public function getLocale() + { + return $this->currentLocale; + } + + /** + * Returns the current translation for a given locale + * + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object + * + * @return ChildCreditNoteTypeI18n */ + public function getTranslation($locale = 'en_US', ConnectionInterface $con = null) + { + if (!isset($this->currentTranslations[$locale])) { + if (null !== $this->collCreditNoteTypeI18ns) { + foreach ($this->collCreditNoteTypeI18ns as $translation) { + if ($translation->getLocale() == $locale) { + $this->currentTranslations[$locale] = $translation; + + return $translation; + } + } + } + if ($this->isNew()) { + $translation = new ChildCreditNoteTypeI18n(); + $translation->setLocale($locale); + } else { + $translation = ChildCreditNoteTypeI18nQuery::create() + ->filterByPrimaryKey(array($this->getPrimaryKey(), $locale)) + ->findOneOrCreate($con); + $this->currentTranslations[$locale] = $translation; + } + $this->addCreditNoteTypeI18n($translation); + } + + return $this->currentTranslations[$locale]; + } + + /** + * Remove the translation for a given locale + * + * @param string $locale Locale to use for the translation, e.g. 'fr_FR' + * @param ConnectionInterface $con an optional connection object + * + * @return ChildCreditNoteType The current object (for fluent API support) + */ + public function removeTranslation($locale = 'en_US', ConnectionInterface $con = null) + { + if (!$this->isNew()) { + ChildCreditNoteTypeI18nQuery::create() + ->filterByPrimaryKey(array($this->getPrimaryKey(), $locale)) + ->delete($con); + } + if (isset($this->currentTranslations[$locale])) { + unset($this->currentTranslations[$locale]); + } + foreach ($this->collCreditNoteTypeI18ns as $key => $translation) { + if ($translation->getLocale() == $locale) { + unset($this->collCreditNoteTypeI18ns[$key]); + break; + } + } + + return $this; + } + + /** + * Returns the current translation + * + * @param ConnectionInterface $con an optional connection object + * + * @return ChildCreditNoteTypeI18n */ + public function getCurrentTranslation(ConnectionInterface $con = null) + { + return $this->getTranslation($this->getLocale(), $con); + } + + + /** + * Get the [title] column value. + * + * @return string + */ + public function getTitle() + { + return $this->getCurrentTranslation()->getTitle(); + } + + + /** + * Set the value of [title] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteTypeI18n The current object (for fluent API support) + */ + public function setTitle($v) + { $this->getCurrentTranslation()->setTitle($v); + + return $this; + } + + + /** + * Get the [description] column value. + * + * @return string + */ + public function getDescription() + { + return $this->getCurrentTranslation()->getDescription(); + } + + + /** + * Set the value of [description] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteTypeI18n The current object (for fluent API support) + */ + public function setDescription($v) + { $this->getCurrentTranslation()->setDescription($v); + + return $this; + } + + + /** + * Get the [chapo] column value. + * + * @return string + */ + public function getChapo() + { + return $this->getCurrentTranslation()->getChapo(); + } + + + /** + * Set the value of [chapo] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteTypeI18n The current object (for fluent API support) + */ + public function setChapo($v) + { $this->getCurrentTranslation()->setChapo($v); + + return $this; + } + + + /** + * Get the [postscriptum] column value. + * + * @return string + */ + public function getPostscriptum() + { + return $this->getCurrentTranslation()->getPostscriptum(); + } + + + /** + * Set the value of [postscriptum] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteTypeI18n The current object (for fluent API support) + */ + public function setPostscriptum($v) + { $this->getCurrentTranslation()->setPostscriptum($v); + + return $this; + } + + // timestampable behavior + + /** + * Mark the current object so that the update date doesn't get updated during next save + * + * @return ChildCreditNoteType The current object (for fluent API support) + */ + public function keepUpdateDateUnchanged() + { + $this->modifiedColumns[CreditNoteTypeTableMap::UPDATED_AT] = true; + + return $this; + } + + /** + * Code to be run before persisting the object + * @param ConnectionInterface $con + * @return boolean + */ + public function preSave(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after persisting the object + * @param ConnectionInterface $con + */ + public function postSave(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before inserting to database + * @param ConnectionInterface $con + * @return boolean + */ + public function preInsert(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after inserting to database + * @param ConnectionInterface $con + */ + public function postInsert(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before updating the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preUpdate(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after updating the object in database + * @param ConnectionInterface $con + */ + public function postUpdate(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before deleting the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preDelete(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after deleting the object in database + * @param ConnectionInterface $con + */ + public function postDelete(ConnectionInterface $con = null) + { + + } + + + /** + * Derived method to catches calls to undefined methods. + * + * Provides magic import/export method support (fromXML()/toXML(), fromYAML()/toYAML(), etc.). + * Allows to define default __call() behavior if you overwrite __call() + * + * @param string $name + * @param mixed $params + * + * @return array|string + */ + public function __call($name, $params) + { + if (0 === strpos($name, 'get')) { + $virtualColumn = substr($name, 3); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + + $virtualColumn = lcfirst($virtualColumn); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + } + + if (0 === strpos($name, 'from')) { + $format = substr($name, 4); + + return $this->importFrom($format, reset($params)); + } + + if (0 === strpos($name, 'to')) { + $format = substr($name, 2); + $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true; + + return $this->exportTo($format, $includeLazyLoadColumns); + } + + throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name)); + } + +} diff --git a/local/modules/CreditNote/Model/Base/CreditNoteTypeI18n.php b/local/modules/CreditNote/Model/Base/CreditNoteTypeI18n.php new file mode 100644 index 000000000..b2cd7bdc5 --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CreditNoteTypeI18n.php @@ -0,0 +1,1442 @@ +locale = 'en_US'; + } + + /** + * Initializes internal state of CreditNote\Model\Base\CreditNoteTypeI18n object. + * @see applyDefaults() + */ + public function __construct() + { + $this->applyDefaultValues(); + } + + /** + * Returns whether the object has been modified. + * + * @return boolean True if the object has been modified. + */ + public function isModified() + { + return !!$this->modifiedColumns; + } + + /** + * Has specified column been modified? + * + * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID + * @return boolean True if $col has been modified. + */ + public function isColumnModified($col) + { + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); + } + + /** + * Get the columns that have been modified in this object. + * @return array A unique list of the modified column names for this object. + */ + public function getModifiedColumns() + { + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; + } + + /** + * Returns whether the object has ever been saved. This will + * be false, if the object was retrieved from storage or was created + * and then saved. + * + * @return boolean true, if the object has never been persisted. + */ + public function isNew() + { + return $this->new; + } + + /** + * Setter for the isNew attribute. This method will be called + * by Propel-generated children and objects. + * + * @param boolean $b the state of the object. + */ + public function setNew($b) + { + $this->new = (Boolean) $b; + } + + /** + * Whether this object has been deleted. + * @return boolean The deleted state of this object. + */ + public function isDeleted() + { + return $this->deleted; + } + + /** + * Specify whether this object has been deleted. + * @param boolean $b The deleted state of this object. + * @return void + */ + public function setDeleted($b) + { + $this->deleted = (Boolean) $b; + } + + /** + * Sets the modified state for the object to be false. + * @param string $col If supplied, only the specified column is reset. + * @return void + */ + public function resetModified($col = null) + { + if (null !== $col) { + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); + } + } else { + $this->modifiedColumns = array(); + } + } + + /** + * Compares this with another CreditNoteTypeI18n instance. If + * obj is an instance of CreditNoteTypeI18n, delegates to + * equals(CreditNoteTypeI18n). Otherwise, returns false. + * + * @param mixed $obj The object to compare to. + * @return boolean Whether equal to the object specified. + */ + public function equals($obj) + { + $thisclazz = get_class($this); + if (!is_object($obj) || !($obj instanceof $thisclazz)) { + return false; + } + + if ($this === $obj) { + return true; + } + + if (null === $this->getPrimaryKey() + || null === $obj->getPrimaryKey()) { + return false; + } + + return $this->getPrimaryKey() === $obj->getPrimaryKey(); + } + + /** + * If the primary key is not null, return the hashcode of the + * primary key. Otherwise, return the hash code of the object. + * + * @return int Hashcode + */ + public function hashCode() + { + if (null !== $this->getPrimaryKey()) { + return crc32(serialize($this->getPrimaryKey())); + } + + return crc32(serialize(clone $this)); + } + + /** + * Get the associative array of the virtual columns in this object + * + * @return array + */ + public function getVirtualColumns() + { + return $this->virtualColumns; + } + + /** + * Checks the existence of a virtual column in this object + * + * @param string $name The virtual column name + * @return boolean + */ + public function hasVirtualColumn($name) + { + return array_key_exists($name, $this->virtualColumns); + } + + /** + * Get the value of a virtual column in this object + * + * @param string $name The virtual column name + * @return mixed + * + * @throws PropelException + */ + public function getVirtualColumn($name) + { + if (!$this->hasVirtualColumn($name)) { + throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name)); + } + + return $this->virtualColumns[$name]; + } + + /** + * Set the value of a virtual column in this object + * + * @param string $name The virtual column name + * @param mixed $value The value to give to the virtual column + * + * @return CreditNoteTypeI18n The current object, for fluid interface + */ + public function setVirtualColumn($name, $value) + { + $this->virtualColumns[$name] = $value; + + return $this; + } + + /** + * Logs a message using Propel::log(). + * + * @param string $msg + * @param int $priority One of the Propel::LOG_* logging levels + * @return boolean + */ + protected function log($msg, $priority = Propel::LOG_INFO) + { + return Propel::log(get_class($this) . ': ' . $msg, $priority); + } + + /** + * Populate the current object from a string, using a given parser format + * + * $book = new Book(); + * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, + * or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param string $data The source data to import from + * + * @return CreditNoteTypeI18n The current object, for fluid interface + */ + public function importFrom($parser, $data) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + $this->fromArray($parser->toArray($data), TableMap::TYPE_PHPNAME); + + return $this; + } + + /** + * Export the current object properties to a string, using a given parser format + * + * $book = BookQuery::create()->findPk(9012); + * echo $book->exportTo('JSON'); + * => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE. + * @return string The exported data + */ + public function exportTo($parser, $includeLazyLoadColumns = true) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true)); + } + + /** + * Clean up internal collections prior to serializing + * Avoids recursive loops that turn into segmentation faults when serializing + */ + public function __sleep() + { + $this->clearAllReferences(); + + return array_keys(get_object_vars($this)); + } + + /** + * Get the [id] column value. + * + * @return int + */ + public function getId() + { + + return $this->id; + } + + /** + * Get the [locale] column value. + * + * @return string + */ + public function getLocale() + { + + return $this->locale; + } + + /** + * Get the [title] column value. + * + * @return string + */ + public function getTitle() + { + + return $this->title; + } + + /** + * Get the [description] column value. + * + * @return string + */ + public function getDescription() + { + + return $this->description; + } + + /** + * Get the [chapo] column value. + * + * @return string + */ + public function getChapo() + { + + return $this->chapo; + } + + /** + * Get the [postscriptum] column value. + * + * @return string + */ + public function getPostscriptum() + { + + return $this->postscriptum; + } + + /** + * Set the value of [id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteTypeI18n The current object (for fluent API support) + */ + public function setId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->id !== $v) { + $this->id = $v; + $this->modifiedColumns[CreditNoteTypeI18nTableMap::ID] = true; + } + + if ($this->aCreditNoteType !== null && $this->aCreditNoteType->getId() !== $v) { + $this->aCreditNoteType = null; + } + + + return $this; + } // setId() + + /** + * Set the value of [locale] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteTypeI18n The current object (for fluent API support) + */ + public function setLocale($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->locale !== $v) { + $this->locale = $v; + $this->modifiedColumns[CreditNoteTypeI18nTableMap::LOCALE] = true; + } + + + return $this; + } // setLocale() + + /** + * Set the value of [title] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteTypeI18n The current object (for fluent API support) + */ + public function setTitle($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->title !== $v) { + $this->title = $v; + $this->modifiedColumns[CreditNoteTypeI18nTableMap::TITLE] = true; + } + + + return $this; + } // setTitle() + + /** + * Set the value of [description] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteTypeI18n The current object (for fluent API support) + */ + public function setDescription($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->description !== $v) { + $this->description = $v; + $this->modifiedColumns[CreditNoteTypeI18nTableMap::DESCRIPTION] = true; + } + + + return $this; + } // setDescription() + + /** + * Set the value of [chapo] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteTypeI18n The current object (for fluent API support) + */ + public function setChapo($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->chapo !== $v) { + $this->chapo = $v; + $this->modifiedColumns[CreditNoteTypeI18nTableMap::CHAPO] = true; + } + + + return $this; + } // setChapo() + + /** + * Set the value of [postscriptum] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteTypeI18n The current object (for fluent API support) + */ + public function setPostscriptum($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->postscriptum !== $v) { + $this->postscriptum = $v; + $this->modifiedColumns[CreditNoteTypeI18nTableMap::POSTSCRIPTUM] = true; + } + + + return $this; + } // setPostscriptum() + + /** + * Indicates whether the columns in this object are only set to default values. + * + * This method can be used in conjunction with isModified() to indicate whether an object is both + * modified _and_ has some values set which are non-default. + * + * @return boolean Whether the columns in this object are only been set with default values. + */ + public function hasOnlyDefaultValues() + { + if ($this->locale !== 'en_US') { + return false; + } + + // otherwise, everything was equal, so return TRUE + return true; + } // hasOnlyDefaultValues() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (0-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param array $row The row returned by DataFetcher->fetch(). + * @param int $startcol 0-based offset column which indicates which restultset column to start with. + * @param boolean $rehydrate Whether this object is being re-hydrated from the database. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM) + { + try { + + + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CreditNoteTypeI18nTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; + $this->id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CreditNoteTypeI18nTableMap::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)]; + $this->locale = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CreditNoteTypeI18nTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)]; + $this->title = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CreditNoteTypeI18nTableMap::translateFieldName('Description', TableMap::TYPE_PHPNAME, $indexType)]; + $this->description = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CreditNoteTypeI18nTableMap::translateFieldName('Chapo', TableMap::TYPE_PHPNAME, $indexType)]; + $this->chapo = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CreditNoteTypeI18nTableMap::translateFieldName('Postscriptum', TableMap::TYPE_PHPNAME, $indexType)]; + $this->postscriptum = (null !== $col) ? (string) $col : null; + $this->resetModified(); + + $this->setNew(false); + + if ($rehydrate) { + $this->ensureConsistency(); + } + + return $startcol + 6; // 6 = CreditNoteTypeI18nTableMap::NUM_HYDRATE_COLUMNS. + + } catch (Exception $e) { + throw new PropelException("Error populating \CreditNote\Model\CreditNoteTypeI18n object", 0, $e); + } + } + + /** + * Checks and repairs the internal consistency of the object. + * + * This method is executed after an already-instantiated object is re-hydrated + * from the database. It exists to check any foreign keys to make sure that + * the objects related to the current object are correct based on foreign key. + * + * You can override this method in the stub class, but you should always invoke + * the base method from the overridden method (i.e. parent::ensureConsistency()), + * in case your model changes. + * + * @throws PropelException + */ + public function ensureConsistency() + { + if ($this->aCreditNoteType !== null && $this->id !== $this->aCreditNoteType->getId()) { + $this->aCreditNoteType = null; + } + } // ensureConsistency + + /** + * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. + * + * This will only work if the object has been saved and has a valid primary key set. + * + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @return void + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + */ + public function reload($deep = false, ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("Cannot reload a deleted object."); + } + + if ($this->isNew()) { + throw new PropelException("Cannot reload an unsaved object."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CreditNoteTypeI18nTableMap::DATABASE_NAME); + } + + // We don't need to alter the object instance pool; we're just modifying this instance + // already in the pool. + + $dataFetcher = ChildCreditNoteTypeI18nQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con); + $row = $dataFetcher->fetch(); + $dataFetcher->close(); + if (!$row) { + throw new PropelException('Cannot find matching row in the database to reload object values.'); + } + $this->hydrate($row, 0, true, $dataFetcher->getIndexType()); // rehydrate + + if ($deep) { // also de-associate any related objects? + + $this->aCreditNoteType = null; + } // if (deep) + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param ConnectionInterface $con + * @return void + * @throws PropelException + * @see CreditNoteTypeI18n::setDeleted() + * @see CreditNoteTypeI18n::isDeleted() + */ + public function delete(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteTypeI18nTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + try { + $deleteQuery = ChildCreditNoteTypeI18nQuery::create() + ->filterByPrimaryKey($this->getPrimaryKey()); + $ret = $this->preDelete($con); + if ($ret) { + $deleteQuery->delete($con); + $this->postDelete($con); + $con->commit(); + $this->setDeleted(true); + } else { + $con->commit(); + } + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Persists this object to the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All modified related objects will also be persisted in the doSave() + * method. This method wraps all precipitate database operations in a + * single transaction. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() + */ + public function save(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteTypeI18nTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + $isInsert = $this->isNew(); + try { + $ret = $this->preSave($con); + if ($isInsert) { + $ret = $ret && $this->preInsert($con); + } else { + $ret = $ret && $this->preUpdate($con); + } + if ($ret) { + $affectedRows = $this->doSave($con); + if ($isInsert) { + $this->postInsert($con); + } else { + $this->postUpdate($con); + } + $this->postSave($con); + CreditNoteTypeI18nTableMap::addInstanceToPool($this); + } else { + $affectedRows = 0; + } + $con->commit(); + + return $affectedRows; + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Performs the work of inserting or updating the row in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() + */ + protected function doSave(ConnectionInterface $con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + // We call the save method on the following object(s) if they + // were passed to this object by their corresponding set + // method. This object relates to these object(s) by a + // foreign key reference. + + if ($this->aCreditNoteType !== null) { + if ($this->aCreditNoteType->isModified() || $this->aCreditNoteType->isNew()) { + $affectedRows += $this->aCreditNoteType->save($con); + } + $this->setCreditNoteType($this->aCreditNoteType); + } + + if ($this->isNew() || $this->isModified()) { + // persist changes + if ($this->isNew()) { + $this->doInsert($con); + } else { + $this->doUpdate($con); + } + $affectedRows += 1; + $this->resetModified(); + } + + $this->alreadyInSave = false; + + } + + return $affectedRows; + } // doSave() + + /** + * Insert the row in the database. + * + * @param ConnectionInterface $con + * + * @throws PropelException + * @see doSave() + */ + protected function doInsert(ConnectionInterface $con) + { + $modifiedColumns = array(); + $index = 0; + + + // check the columns in natural order for more readable SQL queries + if ($this->isColumnModified(CreditNoteTypeI18nTableMap::ID)) { + $modifiedColumns[':p' . $index++] = 'ID'; + } + if ($this->isColumnModified(CreditNoteTypeI18nTableMap::LOCALE)) { + $modifiedColumns[':p' . $index++] = 'LOCALE'; + } + if ($this->isColumnModified(CreditNoteTypeI18nTableMap::TITLE)) { + $modifiedColumns[':p' . $index++] = 'TITLE'; + } + if ($this->isColumnModified(CreditNoteTypeI18nTableMap::DESCRIPTION)) { + $modifiedColumns[':p' . $index++] = 'DESCRIPTION'; + } + if ($this->isColumnModified(CreditNoteTypeI18nTableMap::CHAPO)) { + $modifiedColumns[':p' . $index++] = 'CHAPO'; + } + if ($this->isColumnModified(CreditNoteTypeI18nTableMap::POSTSCRIPTUM)) { + $modifiedColumns[':p' . $index++] = 'POSTSCRIPTUM'; + } + + $sql = sprintf( + 'INSERT INTO credit_note_type_i18n (%s) VALUES (%s)', + implode(', ', $modifiedColumns), + implode(', ', array_keys($modifiedColumns)) + ); + + try { + $stmt = $con->prepare($sql); + foreach ($modifiedColumns as $identifier => $columnName) { + switch ($columnName) { + case 'ID': + $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT); + break; + case 'LOCALE': + $stmt->bindValue($identifier, $this->locale, PDO::PARAM_STR); + break; + case 'TITLE': + $stmt->bindValue($identifier, $this->title, PDO::PARAM_STR); + break; + case 'DESCRIPTION': + $stmt->bindValue($identifier, $this->description, PDO::PARAM_STR); + break; + case 'CHAPO': + $stmt->bindValue($identifier, $this->chapo, PDO::PARAM_STR); + break; + case 'POSTSCRIPTUM': + $stmt->bindValue($identifier, $this->postscriptum, PDO::PARAM_STR); + break; + } + } + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e); + } + + $this->setNew(false); + } + + /** + * Update the row in the database. + * + * @param ConnectionInterface $con + * + * @return Integer Number of updated rows + * @see doSave() + */ + protected function doUpdate(ConnectionInterface $con) + { + $selectCriteria = $this->buildPkeyCriteria(); + $valuesCriteria = $this->buildCriteria(); + + return $selectCriteria->doUpdate($valuesCriteria, $con); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. + */ + public function getByName($name, $type = TableMap::TYPE_PHPNAME) + { + $pos = CreditNoteTypeI18nTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + $field = $this->getByPosition($pos); + + return $field; + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch ($pos) { + case 0: + return $this->getId(); + break; + case 1: + return $this->getLocale(); + break; + case 2: + return $this->getTitle(); + break; + case 3: + return $this->getDescription(); + break; + case 4: + return $this->getChapo(); + break; + case 5: + return $this->getPostscriptum(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * + * @return array an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false) + { + if (isset($alreadyDumpedObjects['CreditNoteTypeI18n'][serialize($this->getPrimaryKey())])) { + return '*RECURSION*'; + } + $alreadyDumpedObjects['CreditNoteTypeI18n'][serialize($this->getPrimaryKey())] = true; + $keys = CreditNoteTypeI18nTableMap::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getId(), + $keys[1] => $this->getLocale(), + $keys[2] => $this->getTitle(), + $keys[3] => $this->getDescription(), + $keys[4] => $this->getChapo(), + $keys[5] => $this->getPostscriptum(), + ); + $virtualColumns = $this->virtualColumns; + foreach ($virtualColumns as $key => $virtualColumn) { + $result[$key] = $virtualColumn; + } + + if ($includeForeignObjects) { + if (null !== $this->aCreditNoteType) { + $result['CreditNoteType'] = $this->aCreditNoteType->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + } + + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return void + */ + public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) + { + $pos = CreditNoteTypeI18nTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch ($pos) { + case 0: + $this->setId($value); + break; + case 1: + $this->setLocale($value); + break; + case 2: + $this->setTitle($value); + break; + case 3: + $this->setDescription($value); + break; + case 4: + $this->setChapo($value); + break; + case 5: + $this->setPostscriptum($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * The default key type is the column's TableMap::TYPE_PHPNAME. + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) + { + $keys = CreditNoteTypeI18nTableMap::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setLocale($arr[$keys[1]]); + if (array_key_exists($keys[2], $arr)) $this->setTitle($arr[$keys[2]]); + if (array_key_exists($keys[3], $arr)) $this->setDescription($arr[$keys[3]]); + if (array_key_exists($keys[4], $arr)) $this->setChapo($arr[$keys[4]]); + if (array_key_exists($keys[5], $arr)) $this->setPostscriptum($arr[$keys[5]]); + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(CreditNoteTypeI18nTableMap::DATABASE_NAME); + + if ($this->isColumnModified(CreditNoteTypeI18nTableMap::ID)) $criteria->add(CreditNoteTypeI18nTableMap::ID, $this->id); + if ($this->isColumnModified(CreditNoteTypeI18nTableMap::LOCALE)) $criteria->add(CreditNoteTypeI18nTableMap::LOCALE, $this->locale); + if ($this->isColumnModified(CreditNoteTypeI18nTableMap::TITLE)) $criteria->add(CreditNoteTypeI18nTableMap::TITLE, $this->title); + if ($this->isColumnModified(CreditNoteTypeI18nTableMap::DESCRIPTION)) $criteria->add(CreditNoteTypeI18nTableMap::DESCRIPTION, $this->description); + if ($this->isColumnModified(CreditNoteTypeI18nTableMap::CHAPO)) $criteria->add(CreditNoteTypeI18nTableMap::CHAPO, $this->chapo); + if ($this->isColumnModified(CreditNoteTypeI18nTableMap::POSTSCRIPTUM)) $criteria->add(CreditNoteTypeI18nTableMap::POSTSCRIPTUM, $this->postscriptum); + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(CreditNoteTypeI18nTableMap::DATABASE_NAME); + $criteria->add(CreditNoteTypeI18nTableMap::ID, $this->id); + $criteria->add(CreditNoteTypeI18nTableMap::LOCALE, $this->locale); + + return $criteria; + } + + /** + * Returns the composite primary key for this object. + * The array elements will be in same order as specified in XML. + * @return array + */ + public function getPrimaryKey() + { + $pks = array(); + $pks[0] = $this->getId(); + $pks[1] = $this->getLocale(); + + return $pks; + } + + /** + * Set the [composite] primary key. + * + * @param array $keys The elements of the composite key (order must match the order in XML file). + * @return void + */ + public function setPrimaryKey($keys) + { + $this->setId($keys[0]); + $this->setLocale($keys[1]); + } + + /** + * Returns true if the primary key for this object is null. + * @return boolean + */ + public function isPrimaryKeyNull() + { + + return (null === $this->getId()) && (null === $this->getLocale()); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of \CreditNote\Model\CreditNoteTypeI18n (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false, $makeNew = true) + { + $copyObj->setId($this->getId()); + $copyObj->setLocale($this->getLocale()); + $copyObj->setTitle($this->getTitle()); + $copyObj->setDescription($this->getDescription()); + $copyObj->setChapo($this->getChapo()); + $copyObj->setPostscriptum($this->getPostscriptum()); + if ($makeNew) { + $copyObj->setNew(true); + } + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \CreditNote\Model\CreditNoteTypeI18n Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + + return $copyObj; + } + + /** + * Declares an association between this object and a ChildCreditNoteType object. + * + * @param ChildCreditNoteType $v + * @return \CreditNote\Model\CreditNoteTypeI18n The current object (for fluent API support) + * @throws PropelException + */ + public function setCreditNoteType(ChildCreditNoteType $v = null) + { + if ($v === null) { + $this->setId(NULL); + } else { + $this->setId($v->getId()); + } + + $this->aCreditNoteType = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCreditNoteType object, it will not be re-added. + if ($v !== null) { + $v->addCreditNoteTypeI18n($this); + } + + + return $this; + } + + + /** + * Get the associated ChildCreditNoteType object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCreditNoteType The associated ChildCreditNoteType object. + * @throws PropelException + */ + public function getCreditNoteType(ConnectionInterface $con = null) + { + if ($this->aCreditNoteType === null && ($this->id !== null)) { + $this->aCreditNoteType = ChildCreditNoteTypeQuery::create()->findPk($this->id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCreditNoteType->addCreditNoteTypeI18ns($this); + */ + } + + return $this->aCreditNoteType; + } + + /** + * Clears the current object and sets all attributes to their default values + */ + public function clear() + { + $this->id = null; + $this->locale = null; + $this->title = null; + $this->description = null; + $this->chapo = null; + $this->postscriptum = null; + $this->alreadyInSave = false; + $this->clearAllReferences(); + $this->applyDefaultValues(); + $this->resetModified(); + $this->setNew(true); + $this->setDeleted(false); + } + + /** + * Resets all references to other model objects or collections of model objects. + * + * This method is a user-space workaround for PHP's inability to garbage collect + * objects with circular references (even in PHP 5.3). This is currently necessary + * when using Propel in certain daemon or large-volume/high-memory operations. + * + * @param boolean $deep Whether to also clear the references on all referrer objects. + */ + public function clearAllReferences($deep = false) + { + if ($deep) { + } // if ($deep) + + $this->aCreditNoteType = null; + } + + /** + * Return the string representation of this object + * + * @return string + */ + public function __toString() + { + return (string) $this->exportTo(CreditNoteTypeI18nTableMap::DEFAULT_STRING_FORMAT); + } + + /** + * Code to be run before persisting the object + * @param ConnectionInterface $con + * @return boolean + */ + public function preSave(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after persisting the object + * @param ConnectionInterface $con + */ + public function postSave(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before inserting to database + * @param ConnectionInterface $con + * @return boolean + */ + public function preInsert(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after inserting to database + * @param ConnectionInterface $con + */ + public function postInsert(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before updating the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preUpdate(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after updating the object in database + * @param ConnectionInterface $con + */ + public function postUpdate(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before deleting the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preDelete(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after deleting the object in database + * @param ConnectionInterface $con + */ + public function postDelete(ConnectionInterface $con = null) + { + + } + + + /** + * Derived method to catches calls to undefined methods. + * + * Provides magic import/export method support (fromXML()/toXML(), fromYAML()/toYAML(), etc.). + * Allows to define default __call() behavior if you overwrite __call() + * + * @param string $name + * @param mixed $params + * + * @return array|string + */ + public function __call($name, $params) + { + if (0 === strpos($name, 'get')) { + $virtualColumn = substr($name, 3); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + + $virtualColumn = lcfirst($virtualColumn); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + } + + if (0 === strpos($name, 'from')) { + $format = substr($name, 4); + + return $this->importFrom($format, reset($params)); + } + + if (0 === strpos($name, 'to')) { + $format = substr($name, 2); + $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true; + + return $this->exportTo($format, $includeLazyLoadColumns); + } + + throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name)); + } + +} diff --git a/local/modules/CreditNote/Model/Base/CreditNoteTypeI18nQuery.php b/local/modules/CreditNote/Model/Base/CreditNoteTypeI18nQuery.php new file mode 100644 index 000000000..b0676533d --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CreditNoteTypeI18nQuery.php @@ -0,0 +1,607 @@ +setModelAlias($modelAlias); + } + if ($criteria instanceof Criteria) { + $query->mergeWith($criteria); + } + + return $query; + } + + /** + * Find object by primary key. + * Propel uses the instance pool to skip the database if the object exists. + * Go fast if the query is untouched. + * + * + * $obj = $c->findPk(array(12, 34), $con); + * + * + * @param array[$id, $locale] $key Primary key to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ChildCreditNoteTypeI18n|array|mixed the result, formatted by the current formatter + */ + public function findPk($key, $con = null) + { + if ($key === null) { + return null; + } + if ((null !== ($obj = CreditNoteTypeI18nTableMap::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) { + // the object is already in the instance pool + return $obj; + } + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CreditNoteTypeI18nTableMap::DATABASE_NAME); + } + $this->basePreSelect($con); + if ($this->formatter || $this->modelAlias || $this->with || $this->select + || $this->selectColumns || $this->asColumns || $this->selectModifiers + || $this->map || $this->having || $this->joins) { + return $this->findPkComplex($key, $con); + } else { + return $this->findPkSimple($key, $con); + } + } + + /** + * Find object by primary key using raw SQL to go fast. + * Bypass doSelect() and the object formatter by using generated code. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCreditNoteTypeI18n A model object, or null if the key is not found + */ + protected function findPkSimple($key, $con) + { + $sql = 'SELECT ID, LOCALE, TITLE, DESCRIPTION, CHAPO, POSTSCRIPTUM FROM credit_note_type_i18n WHERE ID = :p0 AND LOCALE = :p1'; + try { + $stmt = $con->prepare($sql); + $stmt->bindValue(':p0', $key[0], PDO::PARAM_INT); + $stmt->bindValue(':p1', $key[1], PDO::PARAM_STR); + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e); + } + $obj = null; + if ($row = $stmt->fetch(\PDO::FETCH_NUM)) { + $obj = new ChildCreditNoteTypeI18n(); + $obj->hydrate($row); + CreditNoteTypeI18nTableMap::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1]))); + } + $stmt->closeCursor(); + + return $obj; + } + + /** + * Find object by primary key. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCreditNoteTypeI18n|array|mixed the result, formatted by the current formatter + */ + protected function findPkComplex($key, $con) + { + // As the query uses a PK condition, no limit(1) is necessary. + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKey($key) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher); + } + + /** + * Find objects by primary key + * + * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); + * + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter + */ + public function findPks($keys, $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getReadConnection($this->getDbName()); + } + $this->basePreSelect($con); + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKeys($keys) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->format($dataFetcher); + } + + /** + * Filter the query by primary key + * + * @param mixed $key Primary key to use for the query + * + * @return ChildCreditNoteTypeI18nQuery The current query, for fluid interface + */ + public function filterByPrimaryKey($key) + { + $this->addUsingAlias(CreditNoteTypeI18nTableMap::ID, $key[0], Criteria::EQUAL); + $this->addUsingAlias(CreditNoteTypeI18nTableMap::LOCALE, $key[1], Criteria::EQUAL); + + return $this; + } + + /** + * Filter the query by a list of primary keys + * + * @param array $keys The list of primary key to use for the query + * + * @return ChildCreditNoteTypeI18nQuery The current query, for fluid interface + */ + public function filterByPrimaryKeys($keys) + { + if (empty($keys)) { + return $this->add(null, '1<>1', Criteria::CUSTOM); + } + foreach ($keys as $key) { + $cton0 = $this->getNewCriterion(CreditNoteTypeI18nTableMap::ID, $key[0], Criteria::EQUAL); + $cton1 = $this->getNewCriterion(CreditNoteTypeI18nTableMap::LOCALE, $key[1], Criteria::EQUAL); + $cton0->addAnd($cton1); + $this->addOr($cton0); + } + + return $this; + } + + /** + * Filter the query on the id column + * + * Example usage: + * + * $query->filterById(1234); // WHERE id = 1234 + * $query->filterById(array(12, 34)); // WHERE id IN (12, 34) + * $query->filterById(array('min' => 12)); // WHERE id > 12 + * + * + * @see filterByCreditNoteType() + * + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteTypeI18nQuery The current query, for fluid interface + */ + public function filterById($id = null, $comparison = null) + { + if (is_array($id)) { + $useMinMax = false; + if (isset($id['min'])) { + $this->addUsingAlias(CreditNoteTypeI18nTableMap::ID, $id['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($id['max'])) { + $this->addUsingAlias(CreditNoteTypeI18nTableMap::ID, $id['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTypeI18nTableMap::ID, $id, $comparison); + } + + /** + * Filter the query on the locale column + * + * Example usage: + * + * $query->filterByLocale('fooValue'); // WHERE locale = 'fooValue' + * $query->filterByLocale('%fooValue%'); // WHERE locale LIKE '%fooValue%' + * + * + * @param string $locale The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteTypeI18nQuery The current query, for fluid interface + */ + public function filterByLocale($locale = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($locale)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $locale)) { + $locale = str_replace('*', '%', $locale); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteTypeI18nTableMap::LOCALE, $locale, $comparison); + } + + /** + * Filter the query on the title column + * + * Example usage: + * + * $query->filterByTitle('fooValue'); // WHERE title = 'fooValue' + * $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%' + * + * + * @param string $title The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteTypeI18nQuery The current query, for fluid interface + */ + public function filterByTitle($title = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($title)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $title)) { + $title = str_replace('*', '%', $title); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteTypeI18nTableMap::TITLE, $title, $comparison); + } + + /** + * Filter the query on the description column + * + * Example usage: + * + * $query->filterByDescription('fooValue'); // WHERE description = 'fooValue' + * $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%' + * + * + * @param string $description The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteTypeI18nQuery The current query, for fluid interface + */ + public function filterByDescription($description = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($description)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $description)) { + $description = str_replace('*', '%', $description); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteTypeI18nTableMap::DESCRIPTION, $description, $comparison); + } + + /** + * Filter the query on the chapo column + * + * Example usage: + * + * $query->filterByChapo('fooValue'); // WHERE chapo = 'fooValue' + * $query->filterByChapo('%fooValue%'); // WHERE chapo LIKE '%fooValue%' + * + * + * @param string $chapo The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteTypeI18nQuery The current query, for fluid interface + */ + public function filterByChapo($chapo = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($chapo)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $chapo)) { + $chapo = str_replace('*', '%', $chapo); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteTypeI18nTableMap::CHAPO, $chapo, $comparison); + } + + /** + * Filter the query on the postscriptum column + * + * Example usage: + * + * $query->filterByPostscriptum('fooValue'); // WHERE postscriptum = 'fooValue' + * $query->filterByPostscriptum('%fooValue%'); // WHERE postscriptum LIKE '%fooValue%' + * + * + * @param string $postscriptum The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteTypeI18nQuery The current query, for fluid interface + */ + public function filterByPostscriptum($postscriptum = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($postscriptum)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $postscriptum)) { + $postscriptum = str_replace('*', '%', $postscriptum); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteTypeI18nTableMap::POSTSCRIPTUM, $postscriptum, $comparison); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNoteType object + * + * @param \CreditNote\Model\CreditNoteType|ObjectCollection $creditNoteType The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteTypeI18nQuery The current query, for fluid interface + */ + public function filterByCreditNoteType($creditNoteType, $comparison = null) + { + if ($creditNoteType instanceof \CreditNote\Model\CreditNoteType) { + return $this + ->addUsingAlias(CreditNoteTypeI18nTableMap::ID, $creditNoteType->getId(), $comparison); + } elseif ($creditNoteType instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CreditNoteTypeI18nTableMap::ID, $creditNoteType->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByCreditNoteType() only accepts arguments of type \CreditNote\Model\CreditNoteType or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNoteType relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteTypeI18nQuery The current query, for fluid interface + */ + public function joinCreditNoteType($relationAlias = null, $joinType = 'LEFT JOIN') + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNoteType'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNoteType'); + } + + return $this; + } + + /** + * Use the CreditNoteType relation CreditNoteType object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteTypeQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteTypeQuery($relationAlias = null, $joinType = 'LEFT JOIN') + { + return $this + ->joinCreditNoteType($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNoteType', '\CreditNote\Model\CreditNoteTypeQuery'); + } + + /** + * Exclude object from result + * + * @param ChildCreditNoteTypeI18n $creditNoteTypeI18n Object to remove from the list of results + * + * @return ChildCreditNoteTypeI18nQuery The current query, for fluid interface + */ + public function prune($creditNoteTypeI18n = null) + { + if ($creditNoteTypeI18n) { + $this->addCond('pruneCond0', $this->getAliasedColName(CreditNoteTypeI18nTableMap::ID), $creditNoteTypeI18n->getId(), Criteria::NOT_EQUAL); + $this->addCond('pruneCond1', $this->getAliasedColName(CreditNoteTypeI18nTableMap::LOCALE), $creditNoteTypeI18n->getLocale(), Criteria::NOT_EQUAL); + $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR); + } + + return $this; + } + + /** + * Deletes all rows from the credit_note_type_i18n table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public function doDeleteAll(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteTypeI18nTableMap::DATABASE_NAME); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + $affectedRows += parent::doDeleteAll($con); + // Because this db requires some delete cascade/set null emulation, we have to + // clear the cached instance *after* the emulation has happened (since + // instances get re-added by the select statement contained therein). + CreditNoteTypeI18nTableMap::clearInstancePool(); + CreditNoteTypeI18nTableMap::clearRelatedInstancePool(); + + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $affectedRows; + } + + /** + * Performs a DELETE on the database, given a ChildCreditNoteTypeI18n or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or ChildCreditNoteTypeI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public function delete(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteTypeI18nTableMap::DATABASE_NAME); + } + + $criteria = $this; + + // Set the correct dbName + $criteria->setDbName(CreditNoteTypeI18nTableMap::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + + + CreditNoteTypeI18nTableMap::removeInstanceFromPool($criteria); + + $affectedRows += ModelCriteria::delete($con); + CreditNoteTypeI18nTableMap::clearRelatedInstancePool(); + $con->commit(); + + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + +} // CreditNoteTypeI18nQuery diff --git a/local/modules/CreditNote/Model/Base/CreditNoteTypeQuery.php b/local/modules/CreditNote/Model/Base/CreditNoteTypeQuery.php new file mode 100644 index 000000000..7629600a7 --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CreditNoteTypeQuery.php @@ -0,0 +1,861 @@ +setModelAlias($modelAlias); + } + if ($criteria instanceof Criteria) { + $query->mergeWith($criteria); + } + + return $query; + } + + /** + * Find object by primary key. + * Propel uses the instance pool to skip the database if the object exists. + * Go fast if the query is untouched. + * + * + * $obj = $c->findPk(12, $con); + * + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ChildCreditNoteType|array|mixed the result, formatted by the current formatter + */ + public function findPk($key, $con = null) + { + if ($key === null) { + return null; + } + if ((null !== ($obj = CreditNoteTypeTableMap::getInstanceFromPool((string) $key))) && !$this->formatter) { + // the object is already in the instance pool + return $obj; + } + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CreditNoteTypeTableMap::DATABASE_NAME); + } + $this->basePreSelect($con); + if ($this->formatter || $this->modelAlias || $this->with || $this->select + || $this->selectColumns || $this->asColumns || $this->selectModifiers + || $this->map || $this->having || $this->joins) { + return $this->findPkComplex($key, $con); + } else { + return $this->findPkSimple($key, $con); + } + } + + /** + * Find object by primary key using raw SQL to go fast. + * Bypass doSelect() and the object formatter by using generated code. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCreditNoteType A model object, or null if the key is not found + */ + protected function findPkSimple($key, $con) + { + $sql = 'SELECT ID, CODE, COLOR, POSITION, REQUIRED_ORDER, CREATED_AT, UPDATED_AT FROM credit_note_type WHERE ID = :p0'; + try { + $stmt = $con->prepare($sql); + $stmt->bindValue(':p0', $key, PDO::PARAM_INT); + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e); + } + $obj = null; + if ($row = $stmt->fetch(\PDO::FETCH_NUM)) { + $obj = new ChildCreditNoteType(); + $obj->hydrate($row); + CreditNoteTypeTableMap::addInstanceToPool($obj, (string) $key); + } + $stmt->closeCursor(); + + return $obj; + } + + /** + * Find object by primary key. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCreditNoteType|array|mixed the result, formatted by the current formatter + */ + protected function findPkComplex($key, $con) + { + // As the query uses a PK condition, no limit(1) is necessary. + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKey($key) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher); + } + + /** + * Find objects by primary key + * + * $objs = $c->findPks(array(12, 56, 832), $con); + * + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter + */ + public function findPks($keys, $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getReadConnection($this->getDbName()); + } + $this->basePreSelect($con); + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKeys($keys) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->format($dataFetcher); + } + + /** + * Filter the query by primary key + * + * @param mixed $key Primary key to use for the query + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function filterByPrimaryKey($key) + { + + return $this->addUsingAlias(CreditNoteTypeTableMap::ID, $key, Criteria::EQUAL); + } + + /** + * Filter the query by a list of primary keys + * + * @param array $keys The list of primary key to use for the query + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function filterByPrimaryKeys($keys) + { + + return $this->addUsingAlias(CreditNoteTypeTableMap::ID, $keys, Criteria::IN); + } + + /** + * Filter the query on the id column + * + * Example usage: + * + * $query->filterById(1234); // WHERE id = 1234 + * $query->filterById(array(12, 34)); // WHERE id IN (12, 34) + * $query->filterById(array('min' => 12)); // WHERE id > 12 + * + * + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function filterById($id = null, $comparison = null) + { + if (is_array($id)) { + $useMinMax = false; + if (isset($id['min'])) { + $this->addUsingAlias(CreditNoteTypeTableMap::ID, $id['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($id['max'])) { + $this->addUsingAlias(CreditNoteTypeTableMap::ID, $id['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTypeTableMap::ID, $id, $comparison); + } + + /** + * Filter the query on the code column + * + * Example usage: + * + * $query->filterByCode('fooValue'); // WHERE code = 'fooValue' + * $query->filterByCode('%fooValue%'); // WHERE code LIKE '%fooValue%' + * + * + * @param string $code The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function filterByCode($code = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($code)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $code)) { + $code = str_replace('*', '%', $code); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteTypeTableMap::CODE, $code, $comparison); + } + + /** + * Filter the query on the color column + * + * Example usage: + * + * $query->filterByColor('fooValue'); // WHERE color = 'fooValue' + * $query->filterByColor('%fooValue%'); // WHERE color LIKE '%fooValue%' + * + * + * @param string $color The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function filterByColor($color = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($color)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $color)) { + $color = str_replace('*', '%', $color); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteTypeTableMap::COLOR, $color, $comparison); + } + + /** + * Filter the query on the position column + * + * Example usage: + * + * $query->filterByPosition(1234); // WHERE position = 1234 + * $query->filterByPosition(array(12, 34)); // WHERE position IN (12, 34) + * $query->filterByPosition(array('min' => 12)); // WHERE position > 12 + * + * + * @param mixed $position The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function filterByPosition($position = null, $comparison = null) + { + if (is_array($position)) { + $useMinMax = false; + if (isset($position['min'])) { + $this->addUsingAlias(CreditNoteTypeTableMap::POSITION, $position['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($position['max'])) { + $this->addUsingAlias(CreditNoteTypeTableMap::POSITION, $position['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTypeTableMap::POSITION, $position, $comparison); + } + + /** + * Filter the query on the required_order column + * + * Example usage: + * + * $query->filterByRequiredOrder(true); // WHERE required_order = true + * $query->filterByRequiredOrder('yes'); // WHERE required_order = true + * + * + * @param boolean|string $requiredOrder The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function filterByRequiredOrder($requiredOrder = null, $comparison = null) + { + if (is_string($requiredOrder)) { + $required_order = in_array(strtolower($requiredOrder), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; + } + + return $this->addUsingAlias(CreditNoteTypeTableMap::REQUIRED_ORDER, $requiredOrder, $comparison); + } + + /** + * Filter the query on the created_at column + * + * Example usage: + * + * $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14' + * $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14' + * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' + * + * + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function filterByCreatedAt($createdAt = null, $comparison = null) + { + if (is_array($createdAt)) { + $useMinMax = false; + if (isset($createdAt['min'])) { + $this->addUsingAlias(CreditNoteTypeTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($createdAt['max'])) { + $this->addUsingAlias(CreditNoteTypeTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTypeTableMap::CREATED_AT, $createdAt, $comparison); + } + + /** + * Filter the query on the updated_at column + * + * Example usage: + * + * $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14' + * $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14' + * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' + * + * + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function filterByUpdatedAt($updatedAt = null, $comparison = null) + { + if (is_array($updatedAt)) { + $useMinMax = false; + if (isset($updatedAt['min'])) { + $this->addUsingAlias(CreditNoteTypeTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($updatedAt['max'])) { + $this->addUsingAlias(CreditNoteTypeTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteTypeTableMap::UPDATED_AT, $updatedAt, $comparison); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNote object + * + * @param \CreditNote\Model\CreditNote|ObjectCollection $creditNote the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function filterByCreditNote($creditNote, $comparison = null) + { + if ($creditNote instanceof \CreditNote\Model\CreditNote) { + return $this + ->addUsingAlias(CreditNoteTypeTableMap::ID, $creditNote->getTypeId(), $comparison); + } elseif ($creditNote instanceof ObjectCollection) { + return $this + ->useCreditNoteQuery() + ->filterByPrimaryKeys($creditNote->getPrimaryKeys()) + ->endUse(); + } else { + throw new PropelException('filterByCreditNote() only accepts arguments of type \CreditNote\Model\CreditNote or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNote relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function joinCreditNote($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNote'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNote'); + } + + return $this; + } + + /** + * Use the CreditNote relation CreditNote object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCreditNote($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNote', '\CreditNote\Model\CreditNoteQuery'); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNoteTypeI18n object + * + * @param \CreditNote\Model\CreditNoteTypeI18n|ObjectCollection $creditNoteTypeI18n the related object to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function filterByCreditNoteTypeI18n($creditNoteTypeI18n, $comparison = null) + { + if ($creditNoteTypeI18n instanceof \CreditNote\Model\CreditNoteTypeI18n) { + return $this + ->addUsingAlias(CreditNoteTypeTableMap::ID, $creditNoteTypeI18n->getId(), $comparison); + } elseif ($creditNoteTypeI18n instanceof ObjectCollection) { + return $this + ->useCreditNoteTypeI18nQuery() + ->filterByPrimaryKeys($creditNoteTypeI18n->getPrimaryKeys()) + ->endUse(); + } else { + throw new PropelException('filterByCreditNoteTypeI18n() only accepts arguments of type \CreditNote\Model\CreditNoteTypeI18n or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNoteTypeI18n relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function joinCreditNoteTypeI18n($relationAlias = null, $joinType = 'LEFT JOIN') + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNoteTypeI18n'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNoteTypeI18n'); + } + + return $this; + } + + /** + * Use the CreditNoteTypeI18n relation CreditNoteTypeI18n object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteTypeI18nQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteTypeI18nQuery($relationAlias = null, $joinType = 'LEFT JOIN') + { + return $this + ->joinCreditNoteTypeI18n($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNoteTypeI18n', '\CreditNote\Model\CreditNoteTypeI18nQuery'); + } + + /** + * Exclude object from result + * + * @param ChildCreditNoteType $creditNoteType Object to remove from the list of results + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function prune($creditNoteType = null) + { + if ($creditNoteType) { + $this->addUsingAlias(CreditNoteTypeTableMap::ID, $creditNoteType->getId(), Criteria::NOT_EQUAL); + } + + return $this; + } + + /** + * Deletes all rows from the credit_note_type table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public function doDeleteAll(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteTypeTableMap::DATABASE_NAME); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + $affectedRows += parent::doDeleteAll($con); + // Because this db requires some delete cascade/set null emulation, we have to + // clear the cached instance *after* the emulation has happened (since + // instances get re-added by the select statement contained therein). + CreditNoteTypeTableMap::clearInstancePool(); + CreditNoteTypeTableMap::clearRelatedInstancePool(); + + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $affectedRows; + } + + /** + * Performs a DELETE on the database, given a ChildCreditNoteType or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or ChildCreditNoteType object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public function delete(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteTypeTableMap::DATABASE_NAME); + } + + $criteria = $this; + + // Set the correct dbName + $criteria->setDbName(CreditNoteTypeTableMap::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + + + CreditNoteTypeTableMap::removeInstanceFromPool($criteria); + + $affectedRows += ModelCriteria::delete($con); + CreditNoteTypeTableMap::clearRelatedInstancePool(); + $con->commit(); + + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + // i18n behavior + + /** + * Adds a JOIN clause to the query using the i18n relation + * + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function joinI18n($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) + { + $relationName = $relationAlias ? $relationAlias : 'CreditNoteTypeI18n'; + + return $this + ->joinCreditNoteTypeI18n($relationAlias, $joinType) + ->addJoinCondition($relationName, $relationName . '.Locale = ?', $locale); + } + + /** + * Adds a JOIN clause to the query and hydrates the related I18n object. + * Shortcut for $c->joinI18n($locale)->with() + * + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function joinWithI18n($locale = 'en_US', $joinType = Criteria::LEFT_JOIN) + { + $this + ->joinI18n($locale, null, $joinType) + ->with('CreditNoteTypeI18n'); + $this->with['CreditNoteTypeI18n']->setIsWithOneToMany(false); + + return $this; + } + + /** + * Use the I18n relation query object + * + * @see useQuery() + * + * @param string $locale Locale to use for the join condition, e.g. 'fr_FR' + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'. Defaults to left join. + * + * @return ChildCreditNoteTypeI18nQuery A secondary query class using the current class as primary query + */ + public function useI18nQuery($locale = 'en_US', $relationAlias = null, $joinType = Criteria::LEFT_JOIN) + { + return $this + ->joinI18n($locale, $relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNoteTypeI18n', '\CreditNote\Model\CreditNoteTypeI18nQuery'); + } + + // timestampable behavior + + /** + * Filter by the latest updated + * + * @param int $nbDays Maximum age of the latest update in days + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function recentlyUpdated($nbDays = 7) + { + return $this->addUsingAlias(CreditNoteTypeTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL); + } + + /** + * Filter by the latest created + * + * @param int $nbDays Maximum age of in days + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function recentlyCreated($nbDays = 7) + { + return $this->addUsingAlias(CreditNoteTypeTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL); + } + + /** + * Order by update date desc + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function lastUpdatedFirst() + { + return $this->addDescendingOrderByColumn(CreditNoteTypeTableMap::UPDATED_AT); + } + + /** + * Order by update date asc + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function firstUpdatedFirst() + { + return $this->addAscendingOrderByColumn(CreditNoteTypeTableMap::UPDATED_AT); + } + + /** + * Order by create date desc + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function lastCreatedFirst() + { + return $this->addDescendingOrderByColumn(CreditNoteTypeTableMap::CREATED_AT); + } + + /** + * Order by create date asc + * + * @return ChildCreditNoteTypeQuery The current query, for fluid interface + */ + public function firstCreatedFirst() + { + return $this->addAscendingOrderByColumn(CreditNoteTypeTableMap::CREATED_AT); + } + +} // CreditNoteTypeQuery diff --git a/local/modules/CreditNote/Model/Base/CreditNoteVersion.php b/local/modules/CreditNote/Model/Base/CreditNoteVersion.php new file mode 100644 index 000000000..266f8ce46 --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CreditNoteVersion.php @@ -0,0 +1,2890 @@ +total_price = '0.000000'; + $this->total_price_with_tax = '0.000000'; + $this->discount_without_tax = '0.000000'; + $this->discount_with_tax = '0.000000'; + $this->allow_partial_use = true; + $this->version = 0; + $this->order_id_version = 0; + $this->customer_id_version = 0; + $this->parent_id_version = 0; + } + + /** + * Initializes internal state of CreditNote\Model\Base\CreditNoteVersion object. + * @see applyDefaults() + */ + public function __construct() + { + $this->applyDefaultValues(); + } + + /** + * Returns whether the object has been modified. + * + * @return boolean True if the object has been modified. + */ + public function isModified() + { + return !!$this->modifiedColumns; + } + + /** + * Has specified column been modified? + * + * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID + * @return boolean True if $col has been modified. + */ + public function isColumnModified($col) + { + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); + } + + /** + * Get the columns that have been modified in this object. + * @return array A unique list of the modified column names for this object. + */ + public function getModifiedColumns() + { + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; + } + + /** + * Returns whether the object has ever been saved. This will + * be false, if the object was retrieved from storage or was created + * and then saved. + * + * @return boolean true, if the object has never been persisted. + */ + public function isNew() + { + return $this->new; + } + + /** + * Setter for the isNew attribute. This method will be called + * by Propel-generated children and objects. + * + * @param boolean $b the state of the object. + */ + public function setNew($b) + { + $this->new = (Boolean) $b; + } + + /** + * Whether this object has been deleted. + * @return boolean The deleted state of this object. + */ + public function isDeleted() + { + return $this->deleted; + } + + /** + * Specify whether this object has been deleted. + * @param boolean $b The deleted state of this object. + * @return void + */ + public function setDeleted($b) + { + $this->deleted = (Boolean) $b; + } + + /** + * Sets the modified state for the object to be false. + * @param string $col If supplied, only the specified column is reset. + * @return void + */ + public function resetModified($col = null) + { + if (null !== $col) { + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); + } + } else { + $this->modifiedColumns = array(); + } + } + + /** + * Compares this with another CreditNoteVersion instance. If + * obj is an instance of CreditNoteVersion, delegates to + * equals(CreditNoteVersion). Otherwise, returns false. + * + * @param mixed $obj The object to compare to. + * @return boolean Whether equal to the object specified. + */ + public function equals($obj) + { + $thisclazz = get_class($this); + if (!is_object($obj) || !($obj instanceof $thisclazz)) { + return false; + } + + if ($this === $obj) { + return true; + } + + if (null === $this->getPrimaryKey() + || null === $obj->getPrimaryKey()) { + return false; + } + + return $this->getPrimaryKey() === $obj->getPrimaryKey(); + } + + /** + * If the primary key is not null, return the hashcode of the + * primary key. Otherwise, return the hash code of the object. + * + * @return int Hashcode + */ + public function hashCode() + { + if (null !== $this->getPrimaryKey()) { + return crc32(serialize($this->getPrimaryKey())); + } + + return crc32(serialize(clone $this)); + } + + /** + * Get the associative array of the virtual columns in this object + * + * @return array + */ + public function getVirtualColumns() + { + return $this->virtualColumns; + } + + /** + * Checks the existence of a virtual column in this object + * + * @param string $name The virtual column name + * @return boolean + */ + public function hasVirtualColumn($name) + { + return array_key_exists($name, $this->virtualColumns); + } + + /** + * Get the value of a virtual column in this object + * + * @param string $name The virtual column name + * @return mixed + * + * @throws PropelException + */ + public function getVirtualColumn($name) + { + if (!$this->hasVirtualColumn($name)) { + throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name)); + } + + return $this->virtualColumns[$name]; + } + + /** + * Set the value of a virtual column in this object + * + * @param string $name The virtual column name + * @param mixed $value The value to give to the virtual column + * + * @return CreditNoteVersion The current object, for fluid interface + */ + public function setVirtualColumn($name, $value) + { + $this->virtualColumns[$name] = $value; + + return $this; + } + + /** + * Logs a message using Propel::log(). + * + * @param string $msg + * @param int $priority One of the Propel::LOG_* logging levels + * @return boolean + */ + protected function log($msg, $priority = Propel::LOG_INFO) + { + return Propel::log(get_class($this) . ': ' . $msg, $priority); + } + + /** + * Populate the current object from a string, using a given parser format + * + * $book = new Book(); + * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, + * or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param string $data The source data to import from + * + * @return CreditNoteVersion The current object, for fluid interface + */ + public function importFrom($parser, $data) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + $this->fromArray($parser->toArray($data), TableMap::TYPE_PHPNAME); + + return $this; + } + + /** + * Export the current object properties to a string, using a given parser format + * + * $book = BookQuery::create()->findPk(9012); + * echo $book->exportTo('JSON'); + * => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE. + * @return string The exported data + */ + public function exportTo($parser, $includeLazyLoadColumns = true) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true)); + } + + /** + * Clean up internal collections prior to serializing + * Avoids recursive loops that turn into segmentation faults when serializing + */ + public function __sleep() + { + $this->clearAllReferences(); + + return array_keys(get_object_vars($this)); + } + + /** + * Get the [id] column value. + * + * @return int + */ + public function getId() + { + + return $this->id; + } + + /** + * Get the [ref] column value. + * + * @return string + */ + public function getRef() + { + + return $this->ref; + } + + /** + * Get the [invoice_ref] column value. + * + * @return string + */ + public function getInvoiceRef() + { + + return $this->invoice_ref; + } + + /** + * Get the [invoice_address_id] column value. + * + * @return int + */ + public function getInvoiceAddressId() + { + + return $this->invoice_address_id; + } + + /** + * Get the [optionally formatted] temporal [invoice_date] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getInvoiceDate($format = NULL) + { + if ($format === null) { + return $this->invoice_date; + } else { + return $this->invoice_date instanceof \DateTime ? $this->invoice_date->format($format) : null; + } + } + + /** + * Get the [order_id] column value. + * + * @return int + */ + public function getOrderId() + { + + return $this->order_id; + } + + /** + * Get the [customer_id] column value. + * + * @return int + */ + public function getCustomerId() + { + + return $this->customer_id; + } + + /** + * Get the [parent_id] column value. + * + * @return int + */ + public function getParentId() + { + + return $this->parent_id; + } + + /** + * Get the [type_id] column value. + * + * @return int + */ + public function getTypeId() + { + + return $this->type_id; + } + + /** + * Get the [status_id] column value. + * + * @return int + */ + public function getStatusId() + { + + return $this->status_id; + } + + /** + * Get the [currency_id] column value. + * + * @return int + */ + public function getCurrencyId() + { + + return $this->currency_id; + } + + /** + * Get the [currency_rate] column value. + * + * @return double + */ + public function getCurrencyRate() + { + + return $this->currency_rate; + } + + /** + * Get the [total_price] column value. + * + * @return string + */ + public function getTotalPrice() + { + + return $this->total_price; + } + + /** + * Get the [total_price_with_tax] column value. + * + * @return string + */ + public function getTotalPriceWithTax() + { + + return $this->total_price_with_tax; + } + + /** + * Get the [discount_without_tax] column value. + * + * @return string + */ + public function getDiscountWithoutTax() + { + + return $this->discount_without_tax; + } + + /** + * Get the [discount_with_tax] column value. + * + * @return string + */ + public function getDiscountWithTax() + { + + return $this->discount_with_tax; + } + + /** + * Get the [allow_partial_use] column value. + * + * @return boolean + */ + public function getAllowPartialUse() + { + + return $this->allow_partial_use; + } + + /** + * Get the [optionally formatted] temporal [created_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getCreatedAt($format = NULL) + { + if ($format === null) { + return $this->created_at; + } else { + return $this->created_at instanceof \DateTime ? $this->created_at->format($format) : null; + } + } + + /** + * Get the [optionally formatted] temporal [updated_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getUpdatedAt($format = NULL) + { + if ($format === null) { + return $this->updated_at; + } else { + return $this->updated_at instanceof \DateTime ? $this->updated_at->format($format) : null; + } + } + + /** + * Get the [version] column value. + * + * @return int + */ + public function getVersion() + { + + return $this->version; + } + + /** + * Get the [optionally formatted] temporal [version_created_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getVersionCreatedAt($format = NULL) + { + if ($format === null) { + return $this->version_created_at; + } else { + return $this->version_created_at instanceof \DateTime ? $this->version_created_at->format($format) : null; + } + } + + /** + * Get the [version_created_by] column value. + * + * @return string + */ + public function getVersionCreatedBy() + { + + return $this->version_created_by; + } + + /** + * Get the [order_id_version] column value. + * + * @return int + */ + public function getOrderIdVersion() + { + + return $this->order_id_version; + } + + /** + * Get the [customer_id_version] column value. + * + * @return int + */ + public function getCustomerIdVersion() + { + + return $this->customer_id_version; + } + + /** + * Get the [parent_id_version] column value. + * + * @return int + */ + public function getParentIdVersion() + { + + return $this->parent_id_version; + } + + /** + * Get the [credit_note_ids] column value. + * + * @return array + */ + public function getCreditNoteIds() + { + if (null === $this->credit_note_ids_unserialized) { + $this->credit_note_ids_unserialized = array(); + } + if (!$this->credit_note_ids_unserialized && null !== $this->credit_note_ids) { + $credit_note_ids_unserialized = substr($this->credit_note_ids, 2, -2); + $this->credit_note_ids_unserialized = $credit_note_ids_unserialized ? explode(' | ', $credit_note_ids_unserialized) : array(); + } + + return $this->credit_note_ids_unserialized; + } + + /** + * Test the presence of a value in the [credit_note_ids] array column value. + * @param mixed $value + * + * @return boolean + */ + public function hasCreditNoteId($value) + { + return in_array($value, $this->getCreditNoteIds()); + } // hasCreditNoteId() + + /** + * Get the [credit_note_versions] column value. + * + * @return array + */ + public function getCreditNoteVersions() + { + if (null === $this->credit_note_versions_unserialized) { + $this->credit_note_versions_unserialized = array(); + } + if (!$this->credit_note_versions_unserialized && null !== $this->credit_note_versions) { + $credit_note_versions_unserialized = substr($this->credit_note_versions, 2, -2); + $this->credit_note_versions_unserialized = $credit_note_versions_unserialized ? explode(' | ', $credit_note_versions_unserialized) : array(); + } + + return $this->credit_note_versions_unserialized; + } + + /** + * Test the presence of a value in the [credit_note_versions] array column value. + * @param mixed $value + * + * @return boolean + */ + public function hasCreditNoteVersion($value) + { + return in_array($value, $this->getCreditNoteVersions()); + } // hasCreditNoteVersion() + + /** + * Set the value of [id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->id !== $v) { + $this->id = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::ID] = true; + } + + if ($this->aCreditNote !== null && $this->aCreditNote->getId() !== $v) { + $this->aCreditNote = null; + } + + + return $this; + } // setId() + + /** + * Set the value of [ref] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setRef($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->ref !== $v) { + $this->ref = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::REF] = true; + } + + + return $this; + } // setRef() + + /** + * Set the value of [invoice_ref] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setInvoiceRef($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->invoice_ref !== $v) { + $this->invoice_ref = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::INVOICE_REF] = true; + } + + + return $this; + } // setInvoiceRef() + + /** + * Set the value of [invoice_address_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setInvoiceAddressId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->invoice_address_id !== $v) { + $this->invoice_address_id = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::INVOICE_ADDRESS_ID] = true; + } + + + return $this; + } // setInvoiceAddressId() + + /** + * Sets the value of [invoice_date] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setInvoiceDate($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->invoice_date !== null || $dt !== null) { + if ($dt !== $this->invoice_date) { + $this->invoice_date = $dt; + $this->modifiedColumns[CreditNoteVersionTableMap::INVOICE_DATE] = true; + } + } // if either are not null + + + return $this; + } // setInvoiceDate() + + /** + * Set the value of [order_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setOrderId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->order_id !== $v) { + $this->order_id = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::ORDER_ID] = true; + } + + + return $this; + } // setOrderId() + + /** + * Set the value of [customer_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setCustomerId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->customer_id !== $v) { + $this->customer_id = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::CUSTOMER_ID] = true; + } + + + return $this; + } // setCustomerId() + + /** + * Set the value of [parent_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setParentId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->parent_id !== $v) { + $this->parent_id = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::PARENT_ID] = true; + } + + + return $this; + } // setParentId() + + /** + * Set the value of [type_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setTypeId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->type_id !== $v) { + $this->type_id = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::TYPE_ID] = true; + } + + + return $this; + } // setTypeId() + + /** + * Set the value of [status_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setStatusId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->status_id !== $v) { + $this->status_id = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::STATUS_ID] = true; + } + + + return $this; + } // setStatusId() + + /** + * Set the value of [currency_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setCurrencyId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->currency_id !== $v) { + $this->currency_id = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::CURRENCY_ID] = true; + } + + + return $this; + } // setCurrencyId() + + /** + * Set the value of [currency_rate] column. + * + * @param double $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setCurrencyRate($v) + { + if ($v !== null) { + $v = (double) $v; + } + + if ($this->currency_rate !== $v) { + $this->currency_rate = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::CURRENCY_RATE] = true; + } + + + return $this; + } // setCurrencyRate() + + /** + * Set the value of [total_price] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setTotalPrice($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->total_price !== $v) { + $this->total_price = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::TOTAL_PRICE] = true; + } + + + return $this; + } // setTotalPrice() + + /** + * Set the value of [total_price_with_tax] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setTotalPriceWithTax($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->total_price_with_tax !== $v) { + $this->total_price_with_tax = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::TOTAL_PRICE_WITH_TAX] = true; + } + + + return $this; + } // setTotalPriceWithTax() + + /** + * Set the value of [discount_without_tax] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setDiscountWithoutTax($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->discount_without_tax !== $v) { + $this->discount_without_tax = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::DISCOUNT_WITHOUT_TAX] = true; + } + + + return $this; + } // setDiscountWithoutTax() + + /** + * Set the value of [discount_with_tax] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setDiscountWithTax($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->discount_with_tax !== $v) { + $this->discount_with_tax = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::DISCOUNT_WITH_TAX] = true; + } + + + return $this; + } // setDiscountWithTax() + + /** + * Sets the value of the [allow_partial_use] column. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * + * @param boolean|integer|string $v The new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setAllowPartialUse($v) + { + if ($v !== null) { + if (is_string($v)) { + $v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; + } else { + $v = (boolean) $v; + } + } + + if ($this->allow_partial_use !== $v) { + $this->allow_partial_use = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::ALLOW_PARTIAL_USE] = true; + } + + + return $this; + } // setAllowPartialUse() + + /** + * Sets the value of [created_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setCreatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->created_at !== null || $dt !== null) { + if ($dt !== $this->created_at) { + $this->created_at = $dt; + $this->modifiedColumns[CreditNoteVersionTableMap::CREATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setCreatedAt() + + /** + * Sets the value of [updated_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setUpdatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->updated_at !== null || $dt !== null) { + if ($dt !== $this->updated_at) { + $this->updated_at = $dt; + $this->modifiedColumns[CreditNoteVersionTableMap::UPDATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setUpdatedAt() + + /** + * Set the value of [version] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setVersion($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->version !== $v) { + $this->version = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::VERSION] = true; + } + + + return $this; + } // setVersion() + + /** + * Sets the value of [version_created_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setVersionCreatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->version_created_at !== null || $dt !== null) { + if ($dt !== $this->version_created_at) { + $this->version_created_at = $dt; + $this->modifiedColumns[CreditNoteVersionTableMap::VERSION_CREATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setVersionCreatedAt() + + /** + * Set the value of [version_created_by] column. + * + * @param string $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setVersionCreatedBy($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->version_created_by !== $v) { + $this->version_created_by = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::VERSION_CREATED_BY] = true; + } + + + return $this; + } // setVersionCreatedBy() + + /** + * Set the value of [order_id_version] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setOrderIdVersion($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->order_id_version !== $v) { + $this->order_id_version = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::ORDER_ID_VERSION] = true; + } + + + return $this; + } // setOrderIdVersion() + + /** + * Set the value of [customer_id_version] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setCustomerIdVersion($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->customer_id_version !== $v) { + $this->customer_id_version = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::CUSTOMER_ID_VERSION] = true; + } + + + return $this; + } // setCustomerIdVersion() + + /** + * Set the value of [parent_id_version] column. + * + * @param int $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setParentIdVersion($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->parent_id_version !== $v) { + $this->parent_id_version = $v; + $this->modifiedColumns[CreditNoteVersionTableMap::PARENT_ID_VERSION] = true; + } + + + return $this; + } // setParentIdVersion() + + /** + * Set the value of [credit_note_ids] column. + * + * @param array $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setCreditNoteIds($v) + { + if ($this->credit_note_ids_unserialized !== $v) { + $this->credit_note_ids_unserialized = $v; + $this->credit_note_ids = '| ' . implode(' | ', $v) . ' |'; + $this->modifiedColumns[CreditNoteVersionTableMap::CREDIT_NOTE_IDS] = true; + } + + + return $this; + } // setCreditNoteIds() + + /** + * Adds a value to the [credit_note_ids] array column value. + * @param mixed $value + * + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function addCreditNoteId($value) + { + $currentArray = $this->getCreditNoteIds(); + $currentArray []= $value; + $this->setCreditNoteIds($currentArray); + + return $this; + } // addCreditNoteId() + + /** + * Removes a value from the [credit_note_ids] array column value. + * @param mixed $value + * + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function removeCreditNoteId($value) + { + $targetArray = array(); + foreach ($this->getCreditNoteIds() as $element) { + if ($element != $value) { + $targetArray []= $element; + } + } + $this->setCreditNoteIds($targetArray); + + return $this; + } // removeCreditNoteId() + + /** + * Set the value of [credit_note_versions] column. + * + * @param array $v new value + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function setCreditNoteVersions($v) + { + if ($this->credit_note_versions_unserialized !== $v) { + $this->credit_note_versions_unserialized = $v; + $this->credit_note_versions = '| ' . implode(' | ', $v) . ' |'; + $this->modifiedColumns[CreditNoteVersionTableMap::CREDIT_NOTE_VERSIONS] = true; + } + + + return $this; + } // setCreditNoteVersions() + + /** + * Adds a value to the [credit_note_versions] array column value. + * @param mixed $value + * + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function addCreditNoteVersion($value) + { + $currentArray = $this->getCreditNoteVersions(); + $currentArray []= $value; + $this->setCreditNoteVersions($currentArray); + + return $this; + } // addCreditNoteVersion() + + /** + * Removes a value from the [credit_note_versions] array column value. + * @param mixed $value + * + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + */ + public function removeCreditNoteVersion($value) + { + $targetArray = array(); + foreach ($this->getCreditNoteVersions() as $element) { + if ($element != $value) { + $targetArray []= $element; + } + } + $this->setCreditNoteVersions($targetArray); + + return $this; + } // removeCreditNoteVersion() + + /** + * Indicates whether the columns in this object are only set to default values. + * + * This method can be used in conjunction with isModified() to indicate whether an object is both + * modified _and_ has some values set which are non-default. + * + * @return boolean Whether the columns in this object are only been set with default values. + */ + public function hasOnlyDefaultValues() + { + if ($this->total_price !== '0.000000') { + return false; + } + + if ($this->total_price_with_tax !== '0.000000') { + return false; + } + + if ($this->discount_without_tax !== '0.000000') { + return false; + } + + if ($this->discount_with_tax !== '0.000000') { + return false; + } + + if ($this->allow_partial_use !== true) { + return false; + } + + if ($this->version !== 0) { + return false; + } + + if ($this->order_id_version !== 0) { + return false; + } + + if ($this->customer_id_version !== 0) { + return false; + } + + if ($this->parent_id_version !== 0) { + return false; + } + + // otherwise, everything was equal, so return TRUE + return true; + } // hasOnlyDefaultValues() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (0-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param array $row The row returned by DataFetcher->fetch(). + * @param int $startcol 0-based offset column which indicates which restultset column to start with. + * @param boolean $rehydrate Whether this object is being re-hydrated from the database. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM) + { + try { + + + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : CreditNoteVersionTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; + $this->id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CreditNoteVersionTableMap::translateFieldName('Ref', TableMap::TYPE_PHPNAME, $indexType)]; + $this->ref = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CreditNoteVersionTableMap::translateFieldName('InvoiceRef', TableMap::TYPE_PHPNAME, $indexType)]; + $this->invoice_ref = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CreditNoteVersionTableMap::translateFieldName('InvoiceAddressId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->invoice_address_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CreditNoteVersionTableMap::translateFieldName('InvoiceDate', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->invoice_date = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CreditNoteVersionTableMap::translateFieldName('OrderId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->order_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CreditNoteVersionTableMap::translateFieldName('CustomerId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->customer_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CreditNoteVersionTableMap::translateFieldName('ParentId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->parent_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CreditNoteVersionTableMap::translateFieldName('TypeId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->type_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : CreditNoteVersionTableMap::translateFieldName('StatusId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->status_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : CreditNoteVersionTableMap::translateFieldName('CurrencyId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->currency_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : CreditNoteVersionTableMap::translateFieldName('CurrencyRate', TableMap::TYPE_PHPNAME, $indexType)]; + $this->currency_rate = (null !== $col) ? (double) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 12 + $startcol : CreditNoteVersionTableMap::translateFieldName('TotalPrice', TableMap::TYPE_PHPNAME, $indexType)]; + $this->total_price = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : CreditNoteVersionTableMap::translateFieldName('TotalPriceWithTax', TableMap::TYPE_PHPNAME, $indexType)]; + $this->total_price_with_tax = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : CreditNoteVersionTableMap::translateFieldName('DiscountWithoutTax', TableMap::TYPE_PHPNAME, $indexType)]; + $this->discount_without_tax = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 15 + $startcol : CreditNoteVersionTableMap::translateFieldName('DiscountWithTax', TableMap::TYPE_PHPNAME, $indexType)]; + $this->discount_with_tax = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 16 + $startcol : CreditNoteVersionTableMap::translateFieldName('AllowPartialUse', TableMap::TYPE_PHPNAME, $indexType)]; + $this->allow_partial_use = (null !== $col) ? (boolean) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 17 + $startcol : CreditNoteVersionTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 18 + $startcol : CreditNoteVersionTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 19 + $startcol : CreditNoteVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)]; + $this->version = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 20 + $startcol : CreditNoteVersionTableMap::translateFieldName('VersionCreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->version_created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 21 + $startcol : CreditNoteVersionTableMap::translateFieldName('VersionCreatedBy', TableMap::TYPE_PHPNAME, $indexType)]; + $this->version_created_by = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 22 + $startcol : CreditNoteVersionTableMap::translateFieldName('OrderIdVersion', TableMap::TYPE_PHPNAME, $indexType)]; + $this->order_id_version = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 23 + $startcol : CreditNoteVersionTableMap::translateFieldName('CustomerIdVersion', TableMap::TYPE_PHPNAME, $indexType)]; + $this->customer_id_version = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 24 + $startcol : CreditNoteVersionTableMap::translateFieldName('ParentIdVersion', TableMap::TYPE_PHPNAME, $indexType)]; + $this->parent_id_version = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 25 + $startcol : CreditNoteVersionTableMap::translateFieldName('CreditNoteIds', TableMap::TYPE_PHPNAME, $indexType)]; + $this->credit_note_ids = $col; + $this->credit_note_ids_unserialized = null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 26 + $startcol : CreditNoteVersionTableMap::translateFieldName('CreditNoteVersions', TableMap::TYPE_PHPNAME, $indexType)]; + $this->credit_note_versions = $col; + $this->credit_note_versions_unserialized = null; + $this->resetModified(); + + $this->setNew(false); + + if ($rehydrate) { + $this->ensureConsistency(); + } + + return $startcol + 27; // 27 = CreditNoteVersionTableMap::NUM_HYDRATE_COLUMNS. + + } catch (Exception $e) { + throw new PropelException("Error populating \CreditNote\Model\CreditNoteVersion object", 0, $e); + } + } + + /** + * Checks and repairs the internal consistency of the object. + * + * This method is executed after an already-instantiated object is re-hydrated + * from the database. It exists to check any foreign keys to make sure that + * the objects related to the current object are correct based on foreign key. + * + * You can override this method in the stub class, but you should always invoke + * the base method from the overridden method (i.e. parent::ensureConsistency()), + * in case your model changes. + * + * @throws PropelException + */ + public function ensureConsistency() + { + if ($this->aCreditNote !== null && $this->id !== $this->aCreditNote->getId()) { + $this->aCreditNote = null; + } + } // ensureConsistency + + /** + * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. + * + * This will only work if the object has been saved and has a valid primary key set. + * + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @return void + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + */ + public function reload($deep = false, ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("Cannot reload a deleted object."); + } + + if ($this->isNew()) { + throw new PropelException("Cannot reload an unsaved object."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CreditNoteVersionTableMap::DATABASE_NAME); + } + + // We don't need to alter the object instance pool; we're just modifying this instance + // already in the pool. + + $dataFetcher = ChildCreditNoteVersionQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con); + $row = $dataFetcher->fetch(); + $dataFetcher->close(); + if (!$row) { + throw new PropelException('Cannot find matching row in the database to reload object values.'); + } + $this->hydrate($row, 0, true, $dataFetcher->getIndexType()); // rehydrate + + if ($deep) { // also de-associate any related objects? + + $this->aCreditNote = null; + } // if (deep) + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param ConnectionInterface $con + * @return void + * @throws PropelException + * @see CreditNoteVersion::setDeleted() + * @see CreditNoteVersion::isDeleted() + */ + public function delete(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteVersionTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + try { + $deleteQuery = ChildCreditNoteVersionQuery::create() + ->filterByPrimaryKey($this->getPrimaryKey()); + $ret = $this->preDelete($con); + if ($ret) { + $deleteQuery->delete($con); + $this->postDelete($con); + $con->commit(); + $this->setDeleted(true); + } else { + $con->commit(); + } + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Persists this object to the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All modified related objects will also be persisted in the doSave() + * method. This method wraps all precipitate database operations in a + * single transaction. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() + */ + public function save(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteVersionTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + $isInsert = $this->isNew(); + try { + $ret = $this->preSave($con); + if ($isInsert) { + $ret = $ret && $this->preInsert($con); + } else { + $ret = $ret && $this->preUpdate($con); + } + if ($ret) { + $affectedRows = $this->doSave($con); + if ($isInsert) { + $this->postInsert($con); + } else { + $this->postUpdate($con); + } + $this->postSave($con); + CreditNoteVersionTableMap::addInstanceToPool($this); + } else { + $affectedRows = 0; + } + $con->commit(); + + return $affectedRows; + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Performs the work of inserting or updating the row in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() + */ + protected function doSave(ConnectionInterface $con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + // We call the save method on the following object(s) if they + // were passed to this object by their corresponding set + // method. This object relates to these object(s) by a + // foreign key reference. + + if ($this->aCreditNote !== null) { + if ($this->aCreditNote->isModified() || $this->aCreditNote->isNew()) { + $affectedRows += $this->aCreditNote->save($con); + } + $this->setCreditNote($this->aCreditNote); + } + + if ($this->isNew() || $this->isModified()) { + // persist changes + if ($this->isNew()) { + $this->doInsert($con); + } else { + $this->doUpdate($con); + } + $affectedRows += 1; + $this->resetModified(); + } + + $this->alreadyInSave = false; + + } + + return $affectedRows; + } // doSave() + + /** + * Insert the row in the database. + * + * @param ConnectionInterface $con + * + * @throws PropelException + * @see doSave() + */ + protected function doInsert(ConnectionInterface $con) + { + $modifiedColumns = array(); + $index = 0; + + + // check the columns in natural order for more readable SQL queries + if ($this->isColumnModified(CreditNoteVersionTableMap::ID)) { + $modifiedColumns[':p' . $index++] = 'ID'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::REF)) { + $modifiedColumns[':p' . $index++] = 'REF'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::INVOICE_REF)) { + $modifiedColumns[':p' . $index++] = 'INVOICE_REF'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::INVOICE_ADDRESS_ID)) { + $modifiedColumns[':p' . $index++] = 'INVOICE_ADDRESS_ID'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::INVOICE_DATE)) { + $modifiedColumns[':p' . $index++] = 'INVOICE_DATE'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::ORDER_ID)) { + $modifiedColumns[':p' . $index++] = 'ORDER_ID'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::CUSTOMER_ID)) { + $modifiedColumns[':p' . $index++] = 'CUSTOMER_ID'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::PARENT_ID)) { + $modifiedColumns[':p' . $index++] = 'PARENT_ID'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::TYPE_ID)) { + $modifiedColumns[':p' . $index++] = 'TYPE_ID'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::STATUS_ID)) { + $modifiedColumns[':p' . $index++] = 'STATUS_ID'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::CURRENCY_ID)) { + $modifiedColumns[':p' . $index++] = 'CURRENCY_ID'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::CURRENCY_RATE)) { + $modifiedColumns[':p' . $index++] = 'CURRENCY_RATE'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::TOTAL_PRICE)) { + $modifiedColumns[':p' . $index++] = 'TOTAL_PRICE'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::TOTAL_PRICE_WITH_TAX)) { + $modifiedColumns[':p' . $index++] = 'TOTAL_PRICE_WITH_TAX'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::DISCOUNT_WITHOUT_TAX)) { + $modifiedColumns[':p' . $index++] = 'DISCOUNT_WITHOUT_TAX'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::DISCOUNT_WITH_TAX)) { + $modifiedColumns[':p' . $index++] = 'DISCOUNT_WITH_TAX'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::ALLOW_PARTIAL_USE)) { + $modifiedColumns[':p' . $index++] = 'ALLOW_PARTIAL_USE'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::CREATED_AT)) { + $modifiedColumns[':p' . $index++] = 'CREATED_AT'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::UPDATED_AT)) { + $modifiedColumns[':p' . $index++] = 'UPDATED_AT'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::VERSION)) { + $modifiedColumns[':p' . $index++] = 'VERSION'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::VERSION_CREATED_AT)) { + $modifiedColumns[':p' . $index++] = 'VERSION_CREATED_AT'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::VERSION_CREATED_BY)) { + $modifiedColumns[':p' . $index++] = 'VERSION_CREATED_BY'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::ORDER_ID_VERSION)) { + $modifiedColumns[':p' . $index++] = 'ORDER_ID_VERSION'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::CUSTOMER_ID_VERSION)) { + $modifiedColumns[':p' . $index++] = 'CUSTOMER_ID_VERSION'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::PARENT_ID_VERSION)) { + $modifiedColumns[':p' . $index++] = 'PARENT_ID_VERSION'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::CREDIT_NOTE_IDS)) { + $modifiedColumns[':p' . $index++] = 'CREDIT_NOTE_IDS'; + } + if ($this->isColumnModified(CreditNoteVersionTableMap::CREDIT_NOTE_VERSIONS)) { + $modifiedColumns[':p' . $index++] = 'CREDIT_NOTE_VERSIONS'; + } + + $sql = sprintf( + 'INSERT INTO credit_note_version (%s) VALUES (%s)', + implode(', ', $modifiedColumns), + implode(', ', array_keys($modifiedColumns)) + ); + + try { + $stmt = $con->prepare($sql); + foreach ($modifiedColumns as $identifier => $columnName) { + switch ($columnName) { + case 'ID': + $stmt->bindValue($identifier, $this->id, PDO::PARAM_INT); + break; + case 'REF': + $stmt->bindValue($identifier, $this->ref, PDO::PARAM_STR); + break; + case 'INVOICE_REF': + $stmt->bindValue($identifier, $this->invoice_ref, PDO::PARAM_STR); + break; + case 'INVOICE_ADDRESS_ID': + $stmt->bindValue($identifier, $this->invoice_address_id, PDO::PARAM_INT); + break; + case 'INVOICE_DATE': + $stmt->bindValue($identifier, $this->invoice_date ? $this->invoice_date->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + case 'ORDER_ID': + $stmt->bindValue($identifier, $this->order_id, PDO::PARAM_INT); + break; + case 'CUSTOMER_ID': + $stmt->bindValue($identifier, $this->customer_id, PDO::PARAM_INT); + break; + case 'PARENT_ID': + $stmt->bindValue($identifier, $this->parent_id, PDO::PARAM_INT); + break; + case 'TYPE_ID': + $stmt->bindValue($identifier, $this->type_id, PDO::PARAM_INT); + break; + case 'STATUS_ID': + $stmt->bindValue($identifier, $this->status_id, PDO::PARAM_INT); + break; + case 'CURRENCY_ID': + $stmt->bindValue($identifier, $this->currency_id, PDO::PARAM_INT); + break; + case 'CURRENCY_RATE': + $stmt->bindValue($identifier, $this->currency_rate, PDO::PARAM_STR); + break; + case 'TOTAL_PRICE': + $stmt->bindValue($identifier, $this->total_price, PDO::PARAM_STR); + break; + case 'TOTAL_PRICE_WITH_TAX': + $stmt->bindValue($identifier, $this->total_price_with_tax, PDO::PARAM_STR); + break; + case 'DISCOUNT_WITHOUT_TAX': + $stmt->bindValue($identifier, $this->discount_without_tax, PDO::PARAM_STR); + break; + case 'DISCOUNT_WITH_TAX': + $stmt->bindValue($identifier, $this->discount_with_tax, PDO::PARAM_STR); + break; + case 'ALLOW_PARTIAL_USE': + $stmt->bindValue($identifier, (int) $this->allow_partial_use, PDO::PARAM_INT); + break; + case 'CREATED_AT': + $stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + case 'UPDATED_AT': + $stmt->bindValue($identifier, $this->updated_at ? $this->updated_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + case 'VERSION': + $stmt->bindValue($identifier, $this->version, PDO::PARAM_INT); + break; + case 'VERSION_CREATED_AT': + $stmt->bindValue($identifier, $this->version_created_at ? $this->version_created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + case 'VERSION_CREATED_BY': + $stmt->bindValue($identifier, $this->version_created_by, PDO::PARAM_STR); + break; + case 'ORDER_ID_VERSION': + $stmt->bindValue($identifier, $this->order_id_version, PDO::PARAM_INT); + break; + case 'CUSTOMER_ID_VERSION': + $stmt->bindValue($identifier, $this->customer_id_version, PDO::PARAM_INT); + break; + case 'PARENT_ID_VERSION': + $stmt->bindValue($identifier, $this->parent_id_version, PDO::PARAM_INT); + break; + case 'CREDIT_NOTE_IDS': + $stmt->bindValue($identifier, $this->credit_note_ids, PDO::PARAM_STR); + break; + case 'CREDIT_NOTE_VERSIONS': + $stmt->bindValue($identifier, $this->credit_note_versions, PDO::PARAM_STR); + break; + } + } + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e); + } + + $this->setNew(false); + } + + /** + * Update the row in the database. + * + * @param ConnectionInterface $con + * + * @return Integer Number of updated rows + * @see doSave() + */ + protected function doUpdate(ConnectionInterface $con) + { + $selectCriteria = $this->buildPkeyCriteria(); + $valuesCriteria = $this->buildCriteria(); + + return $selectCriteria->doUpdate($valuesCriteria, $con); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. + */ + public function getByName($name, $type = TableMap::TYPE_PHPNAME) + { + $pos = CreditNoteVersionTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + $field = $this->getByPosition($pos); + + return $field; + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch ($pos) { + case 0: + return $this->getId(); + break; + case 1: + return $this->getRef(); + break; + case 2: + return $this->getInvoiceRef(); + break; + case 3: + return $this->getInvoiceAddressId(); + break; + case 4: + return $this->getInvoiceDate(); + break; + case 5: + return $this->getOrderId(); + break; + case 6: + return $this->getCustomerId(); + break; + case 7: + return $this->getParentId(); + break; + case 8: + return $this->getTypeId(); + break; + case 9: + return $this->getStatusId(); + break; + case 10: + return $this->getCurrencyId(); + break; + case 11: + return $this->getCurrencyRate(); + break; + case 12: + return $this->getTotalPrice(); + break; + case 13: + return $this->getTotalPriceWithTax(); + break; + case 14: + return $this->getDiscountWithoutTax(); + break; + case 15: + return $this->getDiscountWithTax(); + break; + case 16: + return $this->getAllowPartialUse(); + break; + case 17: + return $this->getCreatedAt(); + break; + case 18: + return $this->getUpdatedAt(); + break; + case 19: + return $this->getVersion(); + break; + case 20: + return $this->getVersionCreatedAt(); + break; + case 21: + return $this->getVersionCreatedBy(); + break; + case 22: + return $this->getOrderIdVersion(); + break; + case 23: + return $this->getCustomerIdVersion(); + break; + case 24: + return $this->getParentIdVersion(); + break; + case 25: + return $this->getCreditNoteIds(); + break; + case 26: + return $this->getCreditNoteVersions(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * + * @return array an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false) + { + if (isset($alreadyDumpedObjects['CreditNoteVersion'][serialize($this->getPrimaryKey())])) { + return '*RECURSION*'; + } + $alreadyDumpedObjects['CreditNoteVersion'][serialize($this->getPrimaryKey())] = true; + $keys = CreditNoteVersionTableMap::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getId(), + $keys[1] => $this->getRef(), + $keys[2] => $this->getInvoiceRef(), + $keys[3] => $this->getInvoiceAddressId(), + $keys[4] => $this->getInvoiceDate(), + $keys[5] => $this->getOrderId(), + $keys[6] => $this->getCustomerId(), + $keys[7] => $this->getParentId(), + $keys[8] => $this->getTypeId(), + $keys[9] => $this->getStatusId(), + $keys[10] => $this->getCurrencyId(), + $keys[11] => $this->getCurrencyRate(), + $keys[12] => $this->getTotalPrice(), + $keys[13] => $this->getTotalPriceWithTax(), + $keys[14] => $this->getDiscountWithoutTax(), + $keys[15] => $this->getDiscountWithTax(), + $keys[16] => $this->getAllowPartialUse(), + $keys[17] => $this->getCreatedAt(), + $keys[18] => $this->getUpdatedAt(), + $keys[19] => $this->getVersion(), + $keys[20] => $this->getVersionCreatedAt(), + $keys[21] => $this->getVersionCreatedBy(), + $keys[22] => $this->getOrderIdVersion(), + $keys[23] => $this->getCustomerIdVersion(), + $keys[24] => $this->getParentIdVersion(), + $keys[25] => $this->getCreditNoteIds(), + $keys[26] => $this->getCreditNoteVersions(), + ); + $virtualColumns = $this->virtualColumns; + foreach ($virtualColumns as $key => $virtualColumn) { + $result[$key] = $virtualColumn; + } + + if ($includeForeignObjects) { + if (null !== $this->aCreditNote) { + $result['CreditNote'] = $this->aCreditNote->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + } + + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return void + */ + public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) + { + $pos = CreditNoteVersionTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch ($pos) { + case 0: + $this->setId($value); + break; + case 1: + $this->setRef($value); + break; + case 2: + $this->setInvoiceRef($value); + break; + case 3: + $this->setInvoiceAddressId($value); + break; + case 4: + $this->setInvoiceDate($value); + break; + case 5: + $this->setOrderId($value); + break; + case 6: + $this->setCustomerId($value); + break; + case 7: + $this->setParentId($value); + break; + case 8: + $this->setTypeId($value); + break; + case 9: + $this->setStatusId($value); + break; + case 10: + $this->setCurrencyId($value); + break; + case 11: + $this->setCurrencyRate($value); + break; + case 12: + $this->setTotalPrice($value); + break; + case 13: + $this->setTotalPriceWithTax($value); + break; + case 14: + $this->setDiscountWithoutTax($value); + break; + case 15: + $this->setDiscountWithTax($value); + break; + case 16: + $this->setAllowPartialUse($value); + break; + case 17: + $this->setCreatedAt($value); + break; + case 18: + $this->setUpdatedAt($value); + break; + case 19: + $this->setVersion($value); + break; + case 20: + $this->setVersionCreatedAt($value); + break; + case 21: + $this->setVersionCreatedBy($value); + break; + case 22: + $this->setOrderIdVersion($value); + break; + case 23: + $this->setCustomerIdVersion($value); + break; + case 24: + $this->setParentIdVersion($value); + break; + case 25: + if (!is_array($value)) { + $v = trim(substr($value, 2, -2)); + $value = $v ? explode(' | ', $v) : array(); + } + $this->setCreditNoteIds($value); + break; + case 26: + if (!is_array($value)) { + $v = trim(substr($value, 2, -2)); + $value = $v ? explode(' | ', $v) : array(); + } + $this->setCreditNoteVersions($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * The default key type is the column's TableMap::TYPE_PHPNAME. + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) + { + $keys = CreditNoteVersionTableMap::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setRef($arr[$keys[1]]); + if (array_key_exists($keys[2], $arr)) $this->setInvoiceRef($arr[$keys[2]]); + if (array_key_exists($keys[3], $arr)) $this->setInvoiceAddressId($arr[$keys[3]]); + if (array_key_exists($keys[4], $arr)) $this->setInvoiceDate($arr[$keys[4]]); + if (array_key_exists($keys[5], $arr)) $this->setOrderId($arr[$keys[5]]); + if (array_key_exists($keys[6], $arr)) $this->setCustomerId($arr[$keys[6]]); + if (array_key_exists($keys[7], $arr)) $this->setParentId($arr[$keys[7]]); + if (array_key_exists($keys[8], $arr)) $this->setTypeId($arr[$keys[8]]); + if (array_key_exists($keys[9], $arr)) $this->setStatusId($arr[$keys[9]]); + if (array_key_exists($keys[10], $arr)) $this->setCurrencyId($arr[$keys[10]]); + if (array_key_exists($keys[11], $arr)) $this->setCurrencyRate($arr[$keys[11]]); + if (array_key_exists($keys[12], $arr)) $this->setTotalPrice($arr[$keys[12]]); + if (array_key_exists($keys[13], $arr)) $this->setTotalPriceWithTax($arr[$keys[13]]); + if (array_key_exists($keys[14], $arr)) $this->setDiscountWithoutTax($arr[$keys[14]]); + if (array_key_exists($keys[15], $arr)) $this->setDiscountWithTax($arr[$keys[15]]); + if (array_key_exists($keys[16], $arr)) $this->setAllowPartialUse($arr[$keys[16]]); + if (array_key_exists($keys[17], $arr)) $this->setCreatedAt($arr[$keys[17]]); + if (array_key_exists($keys[18], $arr)) $this->setUpdatedAt($arr[$keys[18]]); + if (array_key_exists($keys[19], $arr)) $this->setVersion($arr[$keys[19]]); + if (array_key_exists($keys[20], $arr)) $this->setVersionCreatedAt($arr[$keys[20]]); + if (array_key_exists($keys[21], $arr)) $this->setVersionCreatedBy($arr[$keys[21]]); + if (array_key_exists($keys[22], $arr)) $this->setOrderIdVersion($arr[$keys[22]]); + if (array_key_exists($keys[23], $arr)) $this->setCustomerIdVersion($arr[$keys[23]]); + if (array_key_exists($keys[24], $arr)) $this->setParentIdVersion($arr[$keys[24]]); + if (array_key_exists($keys[25], $arr)) $this->setCreditNoteIds($arr[$keys[25]]); + if (array_key_exists($keys[26], $arr)) $this->setCreditNoteVersions($arr[$keys[26]]); + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(CreditNoteVersionTableMap::DATABASE_NAME); + + if ($this->isColumnModified(CreditNoteVersionTableMap::ID)) $criteria->add(CreditNoteVersionTableMap::ID, $this->id); + if ($this->isColumnModified(CreditNoteVersionTableMap::REF)) $criteria->add(CreditNoteVersionTableMap::REF, $this->ref); + if ($this->isColumnModified(CreditNoteVersionTableMap::INVOICE_REF)) $criteria->add(CreditNoteVersionTableMap::INVOICE_REF, $this->invoice_ref); + if ($this->isColumnModified(CreditNoteVersionTableMap::INVOICE_ADDRESS_ID)) $criteria->add(CreditNoteVersionTableMap::INVOICE_ADDRESS_ID, $this->invoice_address_id); + if ($this->isColumnModified(CreditNoteVersionTableMap::INVOICE_DATE)) $criteria->add(CreditNoteVersionTableMap::INVOICE_DATE, $this->invoice_date); + if ($this->isColumnModified(CreditNoteVersionTableMap::ORDER_ID)) $criteria->add(CreditNoteVersionTableMap::ORDER_ID, $this->order_id); + if ($this->isColumnModified(CreditNoteVersionTableMap::CUSTOMER_ID)) $criteria->add(CreditNoteVersionTableMap::CUSTOMER_ID, $this->customer_id); + if ($this->isColumnModified(CreditNoteVersionTableMap::PARENT_ID)) $criteria->add(CreditNoteVersionTableMap::PARENT_ID, $this->parent_id); + if ($this->isColumnModified(CreditNoteVersionTableMap::TYPE_ID)) $criteria->add(CreditNoteVersionTableMap::TYPE_ID, $this->type_id); + if ($this->isColumnModified(CreditNoteVersionTableMap::STATUS_ID)) $criteria->add(CreditNoteVersionTableMap::STATUS_ID, $this->status_id); + if ($this->isColumnModified(CreditNoteVersionTableMap::CURRENCY_ID)) $criteria->add(CreditNoteVersionTableMap::CURRENCY_ID, $this->currency_id); + if ($this->isColumnModified(CreditNoteVersionTableMap::CURRENCY_RATE)) $criteria->add(CreditNoteVersionTableMap::CURRENCY_RATE, $this->currency_rate); + if ($this->isColumnModified(CreditNoteVersionTableMap::TOTAL_PRICE)) $criteria->add(CreditNoteVersionTableMap::TOTAL_PRICE, $this->total_price); + if ($this->isColumnModified(CreditNoteVersionTableMap::TOTAL_PRICE_WITH_TAX)) $criteria->add(CreditNoteVersionTableMap::TOTAL_PRICE_WITH_TAX, $this->total_price_with_tax); + if ($this->isColumnModified(CreditNoteVersionTableMap::DISCOUNT_WITHOUT_TAX)) $criteria->add(CreditNoteVersionTableMap::DISCOUNT_WITHOUT_TAX, $this->discount_without_tax); + if ($this->isColumnModified(CreditNoteVersionTableMap::DISCOUNT_WITH_TAX)) $criteria->add(CreditNoteVersionTableMap::DISCOUNT_WITH_TAX, $this->discount_with_tax); + if ($this->isColumnModified(CreditNoteVersionTableMap::ALLOW_PARTIAL_USE)) $criteria->add(CreditNoteVersionTableMap::ALLOW_PARTIAL_USE, $this->allow_partial_use); + if ($this->isColumnModified(CreditNoteVersionTableMap::CREATED_AT)) $criteria->add(CreditNoteVersionTableMap::CREATED_AT, $this->created_at); + if ($this->isColumnModified(CreditNoteVersionTableMap::UPDATED_AT)) $criteria->add(CreditNoteVersionTableMap::UPDATED_AT, $this->updated_at); + if ($this->isColumnModified(CreditNoteVersionTableMap::VERSION)) $criteria->add(CreditNoteVersionTableMap::VERSION, $this->version); + if ($this->isColumnModified(CreditNoteVersionTableMap::VERSION_CREATED_AT)) $criteria->add(CreditNoteVersionTableMap::VERSION_CREATED_AT, $this->version_created_at); + if ($this->isColumnModified(CreditNoteVersionTableMap::VERSION_CREATED_BY)) $criteria->add(CreditNoteVersionTableMap::VERSION_CREATED_BY, $this->version_created_by); + if ($this->isColumnModified(CreditNoteVersionTableMap::ORDER_ID_VERSION)) $criteria->add(CreditNoteVersionTableMap::ORDER_ID_VERSION, $this->order_id_version); + if ($this->isColumnModified(CreditNoteVersionTableMap::CUSTOMER_ID_VERSION)) $criteria->add(CreditNoteVersionTableMap::CUSTOMER_ID_VERSION, $this->customer_id_version); + if ($this->isColumnModified(CreditNoteVersionTableMap::PARENT_ID_VERSION)) $criteria->add(CreditNoteVersionTableMap::PARENT_ID_VERSION, $this->parent_id_version); + if ($this->isColumnModified(CreditNoteVersionTableMap::CREDIT_NOTE_IDS)) $criteria->add(CreditNoteVersionTableMap::CREDIT_NOTE_IDS, $this->credit_note_ids); + if ($this->isColumnModified(CreditNoteVersionTableMap::CREDIT_NOTE_VERSIONS)) $criteria->add(CreditNoteVersionTableMap::CREDIT_NOTE_VERSIONS, $this->credit_note_versions); + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(CreditNoteVersionTableMap::DATABASE_NAME); + $criteria->add(CreditNoteVersionTableMap::ID, $this->id); + $criteria->add(CreditNoteVersionTableMap::VERSION, $this->version); + + return $criteria; + } + + /** + * Returns the composite primary key for this object. + * The array elements will be in same order as specified in XML. + * @return array + */ + public function getPrimaryKey() + { + $pks = array(); + $pks[0] = $this->getId(); + $pks[1] = $this->getVersion(); + + return $pks; + } + + /** + * Set the [composite] primary key. + * + * @param array $keys The elements of the composite key (order must match the order in XML file). + * @return void + */ + public function setPrimaryKey($keys) + { + $this->setId($keys[0]); + $this->setVersion($keys[1]); + } + + /** + * Returns true if the primary key for this object is null. + * @return boolean + */ + public function isPrimaryKeyNull() + { + + return (null === $this->getId()) && (null === $this->getVersion()); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of \CreditNote\Model\CreditNoteVersion (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false, $makeNew = true) + { + $copyObj->setId($this->getId()); + $copyObj->setRef($this->getRef()); + $copyObj->setInvoiceRef($this->getInvoiceRef()); + $copyObj->setInvoiceAddressId($this->getInvoiceAddressId()); + $copyObj->setInvoiceDate($this->getInvoiceDate()); + $copyObj->setOrderId($this->getOrderId()); + $copyObj->setCustomerId($this->getCustomerId()); + $copyObj->setParentId($this->getParentId()); + $copyObj->setTypeId($this->getTypeId()); + $copyObj->setStatusId($this->getStatusId()); + $copyObj->setCurrencyId($this->getCurrencyId()); + $copyObj->setCurrencyRate($this->getCurrencyRate()); + $copyObj->setTotalPrice($this->getTotalPrice()); + $copyObj->setTotalPriceWithTax($this->getTotalPriceWithTax()); + $copyObj->setDiscountWithoutTax($this->getDiscountWithoutTax()); + $copyObj->setDiscountWithTax($this->getDiscountWithTax()); + $copyObj->setAllowPartialUse($this->getAllowPartialUse()); + $copyObj->setCreatedAt($this->getCreatedAt()); + $copyObj->setUpdatedAt($this->getUpdatedAt()); + $copyObj->setVersion($this->getVersion()); + $copyObj->setVersionCreatedAt($this->getVersionCreatedAt()); + $copyObj->setVersionCreatedBy($this->getVersionCreatedBy()); + $copyObj->setOrderIdVersion($this->getOrderIdVersion()); + $copyObj->setCustomerIdVersion($this->getCustomerIdVersion()); + $copyObj->setParentIdVersion($this->getParentIdVersion()); + $copyObj->setCreditNoteIds($this->getCreditNoteIds()); + $copyObj->setCreditNoteVersions($this->getCreditNoteVersions()); + if ($makeNew) { + $copyObj->setNew(true); + } + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \CreditNote\Model\CreditNoteVersion Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + + return $copyObj; + } + + /** + * Declares an association between this object and a ChildCreditNote object. + * + * @param ChildCreditNote $v + * @return \CreditNote\Model\CreditNoteVersion The current object (for fluent API support) + * @throws PropelException + */ + public function setCreditNote(ChildCreditNote $v = null) + { + if ($v === null) { + $this->setId(NULL); + } else { + $this->setId($v->getId()); + } + + $this->aCreditNote = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCreditNote object, it will not be re-added. + if ($v !== null) { + $v->addCreditNoteVersion($this); + } + + + return $this; + } + + + /** + * Get the associated ChildCreditNote object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCreditNote The associated ChildCreditNote object. + * @throws PropelException + */ + public function getCreditNote(ConnectionInterface $con = null) + { + if ($this->aCreditNote === null && ($this->id !== null)) { + $this->aCreditNote = ChildCreditNoteQuery::create()->findPk($this->id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCreditNote->addCreditNoteVersions($this); + */ + } + + return $this->aCreditNote; + } + + /** + * Clears the current object and sets all attributes to their default values + */ + public function clear() + { + $this->id = null; + $this->ref = null; + $this->invoice_ref = null; + $this->invoice_address_id = null; + $this->invoice_date = null; + $this->order_id = null; + $this->customer_id = null; + $this->parent_id = null; + $this->type_id = null; + $this->status_id = null; + $this->currency_id = null; + $this->currency_rate = null; + $this->total_price = null; + $this->total_price_with_tax = null; + $this->discount_without_tax = null; + $this->discount_with_tax = null; + $this->allow_partial_use = null; + $this->created_at = null; + $this->updated_at = null; + $this->version = null; + $this->version_created_at = null; + $this->version_created_by = null; + $this->order_id_version = null; + $this->customer_id_version = null; + $this->parent_id_version = null; + $this->credit_note_ids = null; + $this->credit_note_ids_unserialized = null; + $this->credit_note_versions = null; + $this->credit_note_versions_unserialized = null; + $this->alreadyInSave = false; + $this->clearAllReferences(); + $this->applyDefaultValues(); + $this->resetModified(); + $this->setNew(true); + $this->setDeleted(false); + } + + /** + * Resets all references to other model objects or collections of model objects. + * + * This method is a user-space workaround for PHP's inability to garbage collect + * objects with circular references (even in PHP 5.3). This is currently necessary + * when using Propel in certain daemon or large-volume/high-memory operations. + * + * @param boolean $deep Whether to also clear the references on all referrer objects. + */ + public function clearAllReferences($deep = false) + { + if ($deep) { + } // if ($deep) + + $this->aCreditNote = null; + } + + /** + * Return the string representation of this object + * + * @return string + */ + public function __toString() + { + return (string) $this->exportTo(CreditNoteVersionTableMap::DEFAULT_STRING_FORMAT); + } + + /** + * Code to be run before persisting the object + * @param ConnectionInterface $con + * @return boolean + */ + public function preSave(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after persisting the object + * @param ConnectionInterface $con + */ + public function postSave(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before inserting to database + * @param ConnectionInterface $con + * @return boolean + */ + public function preInsert(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after inserting to database + * @param ConnectionInterface $con + */ + public function postInsert(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before updating the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preUpdate(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after updating the object in database + * @param ConnectionInterface $con + */ + public function postUpdate(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before deleting the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preDelete(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after deleting the object in database + * @param ConnectionInterface $con + */ + public function postDelete(ConnectionInterface $con = null) + { + + } + + + /** + * Derived method to catches calls to undefined methods. + * + * Provides magic import/export method support (fromXML()/toXML(), fromYAML()/toYAML(), etc.). + * Allows to define default __call() behavior if you overwrite __call() + * + * @param string $name + * @param mixed $params + * + * @return array|string + */ + public function __call($name, $params) + { + if (0 === strpos($name, 'get')) { + $virtualColumn = substr($name, 3); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + + $virtualColumn = lcfirst($virtualColumn); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + } + + if (0 === strpos($name, 'from')) { + $format = substr($name, 4); + + return $this->importFrom($format, reset($params)); + } + + if (0 === strpos($name, 'to')) { + $format = substr($name, 2); + $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true; + + return $this->exportTo($format, $includeLazyLoadColumns); + } + + throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name)); + } + +} diff --git a/local/modules/CreditNote/Model/Base/CreditNoteVersionQuery.php b/local/modules/CreditNote/Model/Base/CreditNoteVersionQuery.php new file mode 100644 index 000000000..70a5d7f88 --- /dev/null +++ b/local/modules/CreditNote/Model/Base/CreditNoteVersionQuery.php @@ -0,0 +1,1650 @@ +setModelAlias($modelAlias); + } + if ($criteria instanceof Criteria) { + $query->mergeWith($criteria); + } + + return $query; + } + + /** + * Find object by primary key. + * Propel uses the instance pool to skip the database if the object exists. + * Go fast if the query is untouched. + * + * + * $obj = $c->findPk(array(12, 34), $con); + * + * + * @param array[$id, $version] $key Primary key to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ChildCreditNoteVersion|array|mixed the result, formatted by the current formatter + */ + public function findPk($key, $con = null) + { + if ($key === null) { + return null; + } + if ((null !== ($obj = CreditNoteVersionTableMap::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) { + // the object is already in the instance pool + return $obj; + } + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(CreditNoteVersionTableMap::DATABASE_NAME); + } + $this->basePreSelect($con); + if ($this->formatter || $this->modelAlias || $this->with || $this->select + || $this->selectColumns || $this->asColumns || $this->selectModifiers + || $this->map || $this->having || $this->joins) { + return $this->findPkComplex($key, $con); + } else { + return $this->findPkSimple($key, $con); + } + } + + /** + * Find object by primary key using raw SQL to go fast. + * Bypass doSelect() and the object formatter by using generated code. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCreditNoteVersion A model object, or null if the key is not found + */ + protected function findPkSimple($key, $con) + { + $sql = 'SELECT ID, REF, INVOICE_REF, INVOICE_ADDRESS_ID, INVOICE_DATE, ORDER_ID, CUSTOMER_ID, PARENT_ID, TYPE_ID, STATUS_ID, CURRENCY_ID, CURRENCY_RATE, TOTAL_PRICE, TOTAL_PRICE_WITH_TAX, DISCOUNT_WITHOUT_TAX, DISCOUNT_WITH_TAX, ALLOW_PARTIAL_USE, CREATED_AT, UPDATED_AT, VERSION, VERSION_CREATED_AT, VERSION_CREATED_BY, ORDER_ID_VERSION, CUSTOMER_ID_VERSION, PARENT_ID_VERSION, CREDIT_NOTE_IDS, CREDIT_NOTE_VERSIONS FROM credit_note_version WHERE ID = :p0 AND VERSION = :p1'; + try { + $stmt = $con->prepare($sql); + $stmt->bindValue(':p0', $key[0], PDO::PARAM_INT); + $stmt->bindValue(':p1', $key[1], PDO::PARAM_INT); + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e); + } + $obj = null; + if ($row = $stmt->fetch(\PDO::FETCH_NUM)) { + $obj = new ChildCreditNoteVersion(); + $obj->hydrate($row); + CreditNoteVersionTableMap::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1]))); + } + $stmt->closeCursor(); + + return $obj; + } + + /** + * Find object by primary key. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildCreditNoteVersion|array|mixed the result, formatted by the current formatter + */ + protected function findPkComplex($key, $con) + { + // As the query uses a PK condition, no limit(1) is necessary. + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKey($key) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher); + } + + /** + * Find objects by primary key + * + * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); + * + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter + */ + public function findPks($keys, $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getReadConnection($this->getDbName()); + } + $this->basePreSelect($con); + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKeys($keys) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->format($dataFetcher); + } + + /** + * Filter the query by primary key + * + * @param mixed $key Primary key to use for the query + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByPrimaryKey($key) + { + $this->addUsingAlias(CreditNoteVersionTableMap::ID, $key[0], Criteria::EQUAL); + $this->addUsingAlias(CreditNoteVersionTableMap::VERSION, $key[1], Criteria::EQUAL); + + return $this; + } + + /** + * Filter the query by a list of primary keys + * + * @param array $keys The list of primary key to use for the query + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByPrimaryKeys($keys) + { + if (empty($keys)) { + return $this->add(null, '1<>1', Criteria::CUSTOM); + } + foreach ($keys as $key) { + $cton0 = $this->getNewCriterion(CreditNoteVersionTableMap::ID, $key[0], Criteria::EQUAL); + $cton1 = $this->getNewCriterion(CreditNoteVersionTableMap::VERSION, $key[1], Criteria::EQUAL); + $cton0->addAnd($cton1); + $this->addOr($cton0); + } + + return $this; + } + + /** + * Filter the query on the id column + * + * Example usage: + * + * $query->filterById(1234); // WHERE id = 1234 + * $query->filterById(array(12, 34)); // WHERE id IN (12, 34) + * $query->filterById(array('min' => 12)); // WHERE id > 12 + * + * + * @see filterByCreditNote() + * + * @param mixed $id The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterById($id = null, $comparison = null) + { + if (is_array($id)) { + $useMinMax = false; + if (isset($id['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::ID, $id['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($id['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::ID, $id['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::ID, $id, $comparison); + } + + /** + * Filter the query on the ref column + * + * Example usage: + * + * $query->filterByRef('fooValue'); // WHERE ref = 'fooValue' + * $query->filterByRef('%fooValue%'); // WHERE ref LIKE '%fooValue%' + * + * + * @param string $ref The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByRef($ref = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($ref)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $ref)) { + $ref = str_replace('*', '%', $ref); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::REF, $ref, $comparison); + } + + /** + * Filter the query on the invoice_ref column + * + * Example usage: + * + * $query->filterByInvoiceRef('fooValue'); // WHERE invoice_ref = 'fooValue' + * $query->filterByInvoiceRef('%fooValue%'); // WHERE invoice_ref LIKE '%fooValue%' + * + * + * @param string $invoiceRef The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByInvoiceRef($invoiceRef = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($invoiceRef)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $invoiceRef)) { + $invoiceRef = str_replace('*', '%', $invoiceRef); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::INVOICE_REF, $invoiceRef, $comparison); + } + + /** + * Filter the query on the invoice_address_id column + * + * Example usage: + * + * $query->filterByInvoiceAddressId(1234); // WHERE invoice_address_id = 1234 + * $query->filterByInvoiceAddressId(array(12, 34)); // WHERE invoice_address_id IN (12, 34) + * $query->filterByInvoiceAddressId(array('min' => 12)); // WHERE invoice_address_id > 12 + * + * + * @param mixed $invoiceAddressId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByInvoiceAddressId($invoiceAddressId = null, $comparison = null) + { + if (is_array($invoiceAddressId)) { + $useMinMax = false; + if (isset($invoiceAddressId['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::INVOICE_ADDRESS_ID, $invoiceAddressId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($invoiceAddressId['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::INVOICE_ADDRESS_ID, $invoiceAddressId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::INVOICE_ADDRESS_ID, $invoiceAddressId, $comparison); + } + + /** + * Filter the query on the invoice_date column + * + * Example usage: + * + * $query->filterByInvoiceDate('2011-03-14'); // WHERE invoice_date = '2011-03-14' + * $query->filterByInvoiceDate('now'); // WHERE invoice_date = '2011-03-14' + * $query->filterByInvoiceDate(array('max' => 'yesterday')); // WHERE invoice_date > '2011-03-13' + * + * + * @param mixed $invoiceDate The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByInvoiceDate($invoiceDate = null, $comparison = null) + { + if (is_array($invoiceDate)) { + $useMinMax = false; + if (isset($invoiceDate['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::INVOICE_DATE, $invoiceDate['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($invoiceDate['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::INVOICE_DATE, $invoiceDate['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::INVOICE_DATE, $invoiceDate, $comparison); + } + + /** + * Filter the query on the order_id column + * + * Example usage: + * + * $query->filterByOrderId(1234); // WHERE order_id = 1234 + * $query->filterByOrderId(array(12, 34)); // WHERE order_id IN (12, 34) + * $query->filterByOrderId(array('min' => 12)); // WHERE order_id > 12 + * + * + * @param mixed $orderId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByOrderId($orderId = null, $comparison = null) + { + if (is_array($orderId)) { + $useMinMax = false; + if (isset($orderId['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::ORDER_ID, $orderId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($orderId['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::ORDER_ID, $orderId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::ORDER_ID, $orderId, $comparison); + } + + /** + * Filter the query on the customer_id column + * + * Example usage: + * + * $query->filterByCustomerId(1234); // WHERE customer_id = 1234 + * $query->filterByCustomerId(array(12, 34)); // WHERE customer_id IN (12, 34) + * $query->filterByCustomerId(array('min' => 12)); // WHERE customer_id > 12 + * + * + * @param mixed $customerId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByCustomerId($customerId = null, $comparison = null) + { + if (is_array($customerId)) { + $useMinMax = false; + if (isset($customerId['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::CUSTOMER_ID, $customerId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($customerId['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::CUSTOMER_ID, $customerId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::CUSTOMER_ID, $customerId, $comparison); + } + + /** + * Filter the query on the parent_id column + * + * Example usage: + * + * $query->filterByParentId(1234); // WHERE parent_id = 1234 + * $query->filterByParentId(array(12, 34)); // WHERE parent_id IN (12, 34) + * $query->filterByParentId(array('min' => 12)); // WHERE parent_id > 12 + * + * + * @param mixed $parentId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByParentId($parentId = null, $comparison = null) + { + if (is_array($parentId)) { + $useMinMax = false; + if (isset($parentId['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::PARENT_ID, $parentId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($parentId['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::PARENT_ID, $parentId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::PARENT_ID, $parentId, $comparison); + } + + /** + * Filter the query on the type_id column + * + * Example usage: + * + * $query->filterByTypeId(1234); // WHERE type_id = 1234 + * $query->filterByTypeId(array(12, 34)); // WHERE type_id IN (12, 34) + * $query->filterByTypeId(array('min' => 12)); // WHERE type_id > 12 + * + * + * @param mixed $typeId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByTypeId($typeId = null, $comparison = null) + { + if (is_array($typeId)) { + $useMinMax = false; + if (isset($typeId['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::TYPE_ID, $typeId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($typeId['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::TYPE_ID, $typeId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::TYPE_ID, $typeId, $comparison); + } + + /** + * Filter the query on the status_id column + * + * Example usage: + * + * $query->filterByStatusId(1234); // WHERE status_id = 1234 + * $query->filterByStatusId(array(12, 34)); // WHERE status_id IN (12, 34) + * $query->filterByStatusId(array('min' => 12)); // WHERE status_id > 12 + * + * + * @param mixed $statusId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByStatusId($statusId = null, $comparison = null) + { + if (is_array($statusId)) { + $useMinMax = false; + if (isset($statusId['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::STATUS_ID, $statusId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($statusId['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::STATUS_ID, $statusId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::STATUS_ID, $statusId, $comparison); + } + + /** + * Filter the query on the currency_id column + * + * Example usage: + * + * $query->filterByCurrencyId(1234); // WHERE currency_id = 1234 + * $query->filterByCurrencyId(array(12, 34)); // WHERE currency_id IN (12, 34) + * $query->filterByCurrencyId(array('min' => 12)); // WHERE currency_id > 12 + * + * + * @param mixed $currencyId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByCurrencyId($currencyId = null, $comparison = null) + { + if (is_array($currencyId)) { + $useMinMax = false; + if (isset($currencyId['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::CURRENCY_ID, $currencyId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($currencyId['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::CURRENCY_ID, $currencyId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::CURRENCY_ID, $currencyId, $comparison); + } + + /** + * Filter the query on the currency_rate column + * + * Example usage: + * + * $query->filterByCurrencyRate(1234); // WHERE currency_rate = 1234 + * $query->filterByCurrencyRate(array(12, 34)); // WHERE currency_rate IN (12, 34) + * $query->filterByCurrencyRate(array('min' => 12)); // WHERE currency_rate > 12 + * + * + * @param mixed $currencyRate The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByCurrencyRate($currencyRate = null, $comparison = null) + { + if (is_array($currencyRate)) { + $useMinMax = false; + if (isset($currencyRate['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::CURRENCY_RATE, $currencyRate['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($currencyRate['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::CURRENCY_RATE, $currencyRate['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::CURRENCY_RATE, $currencyRate, $comparison); + } + + /** + * Filter the query on the total_price column + * + * Example usage: + * + * $query->filterByTotalPrice(1234); // WHERE total_price = 1234 + * $query->filterByTotalPrice(array(12, 34)); // WHERE total_price IN (12, 34) + * $query->filterByTotalPrice(array('min' => 12)); // WHERE total_price > 12 + * + * + * @param mixed $totalPrice The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByTotalPrice($totalPrice = null, $comparison = null) + { + if (is_array($totalPrice)) { + $useMinMax = false; + if (isset($totalPrice['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::TOTAL_PRICE, $totalPrice['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($totalPrice['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::TOTAL_PRICE, $totalPrice['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::TOTAL_PRICE, $totalPrice, $comparison); + } + + /** + * Filter the query on the total_price_with_tax column + * + * Example usage: + * + * $query->filterByTotalPriceWithTax(1234); // WHERE total_price_with_tax = 1234 + * $query->filterByTotalPriceWithTax(array(12, 34)); // WHERE total_price_with_tax IN (12, 34) + * $query->filterByTotalPriceWithTax(array('min' => 12)); // WHERE total_price_with_tax > 12 + * + * + * @param mixed $totalPriceWithTax The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByTotalPriceWithTax($totalPriceWithTax = null, $comparison = null) + { + if (is_array($totalPriceWithTax)) { + $useMinMax = false; + if (isset($totalPriceWithTax['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::TOTAL_PRICE_WITH_TAX, $totalPriceWithTax['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($totalPriceWithTax['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::TOTAL_PRICE_WITH_TAX, $totalPriceWithTax['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::TOTAL_PRICE_WITH_TAX, $totalPriceWithTax, $comparison); + } + + /** + * Filter the query on the discount_without_tax column + * + * Example usage: + * + * $query->filterByDiscountWithoutTax(1234); // WHERE discount_without_tax = 1234 + * $query->filterByDiscountWithoutTax(array(12, 34)); // WHERE discount_without_tax IN (12, 34) + * $query->filterByDiscountWithoutTax(array('min' => 12)); // WHERE discount_without_tax > 12 + * + * + * @param mixed $discountWithoutTax The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByDiscountWithoutTax($discountWithoutTax = null, $comparison = null) + { + if (is_array($discountWithoutTax)) { + $useMinMax = false; + if (isset($discountWithoutTax['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::DISCOUNT_WITHOUT_TAX, $discountWithoutTax['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($discountWithoutTax['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::DISCOUNT_WITHOUT_TAX, $discountWithoutTax['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::DISCOUNT_WITHOUT_TAX, $discountWithoutTax, $comparison); + } + + /** + * Filter the query on the discount_with_tax column + * + * Example usage: + * + * $query->filterByDiscountWithTax(1234); // WHERE discount_with_tax = 1234 + * $query->filterByDiscountWithTax(array(12, 34)); // WHERE discount_with_tax IN (12, 34) + * $query->filterByDiscountWithTax(array('min' => 12)); // WHERE discount_with_tax > 12 + * + * + * @param mixed $discountWithTax The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByDiscountWithTax($discountWithTax = null, $comparison = null) + { + if (is_array($discountWithTax)) { + $useMinMax = false; + if (isset($discountWithTax['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::DISCOUNT_WITH_TAX, $discountWithTax['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($discountWithTax['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::DISCOUNT_WITH_TAX, $discountWithTax['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::DISCOUNT_WITH_TAX, $discountWithTax, $comparison); + } + + /** + * Filter the query on the allow_partial_use column + * + * Example usage: + * + * $query->filterByAllowPartialUse(true); // WHERE allow_partial_use = true + * $query->filterByAllowPartialUse('yes'); // WHERE allow_partial_use = true + * + * + * @param boolean|string $allowPartialUse The value to use as filter. + * Non-boolean arguments are converted using the following rules: + * * 1, '1', 'true', 'on', and 'yes' are converted to boolean true + * * 0, '0', 'false', 'off', and 'no' are converted to boolean false + * Check on string values is case insensitive (so 'FaLsE' is seen as 'false'). + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByAllowPartialUse($allowPartialUse = null, $comparison = null) + { + if (is_string($allowPartialUse)) { + $allow_partial_use = in_array(strtolower($allowPartialUse), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::ALLOW_PARTIAL_USE, $allowPartialUse, $comparison); + } + + /** + * Filter the query on the created_at column + * + * Example usage: + * + * $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14' + * $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14' + * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' + * + * + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByCreatedAt($createdAt = null, $comparison = null) + { + if (is_array($createdAt)) { + $useMinMax = false; + if (isset($createdAt['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($createdAt['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::CREATED_AT, $createdAt, $comparison); + } + + /** + * Filter the query on the updated_at column + * + * Example usage: + * + * $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14' + * $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14' + * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' + * + * + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByUpdatedAt($updatedAt = null, $comparison = null) + { + if (is_array($updatedAt)) { + $useMinMax = false; + if (isset($updatedAt['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($updatedAt['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::UPDATED_AT, $updatedAt, $comparison); + } + + /** + * Filter the query on the version column + * + * Example usage: + * + * $query->filterByVersion(1234); // WHERE version = 1234 + * $query->filterByVersion(array(12, 34)); // WHERE version IN (12, 34) + * $query->filterByVersion(array('min' => 12)); // WHERE version > 12 + * + * + * @param mixed $version The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByVersion($version = null, $comparison = null) + { + if (is_array($version)) { + $useMinMax = false; + if (isset($version['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::VERSION, $version['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($version['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::VERSION, $version['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::VERSION, $version, $comparison); + } + + /** + * Filter the query on the version_created_at column + * + * Example usage: + * + * $query->filterByVersionCreatedAt('2011-03-14'); // WHERE version_created_at = '2011-03-14' + * $query->filterByVersionCreatedAt('now'); // WHERE version_created_at = '2011-03-14' + * $query->filterByVersionCreatedAt(array('max' => 'yesterday')); // WHERE version_created_at > '2011-03-13' + * + * + * @param mixed $versionCreatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByVersionCreatedAt($versionCreatedAt = null, $comparison = null) + { + if (is_array($versionCreatedAt)) { + $useMinMax = false; + if (isset($versionCreatedAt['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::VERSION_CREATED_AT, $versionCreatedAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($versionCreatedAt['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::VERSION_CREATED_AT, $versionCreatedAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::VERSION_CREATED_AT, $versionCreatedAt, $comparison); + } + + /** + * Filter the query on the version_created_by column + * + * Example usage: + * + * $query->filterByVersionCreatedBy('fooValue'); // WHERE version_created_by = 'fooValue' + * $query->filterByVersionCreatedBy('%fooValue%'); // WHERE version_created_by LIKE '%fooValue%' + * + * + * @param string $versionCreatedBy The value to use as filter. + * Accepts wildcards (* and % trigger a LIKE) + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByVersionCreatedBy($versionCreatedBy = null, $comparison = null) + { + if (null === $comparison) { + if (is_array($versionCreatedBy)) { + $comparison = Criteria::IN; + } elseif (preg_match('/[\%\*]/', $versionCreatedBy)) { + $versionCreatedBy = str_replace('*', '%', $versionCreatedBy); + $comparison = Criteria::LIKE; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::VERSION_CREATED_BY, $versionCreatedBy, $comparison); + } + + /** + * Filter the query on the order_id_version column + * + * Example usage: + * + * $query->filterByOrderIdVersion(1234); // WHERE order_id_version = 1234 + * $query->filterByOrderIdVersion(array(12, 34)); // WHERE order_id_version IN (12, 34) + * $query->filterByOrderIdVersion(array('min' => 12)); // WHERE order_id_version > 12 + * + * + * @param mixed $orderIdVersion The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByOrderIdVersion($orderIdVersion = null, $comparison = null) + { + if (is_array($orderIdVersion)) { + $useMinMax = false; + if (isset($orderIdVersion['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::ORDER_ID_VERSION, $orderIdVersion['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($orderIdVersion['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::ORDER_ID_VERSION, $orderIdVersion['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::ORDER_ID_VERSION, $orderIdVersion, $comparison); + } + + /** + * Filter the query on the customer_id_version column + * + * Example usage: + * + * $query->filterByCustomerIdVersion(1234); // WHERE customer_id_version = 1234 + * $query->filterByCustomerIdVersion(array(12, 34)); // WHERE customer_id_version IN (12, 34) + * $query->filterByCustomerIdVersion(array('min' => 12)); // WHERE customer_id_version > 12 + * + * + * @param mixed $customerIdVersion The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByCustomerIdVersion($customerIdVersion = null, $comparison = null) + { + if (is_array($customerIdVersion)) { + $useMinMax = false; + if (isset($customerIdVersion['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::CUSTOMER_ID_VERSION, $customerIdVersion['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($customerIdVersion['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::CUSTOMER_ID_VERSION, $customerIdVersion['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::CUSTOMER_ID_VERSION, $customerIdVersion, $comparison); + } + + /** + * Filter the query on the parent_id_version column + * + * Example usage: + * + * $query->filterByParentIdVersion(1234); // WHERE parent_id_version = 1234 + * $query->filterByParentIdVersion(array(12, 34)); // WHERE parent_id_version IN (12, 34) + * $query->filterByParentIdVersion(array('min' => 12)); // WHERE parent_id_version > 12 + * + * + * @param mixed $parentIdVersion The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByParentIdVersion($parentIdVersion = null, $comparison = null) + { + if (is_array($parentIdVersion)) { + $useMinMax = false; + if (isset($parentIdVersion['min'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::PARENT_ID_VERSION, $parentIdVersion['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($parentIdVersion['max'])) { + $this->addUsingAlias(CreditNoteVersionTableMap::PARENT_ID_VERSION, $parentIdVersion['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::PARENT_ID_VERSION, $parentIdVersion, $comparison); + } + + /** + * Filter the query on the credit_note_ids column + * + * @param array $creditNoteIds The values to use as filter. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByCreditNoteIds($creditNoteIds = null, $comparison = null) + { + $key = $this->getAliasedColName(CreditNoteVersionTableMap::CREDIT_NOTE_IDS); + if (null === $comparison || $comparison == Criteria::CONTAINS_ALL) { + foreach ($creditNoteIds as $value) { + $value = '%| ' . $value . ' |%'; + if ($this->containsKey($key)) { + $this->addAnd($key, $value, Criteria::LIKE); + } else { + $this->add($key, $value, Criteria::LIKE); + } + } + + return $this; + } elseif ($comparison == Criteria::CONTAINS_SOME) { + foreach ($creditNoteIds as $value) { + $value = '%| ' . $value . ' |%'; + if ($this->containsKey($key)) { + $this->addOr($key, $value, Criteria::LIKE); + } else { + $this->add($key, $value, Criteria::LIKE); + } + } + + return $this; + } elseif ($comparison == Criteria::CONTAINS_NONE) { + foreach ($creditNoteIds as $value) { + $value = '%| ' . $value . ' |%'; + if ($this->containsKey($key)) { + $this->addAnd($key, $value, Criteria::NOT_LIKE); + } else { + $this->add($key, $value, Criteria::NOT_LIKE); + } + } + $this->addOr($key, null, Criteria::ISNULL); + + return $this; + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::CREDIT_NOTE_IDS, $creditNoteIds, $comparison); + } + + /** + * Filter the query on the credit_note_ids column + * @param mixed $creditNoteIds The value to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::CONTAINS_ALL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByCreditNoteId($creditNoteIds = null, $comparison = null) + { + if (null === $comparison || $comparison == Criteria::CONTAINS_ALL) { + if (is_scalar($creditNoteIds)) { + $creditNoteIds = '%| ' . $creditNoteIds . ' |%'; + $comparison = Criteria::LIKE; + } + } elseif ($comparison == Criteria::CONTAINS_NONE) { + $creditNoteIds = '%| ' . $creditNoteIds . ' |%'; + $comparison = Criteria::NOT_LIKE; + $key = $this->getAliasedColName(CreditNoteVersionTableMap::CREDIT_NOTE_IDS); + if ($this->containsKey($key)) { + $this->addAnd($key, $creditNoteIds, $comparison); + } else { + $this->addAnd($key, $creditNoteIds, $comparison); + } + $this->addOr($key, null, Criteria::ISNULL); + + return $this; + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::CREDIT_NOTE_IDS, $creditNoteIds, $comparison); + } + + /** + * Filter the query on the credit_note_versions column + * + * @param array $creditNoteVersions The values to use as filter. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByCreditNoteVersions($creditNoteVersions = null, $comparison = null) + { + $key = $this->getAliasedColName(CreditNoteVersionTableMap::CREDIT_NOTE_VERSIONS); + if (null === $comparison || $comparison == Criteria::CONTAINS_ALL) { + foreach ($creditNoteVersions as $value) { + $value = '%| ' . $value . ' |%'; + if ($this->containsKey($key)) { + $this->addAnd($key, $value, Criteria::LIKE); + } else { + $this->add($key, $value, Criteria::LIKE); + } + } + + return $this; + } elseif ($comparison == Criteria::CONTAINS_SOME) { + foreach ($creditNoteVersions as $value) { + $value = '%| ' . $value . ' |%'; + if ($this->containsKey($key)) { + $this->addOr($key, $value, Criteria::LIKE); + } else { + $this->add($key, $value, Criteria::LIKE); + } + } + + return $this; + } elseif ($comparison == Criteria::CONTAINS_NONE) { + foreach ($creditNoteVersions as $value) { + $value = '%| ' . $value . ' |%'; + if ($this->containsKey($key)) { + $this->addAnd($key, $value, Criteria::NOT_LIKE); + } else { + $this->add($key, $value, Criteria::NOT_LIKE); + } + } + $this->addOr($key, null, Criteria::ISNULL); + + return $this; + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::CREDIT_NOTE_VERSIONS, $creditNoteVersions, $comparison); + } + + /** + * Filter the query on the credit_note_versions column + * @param mixed $creditNoteVersions The value to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::CONTAINS_ALL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByCreditNoteVersion($creditNoteVersions = null, $comparison = null) + { + if (null === $comparison || $comparison == Criteria::CONTAINS_ALL) { + if (is_scalar($creditNoteVersions)) { + $creditNoteVersions = '%| ' . $creditNoteVersions . ' |%'; + $comparison = Criteria::LIKE; + } + } elseif ($comparison == Criteria::CONTAINS_NONE) { + $creditNoteVersions = '%| ' . $creditNoteVersions . ' |%'; + $comparison = Criteria::NOT_LIKE; + $key = $this->getAliasedColName(CreditNoteVersionTableMap::CREDIT_NOTE_VERSIONS); + if ($this->containsKey($key)) { + $this->addAnd($key, $creditNoteVersions, $comparison); + } else { + $this->addAnd($key, $creditNoteVersions, $comparison); + } + $this->addOr($key, null, Criteria::ISNULL); + + return $this; + } + + return $this->addUsingAlias(CreditNoteVersionTableMap::CREDIT_NOTE_VERSIONS, $creditNoteVersions, $comparison); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNote object + * + * @param \CreditNote\Model\CreditNote|ObjectCollection $creditNote The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function filterByCreditNote($creditNote, $comparison = null) + { + if ($creditNote instanceof \CreditNote\Model\CreditNote) { + return $this + ->addUsingAlias(CreditNoteVersionTableMap::ID, $creditNote->getId(), $comparison); + } elseif ($creditNote instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(CreditNoteVersionTableMap::ID, $creditNote->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByCreditNote() only accepts arguments of type \CreditNote\Model\CreditNote or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNote relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function joinCreditNote($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNote'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNote'); + } + + return $this; + } + + /** + * Use the CreditNote relation CreditNote object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCreditNote($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNote', '\CreditNote\Model\CreditNoteQuery'); + } + + /** + * Exclude object from result + * + * @param ChildCreditNoteVersion $creditNoteVersion Object to remove from the list of results + * + * @return ChildCreditNoteVersionQuery The current query, for fluid interface + */ + public function prune($creditNoteVersion = null) + { + if ($creditNoteVersion) { + $this->addCond('pruneCond0', $this->getAliasedColName(CreditNoteVersionTableMap::ID), $creditNoteVersion->getId(), Criteria::NOT_EQUAL); + $this->addCond('pruneCond1', $this->getAliasedColName(CreditNoteVersionTableMap::VERSION), $creditNoteVersion->getVersion(), Criteria::NOT_EQUAL); + $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR); + } + + return $this; + } + + /** + * Deletes all rows from the credit_note_version table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public function doDeleteAll(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteVersionTableMap::DATABASE_NAME); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + $affectedRows += parent::doDeleteAll($con); + // Because this db requires some delete cascade/set null emulation, we have to + // clear the cached instance *after* the emulation has happened (since + // instances get re-added by the select statement contained therein). + CreditNoteVersionTableMap::clearInstancePool(); + CreditNoteVersionTableMap::clearRelatedInstancePool(); + + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $affectedRows; + } + + /** + * Performs a DELETE on the database, given a ChildCreditNoteVersion or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or ChildCreditNoteVersion object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public function delete(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteVersionTableMap::DATABASE_NAME); + } + + $criteria = $this; + + // Set the correct dbName + $criteria->setDbName(CreditNoteVersionTableMap::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + + + CreditNoteVersionTableMap::removeInstanceFromPool($criteria); + + $affectedRows += ModelCriteria::delete($con); + CreditNoteVersionTableMap::clearRelatedInstancePool(); + $con->commit(); + + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + +} // CreditNoteVersionQuery diff --git a/local/modules/CreditNote/Model/Base/OrderCreditNote.php b/local/modules/CreditNote/Model/Base/OrderCreditNote.php new file mode 100644 index 000000000..e0c7f730c --- /dev/null +++ b/local/modules/CreditNote/Model/Base/OrderCreditNote.php @@ -0,0 +1,1513 @@ +amount_price = '0.000000'; + } + + /** + * Initializes internal state of CreditNote\Model\Base\OrderCreditNote object. + * @see applyDefaults() + */ + public function __construct() + { + $this->applyDefaultValues(); + } + + /** + * Returns whether the object has been modified. + * + * @return boolean True if the object has been modified. + */ + public function isModified() + { + return !!$this->modifiedColumns; + } + + /** + * Has specified column been modified? + * + * @param string $col column fully qualified name (TableMap::TYPE_COLNAME), e.g. Book::AUTHOR_ID + * @return boolean True if $col has been modified. + */ + public function isColumnModified($col) + { + return $this->modifiedColumns && isset($this->modifiedColumns[$col]); + } + + /** + * Get the columns that have been modified in this object. + * @return array A unique list of the modified column names for this object. + */ + public function getModifiedColumns() + { + return $this->modifiedColumns ? array_keys($this->modifiedColumns) : []; + } + + /** + * Returns whether the object has ever been saved. This will + * be false, if the object was retrieved from storage or was created + * and then saved. + * + * @return boolean true, if the object has never been persisted. + */ + public function isNew() + { + return $this->new; + } + + /** + * Setter for the isNew attribute. This method will be called + * by Propel-generated children and objects. + * + * @param boolean $b the state of the object. + */ + public function setNew($b) + { + $this->new = (Boolean) $b; + } + + /** + * Whether this object has been deleted. + * @return boolean The deleted state of this object. + */ + public function isDeleted() + { + return $this->deleted; + } + + /** + * Specify whether this object has been deleted. + * @param boolean $b The deleted state of this object. + * @return void + */ + public function setDeleted($b) + { + $this->deleted = (Boolean) $b; + } + + /** + * Sets the modified state for the object to be false. + * @param string $col If supplied, only the specified column is reset. + * @return void + */ + public function resetModified($col = null) + { + if (null !== $col) { + if (isset($this->modifiedColumns[$col])) { + unset($this->modifiedColumns[$col]); + } + } else { + $this->modifiedColumns = array(); + } + } + + /** + * Compares this with another OrderCreditNote instance. If + * obj is an instance of OrderCreditNote, delegates to + * equals(OrderCreditNote). Otherwise, returns false. + * + * @param mixed $obj The object to compare to. + * @return boolean Whether equal to the object specified. + */ + public function equals($obj) + { + $thisclazz = get_class($this); + if (!is_object($obj) || !($obj instanceof $thisclazz)) { + return false; + } + + if ($this === $obj) { + return true; + } + + if (null === $this->getPrimaryKey() + || null === $obj->getPrimaryKey()) { + return false; + } + + return $this->getPrimaryKey() === $obj->getPrimaryKey(); + } + + /** + * If the primary key is not null, return the hashcode of the + * primary key. Otherwise, return the hash code of the object. + * + * @return int Hashcode + */ + public function hashCode() + { + if (null !== $this->getPrimaryKey()) { + return crc32(serialize($this->getPrimaryKey())); + } + + return crc32(serialize(clone $this)); + } + + /** + * Get the associative array of the virtual columns in this object + * + * @return array + */ + public function getVirtualColumns() + { + return $this->virtualColumns; + } + + /** + * Checks the existence of a virtual column in this object + * + * @param string $name The virtual column name + * @return boolean + */ + public function hasVirtualColumn($name) + { + return array_key_exists($name, $this->virtualColumns); + } + + /** + * Get the value of a virtual column in this object + * + * @param string $name The virtual column name + * @return mixed + * + * @throws PropelException + */ + public function getVirtualColumn($name) + { + if (!$this->hasVirtualColumn($name)) { + throw new PropelException(sprintf('Cannot get value of inexistent virtual column %s.', $name)); + } + + return $this->virtualColumns[$name]; + } + + /** + * Set the value of a virtual column in this object + * + * @param string $name The virtual column name + * @param mixed $value The value to give to the virtual column + * + * @return OrderCreditNote The current object, for fluid interface + */ + public function setVirtualColumn($name, $value) + { + $this->virtualColumns[$name] = $value; + + return $this; + } + + /** + * Logs a message using Propel::log(). + * + * @param string $msg + * @param int $priority One of the Propel::LOG_* logging levels + * @return boolean + */ + protected function log($msg, $priority = Propel::LOG_INFO) + { + return Propel::log(get_class($this) . ': ' . $msg, $priority); + } + + /** + * Populate the current object from a string, using a given parser format + * + * $book = new Book(); + * $book->importFrom('JSON', '{"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, + * or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param string $data The source data to import from + * + * @return OrderCreditNote The current object, for fluid interface + */ + public function importFrom($parser, $data) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + $this->fromArray($parser->toArray($data), TableMap::TYPE_PHPNAME); + + return $this; + } + + /** + * Export the current object properties to a string, using a given parser format + * + * $book = BookQuery::create()->findPk(9012); + * echo $book->exportTo('JSON'); + * => {"Id":9012,"Title":"Don Juan","ISBN":"0140422161","Price":12.99,"PublisherId":1234,"AuthorId":5678}'); + * + * + * @param mixed $parser A AbstractParser instance, or a format name ('XML', 'YAML', 'JSON', 'CSV') + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy load(ed) columns. Defaults to TRUE. + * @return string The exported data + */ + public function exportTo($parser, $includeLazyLoadColumns = true) + { + if (!$parser instanceof AbstractParser) { + $parser = AbstractParser::getParser($parser); + } + + return $parser->fromArray($this->toArray(TableMap::TYPE_PHPNAME, $includeLazyLoadColumns, array(), true)); + } + + /** + * Clean up internal collections prior to serializing + * Avoids recursive loops that turn into segmentation faults when serializing + */ + public function __sleep() + { + $this->clearAllReferences(); + + return array_keys(get_object_vars($this)); + } + + /** + * Get the [order_id] column value. + * + * @return int + */ + public function getOrderId() + { + + return $this->order_id; + } + + /** + * Get the [credit_note_id] column value. + * + * @return int + */ + public function getCreditNoteId() + { + + return $this->credit_note_id; + } + + /** + * Get the [amount_price] column value. + * + * @return string + */ + public function getAmountPrice() + { + + return $this->amount_price; + } + + /** + * Get the [optionally formatted] temporal [created_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getCreatedAt($format = NULL) + { + if ($format === null) { + return $this->created_at; + } else { + return $this->created_at instanceof \DateTime ? $this->created_at->format($format) : null; + } + } + + /** + * Get the [optionally formatted] temporal [updated_at] column value. + * + * + * @param string $format The date/time format string (either date()-style or strftime()-style). + * If format is NULL, then the raw \DateTime object will be returned. + * + * @return mixed Formatted date/time value as string or \DateTime object (if format is NULL), NULL if column is NULL, and 0 if column value is 0000-00-00 00:00:00 + * + * @throws PropelException - if unable to parse/validate the date/time value. + */ + public function getUpdatedAt($format = NULL) + { + if ($format === null) { + return $this->updated_at; + } else { + return $this->updated_at instanceof \DateTime ? $this->updated_at->format($format) : null; + } + } + + /** + * Set the value of [order_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\OrderCreditNote The current object (for fluent API support) + */ + public function setOrderId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->order_id !== $v) { + $this->order_id = $v; + $this->modifiedColumns[OrderCreditNoteTableMap::ORDER_ID] = true; + } + + if ($this->aOrder !== null && $this->aOrder->getId() !== $v) { + $this->aOrder = null; + } + + + return $this; + } // setOrderId() + + /** + * Set the value of [credit_note_id] column. + * + * @param int $v new value + * @return \CreditNote\Model\OrderCreditNote The current object (for fluent API support) + */ + public function setCreditNoteId($v) + { + if ($v !== null) { + $v = (int) $v; + } + + if ($this->credit_note_id !== $v) { + $this->credit_note_id = $v; + $this->modifiedColumns[OrderCreditNoteTableMap::CREDIT_NOTE_ID] = true; + } + + if ($this->aCreditNote !== null && $this->aCreditNote->getId() !== $v) { + $this->aCreditNote = null; + } + + + return $this; + } // setCreditNoteId() + + /** + * Set the value of [amount_price] column. + * + * @param string $v new value + * @return \CreditNote\Model\OrderCreditNote The current object (for fluent API support) + */ + public function setAmountPrice($v) + { + if ($v !== null) { + $v = (string) $v; + } + + if ($this->amount_price !== $v) { + $this->amount_price = $v; + $this->modifiedColumns[OrderCreditNoteTableMap::AMOUNT_PRICE] = true; + } + + + return $this; + } // setAmountPrice() + + /** + * Sets the value of [created_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\OrderCreditNote The current object (for fluent API support) + */ + public function setCreatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->created_at !== null || $dt !== null) { + if ($dt !== $this->created_at) { + $this->created_at = $dt; + $this->modifiedColumns[OrderCreditNoteTableMap::CREATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setCreatedAt() + + /** + * Sets the value of [updated_at] column to a normalized version of the date/time value specified. + * + * @param mixed $v string, integer (timestamp), or \DateTime value. + * Empty strings are treated as NULL. + * @return \CreditNote\Model\OrderCreditNote The current object (for fluent API support) + */ + public function setUpdatedAt($v) + { + $dt = PropelDateTime::newInstance($v, null, '\DateTime'); + if ($this->updated_at !== null || $dt !== null) { + if ($dt !== $this->updated_at) { + $this->updated_at = $dt; + $this->modifiedColumns[OrderCreditNoteTableMap::UPDATED_AT] = true; + } + } // if either are not null + + + return $this; + } // setUpdatedAt() + + /** + * Indicates whether the columns in this object are only set to default values. + * + * This method can be used in conjunction with isModified() to indicate whether an object is both + * modified _and_ has some values set which are non-default. + * + * @return boolean Whether the columns in this object are only been set with default values. + */ + public function hasOnlyDefaultValues() + { + if ($this->amount_price !== '0.000000') { + return false; + } + + // otherwise, everything was equal, so return TRUE + return true; + } // hasOnlyDefaultValues() + + /** + * Hydrates (populates) the object variables with values from the database resultset. + * + * An offset (0-based "start column") is specified so that objects can be hydrated + * with a subset of the columns in the resultset rows. This is needed, for example, + * for results of JOIN queries where the resultset row includes columns from two or + * more tables. + * + * @param array $row The row returned by DataFetcher->fetch(). + * @param int $startcol 0-based offset column which indicates which restultset column to start with. + * @param boolean $rehydrate Whether this object is being re-hydrated from the database. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @return int next starting column + * @throws PropelException - Any caught Exception will be rewrapped as a PropelException. + */ + public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM) + { + try { + + + $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : OrderCreditNoteTableMap::translateFieldName('OrderId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->order_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : OrderCreditNoteTableMap::translateFieldName('CreditNoteId', TableMap::TYPE_PHPNAME, $indexType)]; + $this->credit_note_id = (null !== $col) ? (int) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : OrderCreditNoteTableMap::translateFieldName('AmountPrice', TableMap::TYPE_PHPNAME, $indexType)]; + $this->amount_price = (null !== $col) ? (string) $col : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : OrderCreditNoteTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + + $col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : OrderCreditNoteTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)]; + if ($col === '0000-00-00 00:00:00') { + $col = null; + } + $this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null; + $this->resetModified(); + + $this->setNew(false); + + if ($rehydrate) { + $this->ensureConsistency(); + } + + return $startcol + 5; // 5 = OrderCreditNoteTableMap::NUM_HYDRATE_COLUMNS. + + } catch (Exception $e) { + throw new PropelException("Error populating \CreditNote\Model\OrderCreditNote object", 0, $e); + } + } + + /** + * Checks and repairs the internal consistency of the object. + * + * This method is executed after an already-instantiated object is re-hydrated + * from the database. It exists to check any foreign keys to make sure that + * the objects related to the current object are correct based on foreign key. + * + * You can override this method in the stub class, but you should always invoke + * the base method from the overridden method (i.e. parent::ensureConsistency()), + * in case your model changes. + * + * @throws PropelException + */ + public function ensureConsistency() + { + if ($this->aOrder !== null && $this->order_id !== $this->aOrder->getId()) { + $this->aOrder = null; + } + if ($this->aCreditNote !== null && $this->credit_note_id !== $this->aCreditNote->getId()) { + $this->aCreditNote = null; + } + } // ensureConsistency + + /** + * Reloads this object from datastore based on primary key and (optionally) resets all associated objects. + * + * This will only work if the object has been saved and has a valid primary key set. + * + * @param boolean $deep (optional) Whether to also de-associated any related objects. + * @param ConnectionInterface $con (optional) The ConnectionInterface connection to use. + * @return void + * @throws PropelException - if this object is deleted, unsaved or doesn't have pk match in db + */ + public function reload($deep = false, ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("Cannot reload a deleted object."); + } + + if ($this->isNew()) { + throw new PropelException("Cannot reload an unsaved object."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(OrderCreditNoteTableMap::DATABASE_NAME); + } + + // We don't need to alter the object instance pool; we're just modifying this instance + // already in the pool. + + $dataFetcher = ChildOrderCreditNoteQuery::create(null, $this->buildPkeyCriteria())->setFormatter(ModelCriteria::FORMAT_STATEMENT)->find($con); + $row = $dataFetcher->fetch(); + $dataFetcher->close(); + if (!$row) { + throw new PropelException('Cannot find matching row in the database to reload object values.'); + } + $this->hydrate($row, 0, true, $dataFetcher->getIndexType()); // rehydrate + + if ($deep) { // also de-associate any related objects? + + $this->aOrder = null; + $this->aCreditNote = null; + } // if (deep) + } + + /** + * Removes this object from datastore and sets delete attribute. + * + * @param ConnectionInterface $con + * @return void + * @throws PropelException + * @see OrderCreditNote::setDeleted() + * @see OrderCreditNote::isDeleted() + */ + public function delete(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("This object has already been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(OrderCreditNoteTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + try { + $deleteQuery = ChildOrderCreditNoteQuery::create() + ->filterByPrimaryKey($this->getPrimaryKey()); + $ret = $this->preDelete($con); + if ($ret) { + $deleteQuery->delete($con); + $this->postDelete($con); + $con->commit(); + $this->setDeleted(true); + } else { + $con->commit(); + } + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Persists this object to the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All modified related objects will also be persisted in the doSave() + * method. This method wraps all precipitate database operations in a + * single transaction. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see doSave() + */ + public function save(ConnectionInterface $con = null) + { + if ($this->isDeleted()) { + throw new PropelException("You cannot save an object that has been deleted."); + } + + if ($con === null) { + $con = Propel::getServiceContainer()->getWriteConnection(OrderCreditNoteTableMap::DATABASE_NAME); + } + + $con->beginTransaction(); + $isInsert = $this->isNew(); + try { + $ret = $this->preSave($con); + if ($isInsert) { + $ret = $ret && $this->preInsert($con); + // timestampable behavior + if (!$this->isColumnModified(OrderCreditNoteTableMap::CREATED_AT)) { + $this->setCreatedAt(time()); + } + if (!$this->isColumnModified(OrderCreditNoteTableMap::UPDATED_AT)) { + $this->setUpdatedAt(time()); + } + } else { + $ret = $ret && $this->preUpdate($con); + // timestampable behavior + if ($this->isModified() && !$this->isColumnModified(OrderCreditNoteTableMap::UPDATED_AT)) { + $this->setUpdatedAt(time()); + } + } + if ($ret) { + $affectedRows = $this->doSave($con); + if ($isInsert) { + $this->postInsert($con); + } else { + $this->postUpdate($con); + } + $this->postSave($con); + OrderCreditNoteTableMap::addInstanceToPool($this); + } else { + $affectedRows = 0; + } + $con->commit(); + + return $affectedRows; + } catch (Exception $e) { + $con->rollBack(); + throw $e; + } + } + + /** + * Performs the work of inserting or updating the row in the database. + * + * If the object is new, it inserts it; otherwise an update is performed. + * All related objects are also updated in this method. + * + * @param ConnectionInterface $con + * @return int The number of rows affected by this insert/update and any referring fk objects' save() operations. + * @throws PropelException + * @see save() + */ + protected function doSave(ConnectionInterface $con) + { + $affectedRows = 0; // initialize var to track total num of affected rows + if (!$this->alreadyInSave) { + $this->alreadyInSave = true; + + // We call the save method on the following object(s) if they + // were passed to this object by their corresponding set + // method. This object relates to these object(s) by a + // foreign key reference. + + if ($this->aOrder !== null) { + if ($this->aOrder->isModified() || $this->aOrder->isNew()) { + $affectedRows += $this->aOrder->save($con); + } + $this->setOrder($this->aOrder); + } + + if ($this->aCreditNote !== null) { + if ($this->aCreditNote->isModified() || $this->aCreditNote->isNew()) { + $affectedRows += $this->aCreditNote->save($con); + } + $this->setCreditNote($this->aCreditNote); + } + + if ($this->isNew() || $this->isModified()) { + // persist changes + if ($this->isNew()) { + $this->doInsert($con); + } else { + $this->doUpdate($con); + } + $affectedRows += 1; + $this->resetModified(); + } + + $this->alreadyInSave = false; + + } + + return $affectedRows; + } // doSave() + + /** + * Insert the row in the database. + * + * @param ConnectionInterface $con + * + * @throws PropelException + * @see doSave() + */ + protected function doInsert(ConnectionInterface $con) + { + $modifiedColumns = array(); + $index = 0; + + + // check the columns in natural order for more readable SQL queries + if ($this->isColumnModified(OrderCreditNoteTableMap::ORDER_ID)) { + $modifiedColumns[':p' . $index++] = 'ORDER_ID'; + } + if ($this->isColumnModified(OrderCreditNoteTableMap::CREDIT_NOTE_ID)) { + $modifiedColumns[':p' . $index++] = 'CREDIT_NOTE_ID'; + } + if ($this->isColumnModified(OrderCreditNoteTableMap::AMOUNT_PRICE)) { + $modifiedColumns[':p' . $index++] = 'AMOUNT_PRICE'; + } + if ($this->isColumnModified(OrderCreditNoteTableMap::CREATED_AT)) { + $modifiedColumns[':p' . $index++] = 'CREATED_AT'; + } + if ($this->isColumnModified(OrderCreditNoteTableMap::UPDATED_AT)) { + $modifiedColumns[':p' . $index++] = 'UPDATED_AT'; + } + + $sql = sprintf( + 'INSERT INTO order_credit_note (%s) VALUES (%s)', + implode(', ', $modifiedColumns), + implode(', ', array_keys($modifiedColumns)) + ); + + try { + $stmt = $con->prepare($sql); + foreach ($modifiedColumns as $identifier => $columnName) { + switch ($columnName) { + case 'ORDER_ID': + $stmt->bindValue($identifier, $this->order_id, PDO::PARAM_INT); + break; + case 'CREDIT_NOTE_ID': + $stmt->bindValue($identifier, $this->credit_note_id, PDO::PARAM_INT); + break; + case 'AMOUNT_PRICE': + $stmt->bindValue($identifier, $this->amount_price, PDO::PARAM_STR); + break; + case 'CREATED_AT': + $stmt->bindValue($identifier, $this->created_at ? $this->created_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + case 'UPDATED_AT': + $stmt->bindValue($identifier, $this->updated_at ? $this->updated_at->format("Y-m-d H:i:s") : null, PDO::PARAM_STR); + break; + } + } + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), 0, $e); + } + + $this->setNew(false); + } + + /** + * Update the row in the database. + * + * @param ConnectionInterface $con + * + * @return Integer Number of updated rows + * @see doSave() + */ + protected function doUpdate(ConnectionInterface $con) + { + $selectCriteria = $this->buildPkeyCriteria(); + $valuesCriteria = $this->buildCriteria(); + + return $selectCriteria->doUpdate($valuesCriteria, $con); + } + + /** + * Retrieves a field from the object by name passed in as a string. + * + * @param string $name name + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return mixed Value of field. + */ + public function getByName($name, $type = TableMap::TYPE_PHPNAME) + { + $pos = OrderCreditNoteTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + $field = $this->getByPosition($pos); + + return $field; + } + + /** + * Retrieves a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @return mixed Value of field at $pos + */ + public function getByPosition($pos) + { + switch ($pos) { + case 0: + return $this->getOrderId(); + break; + case 1: + return $this->getCreditNoteId(); + break; + case 2: + return $this->getAmountPrice(); + break; + case 3: + return $this->getCreatedAt(); + break; + case 4: + return $this->getUpdatedAt(); + break; + default: + return null; + break; + } // switch() + } + + /** + * Exports the object as an array. + * + * You can specify the key type of the array by passing one of the class + * type constants. + * + * @param string $keyType (optional) One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to TRUE. + * @param array $alreadyDumpedObjects List of objects to skip to avoid recursion + * @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE. + * + * @return array an associative array containing the field names (as keys) and field values + */ + public function toArray($keyType = TableMap::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false) + { + if (isset($alreadyDumpedObjects['OrderCreditNote'][serialize($this->getPrimaryKey())])) { + return '*RECURSION*'; + } + $alreadyDumpedObjects['OrderCreditNote'][serialize($this->getPrimaryKey())] = true; + $keys = OrderCreditNoteTableMap::getFieldNames($keyType); + $result = array( + $keys[0] => $this->getOrderId(), + $keys[1] => $this->getCreditNoteId(), + $keys[2] => $this->getAmountPrice(), + $keys[3] => $this->getCreatedAt(), + $keys[4] => $this->getUpdatedAt(), + ); + $virtualColumns = $this->virtualColumns; + foreach ($virtualColumns as $key => $virtualColumn) { + $result[$key] = $virtualColumn; + } + + if ($includeForeignObjects) { + if (null !== $this->aOrder) { + $result['Order'] = $this->aOrder->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + if (null !== $this->aCreditNote) { + $result['CreditNote'] = $this->aCreditNote->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true); + } + } + + return $result; + } + + /** + * Sets a field from the object by name passed in as a string. + * + * @param string $name + * @param mixed $value field value + * @param string $type The type of fieldname the $name is of: + * one of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * Defaults to TableMap::TYPE_PHPNAME. + * @return void + */ + public function setByName($name, $value, $type = TableMap::TYPE_PHPNAME) + { + $pos = OrderCreditNoteTableMap::translateFieldName($name, $type, TableMap::TYPE_NUM); + + return $this->setByPosition($pos, $value); + } + + /** + * Sets a field from the object by Position as specified in the xml schema. + * Zero-based. + * + * @param int $pos position in xml schema + * @param mixed $value field value + * @return void + */ + public function setByPosition($pos, $value) + { + switch ($pos) { + case 0: + $this->setOrderId($value); + break; + case 1: + $this->setCreditNoteId($value); + break; + case 2: + $this->setAmountPrice($value); + break; + case 3: + $this->setCreatedAt($value); + break; + case 4: + $this->setUpdatedAt($value); + break; + } // switch() + } + + /** + * Populates the object using an array. + * + * This is particularly useful when populating an object from one of the + * request arrays (e.g. $_POST). This method goes through the column + * names, checking to see whether a matching key exists in populated + * array. If so the setByName() method is called for that column. + * + * You can specify the key type of the array by additionally passing one + * of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME, + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * The default key type is the column's TableMap::TYPE_PHPNAME. + * + * @param array $arr An array to populate the object from. + * @param string $keyType The type of keys the array uses. + * @return void + */ + public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME) + { + $keys = OrderCreditNoteTableMap::getFieldNames($keyType); + + if (array_key_exists($keys[0], $arr)) $this->setOrderId($arr[$keys[0]]); + if (array_key_exists($keys[1], $arr)) $this->setCreditNoteId($arr[$keys[1]]); + if (array_key_exists($keys[2], $arr)) $this->setAmountPrice($arr[$keys[2]]); + if (array_key_exists($keys[3], $arr)) $this->setCreatedAt($arr[$keys[3]]); + if (array_key_exists($keys[4], $arr)) $this->setUpdatedAt($arr[$keys[4]]); + } + + /** + * Build a Criteria object containing the values of all modified columns in this object. + * + * @return Criteria The Criteria object containing all modified values. + */ + public function buildCriteria() + { + $criteria = new Criteria(OrderCreditNoteTableMap::DATABASE_NAME); + + if ($this->isColumnModified(OrderCreditNoteTableMap::ORDER_ID)) $criteria->add(OrderCreditNoteTableMap::ORDER_ID, $this->order_id); + if ($this->isColumnModified(OrderCreditNoteTableMap::CREDIT_NOTE_ID)) $criteria->add(OrderCreditNoteTableMap::CREDIT_NOTE_ID, $this->credit_note_id); + if ($this->isColumnModified(OrderCreditNoteTableMap::AMOUNT_PRICE)) $criteria->add(OrderCreditNoteTableMap::AMOUNT_PRICE, $this->amount_price); + if ($this->isColumnModified(OrderCreditNoteTableMap::CREATED_AT)) $criteria->add(OrderCreditNoteTableMap::CREATED_AT, $this->created_at); + if ($this->isColumnModified(OrderCreditNoteTableMap::UPDATED_AT)) $criteria->add(OrderCreditNoteTableMap::UPDATED_AT, $this->updated_at); + + return $criteria; + } + + /** + * Builds a Criteria object containing the primary key for this object. + * + * Unlike buildCriteria() this method includes the primary key values regardless + * of whether or not they have been modified. + * + * @return Criteria The Criteria object containing value(s) for primary key(s). + */ + public function buildPkeyCriteria() + { + $criteria = new Criteria(OrderCreditNoteTableMap::DATABASE_NAME); + $criteria->add(OrderCreditNoteTableMap::ORDER_ID, $this->order_id); + $criteria->add(OrderCreditNoteTableMap::CREDIT_NOTE_ID, $this->credit_note_id); + + return $criteria; + } + + /** + * Returns the composite primary key for this object. + * The array elements will be in same order as specified in XML. + * @return array + */ + public function getPrimaryKey() + { + $pks = array(); + $pks[0] = $this->getOrderId(); + $pks[1] = $this->getCreditNoteId(); + + return $pks; + } + + /** + * Set the [composite] primary key. + * + * @param array $keys The elements of the composite key (order must match the order in XML file). + * @return void + */ + public function setPrimaryKey($keys) + { + $this->setOrderId($keys[0]); + $this->setCreditNoteId($keys[1]); + } + + /** + * Returns true if the primary key for this object is null. + * @return boolean + */ + public function isPrimaryKeyNull() + { + + return (null === $this->getOrderId()) && (null === $this->getCreditNoteId()); + } + + /** + * Sets contents of passed object to values from current object. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param object $copyObj An object of \CreditNote\Model\OrderCreditNote (or compatible) type. + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @param boolean $makeNew Whether to reset autoincrement PKs and make the object new. + * @throws PropelException + */ + public function copyInto($copyObj, $deepCopy = false, $makeNew = true) + { + $copyObj->setOrderId($this->getOrderId()); + $copyObj->setCreditNoteId($this->getCreditNoteId()); + $copyObj->setAmountPrice($this->getAmountPrice()); + $copyObj->setCreatedAt($this->getCreatedAt()); + $copyObj->setUpdatedAt($this->getUpdatedAt()); + if ($makeNew) { + $copyObj->setNew(true); + } + } + + /** + * Makes a copy of this object that will be inserted as a new row in table when saved. + * It creates a new object filling in the simple attributes, but skipping any primary + * keys that are defined for the table. + * + * If desired, this method can also make copies of all associated (fkey referrers) + * objects. + * + * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. + * @return \CreditNote\Model\OrderCreditNote Clone of current object. + * @throws PropelException + */ + public function copy($deepCopy = false) + { + // we use get_class(), because this might be a subclass + $clazz = get_class($this); + $copyObj = new $clazz(); + $this->copyInto($copyObj, $deepCopy); + + return $copyObj; + } + + /** + * Declares an association between this object and a ChildOrder object. + * + * @param ChildOrder $v + * @return \CreditNote\Model\OrderCreditNote The current object (for fluent API support) + * @throws PropelException + */ + public function setOrder(ChildOrder $v = null) + { + if ($v === null) { + $this->setOrderId(NULL); + } else { + $this->setOrderId($v->getId()); + } + + $this->aOrder = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildOrder object, it will not be re-added. + if ($v !== null) { + $v->addOrderCreditNote($this); + } + + + return $this; + } + + + /** + * Get the associated ChildOrder object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildOrder The associated ChildOrder object. + * @throws PropelException + */ + public function getOrder(ConnectionInterface $con = null) + { + if ($this->aOrder === null && ($this->order_id !== null)) { + $this->aOrder = OrderQuery::create()->findPk($this->order_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aOrder->addOrderCreditNotes($this); + */ + } + + return $this->aOrder; + } + + /** + * Declares an association between this object and a ChildCreditNote object. + * + * @param ChildCreditNote $v + * @return \CreditNote\Model\OrderCreditNote The current object (for fluent API support) + * @throws PropelException + */ + public function setCreditNote(ChildCreditNote $v = null) + { + if ($v === null) { + $this->setCreditNoteId(NULL); + } else { + $this->setCreditNoteId($v->getId()); + } + + $this->aCreditNote = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCreditNote object, it will not be re-added. + if ($v !== null) { + $v->addOrderCreditNote($this); + } + + + return $this; + } + + + /** + * Get the associated ChildCreditNote object + * + * @param ConnectionInterface $con Optional Connection object. + * @return ChildCreditNote The associated ChildCreditNote object. + * @throws PropelException + */ + public function getCreditNote(ConnectionInterface $con = null) + { + if ($this->aCreditNote === null && ($this->credit_note_id !== null)) { + $this->aCreditNote = ChildCreditNoteQuery::create()->findPk($this->credit_note_id, $con); + /* The following can be used additionally to + guarantee the related object contains a reference + to this object. This level of coupling may, however, be + undesirable since it could result in an only partially populated collection + in the referenced object. + $this->aCreditNote->addOrderCreditNotes($this); + */ + } + + return $this->aCreditNote; + } + + /** + * Clears the current object and sets all attributes to their default values + */ + public function clear() + { + $this->order_id = null; + $this->credit_note_id = null; + $this->amount_price = null; + $this->created_at = null; + $this->updated_at = null; + $this->alreadyInSave = false; + $this->clearAllReferences(); + $this->applyDefaultValues(); + $this->resetModified(); + $this->setNew(true); + $this->setDeleted(false); + } + + /** + * Resets all references to other model objects or collections of model objects. + * + * This method is a user-space workaround for PHP's inability to garbage collect + * objects with circular references (even in PHP 5.3). This is currently necessary + * when using Propel in certain daemon or large-volume/high-memory operations. + * + * @param boolean $deep Whether to also clear the references on all referrer objects. + */ + public function clearAllReferences($deep = false) + { + if ($deep) { + } // if ($deep) + + $this->aOrder = null; + $this->aCreditNote = null; + } + + /** + * Return the string representation of this object + * + * @return string + */ + public function __toString() + { + return (string) $this->exportTo(OrderCreditNoteTableMap::DEFAULT_STRING_FORMAT); + } + + // timestampable behavior + + /** + * Mark the current object so that the update date doesn't get updated during next save + * + * @return ChildOrderCreditNote The current object (for fluent API support) + */ + public function keepUpdateDateUnchanged() + { + $this->modifiedColumns[OrderCreditNoteTableMap::UPDATED_AT] = true; + + return $this; + } + + /** + * Code to be run before persisting the object + * @param ConnectionInterface $con + * @return boolean + */ + public function preSave(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after persisting the object + * @param ConnectionInterface $con + */ + public function postSave(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before inserting to database + * @param ConnectionInterface $con + * @return boolean + */ + public function preInsert(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after inserting to database + * @param ConnectionInterface $con + */ + public function postInsert(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before updating the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preUpdate(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after updating the object in database + * @param ConnectionInterface $con + */ + public function postUpdate(ConnectionInterface $con = null) + { + + } + + /** + * Code to be run before deleting the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preDelete(ConnectionInterface $con = null) + { + return true; + } + + /** + * Code to be run after deleting the object in database + * @param ConnectionInterface $con + */ + public function postDelete(ConnectionInterface $con = null) + { + + } + + + /** + * Derived method to catches calls to undefined methods. + * + * Provides magic import/export method support (fromXML()/toXML(), fromYAML()/toYAML(), etc.). + * Allows to define default __call() behavior if you overwrite __call() + * + * @param string $name + * @param mixed $params + * + * @return array|string + */ + public function __call($name, $params) + { + if (0 === strpos($name, 'get')) { + $virtualColumn = substr($name, 3); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + + $virtualColumn = lcfirst($virtualColumn); + if ($this->hasVirtualColumn($virtualColumn)) { + return $this->getVirtualColumn($virtualColumn); + } + } + + if (0 === strpos($name, 'from')) { + $format = substr($name, 4); + + return $this->importFrom($format, reset($params)); + } + + if (0 === strpos($name, 'to')) { + $format = substr($name, 2); + $includeLazyLoadColumns = isset($params[0]) ? $params[0] : true; + + return $this->exportTo($format, $includeLazyLoadColumns); + } + + throw new BadMethodCallException(sprintf('Call to undefined method: %s.', $name)); + } + +} diff --git a/local/modules/CreditNote/Model/Base/OrderCreditNoteQuery.php b/local/modules/CreditNote/Model/Base/OrderCreditNoteQuery.php new file mode 100644 index 000000000..93bf8f6b6 --- /dev/null +++ b/local/modules/CreditNote/Model/Base/OrderCreditNoteQuery.php @@ -0,0 +1,774 @@ +setModelAlias($modelAlias); + } + if ($criteria instanceof Criteria) { + $query->mergeWith($criteria); + } + + return $query; + } + + /** + * Find object by primary key. + * Propel uses the instance pool to skip the database if the object exists. + * Go fast if the query is untouched. + * + * + * $obj = $c->findPk(array(12, 34), $con); + * + * + * @param array[$order_id, $credit_note_id] $key Primary key to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ChildOrderCreditNote|array|mixed the result, formatted by the current formatter + */ + public function findPk($key, $con = null) + { + if ($key === null) { + return null; + } + if ((null !== ($obj = OrderCreditNoteTableMap::getInstanceFromPool(serialize(array((string) $key[0], (string) $key[1]))))) && !$this->formatter) { + // the object is already in the instance pool + return $obj; + } + if ($con === null) { + $con = Propel::getServiceContainer()->getReadConnection(OrderCreditNoteTableMap::DATABASE_NAME); + } + $this->basePreSelect($con); + if ($this->formatter || $this->modelAlias || $this->with || $this->select + || $this->selectColumns || $this->asColumns || $this->selectModifiers + || $this->map || $this->having || $this->joins) { + return $this->findPkComplex($key, $con); + } else { + return $this->findPkSimple($key, $con); + } + } + + /** + * Find object by primary key using raw SQL to go fast. + * Bypass doSelect() and the object formatter by using generated code. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildOrderCreditNote A model object, or null if the key is not found + */ + protected function findPkSimple($key, $con) + { + $sql = 'SELECT ORDER_ID, CREDIT_NOTE_ID, AMOUNT_PRICE, CREATED_AT, UPDATED_AT FROM order_credit_note WHERE ORDER_ID = :p0 AND CREDIT_NOTE_ID = :p1'; + try { + $stmt = $con->prepare($sql); + $stmt->bindValue(':p0', $key[0], PDO::PARAM_INT); + $stmt->bindValue(':p1', $key[1], PDO::PARAM_INT); + $stmt->execute(); + } catch (Exception $e) { + Propel::log($e->getMessage(), Propel::LOG_ERR); + throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e); + } + $obj = null; + if ($row = $stmt->fetch(\PDO::FETCH_NUM)) { + $obj = new ChildOrderCreditNote(); + $obj->hydrate($row); + OrderCreditNoteTableMap::addInstanceToPool($obj, serialize(array((string) $key[0], (string) $key[1]))); + } + $stmt->closeCursor(); + + return $obj; + } + + /** + * Find object by primary key. + * + * @param mixed $key Primary key to use for the query + * @param ConnectionInterface $con A connection object + * + * @return ChildOrderCreditNote|array|mixed the result, formatted by the current formatter + */ + protected function findPkComplex($key, $con) + { + // As the query uses a PK condition, no limit(1) is necessary. + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKey($key) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->formatOne($dataFetcher); + } + + /** + * Find objects by primary key + * + * $objs = $c->findPks(array(array(12, 56), array(832, 123), array(123, 456)), $con); + * + * @param array $keys Primary keys to use for the query + * @param ConnectionInterface $con an optional connection object + * + * @return ObjectCollection|array|mixed the list of results, formatted by the current formatter + */ + public function findPks($keys, $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getReadConnection($this->getDbName()); + } + $this->basePreSelect($con); + $criteria = $this->isKeepQuery() ? clone $this : $this; + $dataFetcher = $criteria + ->filterByPrimaryKeys($keys) + ->doSelect($con); + + return $criteria->getFormatter()->init($criteria)->format($dataFetcher); + } + + /** + * Filter the query by primary key + * + * @param mixed $key Primary key to use for the query + * + * @return ChildOrderCreditNoteQuery The current query, for fluid interface + */ + public function filterByPrimaryKey($key) + { + $this->addUsingAlias(OrderCreditNoteTableMap::ORDER_ID, $key[0], Criteria::EQUAL); + $this->addUsingAlias(OrderCreditNoteTableMap::CREDIT_NOTE_ID, $key[1], Criteria::EQUAL); + + return $this; + } + + /** + * Filter the query by a list of primary keys + * + * @param array $keys The list of primary key to use for the query + * + * @return ChildOrderCreditNoteQuery The current query, for fluid interface + */ + public function filterByPrimaryKeys($keys) + { + if (empty($keys)) { + return $this->add(null, '1<>1', Criteria::CUSTOM); + } + foreach ($keys as $key) { + $cton0 = $this->getNewCriterion(OrderCreditNoteTableMap::ORDER_ID, $key[0], Criteria::EQUAL); + $cton1 = $this->getNewCriterion(OrderCreditNoteTableMap::CREDIT_NOTE_ID, $key[1], Criteria::EQUAL); + $cton0->addAnd($cton1); + $this->addOr($cton0); + } + + return $this; + } + + /** + * Filter the query on the order_id column + * + * Example usage: + * + * $query->filterByOrderId(1234); // WHERE order_id = 1234 + * $query->filterByOrderId(array(12, 34)); // WHERE order_id IN (12, 34) + * $query->filterByOrderId(array('min' => 12)); // WHERE order_id > 12 + * + * + * @see filterByOrder() + * + * @param mixed $orderId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildOrderCreditNoteQuery The current query, for fluid interface + */ + public function filterByOrderId($orderId = null, $comparison = null) + { + if (is_array($orderId)) { + $useMinMax = false; + if (isset($orderId['min'])) { + $this->addUsingAlias(OrderCreditNoteTableMap::ORDER_ID, $orderId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($orderId['max'])) { + $this->addUsingAlias(OrderCreditNoteTableMap::ORDER_ID, $orderId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(OrderCreditNoteTableMap::ORDER_ID, $orderId, $comparison); + } + + /** + * Filter the query on the credit_note_id column + * + * Example usage: + * + * $query->filterByCreditNoteId(1234); // WHERE credit_note_id = 1234 + * $query->filterByCreditNoteId(array(12, 34)); // WHERE credit_note_id IN (12, 34) + * $query->filterByCreditNoteId(array('min' => 12)); // WHERE credit_note_id > 12 + * + * + * @see filterByCreditNote() + * + * @param mixed $creditNoteId The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildOrderCreditNoteQuery The current query, for fluid interface + */ + public function filterByCreditNoteId($creditNoteId = null, $comparison = null) + { + if (is_array($creditNoteId)) { + $useMinMax = false; + if (isset($creditNoteId['min'])) { + $this->addUsingAlias(OrderCreditNoteTableMap::CREDIT_NOTE_ID, $creditNoteId['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($creditNoteId['max'])) { + $this->addUsingAlias(OrderCreditNoteTableMap::CREDIT_NOTE_ID, $creditNoteId['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(OrderCreditNoteTableMap::CREDIT_NOTE_ID, $creditNoteId, $comparison); + } + + /** + * Filter the query on the amount_price column + * + * Example usage: + * + * $query->filterByAmountPrice(1234); // WHERE amount_price = 1234 + * $query->filterByAmountPrice(array(12, 34)); // WHERE amount_price IN (12, 34) + * $query->filterByAmountPrice(array('min' => 12)); // WHERE amount_price > 12 + * + * + * @param mixed $amountPrice The value to use as filter. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildOrderCreditNoteQuery The current query, for fluid interface + */ + public function filterByAmountPrice($amountPrice = null, $comparison = null) + { + if (is_array($amountPrice)) { + $useMinMax = false; + if (isset($amountPrice['min'])) { + $this->addUsingAlias(OrderCreditNoteTableMap::AMOUNT_PRICE, $amountPrice['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($amountPrice['max'])) { + $this->addUsingAlias(OrderCreditNoteTableMap::AMOUNT_PRICE, $amountPrice['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(OrderCreditNoteTableMap::AMOUNT_PRICE, $amountPrice, $comparison); + } + + /** + * Filter the query on the created_at column + * + * Example usage: + * + * $query->filterByCreatedAt('2011-03-14'); // WHERE created_at = '2011-03-14' + * $query->filterByCreatedAt('now'); // WHERE created_at = '2011-03-14' + * $query->filterByCreatedAt(array('max' => 'yesterday')); // WHERE created_at > '2011-03-13' + * + * + * @param mixed $createdAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildOrderCreditNoteQuery The current query, for fluid interface + */ + public function filterByCreatedAt($createdAt = null, $comparison = null) + { + if (is_array($createdAt)) { + $useMinMax = false; + if (isset($createdAt['min'])) { + $this->addUsingAlias(OrderCreditNoteTableMap::CREATED_AT, $createdAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($createdAt['max'])) { + $this->addUsingAlias(OrderCreditNoteTableMap::CREATED_AT, $createdAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(OrderCreditNoteTableMap::CREATED_AT, $createdAt, $comparison); + } + + /** + * Filter the query on the updated_at column + * + * Example usage: + * + * $query->filterByUpdatedAt('2011-03-14'); // WHERE updated_at = '2011-03-14' + * $query->filterByUpdatedAt('now'); // WHERE updated_at = '2011-03-14' + * $query->filterByUpdatedAt(array('max' => 'yesterday')); // WHERE updated_at > '2011-03-13' + * + * + * @param mixed $updatedAt The value to use as filter. + * Values can be integers (unix timestamps), DateTime objects, or strings. + * Empty strings are treated as NULL. + * Use scalar values for equality. + * Use array values for in_array() equivalent. + * Use associative array('min' => $minValue, 'max' => $maxValue) for intervals. + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildOrderCreditNoteQuery The current query, for fluid interface + */ + public function filterByUpdatedAt($updatedAt = null, $comparison = null) + { + if (is_array($updatedAt)) { + $useMinMax = false; + if (isset($updatedAt['min'])) { + $this->addUsingAlias(OrderCreditNoteTableMap::UPDATED_AT, $updatedAt['min'], Criteria::GREATER_EQUAL); + $useMinMax = true; + } + if (isset($updatedAt['max'])) { + $this->addUsingAlias(OrderCreditNoteTableMap::UPDATED_AT, $updatedAt['max'], Criteria::LESS_EQUAL); + $useMinMax = true; + } + if ($useMinMax) { + return $this; + } + if (null === $comparison) { + $comparison = Criteria::IN; + } + } + + return $this->addUsingAlias(OrderCreditNoteTableMap::UPDATED_AT, $updatedAt, $comparison); + } + + /** + * Filter the query by a related \Thelia\Model\Order object + * + * @param \Thelia\Model\Order|ObjectCollection $order The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildOrderCreditNoteQuery The current query, for fluid interface + */ + public function filterByOrder($order, $comparison = null) + { + if ($order instanceof \Thelia\Model\Order) { + return $this + ->addUsingAlias(OrderCreditNoteTableMap::ORDER_ID, $order->getId(), $comparison); + } elseif ($order instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(OrderCreditNoteTableMap::ORDER_ID, $order->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByOrder() only accepts arguments of type \Thelia\Model\Order or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the Order relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildOrderCreditNoteQuery The current query, for fluid interface + */ + public function joinOrder($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('Order'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'Order'); + } + + return $this; + } + + /** + * Use the Order relation Order object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \Thelia\Model\OrderQuery A secondary query class using the current class as primary query + */ + public function useOrderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinOrder($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'Order', '\Thelia\Model\OrderQuery'); + } + + /** + * Filter the query by a related \CreditNote\Model\CreditNote object + * + * @param \CreditNote\Model\CreditNote|ObjectCollection $creditNote The related object(s) to use as filter + * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL + * + * @return ChildOrderCreditNoteQuery The current query, for fluid interface + */ + public function filterByCreditNote($creditNote, $comparison = null) + { + if ($creditNote instanceof \CreditNote\Model\CreditNote) { + return $this + ->addUsingAlias(OrderCreditNoteTableMap::CREDIT_NOTE_ID, $creditNote->getId(), $comparison); + } elseif ($creditNote instanceof ObjectCollection) { + if (null === $comparison) { + $comparison = Criteria::IN; + } + + return $this + ->addUsingAlias(OrderCreditNoteTableMap::CREDIT_NOTE_ID, $creditNote->toKeyValue('PrimaryKey', 'Id'), $comparison); + } else { + throw new PropelException('filterByCreditNote() only accepts arguments of type \CreditNote\Model\CreditNote or Collection'); + } + } + + /** + * Adds a JOIN clause to the query using the CreditNote relation + * + * @param string $relationAlias optional alias for the relation + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return ChildOrderCreditNoteQuery The current query, for fluid interface + */ + public function joinCreditNote($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + $tableMap = $this->getTableMap(); + $relationMap = $tableMap->getRelation('CreditNote'); + + // create a ModelJoin object for this join + $join = new ModelJoin(); + $join->setJoinType($joinType); + $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); + if ($previousJoin = $this->getPreviousJoin()) { + $join->setPreviousJoin($previousJoin); + } + + // add the ModelJoin to the current object + if ($relationAlias) { + $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); + $this->addJoinObject($join, $relationAlias); + } else { + $this->addJoinObject($join, 'CreditNote'); + } + + return $this; + } + + /** + * Use the CreditNote relation CreditNote object + * + * @see useQuery() + * + * @param string $relationAlias optional alias for the relation, + * to be used as main alias in the secondary query + * @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join' + * + * @return \CreditNote\Model\CreditNoteQuery A secondary query class using the current class as primary query + */ + public function useCreditNoteQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) + { + return $this + ->joinCreditNote($relationAlias, $joinType) + ->useQuery($relationAlias ? $relationAlias : 'CreditNote', '\CreditNote\Model\CreditNoteQuery'); + } + + /** + * Exclude object from result + * + * @param ChildOrderCreditNote $orderCreditNote Object to remove from the list of results + * + * @return ChildOrderCreditNoteQuery The current query, for fluid interface + */ + public function prune($orderCreditNote = null) + { + if ($orderCreditNote) { + $this->addCond('pruneCond0', $this->getAliasedColName(OrderCreditNoteTableMap::ORDER_ID), $orderCreditNote->getOrderId(), Criteria::NOT_EQUAL); + $this->addCond('pruneCond1', $this->getAliasedColName(OrderCreditNoteTableMap::CREDIT_NOTE_ID), $orderCreditNote->getCreditNoteId(), Criteria::NOT_EQUAL); + $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR); + } + + return $this; + } + + /** + * Deletes all rows from the order_credit_note table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public function doDeleteAll(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(OrderCreditNoteTableMap::DATABASE_NAME); + } + $affectedRows = 0; // initialize var to track total num of affected rows + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + $affectedRows += parent::doDeleteAll($con); + // Because this db requires some delete cascade/set null emulation, we have to + // clear the cached instance *after* the emulation has happened (since + // instances get re-added by the select statement contained therein). + OrderCreditNoteTableMap::clearInstancePool(); + OrderCreditNoteTableMap::clearRelatedInstancePool(); + + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $affectedRows; + } + + /** + * Performs a DELETE on the database, given a ChildOrderCreditNote or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or ChildOrderCreditNote object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public function delete(ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(OrderCreditNoteTableMap::DATABASE_NAME); + } + + $criteria = $this; + + // Set the correct dbName + $criteria->setDbName(OrderCreditNoteTableMap::DATABASE_NAME); + + $affectedRows = 0; // initialize var to track total num of affected rows + + try { + // use transaction because $criteria could contain info + // for more than one table or we could emulating ON DELETE CASCADE, etc. + $con->beginTransaction(); + + + OrderCreditNoteTableMap::removeInstanceFromPool($criteria); + + $affectedRows += ModelCriteria::delete($con); + OrderCreditNoteTableMap::clearRelatedInstancePool(); + $con->commit(); + + return $affectedRows; + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + } + + // timestampable behavior + + /** + * Filter by the latest updated + * + * @param int $nbDays Maximum age of the latest update in days + * + * @return ChildOrderCreditNoteQuery The current query, for fluid interface + */ + public function recentlyUpdated($nbDays = 7) + { + return $this->addUsingAlias(OrderCreditNoteTableMap::UPDATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL); + } + + /** + * Filter by the latest created + * + * @param int $nbDays Maximum age of in days + * + * @return ChildOrderCreditNoteQuery The current query, for fluid interface + */ + public function recentlyCreated($nbDays = 7) + { + return $this->addUsingAlias(OrderCreditNoteTableMap::CREATED_AT, time() - $nbDays * 24 * 60 * 60, Criteria::GREATER_EQUAL); + } + + /** + * Order by update date desc + * + * @return ChildOrderCreditNoteQuery The current query, for fluid interface + */ + public function lastUpdatedFirst() + { + return $this->addDescendingOrderByColumn(OrderCreditNoteTableMap::UPDATED_AT); + } + + /** + * Order by update date asc + * + * @return ChildOrderCreditNoteQuery The current query, for fluid interface + */ + public function firstUpdatedFirst() + { + return $this->addAscendingOrderByColumn(OrderCreditNoteTableMap::UPDATED_AT); + } + + /** + * Order by create date desc + * + * @return ChildOrderCreditNoteQuery The current query, for fluid interface + */ + public function lastCreatedFirst() + { + return $this->addDescendingOrderByColumn(OrderCreditNoteTableMap::CREATED_AT); + } + + /** + * Order by create date asc + * + * @return ChildOrderCreditNoteQuery The current query, for fluid interface + */ + public function firstCreatedFirst() + { + return $this->addAscendingOrderByColumn(OrderCreditNoteTableMap::CREATED_AT); + } + +} // OrderCreditNoteQuery diff --git a/local/modules/CreditNote/Model/CartCreditNote.php b/local/modules/CreditNote/Model/CartCreditNote.php new file mode 100644 index 000000000..f670e3a0a --- /dev/null +++ b/local/modules/CreditNote/Model/CartCreditNote.php @@ -0,0 +1,10 @@ +setOrderId(null); + } else { + $this->setOrderId($v->getId()); + } + + $this->aOrder = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCustomer object, it will not be re-added. + if (method_exists($v, 'addCreditNote') && $v !== null) { + $v->addCreditNote($this); + } + + return $this; + } + + /** + * Declares an association between this object and a ChildCurrency object. + * + * @param Currency $v + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + * @throws PropelException + */ + public function setCurrency(Currency $v = null) + { + if ($v === null) { + $this->setCurrencyId(null); + } else { + $this->setCurrencyId($v->getId()); + } + + $this->aCurrency = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCustomer object, it will not be re-added. + if (method_exists($v, 'addCreditNote') && $v !== null) { + $v->addCreditNote($this); + } + + return $this; + } + + /** + * Declares an association between this object and a ChildCustomer object. + * + * @param Customer $v + * @return \CreditNote\Model\CreditNote The current object (for fluent API support) + * @throws PropelException + */ + public function setCustomer(Customer $v = null) + { + if ($v === null) { + $this->setCustomerId(null); + } else { + $this->setCustomerId($v->getId()); + } + + $this->aCustomer = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCustomer object, it will not be re-added. + if (method_exists($v, 'addCreditNote') && $v !== null) { + $v->addCreditNote($this); + } + + return $this; + } + + public function setStatusId($v) + { + // check status flow + if (null !== $this->getStatusId() && (int) $v !== (int) $this->getStatusId()) { + if (!CreditNoteStatusFlowQuery::create() + ->filterByFromStatusId($this->getStatusId()) + ->filterByToStatusId($v) + ->findOne()) { + throw new \Exception('You do not respect the status flow'); + } + } + + return parent::setStatusId($v); + } + + public function setCreditNoteStatus(ChildCreditNoteStatus $v = null) + { + // check status flow + if (null !== $v && null !== $this->getCreditNoteStatus() && (int) $v->getId() !== (int) $this->getCreditNoteStatus()->getId()) { + if (!CreditNoteStatusFlowQuery::create() + ->filterByFromStatusId($this->getCreditNoteStatus()->getId()) + ->filterByToStatusId($v->getId()) + ->findOne()) { + throw new \Exception('You do not respect the status flow'); + } + } + + return parent::setCreditNoteStatus($v); + } +} diff --git a/local/modules/CreditNote/Model/CreditNoteAddress.php b/local/modules/CreditNote/Model/CreditNoteAddress.php new file mode 100644 index 000000000..8a3be921d --- /dev/null +++ b/local/modules/CreditNote/Model/CreditNoteAddress.php @@ -0,0 +1,10 @@ +setOrderProductId(null); + } else { + $this->setOrderProductId($v->getId()); + } + + $this->aOrderProduct = $v; + + // Add binding for other direction of this n:n relationship. + // If this object has already been added to the ChildCustomer object, it will not be re-added. + if (method_exists($v, 'addCreditNote') && $v !== null) { + $v->addCreditNote($this); + } + + return $this; + } +} diff --git a/local/modules/CreditNote/Model/CreditNoteDetailQuery.php b/local/modules/CreditNote/Model/CreditNoteDetailQuery.php new file mode 100644 index 000000000..f2fbe5381 --- /dev/null +++ b/local/modules/CreditNote/Model/CreditNoteDetailQuery.php @@ -0,0 +1,21 @@ +filterByFromStatusId($creditNoteStatus->getId()) + ->orderByPriority(Criteria::ASC) + ->useCreditNoteStatusRelatedByToStatusIdQuery() + ->filterByUsed(true) + ->endUse() + ->findOne(); + + if (null === $statusFlow) { + return null; + } + + return $statusFlow->getCreditNoteStatusRelatedByToStatusId(); + } + + /** + * @param CreditNoteStatus $creditNoteStatus + * @return CreditNoteStatus|null + */ + public static function findNextCreditNoteStatus(CreditNoteStatus $creditNoteStatus) + { + /** @var CreditNoteStatusFlow $statusFlow */ + $statusFlow = CreditNoteStatusFlowQuery::create() + ->filterByFromStatusId($creditNoteStatus->getId()) + ->orderByPriority(Criteria::ASC) + ->useCreditNoteStatusRelatedByToStatusIdQuery() + ->filterByUsed($creditNoteStatus->getUsed()) + ->endUse() + ->findOne(); + + if (null === $statusFlow) { + return null; + } + + return $statusFlow->getCreditNoteStatusRelatedByToStatusId(); + } +} diff --git a/local/modules/CreditNote/Model/CreditNoteType.php b/local/modules/CreditNote/Model/CreditNoteType.php new file mode 100644 index 000000000..8b5d41b02 --- /dev/null +++ b/local/modules/CreditNote/Model/CreditNoteType.php @@ -0,0 +1,10 @@ + array('CartId', 'CreditNoteId', 'AmountPrice', 'CreatedAt', 'UpdatedAt', ), + self::TYPE_STUDLYPHPNAME => array('cartId', 'creditNoteId', 'amountPrice', 'createdAt', 'updatedAt', ), + self::TYPE_COLNAME => array(CartCreditNoteTableMap::CART_ID, CartCreditNoteTableMap::CREDIT_NOTE_ID, CartCreditNoteTableMap::AMOUNT_PRICE, CartCreditNoteTableMap::CREATED_AT, CartCreditNoteTableMap::UPDATED_AT, ), + self::TYPE_RAW_COLNAME => array('CART_ID', 'CREDIT_NOTE_ID', 'AMOUNT_PRICE', 'CREATED_AT', 'UPDATED_AT', ), + self::TYPE_FIELDNAME => array('cart_id', 'credit_note_id', 'amount_price', 'created_at', 'updated_at', ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0 + */ + protected static $fieldKeys = array ( + self::TYPE_PHPNAME => array('CartId' => 0, 'CreditNoteId' => 1, 'AmountPrice' => 2, 'CreatedAt' => 3, 'UpdatedAt' => 4, ), + self::TYPE_STUDLYPHPNAME => array('cartId' => 0, 'creditNoteId' => 1, 'amountPrice' => 2, 'createdAt' => 3, 'updatedAt' => 4, ), + self::TYPE_COLNAME => array(CartCreditNoteTableMap::CART_ID => 0, CartCreditNoteTableMap::CREDIT_NOTE_ID => 1, CartCreditNoteTableMap::AMOUNT_PRICE => 2, CartCreditNoteTableMap::CREATED_AT => 3, CartCreditNoteTableMap::UPDATED_AT => 4, ), + self::TYPE_RAW_COLNAME => array('CART_ID' => 0, 'CREDIT_NOTE_ID' => 1, 'AMOUNT_PRICE' => 2, 'CREATED_AT' => 3, 'UPDATED_AT' => 4, ), + self::TYPE_FIELDNAME => array('cart_id' => 0, 'credit_note_id' => 1, 'amount_price' => 2, 'created_at' => 3, 'updated_at' => 4, ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, ) + ); + + /** + * Initialize the table attributes and columns + * Relations are not initialized by this method since they are lazy loaded + * + * @return void + * @throws PropelException + */ + public function initialize() + { + // attributes + $this->setName('cart_credit_note'); + $this->setPhpName('CartCreditNote'); + $this->setClassName('\\CreditNote\\Model\\CartCreditNote'); + $this->setPackage('CreditNote.Model'); + $this->setUseIdGenerator(false); + // columns + $this->addForeignPrimaryKey('CART_ID', 'CartId', 'INTEGER' , 'cart', 'ID', true, null, null); + $this->addForeignPrimaryKey('CREDIT_NOTE_ID', 'CreditNoteId', 'INTEGER' , 'credit_note', 'ID', true, null, null); + $this->addColumn('AMOUNT_PRICE', 'AmountPrice', 'DECIMAL', false, 16, 0); + $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); + $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null); + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('Cart', '\\Thelia\\Model\\Cart', RelationMap::MANY_TO_ONE, array('cart_id' => 'id', ), 'CASCADE', 'RESTRICT'); + $this->addRelation('CreditNote', '\\CreditNote\\Model\\CreditNote', RelationMap::MANY_TO_ONE, array('credit_note_id' => 'id', ), 'CASCADE', 'RESTRICT'); + } // buildRelations() + + /** + * + * Gets the list of behaviors registered for this table + * + * @return array Associative array (name => parameters) of behaviors + */ + public function getBehaviors() + { + return array( + 'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ), + ); + } // getBehaviors() + + /** + * Adds an object to the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases you may need to explicitly add objects + * to the cache in order to ensure that the same objects are always returned by find*() + * and findPk*() calls. + * + * @param \CreditNote\Model\CartCreditNote $obj A \CreditNote\Model\CartCreditNote object. + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + */ + public static function addInstanceToPool($obj, $key = null) + { + if (Propel::isInstancePoolingEnabled()) { + if (null === $key) { + $key = serialize(array((string) $obj->getCartId(), (string) $obj->getCreditNoteId())); + } // if key === null + self::$instances[$key] = $obj; + } + } + + /** + * Removes an object from the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doDelete + * methods in your stub classes -- you may need to explicitly remove objects + * from the cache in order to prevent returning objects that no longer exist. + * + * @param mixed $value A \CreditNote\Model\CartCreditNote object or a primary key value. + */ + public static function removeInstanceFromPool($value) + { + if (Propel::isInstancePoolingEnabled() && null !== $value) { + if (is_object($value) && $value instanceof \CreditNote\Model\CartCreditNote) { + $key = serialize(array((string) $value->getCartId(), (string) $value->getCreditNoteId())); + + } elseif (is_array($value) && count($value) === 2) { + // assume we've been passed a primary key"; + $key = serialize(array((string) $value[0], (string) $value[1])); + } elseif ($value instanceof Criteria) { + self::$instances = []; + + return; + } else { + $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or \CreditNote\Model\CartCreditNote object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value, true))); + throw $e; + } + + unset(self::$instances[$key]); + } + } + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + */ + public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + // If the PK cannot be derived from the row, return NULL. + if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('CartId', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 1 + $offset : static::translateFieldName('CreditNoteId', TableMap::TYPE_PHPNAME, $indexType)] === null) { + return null; + } + + return serialize(array((string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('CartId', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 1 + $offset : static::translateFieldName('CreditNoteId', TableMap::TYPE_PHPNAME, $indexType)])); + } + + /** + * Retrieves the primary key from the DB resultset row + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, an array of the primary key columns will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * + * @return mixed The primary key of the row + */ + public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + + return $pks; + } + + /** + * The class that the tableMap will make instances of. + * + * If $withPrefix is true, the returned path + * uses a dot-path notation which is translated into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName + */ + public static function getOMClass($withPrefix = true) + { + return $withPrefix ? CartCreditNoteTableMap::CLASS_DEFAULT : CartCreditNoteTableMap::OM_CLASS; + } + + /** + * Populates an object of the default type or an object that inherit from the default. + * + * @param array $row row returned by DataFetcher->fetch(). + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return array (CartCreditNote object, last column rank) + */ + public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + $key = CartCreditNoteTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType); + if (null !== ($obj = CartCreditNoteTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, $offset, true); // rehydrate + $col = $offset + CartCreditNoteTableMap::NUM_HYDRATE_COLUMNS; + } else { + $cls = CartCreditNoteTableMap::OM_CLASS; + $obj = new $cls(); + $col = $obj->hydrate($row, $offset, false, $indexType); + CartCreditNoteTableMap::addInstanceToPool($obj, $key); + } + + return array($obj, $col); + } + + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @param DataFetcherInterface $dataFetcher + * @return array + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(DataFetcherInterface $dataFetcher) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = static::getOMClass(false); + // populate the object(s) + while ($row = $dataFetcher->fetch()) { + $key = CartCreditNoteTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType()); + if (null !== ($obj = CartCreditNoteTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, 0, true); // rehydrate + $results[] = $obj; + } else { + $obj = new $cls(); + $obj->hydrate($row); + $results[] = $obj; + CartCreditNoteTableMap::addInstanceToPool($obj, $key); + } // if key exists + } + + return $results; + } + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria, $alias = null) + { + if (null === $alias) { + $criteria->addSelectColumn(CartCreditNoteTableMap::CART_ID); + $criteria->addSelectColumn(CartCreditNoteTableMap::CREDIT_NOTE_ID); + $criteria->addSelectColumn(CartCreditNoteTableMap::AMOUNT_PRICE); + $criteria->addSelectColumn(CartCreditNoteTableMap::CREATED_AT); + $criteria->addSelectColumn(CartCreditNoteTableMap::UPDATED_AT); + } else { + $criteria->addSelectColumn($alias . '.CART_ID'); + $criteria->addSelectColumn($alias . '.CREDIT_NOTE_ID'); + $criteria->addSelectColumn($alias . '.AMOUNT_PRICE'); + $criteria->addSelectColumn($alias . '.CREATED_AT'); + $criteria->addSelectColumn($alias . '.UPDATED_AT'); + } + } + + /** + * Returns the TableMap related to this object. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getServiceContainer()->getDatabaseMap(CartCreditNoteTableMap::DATABASE_NAME)->getTable(CartCreditNoteTableMap::TABLE_NAME); + } + + /** + * Add a TableMap instance to the database for this tableMap class. + */ + public static function buildTableMap() + { + $dbMap = Propel::getServiceContainer()->getDatabaseMap(CartCreditNoteTableMap::DATABASE_NAME); + if (!$dbMap->hasTable(CartCreditNoteTableMap::TABLE_NAME)) { + $dbMap->addTableObject(new CartCreditNoteTableMap()); + } + } + + /** + * Performs a DELETE on the database, given a CartCreditNote or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or CartCreditNote object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CartCreditNoteTableMap::DATABASE_NAME); + } + + if ($values instanceof Criteria) { + // rename for clarity + $criteria = $values; + } elseif ($values instanceof \CreditNote\Model\CartCreditNote) { // it's a model object + // create criteria based on pk values + $criteria = $values->buildPkeyCriteria(); + } else { // it's a primary key, or an array of pks + $criteria = new Criteria(CartCreditNoteTableMap::DATABASE_NAME); + // primary key is composite; we therefore, expect + // the primary key passed to be an array of pkey values + if (count($values) == count($values, COUNT_RECURSIVE)) { + // array is not multi-dimensional + $values = array($values); + } + foreach ($values as $value) { + $criterion = $criteria->getNewCriterion(CartCreditNoteTableMap::CART_ID, $value[0]); + $criterion->addAnd($criteria->getNewCriterion(CartCreditNoteTableMap::CREDIT_NOTE_ID, $value[1])); + $criteria->addOr($criterion); + } + } + + $query = CartCreditNoteQuery::create()->mergeWith($criteria); + + if ($values instanceof Criteria) { CartCreditNoteTableMap::clearInstancePool(); + } elseif (!is_object($values)) { // it's a primary key, or an array of pks + foreach ((array) $values as $singleval) { CartCreditNoteTableMap::removeInstanceFromPool($singleval); + } + } + + return $query->delete($con); + } + + /** + * Deletes all rows from the cart_credit_note table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll(ConnectionInterface $con = null) + { + return CartCreditNoteQuery::create()->doDeleteAll($con); + } + + /** + * Performs an INSERT on the database, given a CartCreditNote or Criteria object. + * + * @param mixed $criteria Criteria or CartCreditNote object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($criteria, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CartCreditNoteTableMap::DATABASE_NAME); + } + + if ($criteria instanceof Criteria) { + $criteria = clone $criteria; // rename for clarity + } else { + $criteria = $criteria->buildCriteria(); // build Criteria from CartCreditNote object + } + + + // Set the correct dbName + $query = CartCreditNoteQuery::create()->mergeWith($criteria); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + $pk = $query->doInsert($con); + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $pk; + } + +} // CartCreditNoteTableMap +// This is the static code needed to register the TableMap for this table with the main Propel class. +// +CartCreditNoteTableMap::buildTableMap(); diff --git a/local/modules/CreditNote/Model/Map/CreditNoteAddressTableMap.php b/local/modules/CreditNote/Model/Map/CreditNoteAddressTableMap.php new file mode 100644 index 000000000..156f1b028 --- /dev/null +++ b/local/modules/CreditNote/Model/Map/CreditNoteAddressTableMap.php @@ -0,0 +1,539 @@ + array('Id', 'CustomerTitleId', 'Company', 'Firstname', 'Lastname', 'Address1', 'Address2', 'Address3', 'Zipcode', 'City', 'Phone', 'Cellphone', 'CountryId', 'StateId', 'CreatedAt', 'UpdatedAt', ), + self::TYPE_STUDLYPHPNAME => array('id', 'customerTitleId', 'company', 'firstname', 'lastname', 'address1', 'address2', 'address3', 'zipcode', 'city', 'phone', 'cellphone', 'countryId', 'stateId', 'createdAt', 'updatedAt', ), + self::TYPE_COLNAME => array(CreditNoteAddressTableMap::ID, CreditNoteAddressTableMap::CUSTOMER_TITLE_ID, CreditNoteAddressTableMap::COMPANY, CreditNoteAddressTableMap::FIRSTNAME, CreditNoteAddressTableMap::LASTNAME, CreditNoteAddressTableMap::ADDRESS1, CreditNoteAddressTableMap::ADDRESS2, CreditNoteAddressTableMap::ADDRESS3, CreditNoteAddressTableMap::ZIPCODE, CreditNoteAddressTableMap::CITY, CreditNoteAddressTableMap::PHONE, CreditNoteAddressTableMap::CELLPHONE, CreditNoteAddressTableMap::COUNTRY_ID, CreditNoteAddressTableMap::STATE_ID, CreditNoteAddressTableMap::CREATED_AT, CreditNoteAddressTableMap::UPDATED_AT, ), + self::TYPE_RAW_COLNAME => array('ID', 'CUSTOMER_TITLE_ID', 'COMPANY', 'FIRSTNAME', 'LASTNAME', 'ADDRESS1', 'ADDRESS2', 'ADDRESS3', 'ZIPCODE', 'CITY', 'PHONE', 'CELLPHONE', 'COUNTRY_ID', 'STATE_ID', 'CREATED_AT', 'UPDATED_AT', ), + self::TYPE_FIELDNAME => array('id', 'customer_title_id', 'company', 'firstname', 'lastname', 'address1', 'address2', 'address3', 'zipcode', 'city', 'phone', 'cellphone', 'country_id', 'state_id', 'created_at', 'updated_at', ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0 + */ + protected static $fieldKeys = array ( + self::TYPE_PHPNAME => array('Id' => 0, 'CustomerTitleId' => 1, 'Company' => 2, 'Firstname' => 3, 'Lastname' => 4, 'Address1' => 5, 'Address2' => 6, 'Address3' => 7, 'Zipcode' => 8, 'City' => 9, 'Phone' => 10, 'Cellphone' => 11, 'CountryId' => 12, 'StateId' => 13, 'CreatedAt' => 14, 'UpdatedAt' => 15, ), + self::TYPE_STUDLYPHPNAME => array('id' => 0, 'customerTitleId' => 1, 'company' => 2, 'firstname' => 3, 'lastname' => 4, 'address1' => 5, 'address2' => 6, 'address3' => 7, 'zipcode' => 8, 'city' => 9, 'phone' => 10, 'cellphone' => 11, 'countryId' => 12, 'stateId' => 13, 'createdAt' => 14, 'updatedAt' => 15, ), + self::TYPE_COLNAME => array(CreditNoteAddressTableMap::ID => 0, CreditNoteAddressTableMap::CUSTOMER_TITLE_ID => 1, CreditNoteAddressTableMap::COMPANY => 2, CreditNoteAddressTableMap::FIRSTNAME => 3, CreditNoteAddressTableMap::LASTNAME => 4, CreditNoteAddressTableMap::ADDRESS1 => 5, CreditNoteAddressTableMap::ADDRESS2 => 6, CreditNoteAddressTableMap::ADDRESS3 => 7, CreditNoteAddressTableMap::ZIPCODE => 8, CreditNoteAddressTableMap::CITY => 9, CreditNoteAddressTableMap::PHONE => 10, CreditNoteAddressTableMap::CELLPHONE => 11, CreditNoteAddressTableMap::COUNTRY_ID => 12, CreditNoteAddressTableMap::STATE_ID => 13, CreditNoteAddressTableMap::CREATED_AT => 14, CreditNoteAddressTableMap::UPDATED_AT => 15, ), + self::TYPE_RAW_COLNAME => array('ID' => 0, 'CUSTOMER_TITLE_ID' => 1, 'COMPANY' => 2, 'FIRSTNAME' => 3, 'LASTNAME' => 4, 'ADDRESS1' => 5, 'ADDRESS2' => 6, 'ADDRESS3' => 7, 'ZIPCODE' => 8, 'CITY' => 9, 'PHONE' => 10, 'CELLPHONE' => 11, 'COUNTRY_ID' => 12, 'STATE_ID' => 13, 'CREATED_AT' => 14, 'UPDATED_AT' => 15, ), + self::TYPE_FIELDNAME => array('id' => 0, 'customer_title_id' => 1, 'company' => 2, 'firstname' => 3, 'lastname' => 4, 'address1' => 5, 'address2' => 6, 'address3' => 7, 'zipcode' => 8, 'city' => 9, 'phone' => 10, 'cellphone' => 11, 'country_id' => 12, 'state_id' => 13, 'created_at' => 14, 'updated_at' => 15, ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ) + ); + + /** + * Initialize the table attributes and columns + * Relations are not initialized by this method since they are lazy loaded + * + * @return void + * @throws PropelException + */ + public function initialize() + { + // attributes + $this->setName('credit_note_address'); + $this->setPhpName('CreditNoteAddress'); + $this->setClassName('\\CreditNote\\Model\\CreditNoteAddress'); + $this->setPackage('CreditNote.Model'); + $this->setUseIdGenerator(true); + // columns + $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null); + $this->addForeignKey('CUSTOMER_TITLE_ID', 'CustomerTitleId', 'INTEGER', 'customer_title', 'ID', false, null, null); + $this->addColumn('COMPANY', 'Company', 'VARCHAR', false, 255, null); + $this->addColumn('FIRSTNAME', 'Firstname', 'VARCHAR', true, 255, null); + $this->addColumn('LASTNAME', 'Lastname', 'VARCHAR', true, 255, null); + $this->addColumn('ADDRESS1', 'Address1', 'VARCHAR', true, 255, null); + $this->addColumn('ADDRESS2', 'Address2', 'VARCHAR', false, 255, null); + $this->addColumn('ADDRESS3', 'Address3', 'VARCHAR', false, 255, null); + $this->addColumn('ZIPCODE', 'Zipcode', 'VARCHAR', true, 10, null); + $this->addColumn('CITY', 'City', 'VARCHAR', true, 255, null); + $this->addColumn('PHONE', 'Phone', 'VARCHAR', false, 20, null); + $this->addColumn('CELLPHONE', 'Cellphone', 'VARCHAR', false, 20, null); + $this->addForeignKey('COUNTRY_ID', 'CountryId', 'INTEGER', 'country', 'ID', true, null, null); + $this->addForeignKey('STATE_ID', 'StateId', 'INTEGER', 'state', 'ID', false, null, null); + $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); + $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null); + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('CustomerTitle', '\\Thelia\\Model\\CustomerTitle', RelationMap::MANY_TO_ONE, array('customer_title_id' => 'id', ), 'RESTRICT', 'RESTRICT'); + $this->addRelation('Country', '\\Thelia\\Model\\Country', RelationMap::MANY_TO_ONE, array('country_id' => 'id', ), 'RESTRICT', 'RESTRICT'); + $this->addRelation('State', '\\Thelia\\Model\\State', RelationMap::MANY_TO_ONE, array('state_id' => 'id', ), 'RESTRICT', 'RESTRICT'); + $this->addRelation('CreditNote', '\\CreditNote\\Model\\CreditNote', RelationMap::ONE_TO_MANY, array('id' => 'invoice_address_id', ), 'RESTRICT', 'RESTRICT', 'CreditNotes'); + } // buildRelations() + + /** + * + * Gets the list of behaviors registered for this table + * + * @return array Associative array (name => parameters) of behaviors + */ + public function getBehaviors() + { + return array( + 'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ), + ); + } // getBehaviors() + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + */ + public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + // If the PK cannot be derived from the row, return NULL. + if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) { + return null; + } + + return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; + } + + /** + * Retrieves the primary key from the DB resultset row + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, an array of the primary key columns will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * + * @return mixed The primary key of the row + */ + public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + + return (int) $row[ + $indexType == TableMap::TYPE_NUM + ? 0 + $offset + : self::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType) + ]; + } + + /** + * The class that the tableMap will make instances of. + * + * If $withPrefix is true, the returned path + * uses a dot-path notation which is translated into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName + */ + public static function getOMClass($withPrefix = true) + { + return $withPrefix ? CreditNoteAddressTableMap::CLASS_DEFAULT : CreditNoteAddressTableMap::OM_CLASS; + } + + /** + * Populates an object of the default type or an object that inherit from the default. + * + * @param array $row row returned by DataFetcher->fetch(). + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return array (CreditNoteAddress object, last column rank) + */ + public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + $key = CreditNoteAddressTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType); + if (null !== ($obj = CreditNoteAddressTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, $offset, true); // rehydrate + $col = $offset + CreditNoteAddressTableMap::NUM_HYDRATE_COLUMNS; + } else { + $cls = CreditNoteAddressTableMap::OM_CLASS; + $obj = new $cls(); + $col = $obj->hydrate($row, $offset, false, $indexType); + CreditNoteAddressTableMap::addInstanceToPool($obj, $key); + } + + return array($obj, $col); + } + + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @param DataFetcherInterface $dataFetcher + * @return array + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(DataFetcherInterface $dataFetcher) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = static::getOMClass(false); + // populate the object(s) + while ($row = $dataFetcher->fetch()) { + $key = CreditNoteAddressTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType()); + if (null !== ($obj = CreditNoteAddressTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, 0, true); // rehydrate + $results[] = $obj; + } else { + $obj = new $cls(); + $obj->hydrate($row); + $results[] = $obj; + CreditNoteAddressTableMap::addInstanceToPool($obj, $key); + } // if key exists + } + + return $results; + } + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria, $alias = null) + { + if (null === $alias) { + $criteria->addSelectColumn(CreditNoteAddressTableMap::ID); + $criteria->addSelectColumn(CreditNoteAddressTableMap::CUSTOMER_TITLE_ID); + $criteria->addSelectColumn(CreditNoteAddressTableMap::COMPANY); + $criteria->addSelectColumn(CreditNoteAddressTableMap::FIRSTNAME); + $criteria->addSelectColumn(CreditNoteAddressTableMap::LASTNAME); + $criteria->addSelectColumn(CreditNoteAddressTableMap::ADDRESS1); + $criteria->addSelectColumn(CreditNoteAddressTableMap::ADDRESS2); + $criteria->addSelectColumn(CreditNoteAddressTableMap::ADDRESS3); + $criteria->addSelectColumn(CreditNoteAddressTableMap::ZIPCODE); + $criteria->addSelectColumn(CreditNoteAddressTableMap::CITY); + $criteria->addSelectColumn(CreditNoteAddressTableMap::PHONE); + $criteria->addSelectColumn(CreditNoteAddressTableMap::CELLPHONE); + $criteria->addSelectColumn(CreditNoteAddressTableMap::COUNTRY_ID); + $criteria->addSelectColumn(CreditNoteAddressTableMap::STATE_ID); + $criteria->addSelectColumn(CreditNoteAddressTableMap::CREATED_AT); + $criteria->addSelectColumn(CreditNoteAddressTableMap::UPDATED_AT); + } else { + $criteria->addSelectColumn($alias . '.ID'); + $criteria->addSelectColumn($alias . '.CUSTOMER_TITLE_ID'); + $criteria->addSelectColumn($alias . '.COMPANY'); + $criteria->addSelectColumn($alias . '.FIRSTNAME'); + $criteria->addSelectColumn($alias . '.LASTNAME'); + $criteria->addSelectColumn($alias . '.ADDRESS1'); + $criteria->addSelectColumn($alias . '.ADDRESS2'); + $criteria->addSelectColumn($alias . '.ADDRESS3'); + $criteria->addSelectColumn($alias . '.ZIPCODE'); + $criteria->addSelectColumn($alias . '.CITY'); + $criteria->addSelectColumn($alias . '.PHONE'); + $criteria->addSelectColumn($alias . '.CELLPHONE'); + $criteria->addSelectColumn($alias . '.COUNTRY_ID'); + $criteria->addSelectColumn($alias . '.STATE_ID'); + $criteria->addSelectColumn($alias . '.CREATED_AT'); + $criteria->addSelectColumn($alias . '.UPDATED_AT'); + } + } + + /** + * Returns the TableMap related to this object. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getServiceContainer()->getDatabaseMap(CreditNoteAddressTableMap::DATABASE_NAME)->getTable(CreditNoteAddressTableMap::TABLE_NAME); + } + + /** + * Add a TableMap instance to the database for this tableMap class. + */ + public static function buildTableMap() + { + $dbMap = Propel::getServiceContainer()->getDatabaseMap(CreditNoteAddressTableMap::DATABASE_NAME); + if (!$dbMap->hasTable(CreditNoteAddressTableMap::TABLE_NAME)) { + $dbMap->addTableObject(new CreditNoteAddressTableMap()); + } + } + + /** + * Performs a DELETE on the database, given a CreditNoteAddress or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or CreditNoteAddress object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteAddressTableMap::DATABASE_NAME); + } + + if ($values instanceof Criteria) { + // rename for clarity + $criteria = $values; + } elseif ($values instanceof \CreditNote\Model\CreditNoteAddress) { // it's a model object + // create criteria based on pk values + $criteria = $values->buildPkeyCriteria(); + } else { // it's a primary key, or an array of pks + $criteria = new Criteria(CreditNoteAddressTableMap::DATABASE_NAME); + $criteria->add(CreditNoteAddressTableMap::ID, (array) $values, Criteria::IN); + } + + $query = CreditNoteAddressQuery::create()->mergeWith($criteria); + + if ($values instanceof Criteria) { CreditNoteAddressTableMap::clearInstancePool(); + } elseif (!is_object($values)) { // it's a primary key, or an array of pks + foreach ((array) $values as $singleval) { CreditNoteAddressTableMap::removeInstanceFromPool($singleval); + } + } + + return $query->delete($con); + } + + /** + * Deletes all rows from the credit_note_address table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll(ConnectionInterface $con = null) + { + return CreditNoteAddressQuery::create()->doDeleteAll($con); + } + + /** + * Performs an INSERT on the database, given a CreditNoteAddress or Criteria object. + * + * @param mixed $criteria Criteria or CreditNoteAddress object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($criteria, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteAddressTableMap::DATABASE_NAME); + } + + if ($criteria instanceof Criteria) { + $criteria = clone $criteria; // rename for clarity + } else { + $criteria = $criteria->buildCriteria(); // build Criteria from CreditNoteAddress object + } + + if ($criteria->containsKey(CreditNoteAddressTableMap::ID) && $criteria->keyContainsValue(CreditNoteAddressTableMap::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CreditNoteAddressTableMap::ID.')'); + } + + + // Set the correct dbName + $query = CreditNoteAddressQuery::create()->mergeWith($criteria); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + $pk = $query->doInsert($con); + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $pk; + } + +} // CreditNoteAddressTableMap +// This is the static code needed to register the TableMap for this table with the main Propel class. +// +CreditNoteAddressTableMap::buildTableMap(); diff --git a/local/modules/CreditNote/Model/Map/CreditNoteCommentTableMap.php b/local/modules/CreditNote/Model/Map/CreditNoteCommentTableMap.php new file mode 100644 index 000000000..987d30cb0 --- /dev/null +++ b/local/modules/CreditNote/Model/Map/CreditNoteCommentTableMap.php @@ -0,0 +1,457 @@ + array('Id', 'CreditNoteId', 'AdminId', 'Comment', 'CreatedAt', 'UpdatedAt', ), + self::TYPE_STUDLYPHPNAME => array('id', 'creditNoteId', 'adminId', 'comment', 'createdAt', 'updatedAt', ), + self::TYPE_COLNAME => array(CreditNoteCommentTableMap::ID, CreditNoteCommentTableMap::CREDIT_NOTE_ID, CreditNoteCommentTableMap::ADMIN_ID, CreditNoteCommentTableMap::COMMENT, CreditNoteCommentTableMap::CREATED_AT, CreditNoteCommentTableMap::UPDATED_AT, ), + self::TYPE_RAW_COLNAME => array('ID', 'CREDIT_NOTE_ID', 'ADMIN_ID', 'COMMENT', 'CREATED_AT', 'UPDATED_AT', ), + self::TYPE_FIELDNAME => array('id', 'credit_note_id', 'admin_id', 'comment', 'created_at', 'updated_at', ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0 + */ + protected static $fieldKeys = array ( + self::TYPE_PHPNAME => array('Id' => 0, 'CreditNoteId' => 1, 'AdminId' => 2, 'Comment' => 3, 'CreatedAt' => 4, 'UpdatedAt' => 5, ), + self::TYPE_STUDLYPHPNAME => array('id' => 0, 'creditNoteId' => 1, 'adminId' => 2, 'comment' => 3, 'createdAt' => 4, 'updatedAt' => 5, ), + self::TYPE_COLNAME => array(CreditNoteCommentTableMap::ID => 0, CreditNoteCommentTableMap::CREDIT_NOTE_ID => 1, CreditNoteCommentTableMap::ADMIN_ID => 2, CreditNoteCommentTableMap::COMMENT => 3, CreditNoteCommentTableMap::CREATED_AT => 4, CreditNoteCommentTableMap::UPDATED_AT => 5, ), + self::TYPE_RAW_COLNAME => array('ID' => 0, 'CREDIT_NOTE_ID' => 1, 'ADMIN_ID' => 2, 'COMMENT' => 3, 'CREATED_AT' => 4, 'UPDATED_AT' => 5, ), + self::TYPE_FIELDNAME => array('id' => 0, 'credit_note_id' => 1, 'admin_id' => 2, 'comment' => 3, 'created_at' => 4, 'updated_at' => 5, ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, ) + ); + + /** + * Initialize the table attributes and columns + * Relations are not initialized by this method since they are lazy loaded + * + * @return void + * @throws PropelException + */ + public function initialize() + { + // attributes + $this->setName('credit_note_comment'); + $this->setPhpName('CreditNoteComment'); + $this->setClassName('\\CreditNote\\Model\\CreditNoteComment'); + $this->setPackage('CreditNote.Model'); + $this->setUseIdGenerator(true); + // columns + $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null); + $this->addForeignKey('CREDIT_NOTE_ID', 'CreditNoteId', 'INTEGER', 'credit_note', 'ID', true, null, null); + $this->addForeignKey('ADMIN_ID', 'AdminId', 'INTEGER', 'admin', 'ID', false, null, null); + $this->addColumn('COMMENT', 'Comment', 'CLOB', false, null, null); + $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); + $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null); + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('CreditNote', '\\CreditNote\\Model\\CreditNote', RelationMap::MANY_TO_ONE, array('credit_note_id' => 'id', ), 'CASCADE', 'RESTRICT'); + $this->addRelation('Admin', '\\Thelia\\Model\\Admin', RelationMap::MANY_TO_ONE, array('admin_id' => 'id', ), 'SET NULL', 'RESTRICT'); + } // buildRelations() + + /** + * + * Gets the list of behaviors registered for this table + * + * @return array Associative array (name => parameters) of behaviors + */ + public function getBehaviors() + { + return array( + 'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ), + ); + } // getBehaviors() + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + */ + public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + // If the PK cannot be derived from the row, return NULL. + if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) { + return null; + } + + return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; + } + + /** + * Retrieves the primary key from the DB resultset row + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, an array of the primary key columns will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * + * @return mixed The primary key of the row + */ + public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + + return (int) $row[ + $indexType == TableMap::TYPE_NUM + ? 0 + $offset + : self::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType) + ]; + } + + /** + * The class that the tableMap will make instances of. + * + * If $withPrefix is true, the returned path + * uses a dot-path notation which is translated into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName + */ + public static function getOMClass($withPrefix = true) + { + return $withPrefix ? CreditNoteCommentTableMap::CLASS_DEFAULT : CreditNoteCommentTableMap::OM_CLASS; + } + + /** + * Populates an object of the default type or an object that inherit from the default. + * + * @param array $row row returned by DataFetcher->fetch(). + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return array (CreditNoteComment object, last column rank) + */ + public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + $key = CreditNoteCommentTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType); + if (null !== ($obj = CreditNoteCommentTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, $offset, true); // rehydrate + $col = $offset + CreditNoteCommentTableMap::NUM_HYDRATE_COLUMNS; + } else { + $cls = CreditNoteCommentTableMap::OM_CLASS; + $obj = new $cls(); + $col = $obj->hydrate($row, $offset, false, $indexType); + CreditNoteCommentTableMap::addInstanceToPool($obj, $key); + } + + return array($obj, $col); + } + + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @param DataFetcherInterface $dataFetcher + * @return array + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(DataFetcherInterface $dataFetcher) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = static::getOMClass(false); + // populate the object(s) + while ($row = $dataFetcher->fetch()) { + $key = CreditNoteCommentTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType()); + if (null !== ($obj = CreditNoteCommentTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, 0, true); // rehydrate + $results[] = $obj; + } else { + $obj = new $cls(); + $obj->hydrate($row); + $results[] = $obj; + CreditNoteCommentTableMap::addInstanceToPool($obj, $key); + } // if key exists + } + + return $results; + } + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria, $alias = null) + { + if (null === $alias) { + $criteria->addSelectColumn(CreditNoteCommentTableMap::ID); + $criteria->addSelectColumn(CreditNoteCommentTableMap::CREDIT_NOTE_ID); + $criteria->addSelectColumn(CreditNoteCommentTableMap::ADMIN_ID); + $criteria->addSelectColumn(CreditNoteCommentTableMap::COMMENT); + $criteria->addSelectColumn(CreditNoteCommentTableMap::CREATED_AT); + $criteria->addSelectColumn(CreditNoteCommentTableMap::UPDATED_AT); + } else { + $criteria->addSelectColumn($alias . '.ID'); + $criteria->addSelectColumn($alias . '.CREDIT_NOTE_ID'); + $criteria->addSelectColumn($alias . '.ADMIN_ID'); + $criteria->addSelectColumn($alias . '.COMMENT'); + $criteria->addSelectColumn($alias . '.CREATED_AT'); + $criteria->addSelectColumn($alias . '.UPDATED_AT'); + } + } + + /** + * Returns the TableMap related to this object. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getServiceContainer()->getDatabaseMap(CreditNoteCommentTableMap::DATABASE_NAME)->getTable(CreditNoteCommentTableMap::TABLE_NAME); + } + + /** + * Add a TableMap instance to the database for this tableMap class. + */ + public static function buildTableMap() + { + $dbMap = Propel::getServiceContainer()->getDatabaseMap(CreditNoteCommentTableMap::DATABASE_NAME); + if (!$dbMap->hasTable(CreditNoteCommentTableMap::TABLE_NAME)) { + $dbMap->addTableObject(new CreditNoteCommentTableMap()); + } + } + + /** + * Performs a DELETE on the database, given a CreditNoteComment or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or CreditNoteComment object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteCommentTableMap::DATABASE_NAME); + } + + if ($values instanceof Criteria) { + // rename for clarity + $criteria = $values; + } elseif ($values instanceof \CreditNote\Model\CreditNoteComment) { // it's a model object + // create criteria based on pk values + $criteria = $values->buildPkeyCriteria(); + } else { // it's a primary key, or an array of pks + $criteria = new Criteria(CreditNoteCommentTableMap::DATABASE_NAME); + $criteria->add(CreditNoteCommentTableMap::ID, (array) $values, Criteria::IN); + } + + $query = CreditNoteCommentQuery::create()->mergeWith($criteria); + + if ($values instanceof Criteria) { CreditNoteCommentTableMap::clearInstancePool(); + } elseif (!is_object($values)) { // it's a primary key, or an array of pks + foreach ((array) $values as $singleval) { CreditNoteCommentTableMap::removeInstanceFromPool($singleval); + } + } + + return $query->delete($con); + } + + /** + * Deletes all rows from the credit_note_comment table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll(ConnectionInterface $con = null) + { + return CreditNoteCommentQuery::create()->doDeleteAll($con); + } + + /** + * Performs an INSERT on the database, given a CreditNoteComment or Criteria object. + * + * @param mixed $criteria Criteria or CreditNoteComment object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($criteria, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteCommentTableMap::DATABASE_NAME); + } + + if ($criteria instanceof Criteria) { + $criteria = clone $criteria; // rename for clarity + } else { + $criteria = $criteria->buildCriteria(); // build Criteria from CreditNoteComment object + } + + if ($criteria->containsKey(CreditNoteCommentTableMap::ID) && $criteria->keyContainsValue(CreditNoteCommentTableMap::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CreditNoteCommentTableMap::ID.')'); + } + + + // Set the correct dbName + $query = CreditNoteCommentQuery::create()->mergeWith($criteria); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + $pk = $query->doInsert($con); + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $pk; + } + +} // CreditNoteCommentTableMap +// This is the static code needed to register the TableMap for this table with the main Propel class. +// +CreditNoteCommentTableMap::buildTableMap(); diff --git a/local/modules/CreditNote/Model/Map/CreditNoteDetailTableMap.php b/local/modules/CreditNote/Model/Map/CreditNoteDetailTableMap.php new file mode 100644 index 000000000..c30263cfc --- /dev/null +++ b/local/modules/CreditNote/Model/Map/CreditNoteDetailTableMap.php @@ -0,0 +1,498 @@ + array('Id', 'CreditNoteId', 'Price', 'PriceWithTax', 'TaxRuleId', 'OrderProductId', 'Type', 'Quantity', 'Title', 'CreatedAt', 'UpdatedAt', ), + self::TYPE_STUDLYPHPNAME => array('id', 'creditNoteId', 'price', 'priceWithTax', 'taxRuleId', 'orderProductId', 'type', 'quantity', 'title', 'createdAt', 'updatedAt', ), + self::TYPE_COLNAME => array(CreditNoteDetailTableMap::ID, CreditNoteDetailTableMap::CREDIT_NOTE_ID, CreditNoteDetailTableMap::PRICE, CreditNoteDetailTableMap::PRICE_WITH_TAX, CreditNoteDetailTableMap::TAX_RULE_ID, CreditNoteDetailTableMap::ORDER_PRODUCT_ID, CreditNoteDetailTableMap::TYPE, CreditNoteDetailTableMap::QUANTITY, CreditNoteDetailTableMap::TITLE, CreditNoteDetailTableMap::CREATED_AT, CreditNoteDetailTableMap::UPDATED_AT, ), + self::TYPE_RAW_COLNAME => array('ID', 'CREDIT_NOTE_ID', 'PRICE', 'PRICE_WITH_TAX', 'TAX_RULE_ID', 'ORDER_PRODUCT_ID', 'TYPE', 'QUANTITY', 'TITLE', 'CREATED_AT', 'UPDATED_AT', ), + self::TYPE_FIELDNAME => array('id', 'credit_note_id', 'price', 'price_with_tax', 'tax_rule_id', 'order_product_id', 'type', 'quantity', 'title', 'created_at', 'updated_at', ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0 + */ + protected static $fieldKeys = array ( + self::TYPE_PHPNAME => array('Id' => 0, 'CreditNoteId' => 1, 'Price' => 2, 'PriceWithTax' => 3, 'TaxRuleId' => 4, 'OrderProductId' => 5, 'Type' => 6, 'Quantity' => 7, 'Title' => 8, 'CreatedAt' => 9, 'UpdatedAt' => 10, ), + self::TYPE_STUDLYPHPNAME => array('id' => 0, 'creditNoteId' => 1, 'price' => 2, 'priceWithTax' => 3, 'taxRuleId' => 4, 'orderProductId' => 5, 'type' => 6, 'quantity' => 7, 'title' => 8, 'createdAt' => 9, 'updatedAt' => 10, ), + self::TYPE_COLNAME => array(CreditNoteDetailTableMap::ID => 0, CreditNoteDetailTableMap::CREDIT_NOTE_ID => 1, CreditNoteDetailTableMap::PRICE => 2, CreditNoteDetailTableMap::PRICE_WITH_TAX => 3, CreditNoteDetailTableMap::TAX_RULE_ID => 4, CreditNoteDetailTableMap::ORDER_PRODUCT_ID => 5, CreditNoteDetailTableMap::TYPE => 6, CreditNoteDetailTableMap::QUANTITY => 7, CreditNoteDetailTableMap::TITLE => 8, CreditNoteDetailTableMap::CREATED_AT => 9, CreditNoteDetailTableMap::UPDATED_AT => 10, ), + self::TYPE_RAW_COLNAME => array('ID' => 0, 'CREDIT_NOTE_ID' => 1, 'PRICE' => 2, 'PRICE_WITH_TAX' => 3, 'TAX_RULE_ID' => 4, 'ORDER_PRODUCT_ID' => 5, 'TYPE' => 6, 'QUANTITY' => 7, 'TITLE' => 8, 'CREATED_AT' => 9, 'UPDATED_AT' => 10, ), + self::TYPE_FIELDNAME => array('id' => 0, 'credit_note_id' => 1, 'price' => 2, 'price_with_tax' => 3, 'tax_rule_id' => 4, 'order_product_id' => 5, 'type' => 6, 'quantity' => 7, 'title' => 8, 'created_at' => 9, 'updated_at' => 10, ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ) + ); + + /** + * Initialize the table attributes and columns + * Relations are not initialized by this method since they are lazy loaded + * + * @return void + * @throws PropelException + */ + public function initialize() + { + // attributes + $this->setName('credit_note_detail'); + $this->setPhpName('CreditNoteDetail'); + $this->setClassName('\\CreditNote\\Model\\CreditNoteDetail'); + $this->setPackage('CreditNote.Model'); + $this->setUseIdGenerator(true); + // columns + $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null); + $this->addForeignKey('CREDIT_NOTE_ID', 'CreditNoteId', 'INTEGER', 'credit_note', 'ID', true, null, null); + $this->addColumn('PRICE', 'Price', 'DECIMAL', false, 16, 0); + $this->addColumn('PRICE_WITH_TAX', 'PriceWithTax', 'DECIMAL', false, 16, 0); + $this->addForeignKey('TAX_RULE_ID', 'TaxRuleId', 'INTEGER', 'tax_rule', 'ID', false, null, null); + $this->addForeignKey('ORDER_PRODUCT_ID', 'OrderProductId', 'INTEGER', 'order_product', 'ID', false, null, null); + $this->addColumn('TYPE', 'Type', 'VARCHAR', false, 55, null); + $this->addColumn('QUANTITY', 'Quantity', 'INTEGER', true, null, 0); + $this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null); + $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); + $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null); + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('CreditNote', '\\CreditNote\\Model\\CreditNote', RelationMap::MANY_TO_ONE, array('credit_note_id' => 'id', ), 'CASCADE', 'RESTRICT'); + $this->addRelation('OrderProduct', '\\Thelia\\Model\\OrderProduct', RelationMap::MANY_TO_ONE, array('order_product_id' => 'id', ), 'RESTRICT', 'RESTRICT'); + $this->addRelation('TaxRule', '\\Thelia\\Model\\TaxRule', RelationMap::MANY_TO_ONE, array('tax_rule_id' => 'id', ), 'RESTRICT', 'RESTRICT'); + } // buildRelations() + + /** + * + * Gets the list of behaviors registered for this table + * + * @return array Associative array (name => parameters) of behaviors + */ + public function getBehaviors() + { + return array( + 'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ), + ); + } // getBehaviors() + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + */ + public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + // If the PK cannot be derived from the row, return NULL. + if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) { + return null; + } + + return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; + } + + /** + * Retrieves the primary key from the DB resultset row + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, an array of the primary key columns will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * + * @return mixed The primary key of the row + */ + public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + + return (int) $row[ + $indexType == TableMap::TYPE_NUM + ? 0 + $offset + : self::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType) + ]; + } + + /** + * The class that the tableMap will make instances of. + * + * If $withPrefix is true, the returned path + * uses a dot-path notation which is translated into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName + */ + public static function getOMClass($withPrefix = true) + { + return $withPrefix ? CreditNoteDetailTableMap::CLASS_DEFAULT : CreditNoteDetailTableMap::OM_CLASS; + } + + /** + * Populates an object of the default type or an object that inherit from the default. + * + * @param array $row row returned by DataFetcher->fetch(). + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return array (CreditNoteDetail object, last column rank) + */ + public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + $key = CreditNoteDetailTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType); + if (null !== ($obj = CreditNoteDetailTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, $offset, true); // rehydrate + $col = $offset + CreditNoteDetailTableMap::NUM_HYDRATE_COLUMNS; + } else { + $cls = CreditNoteDetailTableMap::OM_CLASS; + $obj = new $cls(); + $col = $obj->hydrate($row, $offset, false, $indexType); + CreditNoteDetailTableMap::addInstanceToPool($obj, $key); + } + + return array($obj, $col); + } + + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @param DataFetcherInterface $dataFetcher + * @return array + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(DataFetcherInterface $dataFetcher) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = static::getOMClass(false); + // populate the object(s) + while ($row = $dataFetcher->fetch()) { + $key = CreditNoteDetailTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType()); + if (null !== ($obj = CreditNoteDetailTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, 0, true); // rehydrate + $results[] = $obj; + } else { + $obj = new $cls(); + $obj->hydrate($row); + $results[] = $obj; + CreditNoteDetailTableMap::addInstanceToPool($obj, $key); + } // if key exists + } + + return $results; + } + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria, $alias = null) + { + if (null === $alias) { + $criteria->addSelectColumn(CreditNoteDetailTableMap::ID); + $criteria->addSelectColumn(CreditNoteDetailTableMap::CREDIT_NOTE_ID); + $criteria->addSelectColumn(CreditNoteDetailTableMap::PRICE); + $criteria->addSelectColumn(CreditNoteDetailTableMap::PRICE_WITH_TAX); + $criteria->addSelectColumn(CreditNoteDetailTableMap::TAX_RULE_ID); + $criteria->addSelectColumn(CreditNoteDetailTableMap::ORDER_PRODUCT_ID); + $criteria->addSelectColumn(CreditNoteDetailTableMap::TYPE); + $criteria->addSelectColumn(CreditNoteDetailTableMap::QUANTITY); + $criteria->addSelectColumn(CreditNoteDetailTableMap::TITLE); + $criteria->addSelectColumn(CreditNoteDetailTableMap::CREATED_AT); + $criteria->addSelectColumn(CreditNoteDetailTableMap::UPDATED_AT); + } else { + $criteria->addSelectColumn($alias . '.ID'); + $criteria->addSelectColumn($alias . '.CREDIT_NOTE_ID'); + $criteria->addSelectColumn($alias . '.PRICE'); + $criteria->addSelectColumn($alias . '.PRICE_WITH_TAX'); + $criteria->addSelectColumn($alias . '.TAX_RULE_ID'); + $criteria->addSelectColumn($alias . '.ORDER_PRODUCT_ID'); + $criteria->addSelectColumn($alias . '.TYPE'); + $criteria->addSelectColumn($alias . '.QUANTITY'); + $criteria->addSelectColumn($alias . '.TITLE'); + $criteria->addSelectColumn($alias . '.CREATED_AT'); + $criteria->addSelectColumn($alias . '.UPDATED_AT'); + } + } + + /** + * Returns the TableMap related to this object. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getServiceContainer()->getDatabaseMap(CreditNoteDetailTableMap::DATABASE_NAME)->getTable(CreditNoteDetailTableMap::TABLE_NAME); + } + + /** + * Add a TableMap instance to the database for this tableMap class. + */ + public static function buildTableMap() + { + $dbMap = Propel::getServiceContainer()->getDatabaseMap(CreditNoteDetailTableMap::DATABASE_NAME); + if (!$dbMap->hasTable(CreditNoteDetailTableMap::TABLE_NAME)) { + $dbMap->addTableObject(new CreditNoteDetailTableMap()); + } + } + + /** + * Performs a DELETE on the database, given a CreditNoteDetail or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or CreditNoteDetail object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteDetailTableMap::DATABASE_NAME); + } + + if ($values instanceof Criteria) { + // rename for clarity + $criteria = $values; + } elseif ($values instanceof \CreditNote\Model\CreditNoteDetail) { // it's a model object + // create criteria based on pk values + $criteria = $values->buildPkeyCriteria(); + } else { // it's a primary key, or an array of pks + $criteria = new Criteria(CreditNoteDetailTableMap::DATABASE_NAME); + $criteria->add(CreditNoteDetailTableMap::ID, (array) $values, Criteria::IN); + } + + $query = CreditNoteDetailQuery::create()->mergeWith($criteria); + + if ($values instanceof Criteria) { CreditNoteDetailTableMap::clearInstancePool(); + } elseif (!is_object($values)) { // it's a primary key, or an array of pks + foreach ((array) $values as $singleval) { CreditNoteDetailTableMap::removeInstanceFromPool($singleval); + } + } + + return $query->delete($con); + } + + /** + * Deletes all rows from the credit_note_detail table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll(ConnectionInterface $con = null) + { + return CreditNoteDetailQuery::create()->doDeleteAll($con); + } + + /** + * Performs an INSERT on the database, given a CreditNoteDetail or Criteria object. + * + * @param mixed $criteria Criteria or CreditNoteDetail object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($criteria, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteDetailTableMap::DATABASE_NAME); + } + + if ($criteria instanceof Criteria) { + $criteria = clone $criteria; // rename for clarity + } else { + $criteria = $criteria->buildCriteria(); // build Criteria from CreditNoteDetail object + } + + if ($criteria->containsKey(CreditNoteDetailTableMap::ID) && $criteria->keyContainsValue(CreditNoteDetailTableMap::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CreditNoteDetailTableMap::ID.')'); + } + + + // Set the correct dbName + $query = CreditNoteDetailQuery::create()->mergeWith($criteria); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + $pk = $query->doInsert($con); + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $pk; + } + +} // CreditNoteDetailTableMap +// This is the static code needed to register the TableMap for this table with the main Propel class. +// +CreditNoteDetailTableMap::buildTableMap(); diff --git a/local/modules/CreditNote/Model/Map/CreditNoteStatusFlowTableMap.php b/local/modules/CreditNote/Model/Map/CreditNoteStatusFlowTableMap.php new file mode 100644 index 000000000..6e345e9a7 --- /dev/null +++ b/local/modules/CreditNote/Model/Map/CreditNoteStatusFlowTableMap.php @@ -0,0 +1,465 @@ + array('Id', 'FromStatusId', 'ToStatusId', 'Priority', 'Root', 'CreatedAt', 'UpdatedAt', ), + self::TYPE_STUDLYPHPNAME => array('id', 'fromStatusId', 'toStatusId', 'priority', 'root', 'createdAt', 'updatedAt', ), + self::TYPE_COLNAME => array(CreditNoteStatusFlowTableMap::ID, CreditNoteStatusFlowTableMap::FROM_STATUS_ID, CreditNoteStatusFlowTableMap::TO_STATUS_ID, CreditNoteStatusFlowTableMap::PRIORITY, CreditNoteStatusFlowTableMap::ROOT, CreditNoteStatusFlowTableMap::CREATED_AT, CreditNoteStatusFlowTableMap::UPDATED_AT, ), + self::TYPE_RAW_COLNAME => array('ID', 'FROM_STATUS_ID', 'TO_STATUS_ID', 'PRIORITY', 'ROOT', 'CREATED_AT', 'UPDATED_AT', ), + self::TYPE_FIELDNAME => array('id', 'from_status_id', 'to_status_id', 'priority', 'root', 'created_at', 'updated_at', ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0 + */ + protected static $fieldKeys = array ( + self::TYPE_PHPNAME => array('Id' => 0, 'FromStatusId' => 1, 'ToStatusId' => 2, 'Priority' => 3, 'Root' => 4, 'CreatedAt' => 5, 'UpdatedAt' => 6, ), + self::TYPE_STUDLYPHPNAME => array('id' => 0, 'fromStatusId' => 1, 'toStatusId' => 2, 'priority' => 3, 'root' => 4, 'createdAt' => 5, 'updatedAt' => 6, ), + self::TYPE_COLNAME => array(CreditNoteStatusFlowTableMap::ID => 0, CreditNoteStatusFlowTableMap::FROM_STATUS_ID => 1, CreditNoteStatusFlowTableMap::TO_STATUS_ID => 2, CreditNoteStatusFlowTableMap::PRIORITY => 3, CreditNoteStatusFlowTableMap::ROOT => 4, CreditNoteStatusFlowTableMap::CREATED_AT => 5, CreditNoteStatusFlowTableMap::UPDATED_AT => 6, ), + self::TYPE_RAW_COLNAME => array('ID' => 0, 'FROM_STATUS_ID' => 1, 'TO_STATUS_ID' => 2, 'PRIORITY' => 3, 'ROOT' => 4, 'CREATED_AT' => 5, 'UPDATED_AT' => 6, ), + self::TYPE_FIELDNAME => array('id' => 0, 'from_status_id' => 1, 'to_status_id' => 2, 'priority' => 3, 'root' => 4, 'created_at' => 5, 'updated_at' => 6, ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, ) + ); + + /** + * Initialize the table attributes and columns + * Relations are not initialized by this method since they are lazy loaded + * + * @return void + * @throws PropelException + */ + public function initialize() + { + // attributes + $this->setName('credit_note_status_flow'); + $this->setPhpName('CreditNoteStatusFlow'); + $this->setClassName('\\CreditNote\\Model\\CreditNoteStatusFlow'); + $this->setPackage('CreditNote.Model'); + $this->setUseIdGenerator(true); + // columns + $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null); + $this->addForeignKey('FROM_STATUS_ID', 'FromStatusId', 'INTEGER', 'credit_note_status', 'ID', true, null, null); + $this->addForeignKey('TO_STATUS_ID', 'ToStatusId', 'INTEGER', 'credit_note_status', 'ID', true, null, null); + $this->addColumn('PRIORITY', 'Priority', 'INTEGER', false, 11, null); + $this->addColumn('ROOT', 'Root', 'BOOLEAN', true, 1, false); + $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); + $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null); + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('CreditNoteStatusRelatedByFromStatusId', '\\CreditNote\\Model\\CreditNoteStatus', RelationMap::MANY_TO_ONE, array('from_status_id' => 'id', ), 'CASCADE', 'RESTRICT'); + $this->addRelation('CreditNoteStatusRelatedByToStatusId', '\\CreditNote\\Model\\CreditNoteStatus', RelationMap::MANY_TO_ONE, array('to_status_id' => 'id', ), 'CASCADE', 'RESTRICT'); + } // buildRelations() + + /** + * + * Gets the list of behaviors registered for this table + * + * @return array Associative array (name => parameters) of behaviors + */ + public function getBehaviors() + { + return array( + 'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ), + ); + } // getBehaviors() + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + */ + public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + // If the PK cannot be derived from the row, return NULL. + if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) { + return null; + } + + return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; + } + + /** + * Retrieves the primary key from the DB resultset row + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, an array of the primary key columns will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * + * @return mixed The primary key of the row + */ + public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + + return (int) $row[ + $indexType == TableMap::TYPE_NUM + ? 0 + $offset + : self::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType) + ]; + } + + /** + * The class that the tableMap will make instances of. + * + * If $withPrefix is true, the returned path + * uses a dot-path notation which is translated into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName + */ + public static function getOMClass($withPrefix = true) + { + return $withPrefix ? CreditNoteStatusFlowTableMap::CLASS_DEFAULT : CreditNoteStatusFlowTableMap::OM_CLASS; + } + + /** + * Populates an object of the default type or an object that inherit from the default. + * + * @param array $row row returned by DataFetcher->fetch(). + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return array (CreditNoteStatusFlow object, last column rank) + */ + public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + $key = CreditNoteStatusFlowTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType); + if (null !== ($obj = CreditNoteStatusFlowTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, $offset, true); // rehydrate + $col = $offset + CreditNoteStatusFlowTableMap::NUM_HYDRATE_COLUMNS; + } else { + $cls = CreditNoteStatusFlowTableMap::OM_CLASS; + $obj = new $cls(); + $col = $obj->hydrate($row, $offset, false, $indexType); + CreditNoteStatusFlowTableMap::addInstanceToPool($obj, $key); + } + + return array($obj, $col); + } + + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @param DataFetcherInterface $dataFetcher + * @return array + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(DataFetcherInterface $dataFetcher) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = static::getOMClass(false); + // populate the object(s) + while ($row = $dataFetcher->fetch()) { + $key = CreditNoteStatusFlowTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType()); + if (null !== ($obj = CreditNoteStatusFlowTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, 0, true); // rehydrate + $results[] = $obj; + } else { + $obj = new $cls(); + $obj->hydrate($row); + $results[] = $obj; + CreditNoteStatusFlowTableMap::addInstanceToPool($obj, $key); + } // if key exists + } + + return $results; + } + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria, $alias = null) + { + if (null === $alias) { + $criteria->addSelectColumn(CreditNoteStatusFlowTableMap::ID); + $criteria->addSelectColumn(CreditNoteStatusFlowTableMap::FROM_STATUS_ID); + $criteria->addSelectColumn(CreditNoteStatusFlowTableMap::TO_STATUS_ID); + $criteria->addSelectColumn(CreditNoteStatusFlowTableMap::PRIORITY); + $criteria->addSelectColumn(CreditNoteStatusFlowTableMap::ROOT); + $criteria->addSelectColumn(CreditNoteStatusFlowTableMap::CREATED_AT); + $criteria->addSelectColumn(CreditNoteStatusFlowTableMap::UPDATED_AT); + } else { + $criteria->addSelectColumn($alias . '.ID'); + $criteria->addSelectColumn($alias . '.FROM_STATUS_ID'); + $criteria->addSelectColumn($alias . '.TO_STATUS_ID'); + $criteria->addSelectColumn($alias . '.PRIORITY'); + $criteria->addSelectColumn($alias . '.ROOT'); + $criteria->addSelectColumn($alias . '.CREATED_AT'); + $criteria->addSelectColumn($alias . '.UPDATED_AT'); + } + } + + /** + * Returns the TableMap related to this object. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getServiceContainer()->getDatabaseMap(CreditNoteStatusFlowTableMap::DATABASE_NAME)->getTable(CreditNoteStatusFlowTableMap::TABLE_NAME); + } + + /** + * Add a TableMap instance to the database for this tableMap class. + */ + public static function buildTableMap() + { + $dbMap = Propel::getServiceContainer()->getDatabaseMap(CreditNoteStatusFlowTableMap::DATABASE_NAME); + if (!$dbMap->hasTable(CreditNoteStatusFlowTableMap::TABLE_NAME)) { + $dbMap->addTableObject(new CreditNoteStatusFlowTableMap()); + } + } + + /** + * Performs a DELETE on the database, given a CreditNoteStatusFlow or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or CreditNoteStatusFlow object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteStatusFlowTableMap::DATABASE_NAME); + } + + if ($values instanceof Criteria) { + // rename for clarity + $criteria = $values; + } elseif ($values instanceof \CreditNote\Model\CreditNoteStatusFlow) { // it's a model object + // create criteria based on pk values + $criteria = $values->buildPkeyCriteria(); + } else { // it's a primary key, or an array of pks + $criteria = new Criteria(CreditNoteStatusFlowTableMap::DATABASE_NAME); + $criteria->add(CreditNoteStatusFlowTableMap::ID, (array) $values, Criteria::IN); + } + + $query = CreditNoteStatusFlowQuery::create()->mergeWith($criteria); + + if ($values instanceof Criteria) { CreditNoteStatusFlowTableMap::clearInstancePool(); + } elseif (!is_object($values)) { // it's a primary key, or an array of pks + foreach ((array) $values as $singleval) { CreditNoteStatusFlowTableMap::removeInstanceFromPool($singleval); + } + } + + return $query->delete($con); + } + + /** + * Deletes all rows from the credit_note_status_flow table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll(ConnectionInterface $con = null) + { + return CreditNoteStatusFlowQuery::create()->doDeleteAll($con); + } + + /** + * Performs an INSERT on the database, given a CreditNoteStatusFlow or Criteria object. + * + * @param mixed $criteria Criteria or CreditNoteStatusFlow object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($criteria, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteStatusFlowTableMap::DATABASE_NAME); + } + + if ($criteria instanceof Criteria) { + $criteria = clone $criteria; // rename for clarity + } else { + $criteria = $criteria->buildCriteria(); // build Criteria from CreditNoteStatusFlow object + } + + if ($criteria->containsKey(CreditNoteStatusFlowTableMap::ID) && $criteria->keyContainsValue(CreditNoteStatusFlowTableMap::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CreditNoteStatusFlowTableMap::ID.')'); + } + + + // Set the correct dbName + $query = CreditNoteStatusFlowQuery::create()->mergeWith($criteria); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + $pk = $query->doInsert($con); + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $pk; + } + +} // CreditNoteStatusFlowTableMap +// This is the static code needed to register the TableMap for this table with the main Propel class. +// +CreditNoteStatusFlowTableMap::buildTableMap(); diff --git a/local/modules/CreditNote/Model/Map/CreditNoteStatusI18nTableMap.php b/local/modules/CreditNote/Model/Map/CreditNoteStatusI18nTableMap.php new file mode 100644 index 000000000..e2ca04313 --- /dev/null +++ b/local/modules/CreditNote/Model/Map/CreditNoteStatusI18nTableMap.php @@ -0,0 +1,498 @@ + array('Id', 'Locale', 'Title', 'Description', 'Chapo', 'Postscriptum', ), + self::TYPE_STUDLYPHPNAME => array('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', ), + self::TYPE_COLNAME => array(CreditNoteStatusI18nTableMap::ID, CreditNoteStatusI18nTableMap::LOCALE, CreditNoteStatusI18nTableMap::TITLE, CreditNoteStatusI18nTableMap::DESCRIPTION, CreditNoteStatusI18nTableMap::CHAPO, CreditNoteStatusI18nTableMap::POSTSCRIPTUM, ), + self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', 'TITLE', 'DESCRIPTION', 'CHAPO', 'POSTSCRIPTUM', ), + self::TYPE_FIELDNAME => array('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0 + */ + protected static $fieldKeys = array ( + self::TYPE_PHPNAME => array('Id' => 0, 'Locale' => 1, 'Title' => 2, 'Description' => 3, 'Chapo' => 4, 'Postscriptum' => 5, ), + self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, ), + self::TYPE_COLNAME => array(CreditNoteStatusI18nTableMap::ID => 0, CreditNoteStatusI18nTableMap::LOCALE => 1, CreditNoteStatusI18nTableMap::TITLE => 2, CreditNoteStatusI18nTableMap::DESCRIPTION => 3, CreditNoteStatusI18nTableMap::CHAPO => 4, CreditNoteStatusI18nTableMap::POSTSCRIPTUM => 5, ), + self::TYPE_RAW_COLNAME => array('ID' => 0, 'LOCALE' => 1, 'TITLE' => 2, 'DESCRIPTION' => 3, 'CHAPO' => 4, 'POSTSCRIPTUM' => 5, ), + self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, ) + ); + + /** + * Initialize the table attributes and columns + * Relations are not initialized by this method since they are lazy loaded + * + * @return void + * @throws PropelException + */ + public function initialize() + { + // attributes + $this->setName('credit_note_status_i18n'); + $this->setPhpName('CreditNoteStatusI18n'); + $this->setClassName('\\CreditNote\\Model\\CreditNoteStatusI18n'); + $this->setPackage('CreditNote.Model'); + $this->setUseIdGenerator(false); + // columns + $this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'credit_note_status', 'ID', true, null, null); + $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US'); + $this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null); + $this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null); + $this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null); + $this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null); + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('CreditNoteStatus', '\\CreditNote\\Model\\CreditNoteStatus', RelationMap::MANY_TO_ONE, array('id' => 'id', ), 'CASCADE', null); + } // buildRelations() + + /** + * Adds an object to the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases you may need to explicitly add objects + * to the cache in order to ensure that the same objects are always returned by find*() + * and findPk*() calls. + * + * @param \CreditNote\Model\CreditNoteStatusI18n $obj A \CreditNote\Model\CreditNoteStatusI18n object. + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + */ + public static function addInstanceToPool($obj, $key = null) + { + if (Propel::isInstancePoolingEnabled()) { + if (null === $key) { + $key = serialize(array((string) $obj->getId(), (string) $obj->getLocale())); + } // if key === null + self::$instances[$key] = $obj; + } + } + + /** + * Removes an object from the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doDelete + * methods in your stub classes -- you may need to explicitly remove objects + * from the cache in order to prevent returning objects that no longer exist. + * + * @param mixed $value A \CreditNote\Model\CreditNoteStatusI18n object or a primary key value. + */ + public static function removeInstanceFromPool($value) + { + if (Propel::isInstancePoolingEnabled() && null !== $value) { + if (is_object($value) && $value instanceof \CreditNote\Model\CreditNoteStatusI18n) { + $key = serialize(array((string) $value->getId(), (string) $value->getLocale())); + + } elseif (is_array($value) && count($value) === 2) { + // assume we've been passed a primary key"; + $key = serialize(array((string) $value[0], (string) $value[1])); + } elseif ($value instanceof Criteria) { + self::$instances = []; + + return; + } else { + $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or \CreditNote\Model\CreditNoteStatusI18n object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value, true))); + throw $e; + } + + unset(self::$instances[$key]); + } + } + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + */ + public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + // If the PK cannot be derived from the row, return NULL. + if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 1 + $offset : static::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)] === null) { + return null; + } + + return serialize(array((string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 1 + $offset : static::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)])); + } + + /** + * Retrieves the primary key from the DB resultset row + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, an array of the primary key columns will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * + * @return mixed The primary key of the row + */ + public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + + return $pks; + } + + /** + * The class that the tableMap will make instances of. + * + * If $withPrefix is true, the returned path + * uses a dot-path notation which is translated into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName + */ + public static function getOMClass($withPrefix = true) + { + return $withPrefix ? CreditNoteStatusI18nTableMap::CLASS_DEFAULT : CreditNoteStatusI18nTableMap::OM_CLASS; + } + + /** + * Populates an object of the default type or an object that inherit from the default. + * + * @param array $row row returned by DataFetcher->fetch(). + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return array (CreditNoteStatusI18n object, last column rank) + */ + public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + $key = CreditNoteStatusI18nTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType); + if (null !== ($obj = CreditNoteStatusI18nTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, $offset, true); // rehydrate + $col = $offset + CreditNoteStatusI18nTableMap::NUM_HYDRATE_COLUMNS; + } else { + $cls = CreditNoteStatusI18nTableMap::OM_CLASS; + $obj = new $cls(); + $col = $obj->hydrate($row, $offset, false, $indexType); + CreditNoteStatusI18nTableMap::addInstanceToPool($obj, $key); + } + + return array($obj, $col); + } + + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @param DataFetcherInterface $dataFetcher + * @return array + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(DataFetcherInterface $dataFetcher) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = static::getOMClass(false); + // populate the object(s) + while ($row = $dataFetcher->fetch()) { + $key = CreditNoteStatusI18nTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType()); + if (null !== ($obj = CreditNoteStatusI18nTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, 0, true); // rehydrate + $results[] = $obj; + } else { + $obj = new $cls(); + $obj->hydrate($row); + $results[] = $obj; + CreditNoteStatusI18nTableMap::addInstanceToPool($obj, $key); + } // if key exists + } + + return $results; + } + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria, $alias = null) + { + if (null === $alias) { + $criteria->addSelectColumn(CreditNoteStatusI18nTableMap::ID); + $criteria->addSelectColumn(CreditNoteStatusI18nTableMap::LOCALE); + $criteria->addSelectColumn(CreditNoteStatusI18nTableMap::TITLE); + $criteria->addSelectColumn(CreditNoteStatusI18nTableMap::DESCRIPTION); + $criteria->addSelectColumn(CreditNoteStatusI18nTableMap::CHAPO); + $criteria->addSelectColumn(CreditNoteStatusI18nTableMap::POSTSCRIPTUM); + } else { + $criteria->addSelectColumn($alias . '.ID'); + $criteria->addSelectColumn($alias . '.LOCALE'); + $criteria->addSelectColumn($alias . '.TITLE'); + $criteria->addSelectColumn($alias . '.DESCRIPTION'); + $criteria->addSelectColumn($alias . '.CHAPO'); + $criteria->addSelectColumn($alias . '.POSTSCRIPTUM'); + } + } + + /** + * Returns the TableMap related to this object. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getServiceContainer()->getDatabaseMap(CreditNoteStatusI18nTableMap::DATABASE_NAME)->getTable(CreditNoteStatusI18nTableMap::TABLE_NAME); + } + + /** + * Add a TableMap instance to the database for this tableMap class. + */ + public static function buildTableMap() + { + $dbMap = Propel::getServiceContainer()->getDatabaseMap(CreditNoteStatusI18nTableMap::DATABASE_NAME); + if (!$dbMap->hasTable(CreditNoteStatusI18nTableMap::TABLE_NAME)) { + $dbMap->addTableObject(new CreditNoteStatusI18nTableMap()); + } + } + + /** + * Performs a DELETE on the database, given a CreditNoteStatusI18n or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or CreditNoteStatusI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteStatusI18nTableMap::DATABASE_NAME); + } + + if ($values instanceof Criteria) { + // rename for clarity + $criteria = $values; + } elseif ($values instanceof \CreditNote\Model\CreditNoteStatusI18n) { // it's a model object + // create criteria based on pk values + $criteria = $values->buildPkeyCriteria(); + } else { // it's a primary key, or an array of pks + $criteria = new Criteria(CreditNoteStatusI18nTableMap::DATABASE_NAME); + // primary key is composite; we therefore, expect + // the primary key passed to be an array of pkey values + if (count($values) == count($values, COUNT_RECURSIVE)) { + // array is not multi-dimensional + $values = array($values); + } + foreach ($values as $value) { + $criterion = $criteria->getNewCriterion(CreditNoteStatusI18nTableMap::ID, $value[0]); + $criterion->addAnd($criteria->getNewCriterion(CreditNoteStatusI18nTableMap::LOCALE, $value[1])); + $criteria->addOr($criterion); + } + } + + $query = CreditNoteStatusI18nQuery::create()->mergeWith($criteria); + + if ($values instanceof Criteria) { CreditNoteStatusI18nTableMap::clearInstancePool(); + } elseif (!is_object($values)) { // it's a primary key, or an array of pks + foreach ((array) $values as $singleval) { CreditNoteStatusI18nTableMap::removeInstanceFromPool($singleval); + } + } + + return $query->delete($con); + } + + /** + * Deletes all rows from the credit_note_status_i18n table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll(ConnectionInterface $con = null) + { + return CreditNoteStatusI18nQuery::create()->doDeleteAll($con); + } + + /** + * Performs an INSERT on the database, given a CreditNoteStatusI18n or Criteria object. + * + * @param mixed $criteria Criteria or CreditNoteStatusI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($criteria, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteStatusI18nTableMap::DATABASE_NAME); + } + + if ($criteria instanceof Criteria) { + $criteria = clone $criteria; // rename for clarity + } else { + $criteria = $criteria->buildCriteria(); // build Criteria from CreditNoteStatusI18n object + } + + + // Set the correct dbName + $query = CreditNoteStatusI18nQuery::create()->mergeWith($criteria); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + $pk = $query->doInsert($con); + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $pk; + } + +} // CreditNoteStatusI18nTableMap +// This is the static code needed to register the TableMap for this table with the main Propel class. +// +CreditNoteStatusI18nTableMap::buildTableMap(); diff --git a/local/modules/CreditNote/Model/Map/CreditNoteStatusTableMap.php b/local/modules/CreditNote/Model/Map/CreditNoteStatusTableMap.php new file mode 100644 index 000000000..def4bd81c --- /dev/null +++ b/local/modules/CreditNote/Model/Map/CreditNoteStatusTableMap.php @@ -0,0 +1,495 @@ + array('Id', 'Code', 'Color', 'Invoiced', 'Used', 'Position', 'CreatedAt', 'UpdatedAt', ), + self::TYPE_STUDLYPHPNAME => array('id', 'code', 'color', 'invoiced', 'used', 'position', 'createdAt', 'updatedAt', ), + self::TYPE_COLNAME => array(CreditNoteStatusTableMap::ID, CreditNoteStatusTableMap::CODE, CreditNoteStatusTableMap::COLOR, CreditNoteStatusTableMap::INVOICED, CreditNoteStatusTableMap::USED, CreditNoteStatusTableMap::POSITION, CreditNoteStatusTableMap::CREATED_AT, CreditNoteStatusTableMap::UPDATED_AT, ), + self::TYPE_RAW_COLNAME => array('ID', 'CODE', 'COLOR', 'INVOICED', 'USED', 'POSITION', 'CREATED_AT', 'UPDATED_AT', ), + self::TYPE_FIELDNAME => array('id', 'code', 'color', 'invoiced', 'used', 'position', 'created_at', 'updated_at', ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0 + */ + protected static $fieldKeys = array ( + self::TYPE_PHPNAME => array('Id' => 0, 'Code' => 1, 'Color' => 2, 'Invoiced' => 3, 'Used' => 4, 'Position' => 5, 'CreatedAt' => 6, 'UpdatedAt' => 7, ), + self::TYPE_STUDLYPHPNAME => array('id' => 0, 'code' => 1, 'color' => 2, 'invoiced' => 3, 'used' => 4, 'position' => 5, 'createdAt' => 6, 'updatedAt' => 7, ), + self::TYPE_COLNAME => array(CreditNoteStatusTableMap::ID => 0, CreditNoteStatusTableMap::CODE => 1, CreditNoteStatusTableMap::COLOR => 2, CreditNoteStatusTableMap::INVOICED => 3, CreditNoteStatusTableMap::USED => 4, CreditNoteStatusTableMap::POSITION => 5, CreditNoteStatusTableMap::CREATED_AT => 6, CreditNoteStatusTableMap::UPDATED_AT => 7, ), + self::TYPE_RAW_COLNAME => array('ID' => 0, 'CODE' => 1, 'COLOR' => 2, 'INVOICED' => 3, 'USED' => 4, 'POSITION' => 5, 'CREATED_AT' => 6, 'UPDATED_AT' => 7, ), + self::TYPE_FIELDNAME => array('id' => 0, 'code' => 1, 'color' => 2, 'invoiced' => 3, 'used' => 4, 'position' => 5, 'created_at' => 6, 'updated_at' => 7, ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, ) + ); + + /** + * Initialize the table attributes and columns + * Relations are not initialized by this method since they are lazy loaded + * + * @return void + * @throws PropelException + */ + public function initialize() + { + // attributes + $this->setName('credit_note_status'); + $this->setPhpName('CreditNoteStatus'); + $this->setClassName('\\CreditNote\\Model\\CreditNoteStatus'); + $this->setPackage('CreditNote.Model'); + $this->setUseIdGenerator(true); + // columns + $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null); + $this->addColumn('CODE', 'Code', 'VARCHAR', false, 45, null); + $this->addColumn('COLOR', 'Color', 'CHAR', false, 7, null); + $this->addColumn('INVOICED', 'Invoiced', 'BOOLEAN', true, 1, false); + $this->addColumn('USED', 'Used', 'BOOLEAN', true, 1, false); + $this->addColumn('POSITION', 'Position', 'INTEGER', false, 11, null); + $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); + $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null); + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('CreditNote', '\\CreditNote\\Model\\CreditNote', RelationMap::ONE_TO_MANY, array('id' => 'status_id', ), 'RESTRICT', 'RESTRICT', 'CreditNotes'); + $this->addRelation('CreditNoteStatusFlowRelatedByFromStatusId', '\\CreditNote\\Model\\CreditNoteStatusFlow', RelationMap::ONE_TO_MANY, array('id' => 'from_status_id', ), 'CASCADE', 'RESTRICT', 'CreditNoteStatusFlowsRelatedByFromStatusId'); + $this->addRelation('CreditNoteStatusFlowRelatedByToStatusId', '\\CreditNote\\Model\\CreditNoteStatusFlow', RelationMap::ONE_TO_MANY, array('id' => 'to_status_id', ), 'CASCADE', 'RESTRICT', 'CreditNoteStatusFlowsRelatedByToStatusId'); + $this->addRelation('CreditNoteStatusI18n', '\\CreditNote\\Model\\CreditNoteStatusI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'CreditNoteStatusI18ns'); + } // buildRelations() + + /** + * + * Gets the list of behaviors registered for this table + * + * @return array Associative array (name => parameters) of behaviors + */ + public function getBehaviors() + { + return array( + 'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum', 'locale_column' => 'locale', 'locale_length' => '5', 'default_locale' => '', 'locale_alias' => '', ), + 'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ), + ); + } // getBehaviors() + /** + * Method to invalidate the instance pool of all tables related to credit_note_status * by a foreign key with ON DELETE CASCADE + */ + public static function clearRelatedInstancePool() + { + // Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool, + // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. + CreditNoteStatusFlowTableMap::clearInstancePool(); + CreditNoteStatusI18nTableMap::clearInstancePool(); + } + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + */ + public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + // If the PK cannot be derived from the row, return NULL. + if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) { + return null; + } + + return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; + } + + /** + * Retrieves the primary key from the DB resultset row + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, an array of the primary key columns will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * + * @return mixed The primary key of the row + */ + public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + + return (int) $row[ + $indexType == TableMap::TYPE_NUM + ? 0 + $offset + : self::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType) + ]; + } + + /** + * The class that the tableMap will make instances of. + * + * If $withPrefix is true, the returned path + * uses a dot-path notation which is translated into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName + */ + public static function getOMClass($withPrefix = true) + { + return $withPrefix ? CreditNoteStatusTableMap::CLASS_DEFAULT : CreditNoteStatusTableMap::OM_CLASS; + } + + /** + * Populates an object of the default type or an object that inherit from the default. + * + * @param array $row row returned by DataFetcher->fetch(). + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return array (CreditNoteStatus object, last column rank) + */ + public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + $key = CreditNoteStatusTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType); + if (null !== ($obj = CreditNoteStatusTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, $offset, true); // rehydrate + $col = $offset + CreditNoteStatusTableMap::NUM_HYDRATE_COLUMNS; + } else { + $cls = CreditNoteStatusTableMap::OM_CLASS; + $obj = new $cls(); + $col = $obj->hydrate($row, $offset, false, $indexType); + CreditNoteStatusTableMap::addInstanceToPool($obj, $key); + } + + return array($obj, $col); + } + + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @param DataFetcherInterface $dataFetcher + * @return array + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(DataFetcherInterface $dataFetcher) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = static::getOMClass(false); + // populate the object(s) + while ($row = $dataFetcher->fetch()) { + $key = CreditNoteStatusTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType()); + if (null !== ($obj = CreditNoteStatusTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, 0, true); // rehydrate + $results[] = $obj; + } else { + $obj = new $cls(); + $obj->hydrate($row); + $results[] = $obj; + CreditNoteStatusTableMap::addInstanceToPool($obj, $key); + } // if key exists + } + + return $results; + } + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria, $alias = null) + { + if (null === $alias) { + $criteria->addSelectColumn(CreditNoteStatusTableMap::ID); + $criteria->addSelectColumn(CreditNoteStatusTableMap::CODE); + $criteria->addSelectColumn(CreditNoteStatusTableMap::COLOR); + $criteria->addSelectColumn(CreditNoteStatusTableMap::INVOICED); + $criteria->addSelectColumn(CreditNoteStatusTableMap::USED); + $criteria->addSelectColumn(CreditNoteStatusTableMap::POSITION); + $criteria->addSelectColumn(CreditNoteStatusTableMap::CREATED_AT); + $criteria->addSelectColumn(CreditNoteStatusTableMap::UPDATED_AT); + } else { + $criteria->addSelectColumn($alias . '.ID'); + $criteria->addSelectColumn($alias . '.CODE'); + $criteria->addSelectColumn($alias . '.COLOR'); + $criteria->addSelectColumn($alias . '.INVOICED'); + $criteria->addSelectColumn($alias . '.USED'); + $criteria->addSelectColumn($alias . '.POSITION'); + $criteria->addSelectColumn($alias . '.CREATED_AT'); + $criteria->addSelectColumn($alias . '.UPDATED_AT'); + } + } + + /** + * Returns the TableMap related to this object. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getServiceContainer()->getDatabaseMap(CreditNoteStatusTableMap::DATABASE_NAME)->getTable(CreditNoteStatusTableMap::TABLE_NAME); + } + + /** + * Add a TableMap instance to the database for this tableMap class. + */ + public static function buildTableMap() + { + $dbMap = Propel::getServiceContainer()->getDatabaseMap(CreditNoteStatusTableMap::DATABASE_NAME); + if (!$dbMap->hasTable(CreditNoteStatusTableMap::TABLE_NAME)) { + $dbMap->addTableObject(new CreditNoteStatusTableMap()); + } + } + + /** + * Performs a DELETE on the database, given a CreditNoteStatus or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or CreditNoteStatus object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteStatusTableMap::DATABASE_NAME); + } + + if ($values instanceof Criteria) { + // rename for clarity + $criteria = $values; + } elseif ($values instanceof \CreditNote\Model\CreditNoteStatus) { // it's a model object + // create criteria based on pk values + $criteria = $values->buildPkeyCriteria(); + } else { // it's a primary key, or an array of pks + $criteria = new Criteria(CreditNoteStatusTableMap::DATABASE_NAME); + $criteria->add(CreditNoteStatusTableMap::ID, (array) $values, Criteria::IN); + } + + $query = CreditNoteStatusQuery::create()->mergeWith($criteria); + + if ($values instanceof Criteria) { CreditNoteStatusTableMap::clearInstancePool(); + } elseif (!is_object($values)) { // it's a primary key, or an array of pks + foreach ((array) $values as $singleval) { CreditNoteStatusTableMap::removeInstanceFromPool($singleval); + } + } + + return $query->delete($con); + } + + /** + * Deletes all rows from the credit_note_status table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll(ConnectionInterface $con = null) + { + return CreditNoteStatusQuery::create()->doDeleteAll($con); + } + + /** + * Performs an INSERT on the database, given a CreditNoteStatus or Criteria object. + * + * @param mixed $criteria Criteria or CreditNoteStatus object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($criteria, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteStatusTableMap::DATABASE_NAME); + } + + if ($criteria instanceof Criteria) { + $criteria = clone $criteria; // rename for clarity + } else { + $criteria = $criteria->buildCriteria(); // build Criteria from CreditNoteStatus object + } + + if ($criteria->containsKey(CreditNoteStatusTableMap::ID) && $criteria->keyContainsValue(CreditNoteStatusTableMap::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CreditNoteStatusTableMap::ID.')'); + } + + + // Set the correct dbName + $query = CreditNoteStatusQuery::create()->mergeWith($criteria); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + $pk = $query->doInsert($con); + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $pk; + } + +} // CreditNoteStatusTableMap +// This is the static code needed to register the TableMap for this table with the main Propel class. +// +CreditNoteStatusTableMap::buildTableMap(); diff --git a/local/modules/CreditNote/Model/Map/CreditNoteTableMap.php b/local/modules/CreditNote/Model/Map/CreditNoteTableMap.php new file mode 100644 index 000000000..0a0d0632e --- /dev/null +++ b/local/modules/CreditNote/Model/Map/CreditNoteTableMap.php @@ -0,0 +1,583 @@ + array('Id', 'Ref', 'InvoiceRef', 'InvoiceAddressId', 'InvoiceDate', 'OrderId', 'CustomerId', 'ParentId', 'TypeId', 'StatusId', 'CurrencyId', 'CurrencyRate', 'TotalPrice', 'TotalPriceWithTax', 'DiscountWithoutTax', 'DiscountWithTax', 'AllowPartialUse', 'CreatedAt', 'UpdatedAt', ), + self::TYPE_STUDLYPHPNAME => array('id', 'ref', 'invoiceRef', 'invoiceAddressId', 'invoiceDate', 'orderId', 'customerId', 'parentId', 'typeId', 'statusId', 'currencyId', 'currencyRate', 'totalPrice', 'totalPriceWithTax', 'discountWithoutTax', 'discountWithTax', 'allowPartialUse', 'createdAt', 'updatedAt', ), + self::TYPE_COLNAME => array(CreditNoteTableMap::ID, CreditNoteTableMap::REF, CreditNoteTableMap::INVOICE_REF, CreditNoteTableMap::INVOICE_ADDRESS_ID, CreditNoteTableMap::INVOICE_DATE, CreditNoteTableMap::ORDER_ID, CreditNoteTableMap::CUSTOMER_ID, CreditNoteTableMap::PARENT_ID, CreditNoteTableMap::TYPE_ID, CreditNoteTableMap::STATUS_ID, CreditNoteTableMap::CURRENCY_ID, CreditNoteTableMap::CURRENCY_RATE, CreditNoteTableMap::TOTAL_PRICE, CreditNoteTableMap::TOTAL_PRICE_WITH_TAX, CreditNoteTableMap::DISCOUNT_WITHOUT_TAX, CreditNoteTableMap::DISCOUNT_WITH_TAX, CreditNoteTableMap::ALLOW_PARTIAL_USE, CreditNoteTableMap::CREATED_AT, CreditNoteTableMap::UPDATED_AT, ), + self::TYPE_RAW_COLNAME => array('ID', 'REF', 'INVOICE_REF', 'INVOICE_ADDRESS_ID', 'INVOICE_DATE', 'ORDER_ID', 'CUSTOMER_ID', 'PARENT_ID', 'TYPE_ID', 'STATUS_ID', 'CURRENCY_ID', 'CURRENCY_RATE', 'TOTAL_PRICE', 'TOTAL_PRICE_WITH_TAX', 'DISCOUNT_WITHOUT_TAX', 'DISCOUNT_WITH_TAX', 'ALLOW_PARTIAL_USE', 'CREATED_AT', 'UPDATED_AT', ), + self::TYPE_FIELDNAME => array('id', 'ref', 'invoice_ref', 'invoice_address_id', 'invoice_date', 'order_id', 'customer_id', 'parent_id', 'type_id', 'status_id', 'currency_id', 'currency_rate', 'total_price', 'total_price_with_tax', 'discount_without_tax', 'discount_with_tax', 'allow_partial_use', 'created_at', 'updated_at', ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0 + */ + protected static $fieldKeys = array ( + self::TYPE_PHPNAME => array('Id' => 0, 'Ref' => 1, 'InvoiceRef' => 2, 'InvoiceAddressId' => 3, 'InvoiceDate' => 4, 'OrderId' => 5, 'CustomerId' => 6, 'ParentId' => 7, 'TypeId' => 8, 'StatusId' => 9, 'CurrencyId' => 10, 'CurrencyRate' => 11, 'TotalPrice' => 12, 'TotalPriceWithTax' => 13, 'DiscountWithoutTax' => 14, 'DiscountWithTax' => 15, 'AllowPartialUse' => 16, 'CreatedAt' => 17, 'UpdatedAt' => 18, ), + self::TYPE_STUDLYPHPNAME => array('id' => 0, 'ref' => 1, 'invoiceRef' => 2, 'invoiceAddressId' => 3, 'invoiceDate' => 4, 'orderId' => 5, 'customerId' => 6, 'parentId' => 7, 'typeId' => 8, 'statusId' => 9, 'currencyId' => 10, 'currencyRate' => 11, 'totalPrice' => 12, 'totalPriceWithTax' => 13, 'discountWithoutTax' => 14, 'discountWithTax' => 15, 'allowPartialUse' => 16, 'createdAt' => 17, 'updatedAt' => 18, ), + self::TYPE_COLNAME => array(CreditNoteTableMap::ID => 0, CreditNoteTableMap::REF => 1, CreditNoteTableMap::INVOICE_REF => 2, CreditNoteTableMap::INVOICE_ADDRESS_ID => 3, CreditNoteTableMap::INVOICE_DATE => 4, CreditNoteTableMap::ORDER_ID => 5, CreditNoteTableMap::CUSTOMER_ID => 6, CreditNoteTableMap::PARENT_ID => 7, CreditNoteTableMap::TYPE_ID => 8, CreditNoteTableMap::STATUS_ID => 9, CreditNoteTableMap::CURRENCY_ID => 10, CreditNoteTableMap::CURRENCY_RATE => 11, CreditNoteTableMap::TOTAL_PRICE => 12, CreditNoteTableMap::TOTAL_PRICE_WITH_TAX => 13, CreditNoteTableMap::DISCOUNT_WITHOUT_TAX => 14, CreditNoteTableMap::DISCOUNT_WITH_TAX => 15, CreditNoteTableMap::ALLOW_PARTIAL_USE => 16, CreditNoteTableMap::CREATED_AT => 17, CreditNoteTableMap::UPDATED_AT => 18, ), + self::TYPE_RAW_COLNAME => array('ID' => 0, 'REF' => 1, 'INVOICE_REF' => 2, 'INVOICE_ADDRESS_ID' => 3, 'INVOICE_DATE' => 4, 'ORDER_ID' => 5, 'CUSTOMER_ID' => 6, 'PARENT_ID' => 7, 'TYPE_ID' => 8, 'STATUS_ID' => 9, 'CURRENCY_ID' => 10, 'CURRENCY_RATE' => 11, 'TOTAL_PRICE' => 12, 'TOTAL_PRICE_WITH_TAX' => 13, 'DISCOUNT_WITHOUT_TAX' => 14, 'DISCOUNT_WITH_TAX' => 15, 'ALLOW_PARTIAL_USE' => 16, 'CREATED_AT' => 17, 'UPDATED_AT' => 18, ), + self::TYPE_FIELDNAME => array('id' => 0, 'ref' => 1, 'invoice_ref' => 2, 'invoice_address_id' => 3, 'invoice_date' => 4, 'order_id' => 5, 'customer_id' => 6, 'parent_id' => 7, 'type_id' => 8, 'status_id' => 9, 'currency_id' => 10, 'currency_rate' => 11, 'total_price' => 12, 'total_price_with_tax' => 13, 'discount_without_tax' => 14, 'discount_with_tax' => 15, 'allow_partial_use' => 16, 'created_at' => 17, 'updated_at' => 18, ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ) + ); + + /** + * Initialize the table attributes and columns + * Relations are not initialized by this method since they are lazy loaded + * + * @return void + * @throws PropelException + */ + public function initialize() + { + // attributes + $this->setName('credit_note'); + $this->setPhpName('CreditNote'); + $this->setClassName('\\CreditNote\\Model\\CreditNote'); + $this->setPackage('CreditNote.Model'); + $this->setUseIdGenerator(true); + // columns + $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null); + $this->addColumn('REF', 'Ref', 'VARCHAR', false, 45, null); + $this->addColumn('INVOICE_REF', 'InvoiceRef', 'VARCHAR', false, 45, null); + $this->addForeignKey('INVOICE_ADDRESS_ID', 'InvoiceAddressId', 'INTEGER', 'credit_note_address', 'ID', true, null, null); + $this->addColumn('INVOICE_DATE', 'InvoiceDate', 'TIMESTAMP', false, null, null); + $this->addForeignKey('ORDER_ID', 'OrderId', 'INTEGER', 'order', 'ID', false, null, null); + $this->addForeignKey('CUSTOMER_ID', 'CustomerId', 'INTEGER', 'customer', 'ID', true, null, null); + $this->addForeignKey('PARENT_ID', 'ParentId', 'INTEGER', 'credit_note', 'ID', false, null, null); + $this->addForeignKey('TYPE_ID', 'TypeId', 'INTEGER', 'credit_note_type', 'ID', true, null, null); + $this->addForeignKey('STATUS_ID', 'StatusId', 'INTEGER', 'credit_note_status', 'ID', true, null, null); + $this->addForeignKey('CURRENCY_ID', 'CurrencyId', 'INTEGER', 'currency', 'ID', true, null, null); + $this->addColumn('CURRENCY_RATE', 'CurrencyRate', 'FLOAT', false, null, null); + $this->addColumn('TOTAL_PRICE', 'TotalPrice', 'DECIMAL', false, 16, 0); + $this->addColumn('TOTAL_PRICE_WITH_TAX', 'TotalPriceWithTax', 'DECIMAL', false, 16, 0); + $this->addColumn('DISCOUNT_WITHOUT_TAX', 'DiscountWithoutTax', 'DECIMAL', false, 16, 0); + $this->addColumn('DISCOUNT_WITH_TAX', 'DiscountWithTax', 'DECIMAL', false, 16, 0); + $this->addColumn('ALLOW_PARTIAL_USE', 'AllowPartialUse', 'BOOLEAN', false, 1, true); + $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); + $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null); + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('Order', '\\Thelia\\Model\\Order', RelationMap::MANY_TO_ONE, array('order_id' => 'id', ), 'RESTRICT', 'RESTRICT'); + $this->addRelation('Customer', '\\Thelia\\Model\\Customer', RelationMap::MANY_TO_ONE, array('customer_id' => 'id', ), 'RESTRICT', 'RESTRICT'); + $this->addRelation('CreditNoteRelatedByParentId', '\\CreditNote\\Model\\CreditNote', RelationMap::MANY_TO_ONE, array('parent_id' => 'id', ), 'RESTRICT', 'RESTRICT'); + $this->addRelation('CreditNoteType', '\\CreditNote\\Model\\CreditNoteType', RelationMap::MANY_TO_ONE, array('type_id' => 'id', ), 'RESTRICT', 'RESTRICT'); + $this->addRelation('CreditNoteStatus', '\\CreditNote\\Model\\CreditNoteStatus', RelationMap::MANY_TO_ONE, array('status_id' => 'id', ), 'RESTRICT', 'RESTRICT'); + $this->addRelation('Currency', '\\Thelia\\Model\\Currency', RelationMap::MANY_TO_ONE, array('currency_id' => 'id', ), 'RESTRICT', 'RESTRICT'); + $this->addRelation('CreditNoteAddress', '\\CreditNote\\Model\\CreditNoteAddress', RelationMap::MANY_TO_ONE, array('invoice_address_id' => 'id', ), 'RESTRICT', 'RESTRICT'); + $this->addRelation('CreditNoteRelatedById', '\\CreditNote\\Model\\CreditNote', RelationMap::ONE_TO_MANY, array('id' => 'parent_id', ), 'RESTRICT', 'RESTRICT', 'CreditNotesRelatedById'); + $this->addRelation('OrderCreditNote', '\\CreditNote\\Model\\OrderCreditNote', RelationMap::ONE_TO_MANY, array('id' => 'credit_note_id', ), 'CASCADE', 'RESTRICT', 'OrderCreditNotes'); + $this->addRelation('CartCreditNote', '\\CreditNote\\Model\\CartCreditNote', RelationMap::ONE_TO_MANY, array('id' => 'credit_note_id', ), 'CASCADE', 'RESTRICT', 'CartCreditNotes'); + $this->addRelation('CreditNoteDetail', '\\CreditNote\\Model\\CreditNoteDetail', RelationMap::ONE_TO_MANY, array('id' => 'credit_note_id', ), 'CASCADE', 'RESTRICT', 'CreditNoteDetails'); + $this->addRelation('CreditNoteComment', '\\CreditNote\\Model\\CreditNoteComment', RelationMap::ONE_TO_MANY, array('id' => 'credit_note_id', ), 'CASCADE', 'RESTRICT', 'CreditNoteComments'); + } // buildRelations() + + /** + * + * Gets the list of behaviors registered for this table + * + * @return array Associative array (name => parameters) of behaviors + */ + public function getBehaviors() + { + return array( + 'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ), + ); + } // getBehaviors() + /** + * Method to invalidate the instance pool of all tables related to credit_note * by a foreign key with ON DELETE CASCADE + */ + public static function clearRelatedInstancePool() + { + // Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool, + // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. + OrderCreditNoteTableMap::clearInstancePool(); + CartCreditNoteTableMap::clearInstancePool(); + CreditNoteDetailTableMap::clearInstancePool(); + CreditNoteCommentTableMap::clearInstancePool(); + } + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + */ + public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + // If the PK cannot be derived from the row, return NULL. + if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) { + return null; + } + + return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; + } + + /** + * Retrieves the primary key from the DB resultset row + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, an array of the primary key columns will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * + * @return mixed The primary key of the row + */ + public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + + return (int) $row[ + $indexType == TableMap::TYPE_NUM + ? 0 + $offset + : self::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType) + ]; + } + + /** + * The class that the tableMap will make instances of. + * + * If $withPrefix is true, the returned path + * uses a dot-path notation which is translated into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName + */ + public static function getOMClass($withPrefix = true) + { + return $withPrefix ? CreditNoteTableMap::CLASS_DEFAULT : CreditNoteTableMap::OM_CLASS; + } + + /** + * Populates an object of the default type or an object that inherit from the default. + * + * @param array $row row returned by DataFetcher->fetch(). + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return array (CreditNote object, last column rank) + */ + public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + $key = CreditNoteTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType); + if (null !== ($obj = CreditNoteTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, $offset, true); // rehydrate + $col = $offset + CreditNoteTableMap::NUM_HYDRATE_COLUMNS; + } else { + $cls = CreditNoteTableMap::OM_CLASS; + $obj = new $cls(); + $col = $obj->hydrate($row, $offset, false, $indexType); + CreditNoteTableMap::addInstanceToPool($obj, $key); + } + + return array($obj, $col); + } + + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @param DataFetcherInterface $dataFetcher + * @return array + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(DataFetcherInterface $dataFetcher) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = static::getOMClass(false); + // populate the object(s) + while ($row = $dataFetcher->fetch()) { + $key = CreditNoteTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType()); + if (null !== ($obj = CreditNoteTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, 0, true); // rehydrate + $results[] = $obj; + } else { + $obj = new $cls(); + $obj->hydrate($row); + $results[] = $obj; + CreditNoteTableMap::addInstanceToPool($obj, $key); + } // if key exists + } + + return $results; + } + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria, $alias = null) + { + if (null === $alias) { + $criteria->addSelectColumn(CreditNoteTableMap::ID); + $criteria->addSelectColumn(CreditNoteTableMap::REF); + $criteria->addSelectColumn(CreditNoteTableMap::INVOICE_REF); + $criteria->addSelectColumn(CreditNoteTableMap::INVOICE_ADDRESS_ID); + $criteria->addSelectColumn(CreditNoteTableMap::INVOICE_DATE); + $criteria->addSelectColumn(CreditNoteTableMap::ORDER_ID); + $criteria->addSelectColumn(CreditNoteTableMap::CUSTOMER_ID); + $criteria->addSelectColumn(CreditNoteTableMap::PARENT_ID); + $criteria->addSelectColumn(CreditNoteTableMap::TYPE_ID); + $criteria->addSelectColumn(CreditNoteTableMap::STATUS_ID); + $criteria->addSelectColumn(CreditNoteTableMap::CURRENCY_ID); + $criteria->addSelectColumn(CreditNoteTableMap::CURRENCY_RATE); + $criteria->addSelectColumn(CreditNoteTableMap::TOTAL_PRICE); + $criteria->addSelectColumn(CreditNoteTableMap::TOTAL_PRICE_WITH_TAX); + $criteria->addSelectColumn(CreditNoteTableMap::DISCOUNT_WITHOUT_TAX); + $criteria->addSelectColumn(CreditNoteTableMap::DISCOUNT_WITH_TAX); + $criteria->addSelectColumn(CreditNoteTableMap::ALLOW_PARTIAL_USE); + $criteria->addSelectColumn(CreditNoteTableMap::CREATED_AT); + $criteria->addSelectColumn(CreditNoteTableMap::UPDATED_AT); + } else { + $criteria->addSelectColumn($alias . '.ID'); + $criteria->addSelectColumn($alias . '.REF'); + $criteria->addSelectColumn($alias . '.INVOICE_REF'); + $criteria->addSelectColumn($alias . '.INVOICE_ADDRESS_ID'); + $criteria->addSelectColumn($alias . '.INVOICE_DATE'); + $criteria->addSelectColumn($alias . '.ORDER_ID'); + $criteria->addSelectColumn($alias . '.CUSTOMER_ID'); + $criteria->addSelectColumn($alias . '.PARENT_ID'); + $criteria->addSelectColumn($alias . '.TYPE_ID'); + $criteria->addSelectColumn($alias . '.STATUS_ID'); + $criteria->addSelectColumn($alias . '.CURRENCY_ID'); + $criteria->addSelectColumn($alias . '.CURRENCY_RATE'); + $criteria->addSelectColumn($alias . '.TOTAL_PRICE'); + $criteria->addSelectColumn($alias . '.TOTAL_PRICE_WITH_TAX'); + $criteria->addSelectColumn($alias . '.DISCOUNT_WITHOUT_TAX'); + $criteria->addSelectColumn($alias . '.DISCOUNT_WITH_TAX'); + $criteria->addSelectColumn($alias . '.ALLOW_PARTIAL_USE'); + $criteria->addSelectColumn($alias . '.CREATED_AT'); + $criteria->addSelectColumn($alias . '.UPDATED_AT'); + } + } + + /** + * Returns the TableMap related to this object. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getServiceContainer()->getDatabaseMap(CreditNoteTableMap::DATABASE_NAME)->getTable(CreditNoteTableMap::TABLE_NAME); + } + + /** + * Add a TableMap instance to the database for this tableMap class. + */ + public static function buildTableMap() + { + $dbMap = Propel::getServiceContainer()->getDatabaseMap(CreditNoteTableMap::DATABASE_NAME); + if (!$dbMap->hasTable(CreditNoteTableMap::TABLE_NAME)) { + $dbMap->addTableObject(new CreditNoteTableMap()); + } + } + + /** + * Performs a DELETE on the database, given a CreditNote or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or CreditNote object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteTableMap::DATABASE_NAME); + } + + if ($values instanceof Criteria) { + // rename for clarity + $criteria = $values; + } elseif ($values instanceof \CreditNote\Model\CreditNote) { // it's a model object + // create criteria based on pk values + $criteria = $values->buildPkeyCriteria(); + } else { // it's a primary key, or an array of pks + $criteria = new Criteria(CreditNoteTableMap::DATABASE_NAME); + $criteria->add(CreditNoteTableMap::ID, (array) $values, Criteria::IN); + } + + $query = CreditNoteQuery::create()->mergeWith($criteria); + + if ($values instanceof Criteria) { CreditNoteTableMap::clearInstancePool(); + } elseif (!is_object($values)) { // it's a primary key, or an array of pks + foreach ((array) $values as $singleval) { CreditNoteTableMap::removeInstanceFromPool($singleval); + } + } + + return $query->delete($con); + } + + /** + * Deletes all rows from the credit_note table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll(ConnectionInterface $con = null) + { + return CreditNoteQuery::create()->doDeleteAll($con); + } + + /** + * Performs an INSERT on the database, given a CreditNote or Criteria object. + * + * @param mixed $criteria Criteria or CreditNote object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($criteria, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteTableMap::DATABASE_NAME); + } + + if ($criteria instanceof Criteria) { + $criteria = clone $criteria; // rename for clarity + } else { + $criteria = $criteria->buildCriteria(); // build Criteria from CreditNote object + } + + if ($criteria->containsKey(CreditNoteTableMap::ID) && $criteria->keyContainsValue(CreditNoteTableMap::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CreditNoteTableMap::ID.')'); + } + + + // Set the correct dbName + $query = CreditNoteQuery::create()->mergeWith($criteria); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + $pk = $query->doInsert($con); + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $pk; + } + +} // CreditNoteTableMap +// This is the static code needed to register the TableMap for this table with the main Propel class. +// +CreditNoteTableMap::buildTableMap(); diff --git a/local/modules/CreditNote/Model/Map/CreditNoteTypeI18nTableMap.php b/local/modules/CreditNote/Model/Map/CreditNoteTypeI18nTableMap.php new file mode 100644 index 000000000..bdac74922 --- /dev/null +++ b/local/modules/CreditNote/Model/Map/CreditNoteTypeI18nTableMap.php @@ -0,0 +1,498 @@ + array('Id', 'Locale', 'Title', 'Description', 'Chapo', 'Postscriptum', ), + self::TYPE_STUDLYPHPNAME => array('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', ), + self::TYPE_COLNAME => array(CreditNoteTypeI18nTableMap::ID, CreditNoteTypeI18nTableMap::LOCALE, CreditNoteTypeI18nTableMap::TITLE, CreditNoteTypeI18nTableMap::DESCRIPTION, CreditNoteTypeI18nTableMap::CHAPO, CreditNoteTypeI18nTableMap::POSTSCRIPTUM, ), + self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', 'TITLE', 'DESCRIPTION', 'CHAPO', 'POSTSCRIPTUM', ), + self::TYPE_FIELDNAME => array('id', 'locale', 'title', 'description', 'chapo', 'postscriptum', ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0 + */ + protected static $fieldKeys = array ( + self::TYPE_PHPNAME => array('Id' => 0, 'Locale' => 1, 'Title' => 2, 'Description' => 3, 'Chapo' => 4, 'Postscriptum' => 5, ), + self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, ), + self::TYPE_COLNAME => array(CreditNoteTypeI18nTableMap::ID => 0, CreditNoteTypeI18nTableMap::LOCALE => 1, CreditNoteTypeI18nTableMap::TITLE => 2, CreditNoteTypeI18nTableMap::DESCRIPTION => 3, CreditNoteTypeI18nTableMap::CHAPO => 4, CreditNoteTypeI18nTableMap::POSTSCRIPTUM => 5, ), + self::TYPE_RAW_COLNAME => array('ID' => 0, 'LOCALE' => 1, 'TITLE' => 2, 'DESCRIPTION' => 3, 'CHAPO' => 4, 'POSTSCRIPTUM' => 5, ), + self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'description' => 3, 'chapo' => 4, 'postscriptum' => 5, ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, ) + ); + + /** + * Initialize the table attributes and columns + * Relations are not initialized by this method since they are lazy loaded + * + * @return void + * @throws PropelException + */ + public function initialize() + { + // attributes + $this->setName('credit_note_type_i18n'); + $this->setPhpName('CreditNoteTypeI18n'); + $this->setClassName('\\CreditNote\\Model\\CreditNoteTypeI18n'); + $this->setPackage('CreditNote.Model'); + $this->setUseIdGenerator(false); + // columns + $this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'credit_note_type', 'ID', true, null, null); + $this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US'); + $this->addColumn('TITLE', 'Title', 'VARCHAR', false, 255, null); + $this->addColumn('DESCRIPTION', 'Description', 'CLOB', false, null, null); + $this->addColumn('CHAPO', 'Chapo', 'LONGVARCHAR', false, null, null); + $this->addColumn('POSTSCRIPTUM', 'Postscriptum', 'LONGVARCHAR', false, null, null); + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('CreditNoteType', '\\CreditNote\\Model\\CreditNoteType', RelationMap::MANY_TO_ONE, array('id' => 'id', ), 'CASCADE', null); + } // buildRelations() + + /** + * Adds an object to the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases you may need to explicitly add objects + * to the cache in order to ensure that the same objects are always returned by find*() + * and findPk*() calls. + * + * @param \CreditNote\Model\CreditNoteTypeI18n $obj A \CreditNote\Model\CreditNoteTypeI18n object. + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + */ + public static function addInstanceToPool($obj, $key = null) + { + if (Propel::isInstancePoolingEnabled()) { + if (null === $key) { + $key = serialize(array((string) $obj->getId(), (string) $obj->getLocale())); + } // if key === null + self::$instances[$key] = $obj; + } + } + + /** + * Removes an object from the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doDelete + * methods in your stub classes -- you may need to explicitly remove objects + * from the cache in order to prevent returning objects that no longer exist. + * + * @param mixed $value A \CreditNote\Model\CreditNoteTypeI18n object or a primary key value. + */ + public static function removeInstanceFromPool($value) + { + if (Propel::isInstancePoolingEnabled() && null !== $value) { + if (is_object($value) && $value instanceof \CreditNote\Model\CreditNoteTypeI18n) { + $key = serialize(array((string) $value->getId(), (string) $value->getLocale())); + + } elseif (is_array($value) && count($value) === 2) { + // assume we've been passed a primary key"; + $key = serialize(array((string) $value[0], (string) $value[1])); + } elseif ($value instanceof Criteria) { + self::$instances = []; + + return; + } else { + $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or \CreditNote\Model\CreditNoteTypeI18n object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value, true))); + throw $e; + } + + unset(self::$instances[$key]); + } + } + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + */ + public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + // If the PK cannot be derived from the row, return NULL. + if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 1 + $offset : static::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)] === null) { + return null; + } + + return serialize(array((string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 1 + $offset : static::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)])); + } + + /** + * Retrieves the primary key from the DB resultset row + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, an array of the primary key columns will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * + * @return mixed The primary key of the row + */ + public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + + return $pks; + } + + /** + * The class that the tableMap will make instances of. + * + * If $withPrefix is true, the returned path + * uses a dot-path notation which is translated into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName + */ + public static function getOMClass($withPrefix = true) + { + return $withPrefix ? CreditNoteTypeI18nTableMap::CLASS_DEFAULT : CreditNoteTypeI18nTableMap::OM_CLASS; + } + + /** + * Populates an object of the default type or an object that inherit from the default. + * + * @param array $row row returned by DataFetcher->fetch(). + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return array (CreditNoteTypeI18n object, last column rank) + */ + public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + $key = CreditNoteTypeI18nTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType); + if (null !== ($obj = CreditNoteTypeI18nTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, $offset, true); // rehydrate + $col = $offset + CreditNoteTypeI18nTableMap::NUM_HYDRATE_COLUMNS; + } else { + $cls = CreditNoteTypeI18nTableMap::OM_CLASS; + $obj = new $cls(); + $col = $obj->hydrate($row, $offset, false, $indexType); + CreditNoteTypeI18nTableMap::addInstanceToPool($obj, $key); + } + + return array($obj, $col); + } + + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @param DataFetcherInterface $dataFetcher + * @return array + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(DataFetcherInterface $dataFetcher) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = static::getOMClass(false); + // populate the object(s) + while ($row = $dataFetcher->fetch()) { + $key = CreditNoteTypeI18nTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType()); + if (null !== ($obj = CreditNoteTypeI18nTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, 0, true); // rehydrate + $results[] = $obj; + } else { + $obj = new $cls(); + $obj->hydrate($row); + $results[] = $obj; + CreditNoteTypeI18nTableMap::addInstanceToPool($obj, $key); + } // if key exists + } + + return $results; + } + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria, $alias = null) + { + if (null === $alias) { + $criteria->addSelectColumn(CreditNoteTypeI18nTableMap::ID); + $criteria->addSelectColumn(CreditNoteTypeI18nTableMap::LOCALE); + $criteria->addSelectColumn(CreditNoteTypeI18nTableMap::TITLE); + $criteria->addSelectColumn(CreditNoteTypeI18nTableMap::DESCRIPTION); + $criteria->addSelectColumn(CreditNoteTypeI18nTableMap::CHAPO); + $criteria->addSelectColumn(CreditNoteTypeI18nTableMap::POSTSCRIPTUM); + } else { + $criteria->addSelectColumn($alias . '.ID'); + $criteria->addSelectColumn($alias . '.LOCALE'); + $criteria->addSelectColumn($alias . '.TITLE'); + $criteria->addSelectColumn($alias . '.DESCRIPTION'); + $criteria->addSelectColumn($alias . '.CHAPO'); + $criteria->addSelectColumn($alias . '.POSTSCRIPTUM'); + } + } + + /** + * Returns the TableMap related to this object. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getServiceContainer()->getDatabaseMap(CreditNoteTypeI18nTableMap::DATABASE_NAME)->getTable(CreditNoteTypeI18nTableMap::TABLE_NAME); + } + + /** + * Add a TableMap instance to the database for this tableMap class. + */ + public static function buildTableMap() + { + $dbMap = Propel::getServiceContainer()->getDatabaseMap(CreditNoteTypeI18nTableMap::DATABASE_NAME); + if (!$dbMap->hasTable(CreditNoteTypeI18nTableMap::TABLE_NAME)) { + $dbMap->addTableObject(new CreditNoteTypeI18nTableMap()); + } + } + + /** + * Performs a DELETE on the database, given a CreditNoteTypeI18n or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or CreditNoteTypeI18n object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteTypeI18nTableMap::DATABASE_NAME); + } + + if ($values instanceof Criteria) { + // rename for clarity + $criteria = $values; + } elseif ($values instanceof \CreditNote\Model\CreditNoteTypeI18n) { // it's a model object + // create criteria based on pk values + $criteria = $values->buildPkeyCriteria(); + } else { // it's a primary key, or an array of pks + $criteria = new Criteria(CreditNoteTypeI18nTableMap::DATABASE_NAME); + // primary key is composite; we therefore, expect + // the primary key passed to be an array of pkey values + if (count($values) == count($values, COUNT_RECURSIVE)) { + // array is not multi-dimensional + $values = array($values); + } + foreach ($values as $value) { + $criterion = $criteria->getNewCriterion(CreditNoteTypeI18nTableMap::ID, $value[0]); + $criterion->addAnd($criteria->getNewCriterion(CreditNoteTypeI18nTableMap::LOCALE, $value[1])); + $criteria->addOr($criterion); + } + } + + $query = CreditNoteTypeI18nQuery::create()->mergeWith($criteria); + + if ($values instanceof Criteria) { CreditNoteTypeI18nTableMap::clearInstancePool(); + } elseif (!is_object($values)) { // it's a primary key, or an array of pks + foreach ((array) $values as $singleval) { CreditNoteTypeI18nTableMap::removeInstanceFromPool($singleval); + } + } + + return $query->delete($con); + } + + /** + * Deletes all rows from the credit_note_type_i18n table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll(ConnectionInterface $con = null) + { + return CreditNoteTypeI18nQuery::create()->doDeleteAll($con); + } + + /** + * Performs an INSERT on the database, given a CreditNoteTypeI18n or Criteria object. + * + * @param mixed $criteria Criteria or CreditNoteTypeI18n object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($criteria, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteTypeI18nTableMap::DATABASE_NAME); + } + + if ($criteria instanceof Criteria) { + $criteria = clone $criteria; // rename for clarity + } else { + $criteria = $criteria->buildCriteria(); // build Criteria from CreditNoteTypeI18n object + } + + + // Set the correct dbName + $query = CreditNoteTypeI18nQuery::create()->mergeWith($criteria); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + $pk = $query->doInsert($con); + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $pk; + } + +} // CreditNoteTypeI18nTableMap +// This is the static code needed to register the TableMap for this table with the main Propel class. +// +CreditNoteTypeI18nTableMap::buildTableMap(); diff --git a/local/modules/CreditNote/Model/Map/CreditNoteTypeTableMap.php b/local/modules/CreditNote/Model/Map/CreditNoteTypeTableMap.php new file mode 100644 index 000000000..6cff2460f --- /dev/null +++ b/local/modules/CreditNote/Model/Map/CreditNoteTypeTableMap.php @@ -0,0 +1,484 @@ + array('Id', 'Code', 'Color', 'Position', 'RequiredOrder', 'CreatedAt', 'UpdatedAt', ), + self::TYPE_STUDLYPHPNAME => array('id', 'code', 'color', 'position', 'requiredOrder', 'createdAt', 'updatedAt', ), + self::TYPE_COLNAME => array(CreditNoteTypeTableMap::ID, CreditNoteTypeTableMap::CODE, CreditNoteTypeTableMap::COLOR, CreditNoteTypeTableMap::POSITION, CreditNoteTypeTableMap::REQUIRED_ORDER, CreditNoteTypeTableMap::CREATED_AT, CreditNoteTypeTableMap::UPDATED_AT, ), + self::TYPE_RAW_COLNAME => array('ID', 'CODE', 'COLOR', 'POSITION', 'REQUIRED_ORDER', 'CREATED_AT', 'UPDATED_AT', ), + self::TYPE_FIELDNAME => array('id', 'code', 'color', 'position', 'required_order', 'created_at', 'updated_at', ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0 + */ + protected static $fieldKeys = array ( + self::TYPE_PHPNAME => array('Id' => 0, 'Code' => 1, 'Color' => 2, 'Position' => 3, 'RequiredOrder' => 4, 'CreatedAt' => 5, 'UpdatedAt' => 6, ), + self::TYPE_STUDLYPHPNAME => array('id' => 0, 'code' => 1, 'color' => 2, 'position' => 3, 'requiredOrder' => 4, 'createdAt' => 5, 'updatedAt' => 6, ), + self::TYPE_COLNAME => array(CreditNoteTypeTableMap::ID => 0, CreditNoteTypeTableMap::CODE => 1, CreditNoteTypeTableMap::COLOR => 2, CreditNoteTypeTableMap::POSITION => 3, CreditNoteTypeTableMap::REQUIRED_ORDER => 4, CreditNoteTypeTableMap::CREATED_AT => 5, CreditNoteTypeTableMap::UPDATED_AT => 6, ), + self::TYPE_RAW_COLNAME => array('ID' => 0, 'CODE' => 1, 'COLOR' => 2, 'POSITION' => 3, 'REQUIRED_ORDER' => 4, 'CREATED_AT' => 5, 'UPDATED_AT' => 6, ), + self::TYPE_FIELDNAME => array('id' => 0, 'code' => 1, 'color' => 2, 'position' => 3, 'required_order' => 4, 'created_at' => 5, 'updated_at' => 6, ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, ) + ); + + /** + * Initialize the table attributes and columns + * Relations are not initialized by this method since they are lazy loaded + * + * @return void + * @throws PropelException + */ + public function initialize() + { + // attributes + $this->setName('credit_note_type'); + $this->setPhpName('CreditNoteType'); + $this->setClassName('\\CreditNote\\Model\\CreditNoteType'); + $this->setPackage('CreditNote.Model'); + $this->setUseIdGenerator(true); + // columns + $this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null); + $this->addColumn('CODE', 'Code', 'VARCHAR', false, 45, null); + $this->addColumn('COLOR', 'Color', 'CHAR', false, 7, null); + $this->addColumn('POSITION', 'Position', 'INTEGER', false, 11, null); + $this->addColumn('REQUIRED_ORDER', 'RequiredOrder', 'BOOLEAN', true, 1, false); + $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); + $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null); + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('CreditNote', '\\CreditNote\\Model\\CreditNote', RelationMap::ONE_TO_MANY, array('id' => 'type_id', ), 'RESTRICT', 'RESTRICT', 'CreditNotes'); + $this->addRelation('CreditNoteTypeI18n', '\\CreditNote\\Model\\CreditNoteTypeI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'CreditNoteTypeI18ns'); + } // buildRelations() + + /** + * + * Gets the list of behaviors registered for this table + * + * @return array Associative array (name => parameters) of behaviors + */ + public function getBehaviors() + { + return array( + 'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, description, chapo, postscriptum', 'locale_column' => 'locale', 'locale_length' => '5', 'default_locale' => '', 'locale_alias' => '', ), + 'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ), + ); + } // getBehaviors() + /** + * Method to invalidate the instance pool of all tables related to credit_note_type * by a foreign key with ON DELETE CASCADE + */ + public static function clearRelatedInstancePool() + { + // Invalidate objects in ".$this->getClassNameFromBuilder($joinedTableTableMapBuilder)." instance pool, + // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule. + CreditNoteTypeI18nTableMap::clearInstancePool(); + } + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + */ + public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + // If the PK cannot be derived from the row, return NULL. + if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null) { + return null; + } + + return (string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)]; + } + + /** + * Retrieves the primary key from the DB resultset row + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, an array of the primary key columns will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * + * @return mixed The primary key of the row + */ + public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + + return (int) $row[ + $indexType == TableMap::TYPE_NUM + ? 0 + $offset + : self::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType) + ]; + } + + /** + * The class that the tableMap will make instances of. + * + * If $withPrefix is true, the returned path + * uses a dot-path notation which is translated into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName + */ + public static function getOMClass($withPrefix = true) + { + return $withPrefix ? CreditNoteTypeTableMap::CLASS_DEFAULT : CreditNoteTypeTableMap::OM_CLASS; + } + + /** + * Populates an object of the default type or an object that inherit from the default. + * + * @param array $row row returned by DataFetcher->fetch(). + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return array (CreditNoteType object, last column rank) + */ + public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + $key = CreditNoteTypeTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType); + if (null !== ($obj = CreditNoteTypeTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, $offset, true); // rehydrate + $col = $offset + CreditNoteTypeTableMap::NUM_HYDRATE_COLUMNS; + } else { + $cls = CreditNoteTypeTableMap::OM_CLASS; + $obj = new $cls(); + $col = $obj->hydrate($row, $offset, false, $indexType); + CreditNoteTypeTableMap::addInstanceToPool($obj, $key); + } + + return array($obj, $col); + } + + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @param DataFetcherInterface $dataFetcher + * @return array + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(DataFetcherInterface $dataFetcher) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = static::getOMClass(false); + // populate the object(s) + while ($row = $dataFetcher->fetch()) { + $key = CreditNoteTypeTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType()); + if (null !== ($obj = CreditNoteTypeTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, 0, true); // rehydrate + $results[] = $obj; + } else { + $obj = new $cls(); + $obj->hydrate($row); + $results[] = $obj; + CreditNoteTypeTableMap::addInstanceToPool($obj, $key); + } // if key exists + } + + return $results; + } + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria, $alias = null) + { + if (null === $alias) { + $criteria->addSelectColumn(CreditNoteTypeTableMap::ID); + $criteria->addSelectColumn(CreditNoteTypeTableMap::CODE); + $criteria->addSelectColumn(CreditNoteTypeTableMap::COLOR); + $criteria->addSelectColumn(CreditNoteTypeTableMap::POSITION); + $criteria->addSelectColumn(CreditNoteTypeTableMap::REQUIRED_ORDER); + $criteria->addSelectColumn(CreditNoteTypeTableMap::CREATED_AT); + $criteria->addSelectColumn(CreditNoteTypeTableMap::UPDATED_AT); + } else { + $criteria->addSelectColumn($alias . '.ID'); + $criteria->addSelectColumn($alias . '.CODE'); + $criteria->addSelectColumn($alias . '.COLOR'); + $criteria->addSelectColumn($alias . '.POSITION'); + $criteria->addSelectColumn($alias . '.REQUIRED_ORDER'); + $criteria->addSelectColumn($alias . '.CREATED_AT'); + $criteria->addSelectColumn($alias . '.UPDATED_AT'); + } + } + + /** + * Returns the TableMap related to this object. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getServiceContainer()->getDatabaseMap(CreditNoteTypeTableMap::DATABASE_NAME)->getTable(CreditNoteTypeTableMap::TABLE_NAME); + } + + /** + * Add a TableMap instance to the database for this tableMap class. + */ + public static function buildTableMap() + { + $dbMap = Propel::getServiceContainer()->getDatabaseMap(CreditNoteTypeTableMap::DATABASE_NAME); + if (!$dbMap->hasTable(CreditNoteTypeTableMap::TABLE_NAME)) { + $dbMap->addTableObject(new CreditNoteTypeTableMap()); + } + } + + /** + * Performs a DELETE on the database, given a CreditNoteType or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or CreditNoteType object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteTypeTableMap::DATABASE_NAME); + } + + if ($values instanceof Criteria) { + // rename for clarity + $criteria = $values; + } elseif ($values instanceof \CreditNote\Model\CreditNoteType) { // it's a model object + // create criteria based on pk values + $criteria = $values->buildPkeyCriteria(); + } else { // it's a primary key, or an array of pks + $criteria = new Criteria(CreditNoteTypeTableMap::DATABASE_NAME); + $criteria->add(CreditNoteTypeTableMap::ID, (array) $values, Criteria::IN); + } + + $query = CreditNoteTypeQuery::create()->mergeWith($criteria); + + if ($values instanceof Criteria) { CreditNoteTypeTableMap::clearInstancePool(); + } elseif (!is_object($values)) { // it's a primary key, or an array of pks + foreach ((array) $values as $singleval) { CreditNoteTypeTableMap::removeInstanceFromPool($singleval); + } + } + + return $query->delete($con); + } + + /** + * Deletes all rows from the credit_note_type table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll(ConnectionInterface $con = null) + { + return CreditNoteTypeQuery::create()->doDeleteAll($con); + } + + /** + * Performs an INSERT on the database, given a CreditNoteType or Criteria object. + * + * @param mixed $criteria Criteria or CreditNoteType object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($criteria, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteTypeTableMap::DATABASE_NAME); + } + + if ($criteria instanceof Criteria) { + $criteria = clone $criteria; // rename for clarity + } else { + $criteria = $criteria->buildCriteria(); // build Criteria from CreditNoteType object + } + + if ($criteria->containsKey(CreditNoteTypeTableMap::ID) && $criteria->keyContainsValue(CreditNoteTypeTableMap::ID) ) { + throw new PropelException('Cannot insert a value for auto-increment primary key ('.CreditNoteTypeTableMap::ID.')'); + } + + + // Set the correct dbName + $query = CreditNoteTypeQuery::create()->mergeWith($criteria); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + $pk = $query->doInsert($con); + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $pk; + } + +} // CreditNoteTypeTableMap +// This is the static code needed to register the TableMap for this table with the main Propel class. +// +CreditNoteTypeTableMap::buildTableMap(); diff --git a/local/modules/CreditNote/Model/Map/CreditNoteVersionTableMap.php b/local/modules/CreditNote/Model/Map/CreditNoteVersionTableMap.php new file mode 100644 index 000000000..ffd3d1e8f --- /dev/null +++ b/local/modules/CreditNote/Model/Map/CreditNoteVersionTableMap.php @@ -0,0 +1,666 @@ + array('Id', 'Ref', 'InvoiceRef', 'InvoiceAddressId', 'InvoiceDate', 'OrderId', 'CustomerId', 'ParentId', 'TypeId', 'StatusId', 'CurrencyId', 'CurrencyRate', 'TotalPrice', 'TotalPriceWithTax', 'DiscountWithoutTax', 'DiscountWithTax', 'AllowPartialUse', 'CreatedAt', 'UpdatedAt', 'Version', 'VersionCreatedAt', 'VersionCreatedBy', 'OrderIdVersion', 'CustomerIdVersion', 'ParentIdVersion', 'CreditNoteIds', 'CreditNoteVersions', ), + self::TYPE_STUDLYPHPNAME => array('id', 'ref', 'invoiceRef', 'invoiceAddressId', 'invoiceDate', 'orderId', 'customerId', 'parentId', 'typeId', 'statusId', 'currencyId', 'currencyRate', 'totalPrice', 'totalPriceWithTax', 'discountWithoutTax', 'discountWithTax', 'allowPartialUse', 'createdAt', 'updatedAt', 'version', 'versionCreatedAt', 'versionCreatedBy', 'orderIdVersion', 'customerIdVersion', 'parentIdVersion', 'creditNoteIds', 'creditNoteVersions', ), + self::TYPE_COLNAME => array(CreditNoteVersionTableMap::ID, CreditNoteVersionTableMap::REF, CreditNoteVersionTableMap::INVOICE_REF, CreditNoteVersionTableMap::INVOICE_ADDRESS_ID, CreditNoteVersionTableMap::INVOICE_DATE, CreditNoteVersionTableMap::ORDER_ID, CreditNoteVersionTableMap::CUSTOMER_ID, CreditNoteVersionTableMap::PARENT_ID, CreditNoteVersionTableMap::TYPE_ID, CreditNoteVersionTableMap::STATUS_ID, CreditNoteVersionTableMap::CURRENCY_ID, CreditNoteVersionTableMap::CURRENCY_RATE, CreditNoteVersionTableMap::TOTAL_PRICE, CreditNoteVersionTableMap::TOTAL_PRICE_WITH_TAX, CreditNoteVersionTableMap::DISCOUNT_WITHOUT_TAX, CreditNoteVersionTableMap::DISCOUNT_WITH_TAX, CreditNoteVersionTableMap::ALLOW_PARTIAL_USE, CreditNoteVersionTableMap::CREATED_AT, CreditNoteVersionTableMap::UPDATED_AT, CreditNoteVersionTableMap::VERSION, CreditNoteVersionTableMap::VERSION_CREATED_AT, CreditNoteVersionTableMap::VERSION_CREATED_BY, CreditNoteVersionTableMap::ORDER_ID_VERSION, CreditNoteVersionTableMap::CUSTOMER_ID_VERSION, CreditNoteVersionTableMap::PARENT_ID_VERSION, CreditNoteVersionTableMap::CREDIT_NOTE_IDS, CreditNoteVersionTableMap::CREDIT_NOTE_VERSIONS, ), + self::TYPE_RAW_COLNAME => array('ID', 'REF', 'INVOICE_REF', 'INVOICE_ADDRESS_ID', 'INVOICE_DATE', 'ORDER_ID', 'CUSTOMER_ID', 'PARENT_ID', 'TYPE_ID', 'STATUS_ID', 'CURRENCY_ID', 'CURRENCY_RATE', 'TOTAL_PRICE', 'TOTAL_PRICE_WITH_TAX', 'DISCOUNT_WITHOUT_TAX', 'DISCOUNT_WITH_TAX', 'ALLOW_PARTIAL_USE', 'CREATED_AT', 'UPDATED_AT', 'VERSION', 'VERSION_CREATED_AT', 'VERSION_CREATED_BY', 'ORDER_ID_VERSION', 'CUSTOMER_ID_VERSION', 'PARENT_ID_VERSION', 'CREDIT_NOTE_IDS', 'CREDIT_NOTE_VERSIONS', ), + self::TYPE_FIELDNAME => array('id', 'ref', 'invoice_ref', 'invoice_address_id', 'invoice_date', 'order_id', 'customer_id', 'parent_id', 'type_id', 'status_id', 'currency_id', 'currency_rate', 'total_price', 'total_price_with_tax', 'discount_without_tax', 'discount_with_tax', 'allow_partial_use', 'created_at', 'updated_at', 'version', 'version_created_at', 'version_created_by', 'order_id_version', 'customer_id_version', 'parent_id_version', 'credit_note_ids', 'credit_note_versions', ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0 + */ + protected static $fieldKeys = array ( + self::TYPE_PHPNAME => array('Id' => 0, 'Ref' => 1, 'InvoiceRef' => 2, 'InvoiceAddressId' => 3, 'InvoiceDate' => 4, 'OrderId' => 5, 'CustomerId' => 6, 'ParentId' => 7, 'TypeId' => 8, 'StatusId' => 9, 'CurrencyId' => 10, 'CurrencyRate' => 11, 'TotalPrice' => 12, 'TotalPriceWithTax' => 13, 'DiscountWithoutTax' => 14, 'DiscountWithTax' => 15, 'AllowPartialUse' => 16, 'CreatedAt' => 17, 'UpdatedAt' => 18, 'Version' => 19, 'VersionCreatedAt' => 20, 'VersionCreatedBy' => 21, 'OrderIdVersion' => 22, 'CustomerIdVersion' => 23, 'ParentIdVersion' => 24, 'CreditNoteIds' => 25, 'CreditNoteVersions' => 26, ), + self::TYPE_STUDLYPHPNAME => array('id' => 0, 'ref' => 1, 'invoiceRef' => 2, 'invoiceAddressId' => 3, 'invoiceDate' => 4, 'orderId' => 5, 'customerId' => 6, 'parentId' => 7, 'typeId' => 8, 'statusId' => 9, 'currencyId' => 10, 'currencyRate' => 11, 'totalPrice' => 12, 'totalPriceWithTax' => 13, 'discountWithoutTax' => 14, 'discountWithTax' => 15, 'allowPartialUse' => 16, 'createdAt' => 17, 'updatedAt' => 18, 'version' => 19, 'versionCreatedAt' => 20, 'versionCreatedBy' => 21, 'orderIdVersion' => 22, 'customerIdVersion' => 23, 'parentIdVersion' => 24, 'creditNoteIds' => 25, 'creditNoteVersions' => 26, ), + self::TYPE_COLNAME => array(CreditNoteVersionTableMap::ID => 0, CreditNoteVersionTableMap::REF => 1, CreditNoteVersionTableMap::INVOICE_REF => 2, CreditNoteVersionTableMap::INVOICE_ADDRESS_ID => 3, CreditNoteVersionTableMap::INVOICE_DATE => 4, CreditNoteVersionTableMap::ORDER_ID => 5, CreditNoteVersionTableMap::CUSTOMER_ID => 6, CreditNoteVersionTableMap::PARENT_ID => 7, CreditNoteVersionTableMap::TYPE_ID => 8, CreditNoteVersionTableMap::STATUS_ID => 9, CreditNoteVersionTableMap::CURRENCY_ID => 10, CreditNoteVersionTableMap::CURRENCY_RATE => 11, CreditNoteVersionTableMap::TOTAL_PRICE => 12, CreditNoteVersionTableMap::TOTAL_PRICE_WITH_TAX => 13, CreditNoteVersionTableMap::DISCOUNT_WITHOUT_TAX => 14, CreditNoteVersionTableMap::DISCOUNT_WITH_TAX => 15, CreditNoteVersionTableMap::ALLOW_PARTIAL_USE => 16, CreditNoteVersionTableMap::CREATED_AT => 17, CreditNoteVersionTableMap::UPDATED_AT => 18, CreditNoteVersionTableMap::VERSION => 19, CreditNoteVersionTableMap::VERSION_CREATED_AT => 20, CreditNoteVersionTableMap::VERSION_CREATED_BY => 21, CreditNoteVersionTableMap::ORDER_ID_VERSION => 22, CreditNoteVersionTableMap::CUSTOMER_ID_VERSION => 23, CreditNoteVersionTableMap::PARENT_ID_VERSION => 24, CreditNoteVersionTableMap::CREDIT_NOTE_IDS => 25, CreditNoteVersionTableMap::CREDIT_NOTE_VERSIONS => 26, ), + self::TYPE_RAW_COLNAME => array('ID' => 0, 'REF' => 1, 'INVOICE_REF' => 2, 'INVOICE_ADDRESS_ID' => 3, 'INVOICE_DATE' => 4, 'ORDER_ID' => 5, 'CUSTOMER_ID' => 6, 'PARENT_ID' => 7, 'TYPE_ID' => 8, 'STATUS_ID' => 9, 'CURRENCY_ID' => 10, 'CURRENCY_RATE' => 11, 'TOTAL_PRICE' => 12, 'TOTAL_PRICE_WITH_TAX' => 13, 'DISCOUNT_WITHOUT_TAX' => 14, 'DISCOUNT_WITH_TAX' => 15, 'ALLOW_PARTIAL_USE' => 16, 'CREATED_AT' => 17, 'UPDATED_AT' => 18, 'VERSION' => 19, 'VERSION_CREATED_AT' => 20, 'VERSION_CREATED_BY' => 21, 'ORDER_ID_VERSION' => 22, 'CUSTOMER_ID_VERSION' => 23, 'PARENT_ID_VERSION' => 24, 'CREDIT_NOTE_IDS' => 25, 'CREDIT_NOTE_VERSIONS' => 26, ), + self::TYPE_FIELDNAME => array('id' => 0, 'ref' => 1, 'invoice_ref' => 2, 'invoice_address_id' => 3, 'invoice_date' => 4, 'order_id' => 5, 'customer_id' => 6, 'parent_id' => 7, 'type_id' => 8, 'status_id' => 9, 'currency_id' => 10, 'currency_rate' => 11, 'total_price' => 12, 'total_price_with_tax' => 13, 'discount_without_tax' => 14, 'discount_with_tax' => 15, 'allow_partial_use' => 16, 'created_at' => 17, 'updated_at' => 18, 'version' => 19, 'version_created_at' => 20, 'version_created_by' => 21, 'order_id_version' => 22, 'customer_id_version' => 23, 'parent_id_version' => 24, 'credit_note_ids' => 25, 'credit_note_versions' => 26, ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, ) + ); + + /** + * Initialize the table attributes and columns + * Relations are not initialized by this method since they are lazy loaded + * + * @return void + * @throws PropelException + */ + public function initialize() + { + // attributes + $this->setName('credit_note_version'); + $this->setPhpName('CreditNoteVersion'); + $this->setClassName('\\CreditNote\\Model\\CreditNoteVersion'); + $this->setPackage('CreditNote.Model'); + $this->setUseIdGenerator(false); + // columns + $this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'credit_note', 'ID', true, null, null); + $this->addColumn('REF', 'Ref', 'VARCHAR', false, 45, null); + $this->addColumn('INVOICE_REF', 'InvoiceRef', 'VARCHAR', false, 45, null); + $this->addColumn('INVOICE_ADDRESS_ID', 'InvoiceAddressId', 'INTEGER', true, null, null); + $this->addColumn('INVOICE_DATE', 'InvoiceDate', 'TIMESTAMP', false, null, null); + $this->addColumn('ORDER_ID', 'OrderId', 'INTEGER', false, null, null); + $this->addColumn('CUSTOMER_ID', 'CustomerId', 'INTEGER', true, null, null); + $this->addColumn('PARENT_ID', 'ParentId', 'INTEGER', false, null, null); + $this->addColumn('TYPE_ID', 'TypeId', 'INTEGER', true, null, null); + $this->addColumn('STATUS_ID', 'StatusId', 'INTEGER', true, null, null); + $this->addColumn('CURRENCY_ID', 'CurrencyId', 'INTEGER', true, null, null); + $this->addColumn('CURRENCY_RATE', 'CurrencyRate', 'FLOAT', false, null, null); + $this->addColumn('TOTAL_PRICE', 'TotalPrice', 'DECIMAL', false, 16, 0); + $this->addColumn('TOTAL_PRICE_WITH_TAX', 'TotalPriceWithTax', 'DECIMAL', false, 16, 0); + $this->addColumn('DISCOUNT_WITHOUT_TAX', 'DiscountWithoutTax', 'DECIMAL', false, 16, 0); + $this->addColumn('DISCOUNT_WITH_TAX', 'DiscountWithTax', 'DECIMAL', false, 16, 0); + $this->addColumn('ALLOW_PARTIAL_USE', 'AllowPartialUse', 'BOOLEAN', false, 1, true); + $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); + $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null); + $this->addPrimaryKey('VERSION', 'Version', 'INTEGER', true, null, 0); + $this->addColumn('VERSION_CREATED_AT', 'VersionCreatedAt', 'TIMESTAMP', false, null, null); + $this->addColumn('VERSION_CREATED_BY', 'VersionCreatedBy', 'VARCHAR', false, 100, null); + $this->addColumn('ORDER_ID_VERSION', 'OrderIdVersion', 'INTEGER', false, null, 0); + $this->addColumn('CUSTOMER_ID_VERSION', 'CustomerIdVersion', 'INTEGER', false, null, 0); + $this->addColumn('PARENT_ID_VERSION', 'ParentIdVersion', 'INTEGER', false, null, 0); + $this->addColumn('CREDIT_NOTE_IDS', 'CreditNoteIds', 'ARRAY', false, null, null); + $this->addColumn('CREDIT_NOTE_VERSIONS', 'CreditNoteVersions', 'ARRAY', false, null, null); + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('CreditNote', '\\CreditNote\\Model\\CreditNote', RelationMap::MANY_TO_ONE, array('id' => 'id', ), 'CASCADE', null); + } // buildRelations() + + /** + * Adds an object to the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases you may need to explicitly add objects + * to the cache in order to ensure that the same objects are always returned by find*() + * and findPk*() calls. + * + * @param \CreditNote\Model\CreditNoteVersion $obj A \CreditNote\Model\CreditNoteVersion object. + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + */ + public static function addInstanceToPool($obj, $key = null) + { + if (Propel::isInstancePoolingEnabled()) { + if (null === $key) { + $key = serialize(array((string) $obj->getId(), (string) $obj->getVersion())); + } // if key === null + self::$instances[$key] = $obj; + } + } + + /** + * Removes an object from the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doDelete + * methods in your stub classes -- you may need to explicitly remove objects + * from the cache in order to prevent returning objects that no longer exist. + * + * @param mixed $value A \CreditNote\Model\CreditNoteVersion object or a primary key value. + */ + public static function removeInstanceFromPool($value) + { + if (Propel::isInstancePoolingEnabled() && null !== $value) { + if (is_object($value) && $value instanceof \CreditNote\Model\CreditNoteVersion) { + $key = serialize(array((string) $value->getId(), (string) $value->getVersion())); + + } elseif (is_array($value) && count($value) === 2) { + // assume we've been passed a primary key"; + $key = serialize(array((string) $value[0], (string) $value[1])); + } elseif ($value instanceof Criteria) { + self::$instances = []; + + return; + } else { + $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or \CreditNote\Model\CreditNoteVersion object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value, true))); + throw $e; + } + + unset(self::$instances[$key]); + } + } + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + */ + public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + // If the PK cannot be derived from the row, return NULL. + if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 19 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)] === null) { + return null; + } + + return serialize(array((string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 19 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)])); + } + + /** + * Retrieves the primary key from the DB resultset row + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, an array of the primary key columns will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * + * @return mixed The primary key of the row + */ + public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + + return $pks; + } + + /** + * The class that the tableMap will make instances of. + * + * If $withPrefix is true, the returned path + * uses a dot-path notation which is translated into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName + */ + public static function getOMClass($withPrefix = true) + { + return $withPrefix ? CreditNoteVersionTableMap::CLASS_DEFAULT : CreditNoteVersionTableMap::OM_CLASS; + } + + /** + * Populates an object of the default type or an object that inherit from the default. + * + * @param array $row row returned by DataFetcher->fetch(). + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return array (CreditNoteVersion object, last column rank) + */ + public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + $key = CreditNoteVersionTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType); + if (null !== ($obj = CreditNoteVersionTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, $offset, true); // rehydrate + $col = $offset + CreditNoteVersionTableMap::NUM_HYDRATE_COLUMNS; + } else { + $cls = CreditNoteVersionTableMap::OM_CLASS; + $obj = new $cls(); + $col = $obj->hydrate($row, $offset, false, $indexType); + CreditNoteVersionTableMap::addInstanceToPool($obj, $key); + } + + return array($obj, $col); + } + + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @param DataFetcherInterface $dataFetcher + * @return array + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(DataFetcherInterface $dataFetcher) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = static::getOMClass(false); + // populate the object(s) + while ($row = $dataFetcher->fetch()) { + $key = CreditNoteVersionTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType()); + if (null !== ($obj = CreditNoteVersionTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, 0, true); // rehydrate + $results[] = $obj; + } else { + $obj = new $cls(); + $obj->hydrate($row); + $results[] = $obj; + CreditNoteVersionTableMap::addInstanceToPool($obj, $key); + } // if key exists + } + + return $results; + } + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria, $alias = null) + { + if (null === $alias) { + $criteria->addSelectColumn(CreditNoteVersionTableMap::ID); + $criteria->addSelectColumn(CreditNoteVersionTableMap::REF); + $criteria->addSelectColumn(CreditNoteVersionTableMap::INVOICE_REF); + $criteria->addSelectColumn(CreditNoteVersionTableMap::INVOICE_ADDRESS_ID); + $criteria->addSelectColumn(CreditNoteVersionTableMap::INVOICE_DATE); + $criteria->addSelectColumn(CreditNoteVersionTableMap::ORDER_ID); + $criteria->addSelectColumn(CreditNoteVersionTableMap::CUSTOMER_ID); + $criteria->addSelectColumn(CreditNoteVersionTableMap::PARENT_ID); + $criteria->addSelectColumn(CreditNoteVersionTableMap::TYPE_ID); + $criteria->addSelectColumn(CreditNoteVersionTableMap::STATUS_ID); + $criteria->addSelectColumn(CreditNoteVersionTableMap::CURRENCY_ID); + $criteria->addSelectColumn(CreditNoteVersionTableMap::CURRENCY_RATE); + $criteria->addSelectColumn(CreditNoteVersionTableMap::TOTAL_PRICE); + $criteria->addSelectColumn(CreditNoteVersionTableMap::TOTAL_PRICE_WITH_TAX); + $criteria->addSelectColumn(CreditNoteVersionTableMap::DISCOUNT_WITHOUT_TAX); + $criteria->addSelectColumn(CreditNoteVersionTableMap::DISCOUNT_WITH_TAX); + $criteria->addSelectColumn(CreditNoteVersionTableMap::ALLOW_PARTIAL_USE); + $criteria->addSelectColumn(CreditNoteVersionTableMap::CREATED_AT); + $criteria->addSelectColumn(CreditNoteVersionTableMap::UPDATED_AT); + $criteria->addSelectColumn(CreditNoteVersionTableMap::VERSION); + $criteria->addSelectColumn(CreditNoteVersionTableMap::VERSION_CREATED_AT); + $criteria->addSelectColumn(CreditNoteVersionTableMap::VERSION_CREATED_BY); + $criteria->addSelectColumn(CreditNoteVersionTableMap::ORDER_ID_VERSION); + $criteria->addSelectColumn(CreditNoteVersionTableMap::CUSTOMER_ID_VERSION); + $criteria->addSelectColumn(CreditNoteVersionTableMap::PARENT_ID_VERSION); + $criteria->addSelectColumn(CreditNoteVersionTableMap::CREDIT_NOTE_IDS); + $criteria->addSelectColumn(CreditNoteVersionTableMap::CREDIT_NOTE_VERSIONS); + } else { + $criteria->addSelectColumn($alias . '.ID'); + $criteria->addSelectColumn($alias . '.REF'); + $criteria->addSelectColumn($alias . '.INVOICE_REF'); + $criteria->addSelectColumn($alias . '.INVOICE_ADDRESS_ID'); + $criteria->addSelectColumn($alias . '.INVOICE_DATE'); + $criteria->addSelectColumn($alias . '.ORDER_ID'); + $criteria->addSelectColumn($alias . '.CUSTOMER_ID'); + $criteria->addSelectColumn($alias . '.PARENT_ID'); + $criteria->addSelectColumn($alias . '.TYPE_ID'); + $criteria->addSelectColumn($alias . '.STATUS_ID'); + $criteria->addSelectColumn($alias . '.CURRENCY_ID'); + $criteria->addSelectColumn($alias . '.CURRENCY_RATE'); + $criteria->addSelectColumn($alias . '.TOTAL_PRICE'); + $criteria->addSelectColumn($alias . '.TOTAL_PRICE_WITH_TAX'); + $criteria->addSelectColumn($alias . '.DISCOUNT_WITHOUT_TAX'); + $criteria->addSelectColumn($alias . '.DISCOUNT_WITH_TAX'); + $criteria->addSelectColumn($alias . '.ALLOW_PARTIAL_USE'); + $criteria->addSelectColumn($alias . '.CREATED_AT'); + $criteria->addSelectColumn($alias . '.UPDATED_AT'); + $criteria->addSelectColumn($alias . '.VERSION'); + $criteria->addSelectColumn($alias . '.VERSION_CREATED_AT'); + $criteria->addSelectColumn($alias . '.VERSION_CREATED_BY'); + $criteria->addSelectColumn($alias . '.ORDER_ID_VERSION'); + $criteria->addSelectColumn($alias . '.CUSTOMER_ID_VERSION'); + $criteria->addSelectColumn($alias . '.PARENT_ID_VERSION'); + $criteria->addSelectColumn($alias . '.CREDIT_NOTE_IDS'); + $criteria->addSelectColumn($alias . '.CREDIT_NOTE_VERSIONS'); + } + } + + /** + * Returns the TableMap related to this object. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getServiceContainer()->getDatabaseMap(CreditNoteVersionTableMap::DATABASE_NAME)->getTable(CreditNoteVersionTableMap::TABLE_NAME); + } + + /** + * Add a TableMap instance to the database for this tableMap class. + */ + public static function buildTableMap() + { + $dbMap = Propel::getServiceContainer()->getDatabaseMap(CreditNoteVersionTableMap::DATABASE_NAME); + if (!$dbMap->hasTable(CreditNoteVersionTableMap::TABLE_NAME)) { + $dbMap->addTableObject(new CreditNoteVersionTableMap()); + } + } + + /** + * Performs a DELETE on the database, given a CreditNoteVersion or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or CreditNoteVersion object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteVersionTableMap::DATABASE_NAME); + } + + if ($values instanceof Criteria) { + // rename for clarity + $criteria = $values; + } elseif ($values instanceof \CreditNote\Model\CreditNoteVersion) { // it's a model object + // create criteria based on pk values + $criteria = $values->buildPkeyCriteria(); + } else { // it's a primary key, or an array of pks + $criteria = new Criteria(CreditNoteVersionTableMap::DATABASE_NAME); + // primary key is composite; we therefore, expect + // the primary key passed to be an array of pkey values + if (count($values) == count($values, COUNT_RECURSIVE)) { + // array is not multi-dimensional + $values = array($values); + } + foreach ($values as $value) { + $criterion = $criteria->getNewCriterion(CreditNoteVersionTableMap::ID, $value[0]); + $criterion->addAnd($criteria->getNewCriterion(CreditNoteVersionTableMap::VERSION, $value[1])); + $criteria->addOr($criterion); + } + } + + $query = CreditNoteVersionQuery::create()->mergeWith($criteria); + + if ($values instanceof Criteria) { CreditNoteVersionTableMap::clearInstancePool(); + } elseif (!is_object($values)) { // it's a primary key, or an array of pks + foreach ((array) $values as $singleval) { CreditNoteVersionTableMap::removeInstanceFromPool($singleval); + } + } + + return $query->delete($con); + } + + /** + * Deletes all rows from the credit_note_version table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll(ConnectionInterface $con = null) + { + return CreditNoteVersionQuery::create()->doDeleteAll($con); + } + + /** + * Performs an INSERT on the database, given a CreditNoteVersion or Criteria object. + * + * @param mixed $criteria Criteria or CreditNoteVersion object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($criteria, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(CreditNoteVersionTableMap::DATABASE_NAME); + } + + if ($criteria instanceof Criteria) { + $criteria = clone $criteria; // rename for clarity + } else { + $criteria = $criteria->buildCriteria(); // build Criteria from CreditNoteVersion object + } + + + // Set the correct dbName + $query = CreditNoteVersionQuery::create()->mergeWith($criteria); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + $pk = $query->doInsert($con); + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $pk; + } + +} // CreditNoteVersionTableMap +// This is the static code needed to register the TableMap for this table with the main Propel class. +// +CreditNoteVersionTableMap::buildTableMap(); diff --git a/local/modules/CreditNote/Model/Map/OrderCreditNoteTableMap.php b/local/modules/CreditNote/Model/Map/OrderCreditNoteTableMap.php new file mode 100644 index 000000000..4efdedbbe --- /dev/null +++ b/local/modules/CreditNote/Model/Map/OrderCreditNoteTableMap.php @@ -0,0 +1,504 @@ + array('OrderId', 'CreditNoteId', 'AmountPrice', 'CreatedAt', 'UpdatedAt', ), + self::TYPE_STUDLYPHPNAME => array('orderId', 'creditNoteId', 'amountPrice', 'createdAt', 'updatedAt', ), + self::TYPE_COLNAME => array(OrderCreditNoteTableMap::ORDER_ID, OrderCreditNoteTableMap::CREDIT_NOTE_ID, OrderCreditNoteTableMap::AMOUNT_PRICE, OrderCreditNoteTableMap::CREATED_AT, OrderCreditNoteTableMap::UPDATED_AT, ), + self::TYPE_RAW_COLNAME => array('ORDER_ID', 'CREDIT_NOTE_ID', 'AMOUNT_PRICE', 'CREATED_AT', 'UPDATED_AT', ), + self::TYPE_FIELDNAME => array('order_id', 'credit_note_id', 'amount_price', 'created_at', 'updated_at', ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, ) + ); + + /** + * holds an array of keys for quick access to the fieldnames array + * + * first dimension keys are the type constants + * e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0 + */ + protected static $fieldKeys = array ( + self::TYPE_PHPNAME => array('OrderId' => 0, 'CreditNoteId' => 1, 'AmountPrice' => 2, 'CreatedAt' => 3, 'UpdatedAt' => 4, ), + self::TYPE_STUDLYPHPNAME => array('orderId' => 0, 'creditNoteId' => 1, 'amountPrice' => 2, 'createdAt' => 3, 'updatedAt' => 4, ), + self::TYPE_COLNAME => array(OrderCreditNoteTableMap::ORDER_ID => 0, OrderCreditNoteTableMap::CREDIT_NOTE_ID => 1, OrderCreditNoteTableMap::AMOUNT_PRICE => 2, OrderCreditNoteTableMap::CREATED_AT => 3, OrderCreditNoteTableMap::UPDATED_AT => 4, ), + self::TYPE_RAW_COLNAME => array('ORDER_ID' => 0, 'CREDIT_NOTE_ID' => 1, 'AMOUNT_PRICE' => 2, 'CREATED_AT' => 3, 'UPDATED_AT' => 4, ), + self::TYPE_FIELDNAME => array('order_id' => 0, 'credit_note_id' => 1, 'amount_price' => 2, 'created_at' => 3, 'updated_at' => 4, ), + self::TYPE_NUM => array(0, 1, 2, 3, 4, ) + ); + + /** + * Initialize the table attributes and columns + * Relations are not initialized by this method since they are lazy loaded + * + * @return void + * @throws PropelException + */ + public function initialize() + { + // attributes + $this->setName('order_credit_note'); + $this->setPhpName('OrderCreditNote'); + $this->setClassName('\\CreditNote\\Model\\OrderCreditNote'); + $this->setPackage('CreditNote.Model'); + $this->setUseIdGenerator(false); + // columns + $this->addForeignPrimaryKey('ORDER_ID', 'OrderId', 'INTEGER' , 'order', 'ID', true, null, null); + $this->addForeignPrimaryKey('CREDIT_NOTE_ID', 'CreditNoteId', 'INTEGER' , 'credit_note', 'ID', true, null, null); + $this->addColumn('AMOUNT_PRICE', 'AmountPrice', 'DECIMAL', false, 16, 0); + $this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null); + $this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null); + } // initialize() + + /** + * Build the RelationMap objects for this table relationships + */ + public function buildRelations() + { + $this->addRelation('Order', '\\Thelia\\Model\\Order', RelationMap::MANY_TO_ONE, array('order_id' => 'id', ), 'CASCADE', 'RESTRICT'); + $this->addRelation('CreditNote', '\\CreditNote\\Model\\CreditNote', RelationMap::MANY_TO_ONE, array('credit_note_id' => 'id', ), 'CASCADE', 'RESTRICT'); + } // buildRelations() + + /** + * + * Gets the list of behaviors registered for this table + * + * @return array Associative array (name => parameters) of behaviors + */ + public function getBehaviors() + { + return array( + 'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ), + ); + } // getBehaviors() + + /** + * Adds an object to the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases you may need to explicitly add objects + * to the cache in order to ensure that the same objects are always returned by find*() + * and findPk*() calls. + * + * @param \CreditNote\Model\OrderCreditNote $obj A \CreditNote\Model\OrderCreditNote object. + * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). + */ + public static function addInstanceToPool($obj, $key = null) + { + if (Propel::isInstancePoolingEnabled()) { + if (null === $key) { + $key = serialize(array((string) $obj->getOrderId(), (string) $obj->getCreditNoteId())); + } // if key === null + self::$instances[$key] = $obj; + } + } + + /** + * Removes an object from the instance pool. + * + * Propel keeps cached copies of objects in an instance pool when they are retrieved + * from the database. In some cases -- especially when you override doDelete + * methods in your stub classes -- you may need to explicitly remove objects + * from the cache in order to prevent returning objects that no longer exist. + * + * @param mixed $value A \CreditNote\Model\OrderCreditNote object or a primary key value. + */ + public static function removeInstanceFromPool($value) + { + if (Propel::isInstancePoolingEnabled() && null !== $value) { + if (is_object($value) && $value instanceof \CreditNote\Model\OrderCreditNote) { + $key = serialize(array((string) $value->getOrderId(), (string) $value->getCreditNoteId())); + + } elseif (is_array($value) && count($value) === 2) { + // assume we've been passed a primary key"; + $key = serialize(array((string) $value[0], (string) $value[1])); + } elseif ($value instanceof Criteria) { + self::$instances = []; + + return; + } else { + $e = new PropelException("Invalid value passed to removeInstanceFromPool(). Expected primary key or \CreditNote\Model\OrderCreditNote object; got " . (is_object($value) ? get_class($value) . ' object.' : var_export($value, true))); + throw $e; + } + + unset(self::$instances[$key]); + } + } + + /** + * Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table. + * + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, a serialize()d version of the primary key will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + */ + public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + // If the PK cannot be derived from the row, return NULL. + if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('OrderId', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 1 + $offset : static::translateFieldName('CreditNoteId', TableMap::TYPE_PHPNAME, $indexType)] === null) { + return null; + } + + return serialize(array((string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('OrderId', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 1 + $offset : static::translateFieldName('CreditNoteId', TableMap::TYPE_PHPNAME, $indexType)])); + } + + /** + * Retrieves the primary key from the DB resultset row + * For tables with a single-column primary key, that simple pkey value will be returned. For tables with + * a multi-column primary key, an array of the primary key columns will be returned. + * + * @param array $row resultset row. + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM + * + * @return mixed The primary key of the row + */ + public static function getPrimaryKeyFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + + return $pks; + } + + /** + * The class that the tableMap will make instances of. + * + * If $withPrefix is true, the returned path + * uses a dot-path notation which is translated into a path + * relative to a location on the PHP include_path. + * (e.g. path.to.MyClass -> 'path/to/MyClass.php') + * + * @param boolean $withPrefix Whether or not to return the path with the class name + * @return string path.to.ClassName + */ + public static function getOMClass($withPrefix = true) + { + return $withPrefix ? OrderCreditNoteTableMap::CLASS_DEFAULT : OrderCreditNoteTableMap::OM_CLASS; + } + + /** + * Populates an object of the default type or an object that inherit from the default. + * + * @param array $row row returned by DataFetcher->fetch(). + * @param int $offset The 0-based offset for reading from the resultset row. + * @param string $indexType The index type of $row. Mostly DataFetcher->getIndexType(). + One of the class type constants TableMap::TYPE_PHPNAME, TableMap::TYPE_STUDLYPHPNAME + * TableMap::TYPE_COLNAME, TableMap::TYPE_FIELDNAME, TableMap::TYPE_NUM. + * + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + * @return array (OrderCreditNote object, last column rank) + */ + public static function populateObject($row, $offset = 0, $indexType = TableMap::TYPE_NUM) + { + $key = OrderCreditNoteTableMap::getPrimaryKeyHashFromRow($row, $offset, $indexType); + if (null !== ($obj = OrderCreditNoteTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, $offset, true); // rehydrate + $col = $offset + OrderCreditNoteTableMap::NUM_HYDRATE_COLUMNS; + } else { + $cls = OrderCreditNoteTableMap::OM_CLASS; + $obj = new $cls(); + $col = $obj->hydrate($row, $offset, false, $indexType); + OrderCreditNoteTableMap::addInstanceToPool($obj, $key); + } + + return array($obj, $col); + } + + /** + * The returned array will contain objects of the default type or + * objects that inherit from the default. + * + * @param DataFetcherInterface $dataFetcher + * @return array + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function populateObjects(DataFetcherInterface $dataFetcher) + { + $results = array(); + + // set the class once to avoid overhead in the loop + $cls = static::getOMClass(false); + // populate the object(s) + while ($row = $dataFetcher->fetch()) { + $key = OrderCreditNoteTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType()); + if (null !== ($obj = OrderCreditNoteTableMap::getInstanceFromPool($key))) { + // We no longer rehydrate the object, since this can cause data loss. + // See http://www.propelorm.org/ticket/509 + // $obj->hydrate($row, 0, true); // rehydrate + $results[] = $obj; + } else { + $obj = new $cls(); + $obj->hydrate($row); + $results[] = $obj; + OrderCreditNoteTableMap::addInstanceToPool($obj, $key); + } // if key exists + } + + return $results; + } + /** + * Add all the columns needed to create a new object. + * + * Note: any columns that were marked with lazyLoad="true" in the + * XML schema will not be added to the select list and only loaded + * on demand. + * + * @param Criteria $criteria object containing the columns to add. + * @param string $alias optional table alias + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function addSelectColumns(Criteria $criteria, $alias = null) + { + if (null === $alias) { + $criteria->addSelectColumn(OrderCreditNoteTableMap::ORDER_ID); + $criteria->addSelectColumn(OrderCreditNoteTableMap::CREDIT_NOTE_ID); + $criteria->addSelectColumn(OrderCreditNoteTableMap::AMOUNT_PRICE); + $criteria->addSelectColumn(OrderCreditNoteTableMap::CREATED_AT); + $criteria->addSelectColumn(OrderCreditNoteTableMap::UPDATED_AT); + } else { + $criteria->addSelectColumn($alias . '.ORDER_ID'); + $criteria->addSelectColumn($alias . '.CREDIT_NOTE_ID'); + $criteria->addSelectColumn($alias . '.AMOUNT_PRICE'); + $criteria->addSelectColumn($alias . '.CREATED_AT'); + $criteria->addSelectColumn($alias . '.UPDATED_AT'); + } + } + + /** + * Returns the TableMap related to this object. + * This method is not needed for general use but a specific application could have a need. + * @return TableMap + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function getTableMap() + { + return Propel::getServiceContainer()->getDatabaseMap(OrderCreditNoteTableMap::DATABASE_NAME)->getTable(OrderCreditNoteTableMap::TABLE_NAME); + } + + /** + * Add a TableMap instance to the database for this tableMap class. + */ + public static function buildTableMap() + { + $dbMap = Propel::getServiceContainer()->getDatabaseMap(OrderCreditNoteTableMap::DATABASE_NAME); + if (!$dbMap->hasTable(OrderCreditNoteTableMap::TABLE_NAME)) { + $dbMap->addTableObject(new OrderCreditNoteTableMap()); + } + } + + /** + * Performs a DELETE on the database, given a OrderCreditNote or Criteria object OR a primary key value. + * + * @param mixed $values Criteria or OrderCreditNote object or primary key or array of primary keys + * which is used to create the DELETE statement + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). This includes CASCADE-related rows + * if supported by native driver or if emulated using Propel. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doDelete($values, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(OrderCreditNoteTableMap::DATABASE_NAME); + } + + if ($values instanceof Criteria) { + // rename for clarity + $criteria = $values; + } elseif ($values instanceof \CreditNote\Model\OrderCreditNote) { // it's a model object + // create criteria based on pk values + $criteria = $values->buildPkeyCriteria(); + } else { // it's a primary key, or an array of pks + $criteria = new Criteria(OrderCreditNoteTableMap::DATABASE_NAME); + // primary key is composite; we therefore, expect + // the primary key passed to be an array of pkey values + if (count($values) == count($values, COUNT_RECURSIVE)) { + // array is not multi-dimensional + $values = array($values); + } + foreach ($values as $value) { + $criterion = $criteria->getNewCriterion(OrderCreditNoteTableMap::ORDER_ID, $value[0]); + $criterion->addAnd($criteria->getNewCriterion(OrderCreditNoteTableMap::CREDIT_NOTE_ID, $value[1])); + $criteria->addOr($criterion); + } + } + + $query = OrderCreditNoteQuery::create()->mergeWith($criteria); + + if ($values instanceof Criteria) { OrderCreditNoteTableMap::clearInstancePool(); + } elseif (!is_object($values)) { // it's a primary key, or an array of pks + foreach ((array) $values as $singleval) { OrderCreditNoteTableMap::removeInstanceFromPool($singleval); + } + } + + return $query->delete($con); + } + + /** + * Deletes all rows from the order_credit_note table. + * + * @param ConnectionInterface $con the connection to use + * @return int The number of affected rows (if supported by underlying database driver). + */ + public static function doDeleteAll(ConnectionInterface $con = null) + { + return OrderCreditNoteQuery::create()->doDeleteAll($con); + } + + /** + * Performs an INSERT on the database, given a OrderCreditNote or Criteria object. + * + * @param mixed $criteria Criteria or OrderCreditNote object containing data that is used to create the INSERT statement. + * @param ConnectionInterface $con the ConnectionInterface connection to use + * @return mixed The new primary key. + * @throws PropelException Any exceptions caught during processing will be + * rethrown wrapped into a PropelException. + */ + public static function doInsert($criteria, ConnectionInterface $con = null) + { + if (null === $con) { + $con = Propel::getServiceContainer()->getWriteConnection(OrderCreditNoteTableMap::DATABASE_NAME); + } + + if ($criteria instanceof Criteria) { + $criteria = clone $criteria; // rename for clarity + } else { + $criteria = $criteria->buildCriteria(); // build Criteria from OrderCreditNote object + } + + + // Set the correct dbName + $query = OrderCreditNoteQuery::create()->mergeWith($criteria); + + try { + // use transaction because $criteria could contain info + // for more than one table (I guess, conceivably) + $con->beginTransaction(); + $pk = $query->doInsert($con); + $con->commit(); + } catch (PropelException $e) { + $con->rollBack(); + throw $e; + } + + return $pk; + } + +} // OrderCreditNoteTableMap +// This is the static code needed to register the TableMap for this table with the main Propel class. +// +OrderCreditNoteTableMap::buildTableMap(); diff --git a/local/modules/CreditNote/Model/OrderCreditNote.php b/local/modules/CreditNote/Model/OrderCreditNote.php new file mode 100644 index 000000000..cd8af1b97 --- /dev/null +++ b/local/modules/CreditNote/Model/OrderCreditNote.php @@ -0,0 +1,10 @@ +gilles.bourgeat@gmail.com> + */ +trait ModelEventDispatcherTrait +{ + use TheliaModelEventDispatcherTrait; + + protected function getTableName() + { + $tableMapClass = self::TABLE_MAP; + return $tableMapClass::TABLE_NAME; + } + + /** + * Code to be run before inserting to database + * @param ConnectionInterface $con + * @return boolean + */ + public function preInsert(ConnectionInterface $con = null) + { + parent::preInsert($con); + + if ($this->getDispatcher() !== null) { + /** @var ActiveRecordInterface $this */ + $event = new PropelEvent($this); + /** @var ModelEventDispatcherTrait $this */ + $this->getDispatcher()->dispatch(CreditNoteEvents::PROPEL_PRE_INSERT . $this->getTableName(), $event); + + if ($event->isPropagationStopped()) { + return false; + } + } + return true; + } + + /** + * Code to be run after inserting to database + * @param ConnectionInterface $con + */ + public function postInsert(ConnectionInterface $con = null) + { + parent::postInsert($con); + + if ($this->getDispatcher() !== null) { + /** @var ActiveRecordInterface $this */ + $event = new PropelEvent($this); + /** @var ModelEventDispatcherTrait $this */ + $this->getDispatcher()->dispatch(CreditNoteEvents::PROPEL_POST_INSERT . $this->getTableName(), $event); + } + } + + /** + * Code to be run before updating the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preUpdate(ConnectionInterface $con = null) + { + parent::preUpdate($con); + + if ($this->getDispatcher() !== null) { + /** @var ActiveRecordInterface $this */ + $event = new PropelEvent($this); + /** @var ModelEventDispatcherTrait $this */ + $this->getDispatcher()->dispatch(CreditNoteEvents::PROPEL_PRE_UPDATE . $this->getTableName(), $event); + + if ($event->isPropagationStopped()) { + return false; + } + } + return true; + } + + /** + * Code to be run after updating the object in database + * @param ConnectionInterface $con + */ + public function postUpdate(ConnectionInterface $con = null) + { + parent::postUpdate($con); + + if ($this->getDispatcher() !== null) { + /** @var ActiveRecordInterface $this */ + $event = new PropelEvent($this); + /** @var ModelEventDispatcherTrait $this */ + $this->getDispatcher()->dispatch(CreditNoteEvents::PROPEL_POST_UPDATE . $this->getTableName(), $event); + } + } + + /** + * Code to be run before deleting the object in database + * @param ConnectionInterface $con + * @return boolean + */ + public function preDelete(ConnectionInterface $con = null) + { + parent::preDelete($con); + + if ($this->getDispatcher() !== null) { + /** @var ActiveRecordInterface $this */ + $event = new PropelEvent($this); + /** @var ModelEventDispatcherTrait $this */ + $this->getDispatcher()->dispatch(CreditNoteEvents::PROPEL_PRE_DELETE . $this->getTableName(), $event); + + if ($event->isPropagationStopped()) { + return false; + } + } + return true; + } + + /** + * Code to be run after deleting the object in database + * @param ConnectionInterface $con + */ + public function postDelete(ConnectionInterface $con = null) + { + parent::postDelete($con); + + if ($this->getDispatcher() !== null) { + /** @var ActiveRecordInterface $this */ + $event = new PropelEvent($this); + /** @var ModelEventDispatcherTrait $this */ + $this->getDispatcher()->dispatch(CreditNoteEvents::PROPEL_POST_DELETE . $this->getTableName(), $event); + } + } +} diff --git a/local/modules/CreditNote/Readme.md b/local/modules/CreditNote/Readme.md new file mode 100644 index 000000000..0b24e5802 --- /dev/null +++ b/local/modules/CreditNote/Readme.md @@ -0,0 +1,24 @@ +# Credit Note + +Author: Gilles Bourgeat + +* Allows granting credit notes to customers + +## Compatibility + +Thelia >= 2.3 + +## Installation + +### Manually + +* Copy the module into ```/local/modules/``` directory and be sure that the name of the module is ```CreditNote```. +* Activate it in your thelia administration panel + +### Composer + +Add it in your main thelia composer.json file + +``` +composer require thelia/credit-note-module:~2.3.0 +``` diff --git a/local/modules/CreditNote/Smarty/Plugins/CreditNoteFormat.php b/local/modules/CreditNote/Smarty/Plugins/CreditNoteFormat.php new file mode 100644 index 000000000..7e8a61486 --- /dev/null +++ b/local/modules/CreditNote/Smarty/Plugins/CreditNoteFormat.php @@ -0,0 +1,164 @@ +gilles.bourgeat@gmail.com> + */ +class CreditNoteFormat extends AbstractSmartyPlugin +{ + /** @var RequestStack */ + protected $requestStack; + + public function __construct(RequestStack $requestStack) + { + $this->requestStack = $requestStack; + } + + /** + * + * display an address in expected format + * + * available parameters : + * address => the id of the address to display + * order_address => the id of the order address to display + * from_country_id => the country id + * dec_point => separator for the decimal point + * thousands_sep => thousands separator + * symbol => Currency symbol + * + * ex : {format_money number="1246.12" decimals="1" dec_point="," thousands_sep=" " symbol="€"} will output "1 246,1 €" + * + * @param $params + * @param null $template + * @throws \TheliaSmarty\Template\Exception\SmartyPluginException + * @return string the expected number formatted + */ + public function formatAddress($params, $template = null) + { + $postal = filter_var( + $this->getParam($params, "postal", null), + FILTER_VALIDATE_BOOLEAN + ); + + $html = filter_var( + $this->getParam($params, "html", true), + FILTER_VALIDATE_BOOLEAN + ); + + $htmlTag = $this->getParam($params, "html_tag", "p"); + $originCountry = $this->getParam($params, "origin_country", null); + $locale = $this->getParam($params, "locale", $this->getSession()->getLang()->getLocale()); + + // extract html attributes + $htmlAttributes = []; + foreach ($params as $k => $v) { + if (strpos($k, 'html_') !== false && $k !== 'html_tag') { + $htmlAttributes[substr($k, 5)] = $v; + } + } + + // get address or order address + $address = null; + if (null !== $id = $this->getParam($params, "credit_note_id", null)) { + if (null === $address = CreditNoteAddressQuery::create()->findOneById( + CreditNoteQuery::create()->findOneById($id)->getInvoiceAddressId() + ) + ) { + return ''; + } + } else { + // try to parse arguments to build address + $address = $this->getAddressFormParams($params); + } + + if (null === $address) { + throw new SmartyPluginException( + "Either address, order_address or full list of address fields should be provided" + ); + } + + $addressFormat = AddressFormat::getInstance(); + if ($postal) { + if ($address instanceof Address) { + $formattedAddress = $addressFormat->postalLabelFormat($address, $locale, $originCountry); + } else { + $formattedAddress = $addressFormat->postalLabelFormatTheliaAddress($address, $locale, $originCountry); + } + } else { + if ($address instanceof Address) { + $formattedAddress = $addressFormat->format($address, $locale, $html, $htmlTag, $htmlAttributes); + } else { + $formattedAddress = $addressFormat->formatTheliaAddress($address, $locale, $html, $htmlTag, $htmlAttributes); + } + } + + return $formattedAddress; + } + + protected function getAddressFormParams($params) + { + // Check if there is arguments + $addressArgs = [ + 'country_code', + 'administrative_area', + 'locality', + 'dependent_locality', + 'postal_code', + 'sorting_code', + 'address_line1', + 'address_line2', + 'organization', + 'recipient', + 'locale' + ]; + $valid = false; + + $address = new Address(); + + foreach ($addressArgs as $arg) { + if (null !== $argVal = $this->getParam($params, $arg, null)) { + $valid = true; + $functionName = 'with' . Container::camelize($arg); + $address = $address->$functionName($argVal); + } + } + + if (false === $valid) { + return null; + } + + return $address; + } + + /** + * @return SmartyPluginDescriptor[] + */ + public function getPluginDescriptors() + { + return array( + new SmartyPluginDescriptor("function", "credit_note_format_address", $this, "formatAddress"), + ); + } + + protected function getSession() + { + return $this->requestStack->getCurrentRequest()->getSession(); + } +} diff --git a/local/modules/CreditNote/composer.json b/local/modules/CreditNote/composer.json new file mode 100644 index 000000000..0aa316c9c --- /dev/null +++ b/local/modules/CreditNote/composer.json @@ -0,0 +1,11 @@ +{ + "name": "thelia/credit-note-module", + "license": "proprietary", + "type": "thelia-module", + "require": { + "thelia/installer": "~1.1" + }, + "extra": { + "installer-name": "CreditNote" + } +} diff --git a/local/modules/CreditNote/templates/backOffice/default/ajax/credit-note-modal.html b/local/modules/CreditNote/templates/backOffice/default/ajax/credit-note-modal.html new file mode 100644 index 000000000..9b28effef --- /dev/null +++ b/local/modules/CreditNote/templates/backOffice/default/ajax/credit-note-modal.html @@ -0,0 +1,450 @@ +{form name="credit-note.create"} + +{if $creditNote->getInvoiceRef() } + {$invoiced = true} +{else} + {$invoiced = false} +{/if} + +getId()}}{else}{url path="/admin/credit-note/create"}{/if}"> + {if $app->request->get('success-url')} + + {/if} + + + +
+
+ +
+ {form_field field='currency_id'} + {if $creditNote->getOrder()} + + {intl l="This credit note use the currency : %currency" d="creditnote.bo.default" currency=$creditNote->getCurrency()->getSymbol()} + {else} + {capture name="currency"} + + {/capture} + {intl l="This credit note use the currency : %currency" d="creditnote.bo.default" currency=$smarty.capture.currency} + {/if} + {/form_field} +
+ + {if $creditNote->getRef()} +
+ {intl l="Credit note ref : %ref" d="creditnote.bo.default" ref=$creditNote->getRef()} +
+ {/if} + + {if $creditNote->getInvoiceRef()} +
+ {intl l="Invoice ref : %ref" d="creditnote.bo.default" ref=$creditNote->getInvoiceRef()} +
+ {/if} + + {* Credit note status select *} +
+ + {form_field field='status_id'} + + {/form_field} +
+ + {* Credit note type select *} +
+ + {form_field field='type_id'} + + {/form_field} +
+ + {* Credit note customer select *} +
+ + {form_field field='customer_id'} + + {/form_field} +
+ + {* Credit note order select *} + {if $creditNote->getCreditNoteType()->getRequiredOrder() && !$creditNote->getOrder()} + {$hasError = true} + {/if} + +
+ + {form_field field='order_id'} + + {/form_field} +
+ + +
+ {* address invoice *} +
+
+
{intl l="Invoice address" d="creditnote.bo.default"}
+
+ + {$other = false} +
+ {form_field field='invoice_address_id'} + {if !$data} + {$other = true} + {/if} + + {/form_field} +
+ +
+ {form_field field='invoice_address_title'} +
+ + {if !$creditNote->getCreditNoteAddress()->getCustomerTitleId()} + + {else} + {$data = $creditNote->getCreditNoteAddress()->getCustomerTitleId()} + {/if} + +
+ {/form_field} + {form_field field='invoice_address_firstname'} +
+ + +
+ {/form_field} + {form_field field='invoice_address_lastname'} +
+ + +
+ {/form_field} + {form_field field='invoice_address_address1'} +
+ + +
+ {/form_field} + {form_field field='invoice_address_address2'} +
+ + +
+ {/form_field} + {form_field field='invoice_address_city'} +
+ + +
+ {/form_field} + {form_field field='invoice_address_zipcode'} +
+ + +
+ {/form_field} + {form_field field='invoice_address_country_id'} +
+ + +
+ {/form_field} + {form_field field='invoice_address_company'} +
+ + +
+ {/form_field} +
+ +
+
+
+ + {* Credit note order *} + {if $creditNote->getOrderId()} +
+ {include file="includes/credit-note-order.html" invoiced=$invoiced} +
+ {/if} + + {* Credit note order *} +
+
+
{intl l="Free amount : " d="creditnote.bo.default"}
+
+
+ + + + + + + + + + + + + + {$i = 0} + {foreach from=$creditNote->getCreditNoteDetails() key=key item=creditNoteDetail} + {if !$creditNoteDetail->getOrderProductId()} + {$i = $i + 1} + {include file="includes/credit-note-free-amount.html"} + {/if} + {/foreach} + + + + +
+ {intl l="Type" d="creditnote.bo.default"} + + {intl l="Title" d="creditnote.bo.default"} + + {intl l="Amount without tax %currency" d="creditnote.bo.default" currency=$creditNote->getCurrency()->getSymbol()} + + {intl l="Tax rule" d="creditnote.bo.default"} + + {intl l="Amount with tax %currency" d="creditnote.bo.default" currency=$creditNote->getCurrency()->getSymbol()} + + {if !$invoiced} + + {/if} +
+
+ {intl l="No free amount." d="creditnote.bo.default"} +
+
+ +
+
+
+
+ +
+ {if $creditNote->getOrder() !== null && $creditNote->getOrder()->getDiscount() > 0} +
+
{intl l="Order discount informations : " d="creditnote.bo.default"}
+
+
+
+ {form_field field='discount_without_tax'} +
+ {intl l="Discount without tax : " d="creditnote.bo.default"} + getCreditNoteType()->getCode() == 'order_full_refund'}disabled{/if} /> +
+ {/form_field} +
+
+ {form_field field='discount_with_tax'} +
+ {intl l="Discount with tax : " d="creditnote.bo.default"} + getCreditNoteType()->getCode() == 'order_full_refund'}disabled{/if} /> +
+ {/form_field} +
+
+
+
+ {/if} +
+ +
+
+
{intl l="Credit Note Informations : " d="creditnote.bo.default"}
+
+
+
+

+ {intl l="Total without tax : " d="creditnote.bo.default"}{format_money number=$creditNote->getTotalPrice() currency_id=$creditNote->getCurrencyId()} +

+
+
+

+ {intl l="Taxes : " d="creditnote.bo.default"}{format_money number=($creditNote->getTotalPriceWithTax() - $creditNote->getTotalPrice()) currency_id=$creditNote->getCurrencyId()} +

+
+
+

+ {intl l="Total with tax : " d="creditnote.bo.default"}{format_money number=$creditNote->getTotalPriceWithTax() currency_id=$creditNote->getCurrencyId()} +

+
+
+
+
+
+ + {* Credit note comment *} +
+
+
{intl l="Internal comment : " d="creditnote.bo.default"}
+
+ {form_field field='comment'} + + {/form_field} +
+
+ {if $creditNote->getId()} + {ifloop rel="credit-note-comment"} +
+
+ {loop type="credit-note-comment" name="credit-note-comment" credit_note_id=$creditNote->getId() order="id-reverse"} + {intl l="User" d="creditnote.bo.default"} : {$ADMIN_FIRST_NAME} {$ADMIN_LAST_NAME}{format_date date=$CREATE_DATE} : +

+
+ {$COMMENT|nl2br nofilter} +
+
+ {/loop} +
+
+ {/ifloop} + {elseloop rel="credit-note-comment"} +
+ {intl l="No comments found for this credit note" d="creditnote.bo.default"} +
+ {/elseloop} + {/if} +
+
+
+ + {if $invoiced} +
+
+
{intl l="Credit note used : " d="creditnote.bo.default"}
+
+ {loop type="order-credit-note" name="order-credit-note" credit_note_id=$creditNote->getId()} + {loop type="order" name="order" customer="*" backend_context=true id=$ORDER_ID} +
+ {intl l="Used by order :" d="creditnote.bo.default"} {$REF} +
+ {/loop} + {/loop} +
+
+
+ {/if} + + {* Credit note version *} + {*{if $creditNote->getId()} +
+
+
{intl l="Credit note versions : " d="creditnote.bo.default"}
+
+ {ifloop rel="credit-note-version"} + {loop type="credit-note-version" name="credit-note-version" id=$creditNote->getId()} + // toto : credit note version + {/loop} + {/ifloop} + {elseloop rel="credit-note-version"} +
+ {intl l="No version found for this credit note" d="creditnote.bo.default"} +
+ {/elseloop} +
+
+
+ {/if}*} + + + + {form_field field='ui_target'} + + {/form_field} + + {form_field field='ui_target_id'} + + {/form_field} + +{/form} \ No newline at end of file diff --git a/local/modules/CreditNote/templates/backOffice/default/assets/js/script.js b/local/modules/CreditNote/templates/backOffice/default/assets/js/script.js new file mode 100644 index 000000000..e52da642d --- /dev/null +++ b/local/modules/CreditNote/templates/backOffice/default/assets/js/script.js @@ -0,0 +1,364 @@ +"use strict"; +(function($) { + var $modal = $('#modal-credit-note-delete'); + + $modal.on('show.bs.modal', function(event){ + var url = $(event.relatedTarget).data('ajax-url'); + + $modal.find('form').attr('action', url); + }); + +})(jQuery); + +(function($){ + var $modal = $('#modal-credit-note'); + var currentRequest; + var lastAjaxUrl; + // fix bug bootstrap 3 and select2 + $.fn.modal.Constructor.prototype.enforceFocus = function() {}; + + /****** Modal methods ******/ + $modal.loaderOff = function(){ + $modal.find('.modal-loader').addClass('hidden'); + $modal.find('.modal-body').removeClass('hidden'); + }; + + $modal.loaderOn = function(){ + $modal.find('.modal-loader').removeClass('hidden'); + $modal.find('.modal-body').addClass('hidden'); + }; + + $modal.reset = function(){ + $modal.hideError(); + $modal.loaderOn(); + }; + + $modal.loadAjax = function(event, data){ + if (typeof data === 'undefined') { + data = {}; + } + + // kill last ajax request if not if it's not finished + if (currentRequest) currentRequest.abort(); + + var url = $(event.relatedTarget).data('ajax-url'); + if (typeof url === 'undefined') { + url = lastAjaxUrl; + } else { + lastAjaxUrl = url; + $modal.loaderOn(); + } + + if ($(event.relatedTarget).data('success-url')) { + data['success-url'] = $(event.relatedTarget).data('success-url'); + } + + if (!data['credit-note-create[action]']) { + data['credit-note-create[action]'] = 'view'; + } + + if ($(event.relatedTarget).data('credit-note-id')) { + data['credit-note-create[credit_note_id]'] = $(event.relatedTarget).data('credit-note-id'); + } + + if ($(event.relatedTarget).data('order-id')) { + data['credit-note-create[order_id]'] = $(event.relatedTarget).data('order-id'); + } + + if ($(event.relatedTarget).data('order-product-id')) { + data['credit-note-create[order_product_quantity][' + $(event.relatedTarget).data('order-product-id') + ']'] = 1; + } + + if ($(event.relatedTarget).data('type-id')) { + data['credit-note-create[type_id]'] = $(event.relatedTarget).data('type-id'); + } + + if ($(event.relatedTarget).data('customer-id')) { + data['credit-note-create[customer_id]'] = $(event.relatedTarget).data('customer-id'); + } + + // to avoid a display bug with select2 + setTimeout(function(data){ + // ajax start + currentRequest = $.ajax({ + url: url, + data: data, + method: 'POST' + }); + + // ajax success + currentRequest.done(function(data){ + $modal.loaderOff(); + $modal.find('.modal-body').html(data); + $modal.modalReady(); + }); + + // ajax error + currentRequest.fail(function(jqXHR, textStatus){ + $modal.displayError(jqXHR, textStatus); + }); + }, 100, data); + }; + + $modal.displayError = function(jqXHR, textStatus){ + if (jqXHR.statusText === 'abort') return; + $modal.loaderOff(); + $modal.find('.modal-body').addClass('hidden'); + var $error = $modal.find('.modal-error').removeClass('hidden'); + $error.find('.textStatus').html(textStatus); + $error.find('iframe').contents().find('html').html(jqXHR.responseText); + }; + + $modal.hideError = function(){ + $modal.find('.modal-error').addClass('hidden').find('iframe').contents().find('html').empty(); + }; + /****** End Modal methods ******/ + + /****** Modal events ******/ + $modal.on('show.bs.modal', function(event){ + $modal.loadAjax(event); + }); + + $modal.on('hidden.bs.modal', function(){ + $modal.reset(); + lastAjaxUrl = undefined; + }); + /****** End Modal events ******/ + + $modal.modalReady = function(){ + var $form = $modal.find('.modal-body form'); + + var initSelect = function($target){ + return $target.select2({ + templateResult: function(data){ + if (!data.id) return data.text; + var prefix = data.element.dataset.color ? ' ' : ''; + return $(prefix + '' + data.text + ''); + }, + templateSelection: function(data){ + var prefix = data.element.dataset.color ? ' ' : ''; + return $(prefix + '' + data.text + ''); + } + }); + }; + + var initAjaxSelect = function($target){ + return $target.select2({ + ajax: { + url: $target.data('url'), + dataType: 'json', + delay: 250, + data: function (params){ + return { + q: params.term, + customerId: $target.data('customer-id') + }; + }, + processResults: function (data){ + return {results: data.items}; + }, + error: function(jqXHR, textStatus){ + if (jqXHR.statusText === 'abort') return; + $target.select2('destroy'); + $modal.displayError(jqXHR, textStatus); + }, + cache: false + }, + minimumInputLength: 3, + placeholder: $target.data('placeholder'), + templateResult: function(data){ + if (data.loading) return data.text; + + var markup = "
"; + markup += data.ref + ' : (' + data.firstname + ' ' + data.lastname + ')' + '
' + data.address + ''; + markup += "
"; + + return $(markup); + }, + templateSelection: function(data){ + if (data.text) { + return data.text; + } + + return data.ref + ' : (' + data.firstname + ' ' + data.lastname + ')'; + } + }); + }; + + var $selectType = initSelect($form.find('.js-select-type')); + var $selectStatus = initSelect($form.find('.js-select-status')); + var $selectCustomer = initAjaxSelect($form.find('.js-select-customer')); + var $selectInvoiceAddress = initSelect($form.find('.js-select-invoice-address')); + + var $selectOrder = $form.find('.js-select-order'); + if ($selectOrder.data('customer-id')) { + initSelect($selectOrder); + } else { + initAjaxSelect($selectOrder); + } + + var getFormData = function(data){ + var formData = $form.serializeArray(); + + for (var i in formData) { + for (var e in data) { + if (formData[i].name === e) { + formData[i].value = data[e]; + delete data[e]; + } + } + } + + for (var e in data) { + formData.push({ + name: i, + value: data[i] + } + ); + } + + return formData + }; + + $selectOrder.on('select2:select', function(event){ + $modal.loadAjax(event, getFormData({ + 'credit-note-create[order_id]': event.params.data.id, + 'credit-note-create[action]': 'refresh' + })); + }); + + $selectCustomer.on('select2:select', function(event){ + $modal.loadAjax(event, getFormData({ + 'credit-note-create[customer_id]': event.params.data.id, + 'credit-note-create[action]': 'refresh' + })); + }); + + $selectStatus.on('select2:select', function(event){ + $modal.loadAjax(event, getFormData({ + 'credit-note-create[action]': 'refresh' + })); + }); + + $selectInvoiceAddress.on('select2:select', function(event){ + $modal.loadAjax(event, getFormData({ + 'credit-note-create[action]': 'refresh' + })); + }); + + $selectType.on('select2:select', function(event){ + $modal.loadAjax(event, getFormData({ + 'credit-note-create[action]': 'refresh' + })); + }); + + $form.on('change', '.js-field-currency', function(event){ + $modal.loadAjax(event, getFormData({ + 'credit-note-create[action]': 'refresh' + })); + }); + + $form.on('change', '.js-order-product-quantity', function(event){ + $modal.loadAjax(event, getFormData({ + 'credit-note-create[action]': 'refresh' + })); + }); + + $form.on('keyup change', '.js-action-refresh', function(event){ + if ($(this).val().length) { + refreshWithTimer($form, event); + } + }); + + /*******************************************/ + /*********** Table Free Amount *************/ + /*******************************************/ + var $tableFreeAmount = $form.find('.js-table-free-amount'); + var templateFreeAmount = $('#template-credit-note-free-amount').html(); + + $tableFreeAmount.on('click', '.js-action-add', function(event){ + event.preventDefault(); + $(this).data('key', parseInt($(this).data('key')) + 1); + + var templateFreeAmountWithKey = templateFreeAmount.replace(/\[\]/g, '[' + $(this).data('key') + ']'); + $tableFreeAmount.find('tbody').append(templateFreeAmountWithKey); + + if ($tableFreeAmount.find('tbody tr').not('.js-no-free-amount').length) { + $tableFreeAmount.find('.js-no-free-amount').addClass('hidden'); + } else { + $tableFreeAmount.find('.js-no-free-amount').removeClass('hidden'); + } + }); + + $tableFreeAmount.on('click', '.js-action-delete', function(event){ + event.preventDefault(); + $(this).parents('tr').remove(); + + if ($tableFreeAmount.find('tbody tr').not('.js-no-free-amount').length) { + $tableFreeAmount.find('.js-no-free-amount').addClass('hidden'); + } else { + $tableFreeAmount.find('.js-no-free-amount').removeClass('hidden'); + } + + $modal.loadAjax(event, getFormData({ + 'credit-note-create[action]': 'refresh' + })); + }); + + $tableFreeAmount.on('change', '.js-field-tax-rule', function(event){ + $(this).parents('tr').find('.js-field-amount-without-tax').trigger('keyup'); + }); + + var currentRequestFreeAmount; + $tableFreeAmount.on('keyup', '.js-field-amount-without-tax, .js-field-amount-with-tax', function(event){ + if (currentRequestFreeAmount) currentRequestFreeAmount.abort(); + + var $th = $(this), $thr = $th.parents('tr'); + + currentRequestFreeAmount = $.ajax({ + url: $(this).data('url'), + dataType: 'json', + data: { + price: parseFloat($(this).val()), + tax_rule: parseInt($thr.find('.js-field-tax-rule').val()) + } + }); + + // ajax success + currentRequestFreeAmount.done(function(data){ + if ($th.hasClass('js-field-amount-without-tax')) { + $thr.find('.js-field-amount-with-tax').val(data.result); + } else { + $thr.find('.js-field-amount-without-tax').val(data.result); + } + + refreshWithTimer(event); + }); + + // ajax error + currentRequestFreeAmount.fail(function(jqXHR, textStatus){ + if (jqXHR.statusText === 'abort') return; + $modal.displayError(jqXHR, textStatus); + }); + }); + + var timer = null; + function refreshWithTimer(event) { + if (timer !== null) { + clearTimeout(timer); + timer = null; + } + timer = setTimeout(function(){ + $modal.loadAjax(event, getFormData({ + 'credit-note-create[action]': 'refresh' + })); + }, 700); + } + + /*******************************************/ + /********* End Table Free Amount ***********/ + /*******************************************/ + }; +})( + jQuery +); diff --git a/local/modules/CreditNote/templates/backOffice/default/credit-note-list.html b/local/modules/CreditNote/templates/backOffice/default/credit-note-list.html new file mode 100644 index 000000000..6a197c5b2 --- /dev/null +++ b/local/modules/CreditNote/templates/backOffice/default/credit-note-list.html @@ -0,0 +1,46 @@ +{extends file="admin-layout.tpl"} + +{block name="no-return-functions"} + {$admin_current_location = 'credit-notes'} +{/block} + +{block name="page-title"}{intl l='Credit notes' d="creditnote.bo.default"}{/block} + +{block name="check-resource"}admin.credit-note{/block} +{block name="check-access"}view{/block} + +{block name="main-content"} +
+
+ + + + {hook name="credit-notes.top"} + +
+
+
+ {include file="includes/credit-note-table.html"} +
+
+
+ + {hook name="credit-notes.bottom"} + +
+ + {include file="includes/credit-note-modal.html"} +
+ +{/block} + +{block name="javascript-initialization"} + {include file="includes/credit-note-js.html"} +{/block} + +{block name="javascript-last-call"} + {hook name="credit-notes.js"} +{/block} \ No newline at end of file diff --git a/local/modules/CreditNote/templates/backOffice/default/hook/customer.edit.html b/local/modules/CreditNote/templates/backOffice/default/hook/customer.edit.html new file mode 100644 index 000000000..7010c96ac --- /dev/null +++ b/local/modules/CreditNote/templates/backOffice/default/hook/customer.edit.html @@ -0,0 +1,5 @@ +
+
+ {include file="includes/credit-note-table.html" customer_id=$customer_id} +
+
\ No newline at end of file diff --git a/local/modules/CreditNote/templates/backOffice/default/hook/main.footer-js.html b/local/modules/CreditNote/templates/backOffice/default/hook/main.footer-js.html new file mode 100644 index 000000000..3b731eefe --- /dev/null +++ b/local/modules/CreditNote/templates/backOffice/default/hook/main.footer-js.html @@ -0,0 +1,51 @@ + + \ No newline at end of file diff --git a/local/modules/CreditNote/templates/backOffice/default/hook/order-edit.product-list.html b/local/modules/CreditNote/templates/backOffice/default/hook/order-edit.product-list.html new file mode 100644 index 000000000..5d36d8931 --- /dev/null +++ b/local/modules/CreditNote/templates/backOffice/default/hook/order-edit.product-list.html @@ -0,0 +1,41 @@ +{if $creditNoteDetails|count > 0} + + + + + + + + + + {foreach from=$creditNoteDetails item=creditNoteDetail} + {if $creditNoteDetail->getQuantity() > 0} + + + + + + {/if} + {/foreach} + +
+ {intl l="Credit Note ref" d="creditnote.bo.default"} + + {intl l="Status" d="creditnote.bo.default"} + + {intl l="Quantity" d="creditnote.bo.default"} +
+ getCreditNote()->getId()}"> + {$creditNoteDetail->getCreditNote()->getRef()} + + + {loop type="credit-note-status" name="credit-note-status" id=$creditNoteDetail->getCreditNote()->getStatusId()} + {$TITLE} + {/loop} + + {$creditNoteDetail->getQuantity()} +
+{/if} diff --git a/local/modules/CreditNote/templates/backOffice/default/hook/order.edit-js.html b/local/modules/CreditNote/templates/backOffice/default/hook/order.edit-js.html new file mode 100644 index 000000000..2ac65e28e --- /dev/null +++ b/local/modules/CreditNote/templates/backOffice/default/hook/order.edit-js.html @@ -0,0 +1,37 @@ +{include file="includes/credit-note-js.html"} + + + + \ No newline at end of file diff --git a/local/modules/CreditNote/templates/backOffice/default/hook/order.tab.html b/local/modules/CreditNote/templates/backOffice/default/hook/order.tab.html new file mode 100644 index 000000000..e8a570562 --- /dev/null +++ b/local/modules/CreditNote/templates/backOffice/default/hook/order.tab.html @@ -0,0 +1,28 @@ +{loop type="order" name="order-tab-credit-note" id=$id customer="*" backend_context=true} + {if $STATUS != 1 && $STATUS != 5} +
+
+ {include file="includes/credit-note-table.html" order_id=$id} +
+
+ {else} +
+ + + + + + + + +
+ {intl l="Credit notes" d="creditnote.bo.default"} +
+
+ {intl l="You can not create a credit note for this order because it is not invoiced." d="creditnote.bo.default"} +
+
+
+ + {/if} +{/loop} \ No newline at end of file diff --git a/local/modules/CreditNote/templates/backOffice/default/includes/credit-note-free-amount.html b/local/modules/CreditNote/templates/backOffice/default/includes/credit-note-free-amount.html new file mode 100644 index 000000000..9e73b3511 --- /dev/null +++ b/local/modules/CreditNote/templates/backOffice/default/includes/credit-note-free-amount.html @@ -0,0 +1,64 @@ + + + {form_field field='free_amount_type' value_key=$key} +
+ +
+ {/form_field} + + + {form_field field='free_amount_title' value_key=$key} +
+ +
+ {/form_field} + + + {form_field field='free_amount_price' value_key=$key} +
+ +
+ {/form_field} + + + {form_field field='free_amount_tax_rule_id' value_key=$key} +
+ +
+ {/form_field} + + + {form_field field='free_amount_price_with_tax' value_key=$key} +
+ +
+ {/form_field} + + +
+ {form_field field='free_amount_id' value_key=$key} + + {/form_field} + + {if !$invoiced} + + {/if} +
+ + \ No newline at end of file diff --git a/local/modules/CreditNote/templates/backOffice/default/includes/credit-note-js.html b/local/modules/CreditNote/templates/backOffice/default/includes/credit-note-js.html new file mode 100644 index 000000000..61fb39b3e --- /dev/null +++ b/local/modules/CreditNote/templates/backOffice/default/includes/credit-note-js.html @@ -0,0 +1,11 @@ + + +{javascripts file='assets/js/script.js' source="CreditNote"} + +{/javascripts} + \ No newline at end of file diff --git a/local/modules/CreditNote/templates/backOffice/default/includes/credit-note-modal.html b/local/modules/CreditNote/templates/backOffice/default/includes/credit-note-modal.html new file mode 100644 index 000000000..338dce491 --- /dev/null +++ b/local/modules/CreditNote/templates/backOffice/default/includes/credit-note-modal.html @@ -0,0 +1,53 @@ + + + \ No newline at end of file diff --git a/local/modules/CreditNote/templates/backOffice/default/includes/credit-note-order.html b/local/modules/CreditNote/templates/backOffice/default/includes/credit-note-order.html new file mode 100644 index 000000000..338289764 --- /dev/null +++ b/local/modules/CreditNote/templates/backOffice/default/includes/credit-note-order.html @@ -0,0 +1,156 @@ +{loop type="order" name="the-order" id=$creditNote->getOrderId() customer="*" backend_context=true} +
+
+ {intl l="Order Informations : " d="creditnote.bo.default"} + + {loop type="order-status" name="all-status" id=$STATUS} + {intl l="Status : %title" d="creditnote.bo.default" title=$TITLE} + {/loop} + + {intl l="Ref :" d="creditnote.bo.default"} {$REF} + +
+
+
+ + + + + {hook name="order-edit.order-product-table-header" location="order_edit_table_header" } + + + + + + + + + + {loop type="order_product" name="order-products" order=$ID} + {if $WAS_IN_PROMO == 1} + {assign "realPrice" $PROMO_PRICE} + {assign "realTax" $PROMO_PRICE_TAX} + {assign "realTaxedPrice" $TAXED_PROMO_PRICE} + {assign "realTotalPrice" $TOTAL_TAXED_PROMO_PRICE} + {else} + {assign "realPrice" $PRICE} + {assign "realTax" $PRICE_TAX} + {assign "realTaxedPrice" $TAXED_PRICE} + {assign "realTotalPrice" $TOTAL_TAXED_PRICE} + {/if} + {hook name="order-edit.before-order-product-row" location="before-order-product-row" order_id=$order_id order_product_id=$ID} + + + {hook name="order-edit.order-product-table-row" location="order_edit_table_row" order_product_id={$ID} } + + + + + + + {hook name="order-edit.after-order-product-row" location="after-order-product-row" order_id=$order_id order_product_id=$ID} + {/loop} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{intl l="Product" d="creditnote.bo.default"}{intl l="Unit. price" d="creditnote.bo.default"}{intl l="Tax" d="creditnote.bo.default"}{intl l="Unit taxed price" d="creditnote.bo.default"}{intl l="Quantity" d="creditnote.bo.default"}{intl l="Total with tax" d="creditnote.bo.default"}
+ {ifloop rel="my_product_loop"} + {loop type="product" name="my_product_loop" visible="*" ref=$REF return_url=false} + {$REF} - {$TITLE} + {if $VIRTUAL}{/if} + {/loop} +
+
{intl l='Combination reference' d="creditnote.bo.default"}
+
+ {$PRODUCT_SALE_ELEMENTS_REF} +
+
+ {/ifloop} + {elseloop rel="my_product_loop"} + {* The product doesn't exist anymore *} + {$TITLE} + {if $VIRTUAL}{/if} + {/elseloop} + {ifloop rel="combinations"} +
+ {loop type="order_product_attribute_combination" name="combinations" order_product=$ID} +
{$ATTRIBUTE_TITLE}
+
{$ATTRIBUTE_AVAILABILITY_TITLE}
+ {/loop} +
+ {/ifloop} + {hook name="order-edit.product-list" location="order-product-list" order_id=$order_id order_product_id=$ID} +
{format_money number=$realPrice currency_id=$CURRENCY}{format_money number=$realTax currency_id=$CURRENCY}{format_money number=$realTaxedPrice currency_id=$CURRENCY} + {if $creditNote->getCreditNoteType()} + + {$currentQuantity = 0} + + {if $creditNote->getCreditNoteType()->getCode() == 'order_full_refund'} + {$currentQuantity = $QUANTITY} + {else} + {foreach from=$creditNote->getCreditNoteDetails() item=creditNoteDetail} + {if $creditNoteDetail->getOrderProductId() == $ID} + {$currentQuantity = $creditNoteDetail->getQuantity()} + {/if} + {/foreach} + {/if} + + {form_field field='order_product_quantity' key=$ID} + {if $invoiced or $creditNote->getCreditNoteType()->getCode() == 'order_full_refund'} + + {$currentQuantity} + {else} + + {/if} + {/form_field} + {/if} + / {$QUANTITY} + {format_money number=$realTotalPrice currency_id=$CURRENCY}
+ {intl l="Total without discount" d="creditnote.bo.default"}{format_money number=$TOTAL_TAXED_AMOUNT-$POSTAGE+$DISCOUNT currency_id=$CURRENCY}
{intl l="Discount" d="creditnote.bo.default"}{format_money number=$DISCOUNT currency_id=$CURRENCY}
{intl l="Coupon code" d="creditnote.bo.default"} + {loop type="order_coupon" name="couponcode" order=$ID} + {$CODE}{if $LOOP_COUNT != $LOOP_TOTAL}, {/if} + {/loop} + {elseloop rel="couponcode"} + Ø + {/elseloop} +
{intl l="Total including discount" d="creditnote.bo.default"}{format_money number=$TOTAL_TAXED_AMOUNT-$POSTAGE currency_id=$CURRENCY}
{intl l="Postage" d="creditnote.bo.default"} + {format_money number=$POSTAGE currency_id=$CURRENCY} + ({format_money number=$POSTAGE_TAX currency_id=$CURRENCY}) +
{intl l="Total" d="creditnote.bo.default"}{format_money number=$TOTAL_TAXED_AMOUNT currency_id=$CURRENCY}
+
+
+
+ +{/loop} \ No newline at end of file diff --git a/local/modules/CreditNote/templates/backOffice/default/includes/credit-note-table.html b/local/modules/CreditNote/templates/backOffice/default/includes/credit-note-table.html new file mode 100644 index 000000000..702cec311 --- /dev/null +++ b/local/modules/CreditNote/templates/backOffice/default/includes/credit-note-table.html @@ -0,0 +1,195 @@ +{assign credit_note_page {$smarty.get.credit_note_page|default:1}} + +{assign credit_note_order {$smarty.get.credit_note_order|default:'id'}} +{assign credit_note_status {$smarty.get.status_id|default:null}} + +
+ + + + + + + + + + + + + {if !$customer_id && !$order_id} + + {/if} + {if !$order_id} + + {/if} + + + + + + + + + {ifloop rel="credit-note"} + + + {loop type="credit-note" name="credit-note" status_id=$credit_note_status order=$credit_note_order page=$credit_note_page customer_id=$customer_id order_id=$order_id limit={config key="number_default_results_per_page.credit_note_list" default=20}} + + + + + + + + {if !$customer_id && !$order_id} + + {/if} + {if !$order_id} + + {/if} + + + + + + + {/loop} + + + + + + + {/ifloop} + + {elseloop rel="credit-note"} + + + + + + {/elseloop} + +
+ {intl l="Credit notes" d="creditnote.bo.default"} + + + {intl l="Add a new credit note" d="creditnote.bo.default"} + +
+ {intl l="#" d="creditnote.bo.default"} + + {intl l="Ref" d="creditnote.bo.default"} + + {intl l="Invoice ref" d="creditnote.bo.default"} + + {intl l="Invoice date" d="creditnote.bo.default"} + + {admin_sortable_header + current_order=$credit_note_order + order='create-date' + reverse_order='create-date-reverse' + path={url path='/admin/credit-note'} + request_parameter_name='credit_note_order' + label="{intl l='Create date' d="creditnote.bo.default"}" + } + + {admin_sortable_header + current_order=$credit_note_order + order='update-date' + reverse_order='update-date-reverse' + path={url path='/admin/credit-note'} + request_parameter_name='credit_note_order' + label="{intl l='Update date' d="creditnote.bo.default"}" + } + + {intl l="Customer" d="creditnote.bo.default"} + + {intl l="Order" d="creditnote.bo.default"} + + {intl l="Status" d="creditnote.bo.default"} + + {intl l="Type" d="creditnote.bo.default"} + + {intl l="Total with tax" d="creditnote.bo.default"} + + {intl l="Total without tax" d="creditnote.bo.default"} + + {intl l="Action" d="creditnote.bo.default"} +
+ {$ID} + + {$REF} + + {$INVOICE_REF} + + {if $INVOICE_DATE != null} + {format_date date=$INVOICE_DATE} + {/if} + {format_date date=$CREATE_DATE}{format_date date=$UPDATE_DATE} + {$CUSTOMER_NAME} + + {if $ORDER_ID} + {$ORDER_REF} + {/if} + + {$STATUS_TITLE} + + {$TYPE_TITLE} + + {format_money number=$TOTAL_PRICE_WITH_TAX currency_id=$CURRENCY_ID} + + {format_money number=$TOTAL_PRICE currency_id=$CURRENCY_ID} + + {if !$INVOICE_REF} + + {else} + + {intl l="PDF" d="creditnote.bo.default"} + {/if} + {if !$INVOICE_REF} + + {/if} +
+ {include + file = "includes/pagination.html" + + loop_ref = "credit-note" + page_param_name = 'credit_note_page' + max_page_count = 10 + page_url = {url path="/admin/credit-note" type=$type_filter status_id=$credit_note_status credit_note_order=$credit_note_order search_term=$search_term search_in=$search_in} + } +
+
+ {intl l='You have no credit notes for the moment.' d="creditnote.bo.default"} +
+
+
diff --git a/local/modules/CreditNote/templates/pdf/default/credit-note.html b/local/modules/CreditNote/templates/pdf/default/credit-note.html new file mode 100644 index 000000000..ae82845f8 --- /dev/null +++ b/local/modules/CreditNote/templates/pdf/default/credit-note.html @@ -0,0 +1,309 @@ +{* Set the default translation domain, that will be used by {intl} when the 'd' parameter is not set *} +{default_translation_domain domain="creditnote.pdf.default"} +{literal} + +{/literal} + + + {hook name="pdf.credit-note.header" credit_note_id=$credit_note_id} + + + + {hook name="pdf.credit-note.footer-top" credit_note_id=$credit_note_id} + + + + + + + + + +
+ {hook name="pdf.credit-note.imprint" credit_note_id=$credit_note_id} + {elsehook rel="pdf.credit-note.imprint"} + + {config key="store_name"} + {$addresses="{config key="store_address1"} {config key="store_address2"} {config key="store_address3"}"} + {$city="{config key="store_zipcode"} {config key="store_city"}"} + {if $addresses != " "}- {$addresses}{/if} + {if $city != " " }- {$city}{/if} + {if {config key="store_country"} } + {loop type="country" visible="*" name="address.country.title" id={config key="store_country"}} - {$TITLE}{/loop} + {/if} + {if {config key="store_business_id"} } + - {config key="store_business_id"} + {/if} +
+ {if {config key="store_phone"} } + {intl l="Phone: "}{config key="store_phone"} + {/if} + {if {config key="store_email"} } + {intl l="Email: "}{config key="store_email"} + {/if} + {/elsehook} +
{intl l="page"} [[page_cu]]/[[page_nb]]
+ {hook name="pdf.credit-note.footer-bottom" order=$order_id} +
+ + {$taxes = []} + + {loop name="credit-note.invoice" type="credit-note" id=$credit_note_id customer="*"} + + + + + + + + + + + + + + + + + + {if $ORDER_ID} + {loop name="order" type="order" id=$ORDER_ID customer="*"} + + + + + + + {/loop} + {/if} + {hookblock name="pdf.credit-note.information" credit_note_id=$credit_note_id fields="title,value"} + {forhook rel="pdf.credit-note.information"} + + + + {/forhook} + {/hookblock} +
+

{intl l="CREDIT NOTE INVOICE"}

+

{intl l="Invoice date"} : {format_date date=$INVOICE_DATE output="date"}

{intl l="Invoice REF"} : {$INVOICE_REF}

{intl l="Credit note REF"} : {$REF}

{intl l="Customer Number"} : {loop type="customer" name="customer.invoice" id=$CUSTOMER_ID current="0"}{$REF}{/loop}

{intl l="Referance invoice REF"} : {$INVOICE_REF}

{intl l="Referance order REF"} : {$REF}

{$title} : {$value}

+ + {hook name="pdf.credit-note.after-information" credit_note_id=$credit_note_id} + + + + + + + +
+

{intl l="Invoice address"}

+ {credit_note_format_address credit_note_id=$ID locale=$locale} +
+ + {hook name="pdf.credit-note.after-addresses" credit_note_id=$credit_note_id} + + + + + + + + + + + + + + + + + + {loop type="credit-note-detail" name="credit-note-detail" credit_note_id=$credit_note_id} + {$detailRef = ""} + {$detailPseRef = ""} + {$detailTitle = $TITLE} + {if $ORDER_PRODUCT_ID} + {loop type="order_product" name="order-product-$ORDER_PRODUCT_ID" id=$ORDER_PRODUCT_ID order=$ORDER_ID} + {$detailRef = $REF} + {$detailTitle = $TITLE} + {$detailPseRef = $PRODUCT_SALE_ELEMENTS_REF} + {/loop} + {/if} + + + + + + + + + + + {hook name="pdf.credit-note.order-product" credit_note_id=$credit_note_id order_product=$ID} + {/loop} +

{intl l="Product"}

{intl l="Unit. price"}

{intl l="Tax"}

{intl l="Unit taxed price"}

{intl l="Quantity"}

{intl l="Total with tax"}

+

{$TITLE}

+

+ {if $detailRef} + {intl l="Product ref : "}{$detailRef}
+ {/if} + {if $detailPseRef} + {intl l="Combination ref : "}{$detailPseRef} + {/if} +

+ {if $ORDER_PRODUCT_ID} + {ifloop rel="combinations"} + {loop type="order_product_attribute_combination" name="combinations" order_product=$ORDER_PRODUCT_ID} + {$ATTRIBUTE_TITLE} - {$ATTRIBUTE_AVAILABILITY_TITLE}
+ {/loop} + {/ifloop} + {/if} + {hook name="pdf.credit-note.detail-list" order_product=$ID order=$order_id} +

{if $QUANTITY}{format_money number={$PRICE / $QUANTITY} currency_id=$CURRENCY_ID}{else}{format_money number=0 currency_id=$CURRENCY_ID}{/if}

{if $QUANTITY}{format_money number={{$PRICE_WITH_TAX - $PRICE} / $QUANTITY} currency_id=$CURRENCY_ID}{else}{format_money number=0 currency_id=$CURRENCY_ID}{/if}

{if $QUANTITY}{format_money number={$PRICE_WITH_TAX / $QUANTITY} currency_id=$CURRENCY_ID}{else}{format_money number=0 currency_id=$CURRENCY_ID}{/if}

{$QUANTITY}

{format_money number=$PRICE_WITH_TAX currency_id=$CURRENCY_ID}

+ + {hook name="pdf.credit-note.after-products" credit_note_id=$credit_note_id} + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +

{intl l="Discount"}

{format_money number=$DISCOUNT_WITH_TAX currency_id=$CURRENCY}

{intl l="Total without tax"}

{format_money number=$TOTAL_PRICE currency_id=$CURRENCY}

{intl l="Tax"}

{format_money number={$TOTAL_PRICE_WITH_TAX - $TOTAL_PRICE} currency_id=$CURRENCY}

{intl l="Total with tax"}

{format_money number=$TOTAL_PRICE_WITH_TAX currency_id=$CURRENCY}

+
+ + {hook name="pdf.credit-note.after-summary" credit_note_id=$credit_note_id} + + {/loop} +
diff --git a/local/modules/Klikandpay b/local/modules/Klikandpay deleted file mode 160000 index a72c066e7..000000000 --- a/local/modules/Klikandpay +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a72c066e7400d2350dca24016a302582cb7e7b62 diff --git a/local/modules/PurgeFakeCustomer/I18n/en_US.php b/local/modules/PurgeFakeCustomer/I18n/en_US.php new file mode 100644 index 000000000..0b4fa142b --- /dev/null +++ b/local/modules/PurgeFakeCustomer/I18n/en_US.php @@ -0,0 +1,4 @@ + 'The displayed english string', +); diff --git a/local/modules/PurgeFakeCustomer/I18n/fr_FR.php b/local/modules/PurgeFakeCustomer/I18n/fr_FR.php new file mode 100644 index 000000000..370862450 --- /dev/null +++ b/local/modules/PurgeFakeCustomer/I18n/fr_FR.php @@ -0,0 +1,4 @@ + 'La traduction française de la chaine', +); diff --git a/local/modules/PurgeFakeCustomer/Readme.md b/local/modules/PurgeFakeCustomer/Readme.md index 55a6662a0..03af2eae9 100644 --- a/local/modules/PurgeFakeCustomer/Readme.md +++ b/local/modules/PurgeFakeCustomer/Readme.md @@ -19,37 +19,24 @@ composer require your-vendor/purge-fake-customer-module:~1.0 ## Usage -Explain here how to use your module, how to configure it, etc. +Traitement de purge des faux clients, basé sur une commande Thelia, qui peut donc être ordonnancé via un cron à intervalles réguliers. -## Hook - -If your module use one or more hook, fill this part. Explain which hooks are used. - - -## Loop - -If your module declare one or more loop, describe them here like this : - -[loop name] +La commande en question est : **php Thelia fakecustomers:purge** ### Input arguments -|Argument |Description | -|--- |--- | -|**arg1** | describe arg1 with an exemple. | -|**arg2** | describe arg2 with an exemple. | +Cette commande ne prend pas de paramètre. + ### Output arguments -|Variable |Description | -|--- |--- | -|$VAR1 | describe $VAR1 variable | -|$VAR2 | describe $VAR2 variable | +Un message dans les logs (de type INFO) indique le nombre de faux clients supprimés suite au passage de la commande, avec leurs Ids, sous la forme : +"%d fake customers deleted (Ids : %s)" -### Exemple - -Add a complete exemple of your loop ## Other ? -If you have other think to put, feel free to complete your readme as you want. +Par défaut, le script purge tous les clients n'ayant jamais effectué de commande depuis la création de leur compte. + +Mais il est possible de rajouter des filtres, au format de WHERE SQL, via une variable **purgefakecustomer_critere** + diff --git a/web/assets/backOffice/default/AdminOrderCreation/admin-order-creation/assets/js/66087d9.js b/web/assets/backOffice/default/AdminOrderCreation/admin-order-creation/assets/js/66087d9.js new file mode 100644 index 000000000..5f67d817e --- /dev/null +++ b/web/assets/backOffice/default/AdminOrderCreation/admin-order-creation/assets/js/66087d9.js @@ -0,0 +1,465 @@ +(function(){ + var $modal = $('#modal-order-creation'); + var currentRequest; + + // fix bug bootstrap 3 and select2 + $.fn.modal.Constructor.prototype.enforceFocus = function() {}; + + var timer = null; + function refreshWithTimer($form, event) { + if (timer !== null) { + clearTimeout(timer); + timer = null; + } + timer = setTimeout(function($form){ + $modal.loadAjax(event, getFormData($form, { + 'admin-order-creation-create[action]': 'refresh' + })); + }, 700, $form); + } + + function initSelect($target, allowClear){ + + if (typeof allowClear === "undefined") { + allowClear = false; + } + return $target.select2({ + allowClear: allowClear, + templateResult: function(data){ + if (!data.id) return data.text; + var prefix = data.element.dataset.color ? ' ' : ''; + prefix += (data.element.dataset.ref ? ' ' + data.element.dataset.ref + '' : ''); + return $(prefix + ' ' + data.text + ''); + }, + templateSelection: function(data){ + if (!data.id) return data.text; + var prefix = data.element.dataset.color ? ' ' : ''; + prefix += (data.element.dataset.ref ? ' ' + data.element.dataset.ref + '' : ''); + return $(prefix + ' ' + data.text + ''); + } + }); + } + + function getFormData($form, data){ + var formData = $form.serializeArray(); + + for (var i in formData) { + for (var e in data) { + if (formData[i].name === e) { + formData[i].value = data[e]; + delete data[e]; + } + } + } + + for (var e in data) { + formData.push({ + name: i, + value: data[i] + } + ); + } + + return formData + } + + function initAjaxSelectCustomer($target){ + return $target.select2({ + ajax: { + url: $target.data('url'), + dataType: 'json', + delay: 250, + data: function (params){ + return { + q: params.term, + customerId: $target.data('customer-id') + }; + }, + processResults: function (data){ + return {results: data.items}; + }, + error: function(jqXHR, textStatus){ + if (jqXHR.statusText === 'abort') return; + $target.select2('destroy'); + $modal.displayError(jqXHR, textStatus); + }, + cache: false + }, + minimumInputLength: 3, + placeholder: $target.data('placeholder'), + templateResult: function(data){ + if (data.loading) return data.text; + + var markup = "
"; + markup += data.ref + ' : (' + data.firstname + ' ' + data.lastname + ')' + '
' + data.address + ''; + markup += "
"; + + return $(markup); + }, + templateSelection: function(data){ + if (data.text) { + return data.text; + } + + return data.ref + ' : (' + data.firstname + ' ' + data.lastname + ')'; + } + }); + } + + function initAjaxSelectProduct($target){ + return $target.select2({ + ajax: { + url: $target.data('url'), + dataType: 'json', + delay: 250, + data: function (params){ + return { + q: params.term + }; + }, + processResults: function (data){ + return {results: data.items}; + }, + error: function(jqXHR, textStatus){ + if (jqXHR.statusText === 'abort') return; + $target.select2('destroy'); + $modal.displayError(jqXHR, textStatus); + }, + cache: false + }, + minimumInputLength: 3, + placeholder: $target.data('placeholder'), + templateResult: function(data){ + if (data.loading) return data.text; + + var markup = "
"; + markup += data.ref + ' : ' + data.title; + markup += "
"; + + return $(markup); + }, + templateSelection: function(data){ + if (data.text) { + return data.text; + } + + return data.ref + ' : ' + data.title; + } + }); + } + + /****** Modal methods ******/ + $modal.loaderOff = function(){ + $modal.find('.modal-loader').addClass('hidden'); + $modal.find('.modal-body').removeClass('hidden'); + }; + + $modal.loaderOn = function(){ + $modal.find('.modal-loader').removeClass('hidden'); + $modal.find('.modal-body').addClass('hidden'); + }; + + $modal.reset = function(){ + $modal.hideError(); + $modal.loaderOn(); + }; + + $modal.hideError = function(){ + $modal.find('.modal-error').addClass('hidden').find('iframe').contents().find('html').empty(); + }; + + $modal.displayError = function(jqXHR, textStatus){ + if (jqXHR.statusText === 'abort') return; + $modal.loaderOff(); + $modal.find('.modal-body').addClass('hidden'); + var $error = $modal.find('.modal-error').removeClass('hidden'); + $error.find('.textStatus').html(textStatus); + $error.find('iframe').contents().find('html').html(jqXHR.responseText); + }; + + $modal.modalReady = function(){ + var $form = $modal.find('.modal-body form'); + + var $selectStatus = initSelect($form.find('.js-select-status')); + var $selectCustomer = initAjaxSelectCustomer($form.find('.js-select-customer')); + var $selectProduct = initAjaxSelectProduct($form.find('.js-select-product')); + var $selectProductSaleElement = initSelect($form.find('.js-select-product-sale-element')); + var $selectInvoiceAddress = initSelect($form.find('.js-select-invoice-address')); + var $selectDeliveryAddress = initSelect($form.find('.js-select-delivery-address')); + var $selectCreditNote = initSelect($form.find('.js-select-credit-note'), true); + var $selectCreditNoteStatus = initSelect($form.find('.js-select-credit-note-status')); + var $selectCreditNoteType = initSelect($form.find('.js-select-credit-note-type')); + + $form.on('submit', function(event){ + event.preventDefault(); + + $modal.loadAjax(event, getFormData($form, { + 'admin-order-creation-create[action]': 'create' + })); + }); + + $selectStatus.on('select2:select', function(event){ + $modal.loadAjax(event, getFormData($form, { + 'admin-order-creation-create[action]': 'refresh' + })); + }); + + $selectCustomer.on('select2:select', function(event){ + $modal.loadAjax(event, getFormData($form, { + 'admin-order-creation-create[customer_id]': event.params.data.id, + 'admin-order-creation-create[action]': 'refresh' + })); + }); + + $selectInvoiceAddress.on('select2:select', function(event){ + $modal.loadAjax(event, getFormData($form, { + 'admin-order-creation-create[action]': 'refresh' + })); + }); + + $selectDeliveryAddress.on('select2:select', function(event){ + $modal.loadAjax(event, getFormData($form, { + 'admin-order-creation-create[action]': 'refresh' + })); + }); + + $selectProduct.on('select2:select', function(event){ + $(event.target).parents('tr').find('.js-refresh-price').val('1'); + + $modal.loadAjax(event, getFormData($form, { + 'admin-order-creation-create[action]': 'refresh' + })); + }); + + $selectProductSaleElement.on('select2:select', function(event){ + $(event.target).parents('tr').find('.js-refresh-price').val('1'); + + $modal.loadAjax(event, getFormData($form, { + 'admin-order-creation-create[action]': 'refresh' + })); + }); + + $selectCreditNote.on('select2:select', function(event){ + $modal.loadAjax(event, getFormData($form, { + 'admin-order-creation-create[action]': 'refresh' + })); + }); + + $form.on('change', '.js-field-currency', function(event){ + $modal.loadAjax(event, getFormData($form, { + 'credit-note-create[action]': 'refresh' + })); + }); + + $form.on('change', '.js-action-refresh', function(event){ + if ($(this).val().length) { + refreshWithTimer($form, event); + } + }); + + var currentProductRequestTax; + $form.on('change', '.js-product-price-with-tax, .js-product-price-without-tax', function(event){ + if (currentProductRequestTax) currentProductRequestTax.abort(); + + var $th = $(this), $thr = $(this).parents('tr'); + + var val = parseFloat($(this).val()); + + if (!val) { + val = 0; + } + + currentProductRequestTax = $.ajax({ + url: $(this).data('url'), + dataType: 'json', + data: { + price: val, + tax_rule: this.dataset.taxRuleId + } + }); + + // ajax success + currentProductRequestTax.done(function(data){ + if ($th.hasClass('js-product-price-without-tax')) { + $thr.find('.js-product-price-with-tax').val(data.result); + } else { + $thr.find('.js-product-price-without-tax').val(data.result); + } + + refreshWithTimer($form, event); + }); + + // ajax error + currentProductRequestTax.fail(function(jqXHR, textStatus){ + if (jqXHR.statusText === 'abort') return; + $modal.displayError(jqXHR, textStatus); + }); + }); + + + /***** Product line *****/ + var $tableProductLine = $form.find('.js-table-product-line'); + var templateProductLine = $('#template-order-creation-product-line').html(); + + $tableProductLine.on('click', '.js-action-add', function(event){ + event.preventDefault(); + $(this).data('key', parseInt($(this).data('key')) + 1); + + var templateProductLineKey = templateProductLine.replace(/\[\]/g, '[' + $(this).data('key') + ']'); + $tableProductLine.find('tbody').append(templateProductLineKey); + + var $selectProduct = initAjaxSelectProduct($form.find('.js-table-product-line tbody .js-select-product').last()); + + $selectProduct.on('select2:select', function(event){ + $modal.loadAjax(event, getFormData($form, { + 'admin-order-creation-create[action]': 'refresh' + })); + }); + + /*if ($tableProductLine.find('tbody tr').not('.js-no-free-amount').length) { + $tableProductLine.find('.js-no-free-amount').addClass('hidden'); + } else { + $tableProductLine.find('.js-no-free-amount').removeClass('hidden'); + }*/ + }); + + $tableProductLine.on('click', '.js-action-delete', function(event){ + event.preventDefault(); + $(this).parents('tr').remove(); + + $modal.loadAjax(event, getFormData($form, { + 'admin-order-creation-create[action]': 'refresh' + })); + }); + + var $shippingArea = $form.find('.js-shipping-area'); + + var currentRequestTax; + $shippingArea.on('change', '.js-field-amount-without-tax, .js-field-amount-with-tax', function(event){ + if (currentRequestTax) currentRequestTax.abort(); + + var $th = $(this), $thr = $shippingArea; + + var val = parseFloat($(this).val()); + + if (!val) { + val = 0; + } + + currentRequestTax = $.ajax({ + url: $(this).data('url'), + dataType: 'json', + data: { + price: val, + tax_rule: parseInt($thr.find('.js-field-tax-rule').val()) + } + }); + + // ajax success + currentRequestTax.done(function(data){ + if ($th.hasClass('js-field-amount-without-tax')) { + $thr.find('.js-field-amount-with-tax').val(data.result); + } else { + $thr.find('.js-field-amount-without-tax').val(data.result); + } + + refreshWithTimer($form, event); + }); + + // ajax error + currentRequestTax.fail(function(jqXHR, textStatus){ + if (jqXHR.statusText === 'abort') return; + $modal.displayError(jqXHR, textStatus); + }); + }); + + $shippingArea.on('change', '.js-field-tax-rule', function(event){ + if (currentRequestTax) currentRequestTax.abort(); + + var $th = $(this), $thr = $shippingArea; + + var val = parseFloat($thr.find('.js-field-amount-with-tax').val()); + + if (!val) { + val = 0; + } + + currentRequestTax = $.ajax({ + url: $(this).data('url'), + dataType: 'json', + data: { + price: val, + tax_rule: parseInt($thr.find('.js-field-tax-rule').val()) + } + }); + + // ajax success + currentRequestTax.done(function(data){ + if ($th.hasClass('js-field-amount-without-tax')) { + $thr.find('.js-field-amount-with-tax').val(data.result); + } else { + $thr.find('.js-field-amount-without-tax').val(data.result); + } + + refreshWithTimer($form, event); + }); + + // ajax error + currentRequestTax.fail(function(jqXHR, textStatus){ + if (jqXHR.statusText === 'abort') return; + $modal.displayError(jqXHR, textStatus); + }); + }); + + + + }; + + $modal.loadAjax = function(event, data){ + if (typeof data === 'undefined') { + data = {}; + } + + // kill last ajax request if not if it's not finished + if (currentRequest) currentRequest.abort(); + + // to avoid a display bug with select2 + setTimeout(function(data){ + // ajax start + currentRequest = $.ajax({ + url: $modal.data('ajaxUrl'), + data: data, + method: 'POST' + }); + + // ajax success + currentRequest.done(function(data, textStatus, xhr){ + $modal.loaderOff(); + $modal.find('.modal-body').html(data); + $modal.modalReady(); + }); + + // ajax error + currentRequest.fail(function(jqXHR, textStatus){ + $modal.displayError(jqXHR, textStatus); + }); + }, 100, data); + }; + + $('body').on('click', '#btn-create-order', function(event){ + $modal.modal('show'); + var customerId = $(this).data('customerId'); + var creditNoteId = $(this).data('creditNoteId'); + + $modal.loadAjax(event, { + 'admin-order-creation-create[action]': 'open', + 'admin-order-creation-create[customer_id]': customerId, + 'admin-order-creation-create[credit_note_id]': creditNoteId + }); + }); + + $modal.on('hidden.bs.modal', function(){ + $modal.reset(); + }); + +}()); \ No newline at end of file diff --git a/web/assets/backOffice/default/CreditNote/assets/js/e133d4e.js b/web/assets/backOffice/default/CreditNote/assets/js/e133d4e.js new file mode 100644 index 000000000..e52da642d --- /dev/null +++ b/web/assets/backOffice/default/CreditNote/assets/js/e133d4e.js @@ -0,0 +1,364 @@ +"use strict"; +(function($) { + var $modal = $('#modal-credit-note-delete'); + + $modal.on('show.bs.modal', function(event){ + var url = $(event.relatedTarget).data('ajax-url'); + + $modal.find('form').attr('action', url); + }); + +})(jQuery); + +(function($){ + var $modal = $('#modal-credit-note'); + var currentRequest; + var lastAjaxUrl; + // fix bug bootstrap 3 and select2 + $.fn.modal.Constructor.prototype.enforceFocus = function() {}; + + /****** Modal methods ******/ + $modal.loaderOff = function(){ + $modal.find('.modal-loader').addClass('hidden'); + $modal.find('.modal-body').removeClass('hidden'); + }; + + $modal.loaderOn = function(){ + $modal.find('.modal-loader').removeClass('hidden'); + $modal.find('.modal-body').addClass('hidden'); + }; + + $modal.reset = function(){ + $modal.hideError(); + $modal.loaderOn(); + }; + + $modal.loadAjax = function(event, data){ + if (typeof data === 'undefined') { + data = {}; + } + + // kill last ajax request if not if it's not finished + if (currentRequest) currentRequest.abort(); + + var url = $(event.relatedTarget).data('ajax-url'); + if (typeof url === 'undefined') { + url = lastAjaxUrl; + } else { + lastAjaxUrl = url; + $modal.loaderOn(); + } + + if ($(event.relatedTarget).data('success-url')) { + data['success-url'] = $(event.relatedTarget).data('success-url'); + } + + if (!data['credit-note-create[action]']) { + data['credit-note-create[action]'] = 'view'; + } + + if ($(event.relatedTarget).data('credit-note-id')) { + data['credit-note-create[credit_note_id]'] = $(event.relatedTarget).data('credit-note-id'); + } + + if ($(event.relatedTarget).data('order-id')) { + data['credit-note-create[order_id]'] = $(event.relatedTarget).data('order-id'); + } + + if ($(event.relatedTarget).data('order-product-id')) { + data['credit-note-create[order_product_quantity][' + $(event.relatedTarget).data('order-product-id') + ']'] = 1; + } + + if ($(event.relatedTarget).data('type-id')) { + data['credit-note-create[type_id]'] = $(event.relatedTarget).data('type-id'); + } + + if ($(event.relatedTarget).data('customer-id')) { + data['credit-note-create[customer_id]'] = $(event.relatedTarget).data('customer-id'); + } + + // to avoid a display bug with select2 + setTimeout(function(data){ + // ajax start + currentRequest = $.ajax({ + url: url, + data: data, + method: 'POST' + }); + + // ajax success + currentRequest.done(function(data){ + $modal.loaderOff(); + $modal.find('.modal-body').html(data); + $modal.modalReady(); + }); + + // ajax error + currentRequest.fail(function(jqXHR, textStatus){ + $modal.displayError(jqXHR, textStatus); + }); + }, 100, data); + }; + + $modal.displayError = function(jqXHR, textStatus){ + if (jqXHR.statusText === 'abort') return; + $modal.loaderOff(); + $modal.find('.modal-body').addClass('hidden'); + var $error = $modal.find('.modal-error').removeClass('hidden'); + $error.find('.textStatus').html(textStatus); + $error.find('iframe').contents().find('html').html(jqXHR.responseText); + }; + + $modal.hideError = function(){ + $modal.find('.modal-error').addClass('hidden').find('iframe').contents().find('html').empty(); + }; + /****** End Modal methods ******/ + + /****** Modal events ******/ + $modal.on('show.bs.modal', function(event){ + $modal.loadAjax(event); + }); + + $modal.on('hidden.bs.modal', function(){ + $modal.reset(); + lastAjaxUrl = undefined; + }); + /****** End Modal events ******/ + + $modal.modalReady = function(){ + var $form = $modal.find('.modal-body form'); + + var initSelect = function($target){ + return $target.select2({ + templateResult: function(data){ + if (!data.id) return data.text; + var prefix = data.element.dataset.color ? ' ' : ''; + return $(prefix + '' + data.text + ''); + }, + templateSelection: function(data){ + var prefix = data.element.dataset.color ? ' ' : ''; + return $(prefix + '' + data.text + ''); + } + }); + }; + + var initAjaxSelect = function($target){ + return $target.select2({ + ajax: { + url: $target.data('url'), + dataType: 'json', + delay: 250, + data: function (params){ + return { + q: params.term, + customerId: $target.data('customer-id') + }; + }, + processResults: function (data){ + return {results: data.items}; + }, + error: function(jqXHR, textStatus){ + if (jqXHR.statusText === 'abort') return; + $target.select2('destroy'); + $modal.displayError(jqXHR, textStatus); + }, + cache: false + }, + minimumInputLength: 3, + placeholder: $target.data('placeholder'), + templateResult: function(data){ + if (data.loading) return data.text; + + var markup = "
"; + markup += data.ref + ' : (' + data.firstname + ' ' + data.lastname + ')' + '
' + data.address + ''; + markup += "
"; + + return $(markup); + }, + templateSelection: function(data){ + if (data.text) { + return data.text; + } + + return data.ref + ' : (' + data.firstname + ' ' + data.lastname + ')'; + } + }); + }; + + var $selectType = initSelect($form.find('.js-select-type')); + var $selectStatus = initSelect($form.find('.js-select-status')); + var $selectCustomer = initAjaxSelect($form.find('.js-select-customer')); + var $selectInvoiceAddress = initSelect($form.find('.js-select-invoice-address')); + + var $selectOrder = $form.find('.js-select-order'); + if ($selectOrder.data('customer-id')) { + initSelect($selectOrder); + } else { + initAjaxSelect($selectOrder); + } + + var getFormData = function(data){ + var formData = $form.serializeArray(); + + for (var i in formData) { + for (var e in data) { + if (formData[i].name === e) { + formData[i].value = data[e]; + delete data[e]; + } + } + } + + for (var e in data) { + formData.push({ + name: i, + value: data[i] + } + ); + } + + return formData + }; + + $selectOrder.on('select2:select', function(event){ + $modal.loadAjax(event, getFormData({ + 'credit-note-create[order_id]': event.params.data.id, + 'credit-note-create[action]': 'refresh' + })); + }); + + $selectCustomer.on('select2:select', function(event){ + $modal.loadAjax(event, getFormData({ + 'credit-note-create[customer_id]': event.params.data.id, + 'credit-note-create[action]': 'refresh' + })); + }); + + $selectStatus.on('select2:select', function(event){ + $modal.loadAjax(event, getFormData({ + 'credit-note-create[action]': 'refresh' + })); + }); + + $selectInvoiceAddress.on('select2:select', function(event){ + $modal.loadAjax(event, getFormData({ + 'credit-note-create[action]': 'refresh' + })); + }); + + $selectType.on('select2:select', function(event){ + $modal.loadAjax(event, getFormData({ + 'credit-note-create[action]': 'refresh' + })); + }); + + $form.on('change', '.js-field-currency', function(event){ + $modal.loadAjax(event, getFormData({ + 'credit-note-create[action]': 'refresh' + })); + }); + + $form.on('change', '.js-order-product-quantity', function(event){ + $modal.loadAjax(event, getFormData({ + 'credit-note-create[action]': 'refresh' + })); + }); + + $form.on('keyup change', '.js-action-refresh', function(event){ + if ($(this).val().length) { + refreshWithTimer($form, event); + } + }); + + /*******************************************/ + /*********** Table Free Amount *************/ + /*******************************************/ + var $tableFreeAmount = $form.find('.js-table-free-amount'); + var templateFreeAmount = $('#template-credit-note-free-amount').html(); + + $tableFreeAmount.on('click', '.js-action-add', function(event){ + event.preventDefault(); + $(this).data('key', parseInt($(this).data('key')) + 1); + + var templateFreeAmountWithKey = templateFreeAmount.replace(/\[\]/g, '[' + $(this).data('key') + ']'); + $tableFreeAmount.find('tbody').append(templateFreeAmountWithKey); + + if ($tableFreeAmount.find('tbody tr').not('.js-no-free-amount').length) { + $tableFreeAmount.find('.js-no-free-amount').addClass('hidden'); + } else { + $tableFreeAmount.find('.js-no-free-amount').removeClass('hidden'); + } + }); + + $tableFreeAmount.on('click', '.js-action-delete', function(event){ + event.preventDefault(); + $(this).parents('tr').remove(); + + if ($tableFreeAmount.find('tbody tr').not('.js-no-free-amount').length) { + $tableFreeAmount.find('.js-no-free-amount').addClass('hidden'); + } else { + $tableFreeAmount.find('.js-no-free-amount').removeClass('hidden'); + } + + $modal.loadAjax(event, getFormData({ + 'credit-note-create[action]': 'refresh' + })); + }); + + $tableFreeAmount.on('change', '.js-field-tax-rule', function(event){ + $(this).parents('tr').find('.js-field-amount-without-tax').trigger('keyup'); + }); + + var currentRequestFreeAmount; + $tableFreeAmount.on('keyup', '.js-field-amount-without-tax, .js-field-amount-with-tax', function(event){ + if (currentRequestFreeAmount) currentRequestFreeAmount.abort(); + + var $th = $(this), $thr = $th.parents('tr'); + + currentRequestFreeAmount = $.ajax({ + url: $(this).data('url'), + dataType: 'json', + data: { + price: parseFloat($(this).val()), + tax_rule: parseInt($thr.find('.js-field-tax-rule').val()) + } + }); + + // ajax success + currentRequestFreeAmount.done(function(data){ + if ($th.hasClass('js-field-amount-without-tax')) { + $thr.find('.js-field-amount-with-tax').val(data.result); + } else { + $thr.find('.js-field-amount-without-tax').val(data.result); + } + + refreshWithTimer(event); + }); + + // ajax error + currentRequestFreeAmount.fail(function(jqXHR, textStatus){ + if (jqXHR.statusText === 'abort') return; + $modal.displayError(jqXHR, textStatus); + }); + }); + + var timer = null; + function refreshWithTimer(event) { + if (timer !== null) { + clearTimeout(timer); + timer = null; + } + timer = setTimeout(function(){ + $modal.loadAjax(event, getFormData({ + 'credit-note-create[action]': 'refresh' + })); + }, 700); + } + + /*******************************************/ + /********* End Table Free Amount ***********/ + /*******************************************/ + }; +})( + jQuery +);