w/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:00.024775 2025] [php7:notice] [pid 2885031] [client 136.143.177.61:58654] PHP Warning: fopen(./LogosArochi/MAR-130915.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:00.024784 2025] [php7:notice] [pid 2885031] [client 136.143.177.61:58654] PHP Stack trace: [Tue Jul 22 08:16:00.024789 2025] [php7:notice] [pid 2885031] [client 136.143.177.61:58654] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.024793 2025] [php7:notice] [pid 2885031] [client 136.143.177.61:58654] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:00.024799 2025] [php7:notice] [pid 2885031] [client 136.143.177.61:58654] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:00.024813 2025] [php7:notice] [pid 2885031] [client 136.143.177.61:58654] PHP Stack trace: [Tue Jul 22 08:16:00.024816 2025] [php7:notice] [pid 2885031] [client 136.143.177.61:58654] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.024820 2025] [php7:notice] [pid 2885031] [client 136.143.177.61:58654] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:00.024825 2025] [php7:notice] [pid 2885031] [client 136.143.177.61:58654] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:00.024828 2025] [php7:notice] [pid 2885031] [client 136.143.177.61:58654] PHP Stack trace: [Tue Jul 22 08:16:00.024832 2025] [php7:notice] [pid 2885031] [client 136.143.177.61:58654] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.024835 2025] [php7:notice] [pid 2885031] [client 136.143.177.61:58654] PHP 2. fclose() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:00.024846 2025] [php7:notice] [pid 2890695] [client 136.143.176.44:55330] PHP Warning: fopen(./LogosArochi/MAR-130925.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:00.024857 2025] [php7:notice] [pid 2890695] [client 136.143.176.44:55330] PHP Stack trace: [Tue Jul 22 08:16:00.024862 2025] [php7:notice] [pid 2890695] [client 136.143.176.44:55330] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.024866 2025] [php7:notice] [pid 2890695] [client 136.143.176.44:55330] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:00.024872 2025] [php7:notice] [pid 2890695] [client 136.143.176.44:55330] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:00.024875 2025] [php7:notice] [pid 2890695] [client 136.143.176.44:55330] PHP Stack trace: [Tue Jul 22 08:16:00.024879 2025] [php7:notice] [pid 2890695] [client 136.143.176.44:55330] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.024883 2025] [php7:notice] [pid 2890695] [client 136.143.176.44:55330] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:00.024888 2025] [php7:notice] [pid 2890695] [client 136.143.176.44:55330] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:00.024891 2025] [php7:notice] [pid 2890695] [client 136.143.176.44:55330] PHP Stack trace: [Tue Jul 22 08:16:00.024894 2025] [php7:notice] [pid 2890695] [client 136.143.176.44:55330] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.024898 2025] [php7:notice] [pid 2890695] [client 136.143.176.44:55330] PHP 2. fclose() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:00.024899 2025] [php7:notice] [pid 2885037] [client 136.143.176.60:32878] PHP Warning: fopen(./LogosArochi/MAR-130923.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:00.024906 2025] [php7:notice] [pid 2885037] [client 136.143.176.60:32878] PHP Stack trace: [Tue Jul 22 08:16:00.024911 2025] [php7:notice] [pid 2885037] [client 136.143.176.60:32878] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.024915 2025] [php7:notice] [pid 2885037] [client 136.143.176.60:32878] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:00.024921 2025] [php7:notice] [pid 2885037] [client 136.143.176.60:32878] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:00.024928 2025] [php7:notice] [pid 2885037] [client 136.143.176.60:32878] PHP Stack trace: [Tue Jul 22 08:16:00.024934 2025] [php7:notice] [pid 2885037] [client 136.143.176.60:32878] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.024937 2025] [php7:notice] [pid 2885037] [client 136.143.176.60:32878] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:00.024942 2025] [php7:notice] [pid 2885037] [client 136.143.176.60:32878] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:00.024945 2025] [php7:notice] [pid 2885037] [client 136.143.176.60:32878] PHP Stack trace: [Tue Jul 22 08:16:00.024958 2025] [php7:notice] [pid 2885037] [client 136.143.176.60:32878] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.024962 2025] [php7:notice] [pid 2885037] [client 136.143.176.60:32878] PHP 2. fclose() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:00.024986 2025] [php7:notice] [pid 2890624] [client 136.143.177.44:52298] PHP Warning: fopen(./LogosArochi/MAR-130925.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:00.024994 2025] [php7:notice] [pid 2890624] [client 136.143.177.44:52298] PHP Stack trace: [Tue Jul 22 08:16:00.024999 2025] [php7:notice] [pid 2890624] [client 136.143.177.44:52298] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025002 2025] [php7:notice] [pid 2890624] [client 136.143.177.44:52298] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:00.025009 2025] [php7:notice] [pid 2890624] [client 136.143.177.44:52298] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:00.025012 2025] [php7:notice] [pid 2890624] [client 136.143.177.44:52298] PHP Stack trace: [Tue Jul 22 08:16:00.025016 2025] [php7:notice] [pid 2890624] [client 136.143.177.44:52298] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025019 2025] [php7:notice] [pid 2890624] [client 136.143.177.44:52298] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:00.025024 2025] [php7:notice] [pid 2890624] [client 136.143.177.44:52298] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:00.025027 2025] [php7:notice] [pid 2890624] [client 136.143.177.44:52298] PHP Stack trace: [Tue Jul 22 08:16:00.025030 2025] [php7:notice] [pid 2890624] [client 136.143.177.44:52298] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025022 2025] [php7:notice] [pid 2891149] [client 136.143.177.43:56798] PHP Warning: fopen(./LogosArochi/MAR-130925.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:00.025037 2025] [php7:notice] [pid 2890624] [client 136.143.177.44:52298] PHP 2. fclose() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:00.025039 2025] [php7:notice] [pid 2891149] [client 136.143.177.43:56798] PHP Stack trace: [Tue Jul 22 08:16:00.025044 2025] [php7:notice] [pid 2891149] [client 136.143.177.43:56798] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025047 2025] [php7:notice] [pid 2891149] [client 136.143.177.43:56798] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:00.025044 2025] [php7:notice] [pid 2887211] [client 136.143.177.62:38746] PHP Warning: fopen(./LogosArochi/MAR-130925.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:00.025053 2025] [php7:notice] [pid 2887211] [client 136.143.177.62:38746] PHP Stack trace: [Tue Jul 22 08:16:00.025053 2025] [php7:notice] [pid 2891149] [client 136.143.177.43:56798] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:00.025057 2025] [php7:notice] [pid 2891149] [client 136.143.177.43:56798] PHP Stack trace: [Tue Jul 22 08:16:00.025057 2025] [php7:notice] [pid 2887211] [client 136.143.177.62:38746] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025061 2025] [php7:notice] [pid 2891149] [client 136.143.177.43:56798] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025062 2025] [php7:notice] [pid 2887211] [client 136.143.177.62:38746] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:00.025064 2025] [php7:notice] [pid 2891149] [client 136.143.177.43:56798] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:00.025069 2025] [php7:notice] [pid 2887211] [client 136.143.177.62:38746] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:00.025069 2025] [php7:notice] [pid 2891149] [client 136.143.177.43:56798] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:00.025073 2025] [php7:notice] [pid 2887211] [client 136.143.177.62:38746] PHP Stack trace: [Tue Jul 22 08:16:00.025074 2025] [php7:notice] [pid 2891149] [client 136.143.177.43:56798] PHP Stack trace: [Tue Jul 22 08:16:00.025076 2025] [php7:notice] [pid 2887211] [client 136.143.177.62:38746] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025077 2025] [php7:notice] [pid 2891149] [client 136.143.177.43:56798] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025080 2025] [php7:notice] [pid 2887211] [client 136.143.177.62:38746] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:00.025082 2025] [php7:notice] [pid 2891149] [client 136.143.177.43:56798] PHP 2. fclose() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:00.025086 2025] [php7:notice] [pid 2887211] [client 136.143.177.62:38746] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:00.025089 2025] [php7:notice] [pid 2887211] [client 136.143.177.62:38746] PHP Stack trace: [Tue Jul 22 08:16:00.025093 2025] [php7:notice] [pid 2887211] [client 136.143.177.62:38746] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025108 2025] [php7:notice] [pid 2887211] [client 136.143.177.62:38746] PHP 2. fclose() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:00.025108 2025] [php7:notice] [pid 2885036] [client 136.143.177.62:60644] PHP Warning: fopen(./LogosArochi/MAR-130914.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:00.025116 2025] [php7:notice] [pid 2885036] [client 136.143.177.62:60644] PHP Stack trace: [Tue Jul 22 08:16:00.025120 2025] [php7:notice] [pid 2885036] [client 136.143.177.62:60644] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025124 2025] [php7:notice] [pid 2885036] [client 136.143.177.62:60644] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:00.025130 2025] [php7:notice] [pid 2885036] [client 136.143.177.62:60644] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:00.025133 2025] [php7:notice] [pid 2885036] [client 136.143.177.62:60644] PHP Stack trace: [Tue Jul 22 08:16:00.025136 2025] [php7:notice] [pid 2885036] [client 136.143.177.62:60644] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025140 2025] [php7:notice] [pid 2885036] [client 136.143.177.62:60644] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:00.025145 2025] [php7:notice] [pid 2885036] [client 136.143.177.62:60644] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:00.025148 2025] [php7:notice] [pid 2885036] [client 136.143.177.62:60644] PHP Stack trace: [Tue Jul 22 08:16:00.025151 2025] [php7:notice] [pid 2885036] [client 136.143.177.62:60644] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025154 2025] [php7:notice] [pid 2885036] [client 136.143.177.62:60644] PHP 2. fclose() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:00.025152 2025] [php7:notice] [pid 2890108] [client 136.143.176.60:44114] PHP Warning: fopen(./LogosArochi/MAR-130925.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:00.025198 2025] [php7:notice] [pid 2891128] [client 136.143.177.43:48100] PHP Warning: fopen(./LogosArochi/MAR-130925.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:00.025207 2025] [php7:notice] [pid 2891128] [client 136.143.177.43:48100] PHP Stack trace: [Tue Jul 22 08:16:00.025212 2025] [php7:notice] [pid 2891128] [client 136.143.177.43:48100] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025216 2025] [php7:notice] [pid 2891128] [client 136.143.177.43:48100] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:00.025222 2025] [php7:notice] [pid 2891128] [client 136.143.177.43:48100] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:00.025225 2025] [php7:notice] [pid 2891128] [client 136.143.177.43:48100] PHP Stack trace: [Tue Jul 22 08:16:00.025230 2025] [php7:notice] [pid 2891128] [client 136.143.177.43:48100] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025236 2025] [php7:notice] [pid 2891128] [client 136.143.177.43:48100] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:00.025244 2025] [php7:notice] [pid 2891128] [client 136.143.177.43:48100] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:00.025253 2025] [php7:notice] [pid 2891128] [client 136.143.177.43:48100] PHP Stack trace: [Tue Jul 22 08:16:00.025250 2025] [php7:notice] [pid 2889415] [client 136.143.177.61:53128] PHP Warning: fopen(./LogosArochi/MAR-130925.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:00.025257 2025] [php7:notice] [pid 2891128] [client 136.143.177.43:48100] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025258 2025] [php7:notice] [pid 2889415] [client 136.143.177.61:53128] PHP Stack trace: [Tue Jul 22 08:16:00.025261 2025] [php7:notice] [pid 2891128] [client 136.143.177.43:48100] PHP 2. fclose() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:00.025263 2025] [php7:notice] [pid 2889415] [client 136.143.177.61:53128] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025267 2025] [php7:notice] [pid 2889415] [client 136.143.177.61:53128] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:00.025273 2025] [php7:notice] [pid 2889415] [client 136.143.177.61:53128] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:00.025276 2025] [php7:notice] [pid 2889415] [client 136.143.177.61:53128] PHP Stack trace: [Tue Jul 22 08:16:00.025280 2025] [php7:notice] [pid 2889415] [client 136.143.177.61:53128] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025283 2025] [php7:notice] [pid 2889415] [client 136.143.177.61:53128] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:00.025289 2025] [php7:notice] [pid 2889415] [client 136.143.177.61:53128] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:00.025292 2025] [php7:notice] [pid 2889415] [client 136.143.177.61:53128] PHP Stack trace: [Tue Jul 22 08:16:00.025295 2025] [php7:notice] [pid 2889415] [client 136.143.177.61:53128] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025291 2025] [php7:notice] [pid 2890618] [client 136.143.177.43:44662] PHP Warning: fopen(./LogosArochi/MAR-130925.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:00.025298 2025] [php7:notice] [pid 2889415] [client 136.143.177.61:53128] PHP 2. fclose() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:00.025302 2025] [php7:notice] [pid 2890618] [client 136.143.177.43:44662] PHP Stack trace: [Tue Jul 22 08:16:00.025307 2025] [php7:notice] [pid 2890618] [client 136.143.177.43:44662] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025310 2025] [php7:notice] [pid 2890618] [client 136.143.177.43:44662] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:00.025174 2025] [php7:notice] [pid 2890108] [client 136.143.176.60:44114] PHP Stack trace: [Tue Jul 22 08:16:00.025317 2025] [php7:notice] [pid 2890108] [client 136.143.176.60:44114] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025317 2025] [php7:notice] [pid 2890618] [client 136.143.177.43:44662] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:00.025321 2025] [php7:notice] [pid 2890108] [client 136.143.176.60:44114] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:00.025321 2025] [php7:notice] [pid 2890618] [client 136.143.177.43:44662] PHP Stack trace: [Tue Jul 22 08:16:00.025331 2025] [php7:notice] [pid 2890618] [client 136.143.177.43:44662] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025332 2025] [php7:notice] [pid 2890108] [client 136.143.176.60:44114] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:00.025334 2025] [php7:notice] [pid 2890618] [client 136.143.177.43:44662] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:00.025336 2025] [php7:notice] [pid 2890108] [client 136.143.176.60:44114] PHP Stack trace: [Tue Jul 22 08:16:00.025340 2025] [php7:notice] [pid 2890108] [client 136.143.176.60:44114] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025340 2025] [php7:notice] [pid 2890618] [client 136.143.177.43:44662] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:00.025344 2025] [php7:notice] [pid 2890108] [client 136.143.176.60:44114] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:00.025345 2025] [php7:notice] [pid 2890618] [client 136.143.177.43:44662] PHP Stack trace: [Tue Jul 22 08:16:00.025349 2025] [php7:notice] [pid 2890618] [client 136.143.177.43:44662] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025349 2025] [php7:notice] [pid 2890108] [client 136.143.176.60:44114] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:00.025353 2025] [php7:notice] [pid 2890618] [client 136.143.177.43:44662] PHP 2. fclose() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:00.025353 2025] [php7:notice] [pid 2890108] [client 136.143.176.60:44114] PHP Stack trace: [Tue Jul 22 08:16:00.025358 2025] [php7:notice] [pid 2890108] [client 136.143.176.60:44114] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025354 2025] [php7:notice] [pid 2890659] [client 136.143.176.44:40186] PHP Warning: fopen(./LogosArochi/MAR-130925.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:00.025362 2025] [php7:notice] [pid 2890108] [client 136.143.176.60:44114] PHP 2. fclose() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:00.025363 2025] [php7:notice] [pid 2890659] [client 136.143.176.44:40186] PHP Stack trace: [Tue Jul 22 08:16:00.025368 2025] [php7:notice] [pid 2890659] [client 136.143.176.44:40186] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025372 2025] [php7:notice] [pid 2890659] [client 136.143.176.44:40186] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:00.025378 2025] [php7:notice] [pid 2890659] [client 136.143.176.44:40186] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:00.025375 2025] [php7:notice] [pid 2890380] [client 136.143.177.43:49112] PHP Warning: fopen(./LogosArochi/MAR-130925.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:00.025381 2025] [php7:notice] [pid 2890659] [client 136.143.176.44:40186] PHP Stack trace: [Tue Jul 22 08:16:00.025383 2025] [php7:notice] [pid 2890380] [client 136.143.177.43:49112] PHP Stack trace: [Tue Jul 22 08:16:00.025385 2025] [php7:notice] [pid 2890659] [client 136.143.176.44:40186] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025388 2025] [php7:notice] [pid 2890380] [client 136.143.177.43:49112] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025392 2025] [php7:notice] [pid 2890659] [client 136.143.176.44:40186] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:00.025394 2025] [php7:notice] [pid 2890380] [client 136.143.177.43:49112] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:00.025398 2025] [php7:notice] [pid 2890659] [client 136.143.176.44:40186] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:00.025400 2025] [php7:notice] [pid 2890380] [client 136.143.177.43:49112] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:00.025401 2025] [php7:notice] [pid 2890659] [client 136.143.176.44:40186] PHP Stack trace: [Tue Jul 22 08:16:00.025403 2025] [php7:notice] [pid 2890380] [client 136.143.177.43:49112] PHP Stack trace: [Tue Jul 22 08:16:00.025405 2025] [php7:notice] [pid 2890659] [client 136.143.176.44:40186] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025407 2025] [php7:notice] [pid 2890380] [client 136.143.177.43:49112] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025409 2025] [php7:notice] [pid 2890659] [client 136.143.176.44:40186] PHP 2. fclose() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:00.025411 2025] [php7:notice] [pid 2890380] [client 136.143.177.43:49112] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:00.025416 2025] [php7:notice] [pid 2890380] [client 136.143.177.43:49112] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:00.025419 2025] [php7:notice] [pid 2890380] [client 136.143.177.43:49112] PHP Stack trace: [Tue Jul 22 08:16:00.025422 2025] [php7:notice] [pid 2890380] [client 136.143.177.43:49112] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025425 2025] [php7:notice] [pid 2890380] [client 136.143.177.43:49112] PHP 2. fclose() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:00.025424 2025] [php7:notice] [pid 2885032] [client 136.143.176.60:50598] PHP Warning: fopen(./LogosArochi/MAR-130917.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:00.025427 2025] [php7:notice] [pid 2888105] [client 136.143.177.61:41580] PHP Warning: fopen(./LogosArochi/MAR-130925.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:00.025431 2025] [php7:notice] [pid 2885032] [client 136.143.176.60:50598] PHP Stack trace: [Tue Jul 22 08:16:00.025434 2025] [php7:notice] [pid 2888105] [client 136.143.177.61:41580] PHP Stack trace: [Tue Jul 22 08:16:00.025437 2025] [php7:notice] [pid 2885032] [client 136.143.176.60:50598] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025441 2025] [php7:notice] [pid 2885032] [client 136.143.176.60:50598] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:00.025459 2025] [php7:notice] [pid 2885032] [client 136.143.176.60:50598] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:00.025462 2025] [php7:notice] [pid 2885032] [client 136.143.176.60:50598] PHP Stack trace: [Tue Jul 22 08:16:00.025466 2025] [php7:notice] [pid 2885032] [client 136.143.176.60:50598] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025472 2025] [php7:notice] [pid 2885032] [client 136.143.176.60:50598] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:00.025477 2025] [php7:notice] [pid 2885032] [client 136.143.176.60:50598] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:00.025480 2025] [php7:notice] [pid 2885032] [client 136.143.176.60:50598] PHP Stack trace: [Tue Jul 22 08:16:00.025483 2025] [php7:notice] [pid 2885032] [client 136.143.176.60:50598] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025486 2025] [php7:notice] [pid 2885032] [client 136.143.176.60:50598] PHP 2. fclose() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:00.025617 2025] [php7:notice] [pid 2885034] [client 136.143.177.61:58506] PHP Warning: fopen(./LogosArochi/MAR-130913.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:00.025625 2025] [php7:notice] [pid 2885034] [client 136.143.177.61:58506] PHP Stack trace: [Tue Jul 22 08:16:00.025629 2025] [php7:notice] [pid 2885034] [client 136.143.177.61:58506] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025632 2025] [php7:notice] [pid 2885034] [client 136.143.177.61:58506] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:00.025638 2025] [php7:notice] [pid 2885034] [client 136.143.177.61:58506] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:00.025641 2025] [php7:notice] [pid 2885034] [client 136.143.177.61:58506] PHP Stack trace: [Tue Jul 22 08:16:00.025644 2025] [php7:notice] [pid 2885034] [client 136.143.177.61:58506] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025648 2025] [php7:notice] [pid 2885034] [client 136.143.177.61:58506] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:00.025652 2025] [php7:notice] [pid 2885034] [client 136.143.177.61:58506] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:00.025655 2025] [php7:notice] [pid 2885034] [client 136.143.177.61:58506] PHP Stack trace: [Tue Jul 22 08:16:00.025658 2025] [php7:notice] [pid 2885034] [client 136.143.177.61:58506] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025661 2025] [php7:notice] [pid 2885034] [client 136.143.177.61:58506] PHP 2. fclose() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:00.025440 2025] [php7:notice] [pid 2888105] [client 136.143.177.61:41580] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025899 2025] [php7:notice] [pid 2888105] [client 136.143.177.61:41580] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:00.025906 2025] [php7:notice] [pid 2888105] [client 136.143.177.61:41580] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:00.025909 2025] [php7:notice] [pid 2888105] [client 136.143.177.61:41580] PHP Stack trace: [Tue Jul 22 08:16:00.025912 2025] [php7:notice] [pid 2888105] [client 136.143.177.61:41580] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025916 2025] [php7:notice] [pid 2888105] [client 136.143.177.61:41580] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:00.025926 2025] [php7:notice] [pid 2888105] [client 136.143.177.61:41580] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:00.025929 2025] [php7:notice] [pid 2888105] [client 136.143.177.61:41580] PHP Stack trace: [Tue Jul 22 08:16:00.025932 2025] [php7:notice] [pid 2888105] [client 136.143.177.61:41580] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.025935 2025] [php7:notice] [pid 2888105] [client 136.143.177.61:41580] PHP 2. fclose() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:00.026121 2025] [php7:notice] [pid 2890694] [client 136.143.177.44:52780] PHP Warning: fopen(./LogosArochi/MAR-130925.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:00.026130 2025] [php7:notice] [pid 2890694] [client 136.143.177.44:52780] PHP Stack trace: [Tue Jul 22 08:16:00.026135 2025] [php7:notice] [pid 2890694] [client 136.143.177.44:52780] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.026138 2025] [php7:notice] [pid 2890694] [client 136.143.177.44:52780] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:00.026144 2025] [php7:notice] [pid 2890694] [client 136.143.177.44:52780] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:00.026147 2025] [php7:notice] [pid 2890694] [client 136.143.177.44:52780] PHP Stack trace: [Tue Jul 22 08:16:00.026150 2025] [php7:notice] [pid 2890694] [client 136.143.177.44:52780] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.026154 2025] [php7:notice] [pid 2890694] [client 136.143.177.44:52780] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:00.026159 2025] [php7:notice] [pid 2890694] [client 136.143.177.44:52780] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:00.026162 2025] [php7:notice] [pid 2890694] [client 136.143.177.44:52780] PHP Stack trace: [Tue Jul 22 08:16:00.026165 2025] [php7:notice] [pid 2890694] [client 136.143.177.44:52780] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:00.026168 2025] [php7:notice] [pid 2890694] [client 136.143.177.44:52780] PHP 2. fclose() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:02.024560 2025] [php7:notice] [pid 2887282] [client 136.143.176.60:50878] PHP Warning: fopen(./LogosArochi/MAR-130925.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:02.024600 2025] [php7:notice] [pid 2887282] [client 136.143.176.60:50878] PHP Stack trace: [Tue Jul 22 08:16:02.024608 2025] [php7:notice] [pid 2887282] [client 136.143.176.60:50878] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:02.024612 2025] [php7:notice] [pid 2887282] [client 136.143.176.60:50878] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:02.024623 2025] [php7:notice] [pid 2887282] [client 136.143.176.60:50878] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:02.024632 2025] [php7:notice] [pid 2887282] [client 136.143.176.60:50878] PHP Stack trace: [Tue Jul 22 08:16:02.024636 2025] [php7:notice] [pid 2887282] [client 136.143.176.60:50878] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:02.024640 2025] [php7:notice] [pid 2887282] [client 136.143.176.60:50878] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:02.024660 2025] [php7:notice] [pid 2887282] [client 136.143.176.60:50878] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:02.024663 2025] [php7:notice] [pid 2887282] [client 136.143.176.60:50878] PHP Stack trace: [Tue Jul 22 08:16:02.024667 2025] [php7:notice] [pid 2887282] [client 136.143.176.60:50878] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:02.024659 2025] [php7:notice] [pid 2889414] [client 136.143.177.44:58210] PHP Warning: fopen(./LogosArochi/MAR-130925.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:02.024670 2025] [php7:notice] [pid 2887282] [client 136.143.176.60:50878] PHP 2. fclose() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:02.024676 2025] [php7:notice] [pid 2889414] [client 136.143.177.44:58210] PHP Stack trace: [Tue Jul 22 08:16:02.024684 2025] [php7:notice] [pid 2889414] [client 136.143.177.44:58210] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:02.024688 2025] [php7:notice] [pid 2889414] [client 136.143.177.44:58210] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:02.024708 2025] [php7:notice] [pid 2889414] [client 136.143.177.44:58210] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:02.024711 2025] [php7:notice] [pid 2889414] [client 136.143.177.44:58210] PHP Stack trace: [Tue Jul 22 08:16:02.024703 2025] [php7:notice] [pid 2885380] [client 136.143.177.61:54892] PHP Warning: fopen(./LogosArochi/MAR-130916.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:02.024715 2025] [php7:notice] [pid 2889414] [client 136.143.177.44:58210] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:02.024720 2025] [php7:notice] [pid 2885380] [client 136.143.177.61:54892] PHP Stack trace: [Tue Jul 22 08:16:02.024722 2025] [php7:notice] [pid 2889414] [client 136.143.177.44:58210] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:02.024726 2025] [php7:notice] [pid 2885380] [client 136.143.177.61:54892] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:02.024728 2025] [php7:notice] [pid 2889414] [client 136.143.177.44:58210] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:02.024730 2025] [php7:notice] [pid 2885380] [client 136.143.177.61:54892] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:02.024731 2025] [php7:notice] [pid 2889414] [client 136.143.177.44:58210] PHP Stack trace: [Tue Jul 22 08:16:02.024735 2025] [php7:notice] [pid 2889414] [client 136.143.177.44:58210] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:02.024739 2025] [php7:notice] [pid 2889414] [client 136.143.177.44:58210] PHP 2. fclose() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:02.024739 2025] [php7:notice] [pid 2885380] [client 136.143.177.61:54892] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:02.024743 2025] [php7:notice] [pid 2885380] [client 136.143.177.61:54892] PHP Stack trace: [Tue Jul 22 08:16:02.024747 2025] [php7:notice] [pid 2885380] [client 136.143.177.61:54892] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:02.024750 2025] [php7:notice] [pid 2885380] [client 136.143.177.61:54892] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:02.024765 2025] [php7:notice] [pid 2885380] [client 136.143.177.61:54892] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:02.024768 2025] [php7:notice] [pid 2885380] [client 136.143.177.61:54892] PHP Stack trace: [Tue Jul 22 08:16:02.024771 2025] [php7:notice] [pid 2885380] [client 136.143.177.61:54892] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:02.024774 2025] [php7:notice] [pid 2885380] [client 136.143.177.61:54892] PHP 2. fclose() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:190 [Tue Jul 22 08:16:02.024786 2025] [php7:notice] [pid 2885033] [client 136.143.177.61:57162] PHP Warning: fopen(./LogosArochi/MAR-130918.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:02.024795 2025] [php7:notice] [pid 2885033] [client 136.143.177.61:57162] PHP Stack trace: [Tue Jul 22 08:16:02.024793 2025] [php7:notice] [pid 2890719] [client 136.143.176.44:53764] PHP Warning: fopen(./LogosArochi/MAR-130925.png): failed to open stream: Permission denied in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 188 [Tue Jul 22 08:16:02.024800 2025] [php7:notice] [pid 2885033] [client 136.143.177.61:57162] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:02.024801 2025] [php7:notice] [pid 2890719] [client 136.143.176.44:53764] PHP Stack trace: [Tue Jul 22 08:16:02.024804 2025] [php7:notice] [pid 2885033] [client 136.143.177.61:57162] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:02.024807 2025] [php7:notice] [pid 2890719] [client 136.143.176.44:53764] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:02.024812 2025] [php7:notice] [pid 2890719] [client 136.143.176.44:53764] PHP 2. fopen() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:188 [Tue Jul 22 08:16:02.024814 2025] [php7:notice] [pid 2885033] [client 136.143.177.61:57162] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:02.024818 2025] [php7:notice] [pid 2890719] [client 136.143.176.44:53764] PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 189 [Tue Jul 22 08:16:02.024821 2025] [php7:notice] [pid 2890719] [client 136.143.176.44:53764] PHP Stack trace: [Tue Jul 22 08:16:02.024820 2025] [php7:notice] [pid 2885033] [client 136.143.177.61:57162] PHP Stack trace: [Tue Jul 22 08:16:02.024825 2025] [php7:notice] [pid 2890719] [client 136.143.176.44:53764] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:02.024826 2025] [php7:notice] [pid 2885033] [client 136.143.177.61:57162] PHP 1. {main}() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:0 [Tue Jul 22 08:16:02.024828 2025] [php7:notice] [pid 2890719] [client 136.143.176.44:53764] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:02.024830 2025] [php7:notice] [pid 2885033] [client 136.143.177.61:57162] PHP 2. fwrite() /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php:189 [Tue Jul 22 08:16:02.024834 2025] [php7:notice] [pid 2890719] [client 136.143.176.44:53764] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/wsImageSave_v3.php on line 190 [Tue Jul 22 08:16:02.024835 2025] [php7:notice] [pid 2885033] [client 136.143.177.61:57162] PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/imagenesAptusLegal/arochi/w "310", "message" => "ERROR - [wsPreBillZB_Moderno_Arochi] Parametros incompletos para el Servicio Web, falta el ID de la Orden de Cobro"); $Resultado = json_encode($j_array); echo $Resultado; return; } if($app_name_ZC == "") { $j_array = array('code' => "320", "message" => "ERROR - [wsPreBillZB_Moderno_Arochi] Parametros incompletos para el Servicio Web, falta el Nombre de la Aplicación"); $Resultado = json_encode($j_array); echo $Resultado; return; } // if($authtoken_ZC == "") // { // $j_array = array('code' => "330", "message" => "ERROR - [wsPreBillZB_Moderno_Arochi] Parametros incompletos para el Servicio Web, falta el Código de Autorización"); // $Resultado = json_encode($j_array); // echo $Resultado; // return; // } if($bDatPac == "") { $j_array = array('code' => "310", "message" => "ERROR - [wsPreBillZB_Moderno_Arochi] Faltan los parametros de conexión OAuth"); $Resultado = json_encode($j_array); echo $Resultado; return; } $bDatPac = base64_decode($bDatPac); $aDatPac = json_decode($bDatPac, true); $RefreshToken = $aDatPac["C_OAuth_refresh_token"]; $ClientId = $aDatPac["C_OAuth_client_id"]; $ClientSecret = $aDatPac["C_OAuth_client_secret"]; $RedirectUri = $aDatPac["C_OAuth_redirect_uri"]; $GrantType = $aDatPac["C_OAuth_grant_type"]; $AuthUrl = "https://accounts.zoho.com/oauth/v2/token"; #JFA: Obtenemos el access token de Zoho Creator // $Params = array( // "refresh_token" => $RefreshToken, // "client_id" => $ClientId, // "client_secret" => $ClientSecret, // "redirect_uri" => $RedirectUri, // "grant_type" => $GrantType // ); // $curl = curl_init(); // curl_setopt($curl, CURLOPT_URL, $AuthUrl); // curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST'); // curl_setopt($curl, CURLOPT_POSTFIELDS, $Params); // curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); // curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); // $response = curl_exec($curl); // $array = json_decode($response); // $coa_access_token = $array->access_token; //$coa_access_token = oauth('arochiylindner.aptus', 'ZCreator', $RefreshToken, $ClientId, $ClientSecret, $RedirectUri, $GrantType, $AuthUrl); //echo $app_name_ZC; $oaut_token = OAuthV2::getToken($app_name_ZC); $coa_access_token = $oaut_token->token; echo $coa_access_token; #== Conexión a Zoho Creator para obtener el registro de la Orden de Cobro //$request_url = 'https://creator.zoho.com/api/json/'.$app_name_ZC.'/view/Prebills_Query?scope=creatorapi&raw=true&authtoken='.$authtoken_ZC.'&criteria=(ID='.$bRecId.')'; $request_url = 'https://creator.zoho.com/api/v2/arochiylindner.aptus/alate/report/Prebills_Query?criteria=(ID='.$bRecId.')'; // Checamos si es españa if($app_name_ZC == "alate-espana") { $request_url = 'https://creator.zoho.com/api/v2/arochiylindner.aptus/alate-espana/report/Prebills_Query?criteria=(ID='.$bRecId.')'; } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $request_url); // curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Zoho-oauthtoken ' . $coa_access_token)); $r = curl_exec($ch); # Usamos la funcion curl_errno() para atrapar cualquier error relacionado con la llamada. if (curl_errno($ch)) { $error_msg = curl_error($ch); } curl_close ($ch); if (isset($error_msg)) { $j_array = array('code' => '999', 'message' => "Error en la llamada curl " . $error_msg); $Resultado = json_encode($j_array); echo $Resultado; return; } else { $ra = json_decode($r); $code = (int)$ra->code; if ($code != 3000) { $j_array = array('code' => $ra->code, 'message' => "No se no se pudieron leer los datos de ATE, contacte al administrador. " . $ra->message . $ra->description); $Resultado = json_encode($j_array); echo $Resultado; return; } } $array = json_decode($r); $bdDatBill = $array->data; //print_r($bdDatBill); #== Datos de la Orden de Cobro $prebill_number = str_pad($bdDatBill[0]->Prebill_Number, 6, "0", STR_PAD_LEFT); $prebill_client = $bdDatBill[0]->Client->display_value; $prebill_date = $bdDatBill[0]->Prebill_Date; $prebill_IncDate = $bdDatBill[0]->Included_to; $prebill_currency = $bdDatBill[0]->Currency; $prebill_Fees = $bdDatBill[0]->Fees; $prebill_Disbur = $bdDatBill[0]->Disbursements; $prebill_Fixed = $bdDatBill[0]->Fixed_Fees; $prebill_FFeeDis = $bdDatBill[0]->F_Fees_Discount; $prebill_SubTot = $bdDatBill[0]->Subtotal_Import; $prebill_ImpIva = $bdDatBill[0]->VAT_Import; $prebill_Import = $bdDatBill[0]->Total_Import; $prebill_PorIva = $bdDatBill[0]->VAT; $prebill_Factur = $bdDatBill[0]->Billable_Hours; $prebill_NoFact = $bdDatBill[0]->NON_Billable_Hours; $prebill_Trabaj = $bdDatBill[0]->Worked_Hours; $prebill_NumClie = $bdDatBill[0]->Client_Number; $prebill_SupName = $bdDatBill[0]->Supervisor_Name; $prebill_SupMail = $bdDatBill[0]->Supervisor_Email; $prebill_FootOne = $bdDatBill[0]->Footer_One; $prebill_FootTwo = $bdDatBill[0]->Footer_Two; $prebill_RazSoci = $bdDatBill[0]->Razon_Social; $prebill_Notes = strip_tags($bdDatBill[0]->Notes); $prebill_TerCon = strip_tags($bdDatBill[0]->Terms_Conditions); $prebill_Ajustada = $bdDatBill[0]->Ajustada; $prebill_TipoMovi = $bdDatBill[0]->Tipo_Movto; $prebill_FeesAlia = $bdDatBill[0]->Fees_Alias; $prebill_FFeesAli = $bdDatBill[0]->Fixed_Fees_Alias; $prebill_AASubTot = $bdDatBill[0]->AA_Subtotal_Import; $prebill_AAVarImp = $bdDatBill[0]->AA_VAT_Import; $prebill_AATotImp = $bdDatBill[0]->AA_Total_Import; $prebill_InvoNumb = $bdDatBill[0]->invoice_number; $prebill_SubTot_FD = $bdDatBill[0]->FD_Subtotal_Import; $prebill_DisNoVat = $bdDatBill[0]->FD_Disb_Not_VAT; // Added by facc's on September 07, 2021. if($InvNumber != "") { $prebill_InvoNumb = $InvNumber; } if ($CurrentDate != "") { $prebill_date = $CurrentDate; } $prebill_BSTotPre = $bdDatBill[0]->BS_Tot_Presup; $prebill_BSTotCar = $bdDatBill[0]->BS_Tot_Cargos; $prebill_BSTotNot = $bdDatBill[0]->BS_Tot_ThisN; $prebill_BSTotDis = $bdDatBill[0]->BS_Tot_Dispon; $prebill_withBudget = $bdDatBill[0]->with_Budget; #== Resumenes para el reporte $prebill_SummPro = json_decode("[".$bdDatBill[0]->Project_Summary."]"); $prebill_SummTks = json_decode("[".$bdDatBill[0]->Timekeeper_Summary."]"); //print_r($prebill_SummTks); $prebill_SummCha = json_decode("[".$bdDatBill[0]->Charges_Summary."]"); $prebill_SummHFi = json_decode("[".$bdDatBill[0]->Fixed_Fees_Summary."]"); $prebill_SummBud = json_decode("[".$bdDatBill[0]->Budget_Summary."]"); $sMonTot = substr($prebill_currency,0,3); $sConducto = ""; foreach ( $bdDatBill[0] as $nombre => $hexa ) { if($nombre == "Client.Conducto") { $sConducto = $hexa; } } #== Conexión a Zoho Creator para obtener los registros de tiempos asociados a la Orden de Cobro //$request_url = 'https://creator.zoho.com/api/json/'.$app_name_ZC.'/view/For_Sincronize_Times?scope=creatorapi&raw=true&authtoken='.$authtoken_ZC.'&criteria=(Prebills='.$bRecId.')'; $request_url = 'https://creator.zoho.com/api/v2/arochiylindner.aptus/alate/report/For_Sincronize_Times?criteria=(Prebills='.$bRecId.')'; // Checamos si es españa if($app_name_ZC == "alate-espana") { $request_url = 'https://creator.zoho.com/api/v2/arochiylindner.aptus/alate-espana/report/For_Sincronize_Times?criteria=(Prebills='.$bRecId.')'; } //echo $request_url; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $request_url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Zoho-oauthtoken ' . $coa_access_token)); $r = curl_exec($ch); $array = json_decode($r); //print_r($array); $bdDatTime = $array->data; //print_r($bdDatTime); #== Conexión a Zoho Creator para obtener los registros de gastos asociados a la Orden de Cobro //$request_url = 'https://creator.zoho.com/api/json/'.$app_name_ZC.'/view/Disbursements_Query?scope=creatorapi&raw=true&authtoken='.$authtoken_ZC.'&criteria=(Prebills='.$bRecId.')'; // $request_url = 'https://creator.zoho.com/api/v2/arochiylindner.aptus/alate/report/Disbursements_Query?criteria=(Prebills='.$bRecId.')'; $request_url = "https://www.zohoapis.com/creator/v2.1/data/arochiylindner.aptus/alate/report/Disbursements_Query?criteria=(Prebills=$bRecId)"; // Checamos si es españa if($app_name_ZC == "alate-espana") { // $request_url = 'https://creator.zoho.com/api/v2/arochiylindner.aptus/alate-espana/report/Disbursements_Query?criteria=(Prebills='.$bRecId.')'; $request_url = "https://www.zohoapis.com/creator/v2.1/data/arochiylindner.aptus/alate-espana/report/Disbursements_Query?criteria=(Prebills=$bRecId)"; } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $request_url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Zoho-oauthtoken ' . $coa_access_token)); $r = curl_exec($ch); $array = json_decode($r); $bdDatDisb = $array->data; #== Conexión a Zoho Creator para obtener los registros de honorarios fijos asociados a la Orden de Cobro //$request_url = 'https://creator.zoho.com/api/json/'.$app_name_ZC.'/view/Fixed_Fees_Query?scope=creatorapi&raw=true&authtoken='.$authtoken_ZC.'&criteria=(Prebills='.$bRecId.')'; $request_url = 'https://creator.zoho.com/api/v2/arochiylindner.aptus/alate/report/Fixed_Fees_Query?criteria=(Prebills='.$bRecId.')'; // Checamos si es españa if($app_name_ZC == "alate-espana") { $request_url = 'https://creator.zoho.com/api/v2/arochiylindner.aptus/alate-espana/report/Fixed_Fees_Query?criteria=(Prebills='.$bRecId.')'; } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $request_url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Zoho-oauthtoken ' . $coa_access_token)); $r = curl_exec($ch); $array = json_decode($r); $bdDatHonF = $array->data; //print_r($bdDatHonF); $SendaArchsGraf = "archs_graf/"; $SendaArchsCFDI = "archs_cfdi/"; //$NomArchPDF = "OC".$prebill_number.".PDF"; $NomArchPDF = $prebill_InvoNumb."_DETALLE_DETAIL.pdf"; #============================================================================================================ #== DEFINIMOS LAS CONSTANTES PARA LAS ETIQUETAS DEL REPORTE #============================================================================================================ $lblOrdCob = "DETALLE DE SERVICIOS"; $lblNumero = "Número"; $lblFecha = "Fecha"; $lblClient = "Cliente"; $lblResPro = "RESUMEN POR PROYECTO"; $lblNombre = "Nombre"; $lblHoras = "Horas"; $lblHonora = "Honorarios"; $lblHONORA = "HONORARIOS"; $lblCargos = "Gastos"; $lblTotale = "T O T A L E S"; $lblResAbo = "RESUMEN POR ABOGADO"; $lblAbogad = "Abogado"; $lblCatego = "Categoría"; $lblResCar = "RESUMEN POR TIPO DE CARGO"; $lblDescri = "Descripción"; $lblImport = "Importe"; $lblAboFec = "Abogado & Fecha Descripción"; $lblTarifa = "Tarifa"; $lblTotHon = "Total Honorarios"; $lblCarGas = "GASTOS"; $lblCantid = "Cantidad"; $lblTotCar = "Total Gastos"; $lblSubTot = "Sub Total"; $lblImpVal = "I.V.A."; $lblTotals = "Total"; $lblPractic = "Practica"; $lblSupervi = "Supervisor"; $lblHonoFij = "H. Fijos"; $lblResPres = "RESUMEN DEL PRESUPUESTO POR PROYECTO"; $lblProyect = "Proyecto"; $lblPresupu = "Presupuesto"; $lblCargoss = "Facturado"; $lblEstaNot = "Esta nota"; $lblDisponi = "Disponible"; $lblResHonF = "RESUMEN DE HONORARIOS FIJOS POR TAREA"; $lblHonFijo = "HONORARIOS FIJOS"; $lblTotHFij = "Total H. Fijos"; $lblDesctos = "Descuento"; $lblAjustes = "Ajuste"; $lblTotHonHor = "Honorarios por Hora"; $lblTotHonFij = "Honorarios Fijos"; $lblSubTotHon = "Sub-Total de Honorarios"; $lblTotGastos = "Gastos"; $lblSubTotals = "Sub Total"; $lblSubConIVA = "Sub-Total con IVA"; $lblDisHonTie = "Descuento Honorarios por Hora"; $lblDisHonFij = "Descuento Honorarios Fijos"; $lblHonFijDis = "Descto HF"; $lblHonTieDis = "Descto H"; $lblConducto = "Conducto"; $lblEliteFact = "Factura"; $lblDisbNoVat = "Tasas Oficiales"; if($language == 2) { $lblOrdCob = "SERVICES DETAIL"; $lblNumero = "Number"; $lblFecha = "Date"; $lblClient = "Client"; $lblResPro = "SUMMARY BY PROJECT"; $lblNombre = "Name"; $lblHoras = "Hours"; $lblHonora = "Fees"; $lblHONORA = "FEES"; $lblCargos = "Expenses"; $lblTotale = "T O T A L S"; $lblResAbo = "SUMMARY BY TIMEKEEPER"; $lblAbogad = "Timekeeper"; $lblCatego = "Category"; $lblResCar = "SUMMARY BY TYPE OF EXPENSES"; $lblDescri = "Description"; $lblImport = "Import"; $lblAboFec = "Timekeeper & Date Description"; $lblTarifa = "Rate"; $lblTotHon = "Total Fees"; $lblCarGas = "EXPENSES"; $lblCantid = "Quantity"; $lblTotCar = "Total Expenses"; $lblSubTot = "Subtotal"; $lblImpVal = "V.A.T."; $lblTotals = "Total"; $lblPractic = "Practice"; $lblSupervi = "Supervisor"; $lblHonoFij = "F. Fixed"; $lblResPres = "BUDGET BY PROJECT"; $lblProyect = "Project"; $lblPresupu = "Budget"; $lblCargoss = "Billed"; $lblEstaNot = "This note"; $lblDisponi = "Available"; $lblResHonF = "SUMMARY OF FIXED FEES BY TASK"; $lblHonFijo = "FIXED FEES"; $lblTotHFij = "Total Fixed Fees"; $lblDesctos = "Discount"; $lblAjustes = "Adjustment"; $lblTotHonHor = "Hourly Fees"; $lblTotHonFij = "Fixed Fees"; $lblSubTotHon = "Sub-Total Fees"; $lblTotGastos = "Expenses"; $lblSubTotals = "Subrotal"; $lblSubConIVA = "Sub-Total with VAT"; $lblDisHonTie = "Discount Hourly Fees"; $lblDisHonFij = "Discount Fixed Fees"; $lblHonFijDis = "Disc. HF"; $lblHonTieDis = "Disc. H"; $lblConducto = "Agent"; $lblEliteFact = "Invoice"; $lblDisbNoVat = "Official Fees"; } $GLOBALS['footOne'] = $prebill_FootOne; $GLOBALS['footTwo'] = $prebill_FootTwo; $GLOBALS['footTre'] = utf8_decode($prebill_SupName)." (".utf8_decode($prebill_SupMail).") "; // . "(" + utf8_decode($prebill_SupMail) . ")"; #============================================================================================================ #== 1. CREAMOS LA CLASE Y OBTENEMOS LOS DATOS BASICOS DEL REPORTE #============================================================================================================ class PDF extends FPDF { function Header() { } function Footer() { $this->SetTextColor(81,81,81); $this->SetFont('arial','',6); $this->SetXY(1.0,20.5); $this->MultiCell(26, 0.25, utf8_decode($GLOBALS['footOne']), 0, 'C', 0); $this->SetTextColor(81,81,81); $this->SetFont('arial','',6); $this->SetXY(1.0,$this->GetY()); $this->Cell(26, 0.25, utf8_decode($GLOBALS['footTwo']), 0, 1,'C', 0); $this->SetTextColor(81,81,81); $this->SetFont('arial','',6); $this->SetXY(1.0,$this->GetY()); $this->Cell(26, 0.25, utf8_decode($GLOBALS['footTre']), 0, 1,'C', 0); $this->SetTextColor(0,0,0); $this->SetFont('arial','',9); $this->SetXY(25.0,20.5); $this->Cell(1.5, 0.25, $this->PageNo().'/{nb}', 0, 1,'R', 0); } } #============================================================================================================ #== 2. CONSTRUYENDO EL DOCUMENTOS CON LA LIBRERÍA FPDF #============================================================================================================ $pdf=new PDF('L','cm','Letter'); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->AddFont('IDAutomationHC39M','','IDAutomationHC39M.php'); $pdf->AddFont('verdana','','verdana.php'); $pdf->SetAutoPageBreak(true); $pdf->SetMargins(0, 0, 0); $pdf->SetLineWidth(0.02); $pdf->SetFillColor(0,0,0); #============================================================================================================ #== 2.1 ENCABEZADO DE LA FACTURA #============================================================================================================ $X = 0; $Y = 0; $pdf->SetTextColor(68,133,184); $pdf->SetFont('arial','B',16); $pdf->SetXY($X+23.1,$Y+1.20+0.1); $pdf->Cell(3.5, 0.25, $lblOrdCob, 0, 1,'R', 0); $pdf->SetTextColor(56,58,58); $pdf->SetFont('arial','B',10); //$pdf->SetXY($X+17-0,$Y+1.96); $pdf->SetXY($X+22.5,$Y+1.96); $pdf->Cell(2.5, 0.25, utf8_decode($lblNumero), 0, 1,'L', 0); $pdf->SetTextColor(56,58,58); $pdf->SetFont('arial','B',12); $pdf->SetXY($X+25.3,$Y+1.95); $pdf->Cell(1.25, 0.25, $prebill_number, 0, 1,'R', 0); $pdf->SetTextColor(56,58,58); $pdf->SetFont('arial','B',10); $pdf->SetXY($X+22.5,$Y+2.5); $pdf->Cell(2.5, 0.25, utf8_decode($lblEliteFact), 0, 1,'L', 0); $pdf->SetTextColor(56,58,58); $pdf->SetFont('arial','B',12); $pdf->SetXY($X+25.3,$Y+2.5); $pdf->Cell(1.25, 0.25, $prebill_InvoNumb, 0, 1,'R', 0); $pdf->SetTextColor(140,133,169); $pdf->SetFont('arial','B',9); $pdf->SetXY($X+22.5,$Y+2.95); $pdf->Cell(2, 0.25, utf8_decode($lblFecha), 0, 1,'L', 0); $pdf->SetTextColor(140,133,169); $pdf->SetFont('arial','B',9); $pdf->SetXY($X+24.5,$Y+2.95); $pdf->MultiCell(9.4, 0.25, $prebill_date, 0, 'L'); $pdf->SetTextColor(140,133,169); $pdf->SetFont('arial','B',9); $pdf->SetXY($X+22.5,$Y+3.40); $pdf->Cell(2, 0.25, utf8_decode($lblClient), 0, 1,'L', 0); $pdf->SetTextColor(140,133,169); $pdf->SetFont('arial','B',9); $pdf->SetXY($X+24.5,$Y+3.40); $pdf->MultiCell(2.0, 0.25, utf8_decode($prebill_NumClie), 0, 'R'); /* $pdf->SetTextColor(140,133,169); $pdf->SetFont('arial','B',9); $pdf->SetXY($X+22.5,$Y+3.85); $pdf->Cell(2, 0.25, utf8_decode($lblSupervi), 0, 1,'L', 0); $pdf->SetTextColor(140,133,169); $pdf->SetFont('arial','B',7); $pdf->SetXY($X+22.5,$Y+4.20); $pdf->MultiCell(9.4, 0.25, utf8_decode($prebill_SupName), 0, 'L'); $pdf->SetTextColor(140,133,169); $pdf->SetFont('arial','B',7); $pdf->SetXY($X+22.5,$Y+4.40); $pdf->MultiCell(9.4, 0.25, utf8_decode($prebill_SupMail), 0, 'L'); */ $pdf->SetTextColor(0,0,0); $pdf->SetFont('arial','B',16); $pdf->SetXY($X+1,$Y+1.20+0.1); $pdf->Cell(14.5, 0.25, utf8_decode($ciaName), 0, 1,'L', 0); $pdf->SetTextColor(56,58,58); $pdf->SetFont('arial','',10); $pdf->SetXY($X+1,$Y+1.70+0.1); $pdf->Cell(4.5, 0.25, utf8_decode($ciaAddr1), 0, 1,'L', 0); $pdf->SetTextColor(56,58,58); $pdf->SetFont('arial','',10); $pdf->SetXY($X+1,$Y+2.20+0.1); $pdf->Cell(4.5, 0.25, utf8_decode($ciaAddr2), 0, 1,'L', 0); $pdf->SetTextColor(56,58,58); $pdf->SetFont('arial','',10); $pdf->SetXY($X+1,$Y+2.70+0.1); $pdf->Cell(4.5, 0.25, utf8_decode($ciaAddr3), 0, 1,'L', 0); // Conducto $sConducto $lblConducto if($sConducto != "") { $pdf->SetTextColor(140,133,169); $pdf->SetFont('arial','',10); $pdf->SetXY($X+1,$Y+3.7); $pdf->Cell(1, 0.25, utf8_decode($lblConducto), 0, 1,'L', 0); $pdf->SetTextColor(0,0,0); $pdf->SetFont('arial','B',13); $pdf->SetXY($X+1,$Y+4.1); $pdf->MultiCell(21.00, 0.45, $sConducto, 0, 'L'); } $pdf->SetTextColor(140,133,169); $pdf->SetFont('arial','',10); $pdf->SetXY($X+1,$Y+4.7); $pdf->Cell(1, 0.25, utf8_decode($lblClient), 0, 1,'L', 0); $pdf->SetTextColor(0,0,0); $pdf->SetFont('arial','B',13); $pdf->SetXY($X+1,$Y+5.1); $pdf->MultiCell(21.00, 0.45, utf8_decode($prebill_RazSoci), 0, 'L'); $pdf->SetTextColor(56,58,58); $pdf->SetFont('arial','B',10); $pdf->SetXY($X+1,$Y+6.0); $pdf->MultiCell(8.6, 0.45, $prebill_currency, 0, 'L'); $X = $X; $Y = $Y+4; $Puntero = $Y; #============================================================================================================ #== Resumen por Presupuesto #============================================================================================================ //echo 'Prebill with budget: ' . $prebill_withBudget; # 20230602 A solicitud de Marisol TKT #6228 se deshabilita esta seccion // if($prebill_withBudget == true) // { // $TotRegsPre = count($prebill_SummBud); // if($TotRegsPre > 0) // { // $Regs = 0; // $Y = $pdf->GetY()+0.20; // $Y = $Y+0.5; // $pdf->SetFont('arial','',12); // $pdf->SetTextColor(0,0,0); // $pdf->SetXY(1.0,$Y); // $pdf->Cell(11.5, 0.60, $lblResPres, 0, 1,'L', 0); // $Y = $Y+0.7; // $pdf->SetFont('arial','',10); // $pdf->SetXY(1.0,$Y); // $pdf->SetFillColor(60,61,58); // $pdf->Cell(16.0, 0.60, "", 0, 1,'L', 1); // $pdf->SetTextColor(255,255,255); // $pdf->SetXY(1.25,$Y); // $pdf->Cell(11.5, 0.60, $lblProyect, 0, 1,'L', 1); // $pdf->SetFont('arial','',10); // $pdf->SetXY(17.0,$Y); // $pdf->SetFillColor(60,61,58); // $pdf->SetTextColor(255,255,255); // $pdf->Cell(2.50, 0.60, $lblPresupu, 0, 1,'R', 1); // $pdf->SetFont('arial','',10); // $pdf->SetXY(19.5,$Y); // $pdf->SetFillColor(60,61,58); // $pdf->SetTextColor(255,255,255); // $pdf->Cell(2.00, 0.60, $lblCargoss, 0, 1,'R', 1); // $pdf->SetFont('arial','',10); // $pdf->SetXY(21.5,$Y); // $pdf->SetFillColor(60,61,58); // $pdf->SetTextColor(255,255,255); // $pdf->Cell(2.50, 0.60, $lblEstaNot, 0, 1,'R', 1); // $pdf->SetFont('arial','',10); // $pdf->SetXY(24.0,$Y); // $pdf->SetFillColor(60,61,58); // $pdf->SetTextColor(255,255,255); // $pdf->Cell(2.45, 0.60, $lblDisponi, 0, 1,'R', 1); // $Y = $Y+0.7; // for ($i = 0; $i < $TotRegsPre; $i++){ // $pdf->SetFont('arial','',8); // $pdf->SetTextColor(0,0,0); // $pdf->SetXY(17.0,$Y); // $pdf->Cell(2.50, 0.30, number_format($prebill_SummBud[$i]->Presupuesto,2), 0, 1,'R', 0); // $pdf->SetXY(19.5,$Y); // $pdf->Cell(2.00, 0.30, number_format($prebill_SummBud[$i]->Cargos,2), 0, 1,'R', 0); // $pdf->SetXY(21.5,$Y); // $pdf->Cell(2.50, 0.30, number_format($prebill_SummBud[$i]->Nota,2), 0, 1,'R', 0); // $pdf->SetXY(24.0,$Y); // $pdf->Cell(2.45, 0.30, number_format($prebill_SummBud[$i]->Disponible,2), 0, 1,'R', 0); // $pdf->SetXY(1.25,$Y); // $pdf->MultiCell(16.0, 0.30, utf8_decode($prebill_SummBud[$i]->Name), 0, 'L', 0); // $pdf->SetDrawColor(140,133,169); // $pdf->line(1.0, $Y-0.1, 26.45, $Y-0.1); // $YY = $pdf->GetY()+0.18; // $Puntero = $pdf->GetY(); // $Y = $YY; // $Regs++; // if ($Puntero > 19.0) // { // if ($TotRegsTie>$Regs) // { // $pdf->AddPage(); // $Y = 1.5; // //TitulosTie($pdf, 1.5, $lblAboFec, $lblHoras, $lblTarifa, $lblImport); // //TitulosTie($pdf, 1.5); // //$Y = 2.43; // } // else // { // $pdf->AddPage(); // $Y = 1.5; // } // } // } // $pdf->SetFont('arial','B',8); // $pdf->SetTextColor(0,0,0); // $pdf->SetXY(1.0,$Y); // $pdf->SetFillColor(238,238,238); // $pdf->Cell(16.00, 0.60, $lblTotale, 0, 1,'R', 1); // $pdf->SetXY(17.0,$Y); // $pdf->Cell(2.50, 0.60, number_format($prebill_BSTotPre,2), 0, 1,'R', 1); // $pdf->SetXY(19.5,$Y); // $pdf->Cell(2.00, 0.60, number_format($prebill_BSTotCar,2), 0, 1,'R', 1); // $pdf->SetXY(21.5,$Y); // $pdf->Cell(2.50, 0.60, number_format($prebill_BSTotNot,2), 0, 1,'R', 1); // $pdf->SetXY(24.0,$Y); // $pdf->Cell(2.45, 0.60, number_format($prebill_BSTotDis,2), 0, 1,'R', 1); // } // } #============================================================================================================ #== Resumen por Proyecto #============================================================================================================ $X = $X; $Y = $Y+1; $Puntero = $pdf->GetY(); if ($Puntero > 19.0) { $pdf->AddPage(); $Y = 2.5; } $TotRegsTie = count($prebill_SummPro); if($TotRegsTie > 0){ $Regs = 0; $Y = $pdf->GetY()+0.20; $Y = $Y+1.5; $pdf->SetFont('arial','',12); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->Cell(11.5, 0.60, $lblResPro, 0, 1,'L', 0); $Y = $Y+0.7; $pdf->SetFont('arial','',10); $pdf->SetXY(1.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->Cell(7.0, 0.60, "", 0, 1,'L', 1); $pdf->SetTextColor(255,255,255); $pdf->SetXY(1.25,$Y); $pdf->Cell(7.0, 0.60, $lblNombre, 0, 1,'L', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(8.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.00, 0.60, $lblPractic, 0, 1,'L', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(10.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.00, 0.60, $lblHoras, 0, 1,'R', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(12.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.50, 0.60, $lblHonora, 0, 1,'R', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(14.5,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.50, 0.60, $lblHonTieDis, 0, 1,'R', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(17.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.50, 0.60, $lblHonoFij, 0, 1,'R', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(19.5,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.50, 0.60, $lblHonFijDis, 0, 1,'R', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(22.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.50, 0.60, $lblCargos, 0, 1,'R', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(24.5,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.45, 0.60, $lblTotals, 0, 1,'R', 1); $Y = $Y+0.7; $Puntero = $Y; if ($Puntero > 19.0) { $pdf->AddPage(); $Y = 2.5; } for ($i = 0; $i < $TotRegsTie; $i++){ $pdf->SetFont('arial','',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(8.0,$Y); $pdf->Cell(2.00, 0.30, substr(utf8_decode($prebill_SummPro[$i]->Practica),0,10), 0, 1,'L', 0); $pdf->SetXY(10.0,$Y); $pdf->Cell(2.00, 0.30, number_format($prebill_SummPro[$i]->TotHrs,2), 0, 1,'R', 0); /* $pdf->SetXY(12.0,$Y); $pdf->Cell(2.50, 0.30, number_format($prebill_SummPro[$i]->TotImp,2), 0, 1,'R', 0); $pdf->SetTextColor(255,0,0); $pdf->SetXY(14.5,$Y); $pdf->Cell(2.50, 0.30, number_format($prebill_SummPro[$i]->TotAjH,2), 0, 1,'R', 0); $pdf->SetTextColor(0,0,0); $pdf->SetXY(17.0,$Y); $pdf->Cell(2.50, 0.30, number_format($prebill_SummPro[$i]->TotFix,2), 0, 1,'R', 0); $pdf->SetTextColor(255,0,0); $pdf->SetXY(19.5,$Y); $pdf->Cell(2.50, 0.30, number_format($prebill_SummPro[$i]->TotAjF,2), 0, 1,'R', 0); $pdf->SetTextColor(0,0,0); $pdf->SetXY(22.0,$Y); $pdf->Cell(2.50, 0.30, number_format($prebill_SummPro[$i]->TotDis,2), 0, 1,'R', 0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($prebill_SummPro[$i]->TotTot,2), 0, 1,'R', 0); */ $pdf->SetXY(12.0,$Y); $pdf->Cell(2.50, 0.30, $prebill_SummPro[$i]->TotImp, 0, 1,'R', 0); $pdf->SetTextColor(255,0,0); $pdf->SetXY(14.5,$Y); $pdf->Cell(2.50, 0.30, $prebill_SummPro[$i]->TotAjH, 0, 1,'R', 0); $pdf->SetTextColor(0,0,0); $pdf->SetXY(17.0,$Y); $pdf->Cell(2.50, 0.30, $prebill_SummPro[$i]->TotFix, 0, 1,'R', 0); $pdf->SetTextColor(255,0,0); $pdf->SetXY(19.5,$Y); $pdf->Cell(2.50, 0.30, $prebill_SummPro[$i]->TotAjF, 0, 1,'R', 0); $pdf->SetTextColor(0,0,0); $pdf->SetXY(22.0,$Y); $pdf->Cell(2.50, 0.30, $prebill_SummPro[$i]->TotDis, 0, 1,'R', 0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, $prebill_SummPro[$i]->TotTot, 0, 1,'R', 0); $pdf->SetXY(1.0,$Y); $pdf->MultiCell(7.0, 0.30, utf8_decode($prebill_SummPro[$i]->Name), 0, 'L', 0); $pdf->SetDrawColor(140,133,169); $pdf->line(1.0, $Y-0.1, 26.95, $Y-0.1); $YY = $pdf->GetY()+0.18; $Puntero = $pdf->GetY(); $Y = $YY; $Regs++; if ($Puntero > 19.0) { if ($TotRegsTie>$Regs) { $pdf->AddPage(); //TitulosTie($pdf, 1.5, $lblAboFec, $lblHoras, $lblTarifa, $lblImport); //TitulosTie($pdf, 1.5); $Y = 2.43; } else { $pdf->AddPage(); $Y = 2.5; } } } $pdf->SetFont('arial','B',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->SetFillColor(238,238,238); $pdf->Cell(9.0, 0.60, $lblTotale, 0, 1,'R', 1); $pdf->SetXY(10.0,$Y); $pdf->Cell(2.00, 0.60, number_format($prebill_Factur,2), 0, 1,'R', 1); $pdf->SetXY(12.0,$Y); $pdf->Cell(2.50, 0.60, number_format($prebill_Fees,2), 0, 1,'R', 1); if($prebill_Ajustada == true && $prebill_TipoMovi == "Descuento" ) { $pdf->SetTextColor(255,0,0); $pdf->SetXY(14.5,$Y); $pdf->Cell(2.50, 0.60, number_format($prebill_FeesAlia,2), 0, 1,'R', 1); } else { $pdf->SetTextColor(255,0,0); $pdf->SetXY(14.5,$Y); $pdf->Cell(2.50, 0.60, "0.00", 0, 1,'R', 1); } $pdf->SetTextColor(0,0,0); $pdf->SetXY(17.0,$Y); $pdf->Cell(2.50, 0.60, number_format($prebill_Fixed,2), 0, 1,'R', 1); $pdf->SetTextColor(255,0,0); $pdf->SetXY(19.5,$Y); $pdf->Cell(2.50, 0.60, number_format($prebill_FFeesAli,2), 0, 1,'R', 1); $pdf->SetTextColor(0,0,0); $pdf->SetXY(22.0,$Y); //$TotRegsTie = count($prebill_SummPro); if(count($prebill_SummPro) > 0 and $app_name_ZC == "alate-espana"){ $prebill_Disbur = $prebill_SummPro[0]->TotDis; } //echo $prebill_Disbur; $pdf->Cell(2.45, 0.60, number_format($prebill_Disbur,2), 0, 1,'R', 1); $pdf->SetXY(24.5,$Y); //$pdf->Cell(2.45, 0.60, number_format($prebill_SubTot,2), 0, 1,'R', 1); if(count($prebill_SummPro) > 0 and $app_name_ZC == "alate-espana"){ $prebill_SubTot_FD = $prebill_SummPro[0]->TotTot; } $pdf->Cell(2.45, 0.60, $prebill_SubTot_FD, 0, 1,'R', 1); } #============================================================================================================ #== Resumen por Abogado #============================================================================================================ $X = $X; $Y = $Y+1; $Puntero = $Y; if ($Puntero > 19.0) { $pdf->AddPage(); $Y = 1.5; } $TotRegsTie = count($prebill_SummTks); if($TotRegsTie > 0) { $Regs = 0; $Y = $pdf->GetY()+0.20; $Y = $Y+0.5; $pdf->SetFont('arial','',12); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->Cell(7.0, 0.60, $lblResAbo, 0, 1,'L', 0); $Y = $Y+0.7; $pdf->SetFont('arial','',10); $pdf->SetXY(1.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->Cell(5.50, 0.60, "", 0, 1,'L', 1); $pdf->SetTextColor(255,255,255); $pdf->SetXY(1.0,$Y); $pdf->Cell(5.50, 0.60, $lblAbogad, 0, 1,'L', 1); $pdf->SetXY(1.0,$Y); $pdf->SetXY(6.5,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(3.5, 0.60, utf8_decode($lblCatego), 0, 1,'L', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(10.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.00, 0.60, $lblHoras, 0, 1,'R', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(12.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.50, 0.60, $lblHonora, 0, 1,'R', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(14.5,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.50, 0.60, $lblHonTieDis, 0, 1,'R', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(17.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.50, 0.60, $lblHonoFij, 0, 1,'R', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(19.5,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.50, 0.60, $lblHonFijDis, 0, 1,'R', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(22.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.50, 0.60, $lblCargos, 0, 1,'R', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(24.5,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.45, 0.60, $lblTotals, 0, 1,'R', 1); $Y = $Y+0.7; $Puntero = $Y; if ($Puntero > 19.0) { $pdf->AddPage(); $Y = 2.5; } for ($i = 0; $i < $TotRegsTie; $i++){ $pdf->SetFont('arial','',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); $pdf->Cell(5.25, 0.30, utf8_decode($prebill_SummTks[$i]->Name), 0, 1,'L', 0); $pdf->SetXY(6.5,$Y); $pdf->Cell(3.5, 0.30, utf8_decode($prebill_SummTks[$i]->Category), 0, 1,'L', 0); $pdf->SetXY(10.0,$Y); $pdf->Cell(2.00, 0.30, $prebill_SummTks[$i]->TotHrs, 0, 1,'R', 0); $pdf->SetXY(12.0,$Y); $pdf->Cell(2.50, 0.30, number_format($prebill_SummTks[$i]->TotImp,2), 0, 1,'R', 0); $pdf->SetTextColor(255,0,0); $pdf->SetXY(14.5,$Y); $pdf->Cell(2.50, 0.30, number_format($prebill_SummTks[$i]->TotAjH,2), 0, 1,'R', 0); $pdf->SetTextColor(0,0,0); $pdf->SetXY(17.0,$Y); $pdf->Cell(2.50, 0.30, number_format($prebill_SummTks[$i]->TotFix,2), 0, 1,'R', 0); $pdf->SetTextColor(255,0,0); $pdf->SetXY(19.5,$Y); $pdf->Cell(2.50, 0.30, number_format($prebill_SummTks[$i]->TotAjF,2), 0, 1,'R', 0); $pdf->SetTextColor(0,0,0); $pdf->SetXY(22.0,$Y); $pdf->Cell(2.50, 0.30, number_format($prebill_SummTks[$i]->TotDis,2), 0, 1,'R', 0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($prebill_SummTks[$i]->TotTot,2), 0, 1,'R', 0); $pdf->SetDrawColor(140,133,169); $pdf->line(1.0, $Y-0.1, 26.95, $Y-0.1); $YY = $pdf->GetY()+0.18; $Puntero = $pdf->GetY(); $Y = $YY; $Regs++; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 2.50; } } $pdf->SetFont('arial','B',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->SetFillColor(238,238,238); $pdf->Cell(9.0, 0.60, $lblTotale, 0, 1,'R', 1); $pdf->SetXY(10.0,$Y); $pdf->Cell(2.00, 0.60, number_format($prebill_Factur,2), 0, 1,'R', 1); $pdf->SetXY(12.0,$Y); $pdf->Cell(2.50, 0.60, number_format($prebill_Fees,2), 0, 1,'R', 1); if($prebill_Ajustada == true && $prebill_TipoMovi == "Descuento" ) { $pdf->SetTextColor(255,0,0); $pdf->SetXY(14.5,$Y); $pdf->Cell(2.50, 0.60, number_format($prebill_FeesAlia,2), 0, 1,'R', 1); } else { $pdf->SetTextColor(255,0,0); $pdf->SetXY(14.5,$Y); $pdf->Cell(2.50, 0.60, "0.00", 0, 1,'R', 1); } $pdf->SetTextColor(0,0,0); $pdf->SetXY(17.0,$Y); $pdf->Cell(2.50, 0.60, number_format($prebill_Fixed,2), 0, 1,'R', 1); $pdf->SetTextColor(255,0,0); $pdf->SetXY(19.5,$Y); $pdf->Cell(2.50, 0.60, number_format($prebill_FFeesAli,2), 0, 1,'R', 1); $pdf->SetTextColor(0,0,0); $pdf->SetXY(22.0,$Y); $pdf->Cell(2.45, 0.60, number_format($prebill_Disbur,2), 0, 1,'R', 1); $pdf->SetXY(24.5,$Y); //$pdf->Cell(2.45, 0.60, number_format($prebill_SubTot,2), 0, 1,'R', 1); $pdf->Cell(2.45, 0.60, $prebill_SubTot_FD, 0, 1,'R', 1); } #============================================================================================================ #== Resumen de Honorarios Fijos por Tarea #============================================================================================================ $X = $X; $Y = $Y+1; $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $TotRegsTie = count($prebill_SummHFi); if($TotRegsTie > 0){ $Regs = 0; $Y = $pdf->GetY()+0.20; $Y = $Y+0.5; $pdf->SetFont('arial','',12); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->Cell(12.0, 0.60, $lblResHonF, 0, 1,'L', 0); $Y = $Y+0.7; $pdf->SetFont('arial','',10); $pdf->SetXY(1.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->Cell(23.5, 0.60, "", 0, 1,'L', 1); $pdf->SetTextColor(255,255,255); $pdf->SetXY(1.25,$Y); $pdf->Cell(23.5, 0.60, utf8_decode($lblDescri), 0, 1,'L', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(19.5,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.50, 0.60, $lblHonoFij, 0, 1,'R', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(22.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.50, 0.60, $lblHonFijDis, 0, 1,'R', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(24.5,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.45, 0.60, $lblImport, 0, 1,'R', 1); $Y = $Y+0.7; $Puntero = $Y; if ($Puntero > 19.0) { $pdf->AddPage(); $Y = 2.5; } for ($i = 0; $i < $TotRegsTie; $i++){ $pdf->SetFont('arial','',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(19.5,$Y); $pdf->Cell(2.5, 0.30, number_format($prebill_SummHFi[$i]->TotFix,2), 0, 1,'R', 0); $pdf->SetXY(22.0,$Y); $pdf->Cell(2.5, 0.30, number_format($prebill_SummHFi[$i]->TotAjF,2), 0, 1,'R', 0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($prebill_SummHFi[$i]->TotTot,2), 0, 1,'R', 0); $pdf->SetXY(1.25,$Y); $pdf->MultiCell(23.5, 0.30, utf8_decode($prebill_SummHFi[$i]->Name), 0, 'L', 0); $pdf->SetDrawColor(140,133,169); $pdf->line(1.0, $Y-0.1, 26.95, $Y-0.1); $YY = $pdf->GetY()+0.18; $Puntero = $pdf->GetY(); $Y = $YY; $Regs++; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 2.50; } } $pdf->SetFont('arial','B',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->SetFillColor(238,238,238); $pdf->Cell(23.5, 0.60, $lblTotale, 0, 1,'R', 1); $pdf->SetXY(19.5,$Y); $pdf->Cell(2.5, 0.60, number_format($prebill_Fixed,2), 0, 1,'R', 1); $pdf->SetTextColor(255,0,0); $pdf->SetXY(22.0,$Y); $pdf->Cell(2.5, 0.60, number_format($prebill_FFeeDis,2), 0, 1,'R', 1); $pdf->SetTextColor(0,0,0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.60, number_format($prebill_Fixed - $prebill_FFeeDis,2), 0, 1,'R', 1); } #============================================================================================================ #== Resumen por Cargos #============================================================================================================ $X = $X; $Y = $Y+1; $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $TotRegsTie = count($prebill_SummCha); if($TotRegsTie > 0){ $Regs = 0; $Y = $pdf->GetY()+0.20; $Y = $Y+0.5; $pdf->SetFont('arial','',12); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->Cell(12.0, 0.60, $lblResCar, 0, 1,'L', 0); $Y = $Y+0.7; $pdf->SetFont('arial','',10); $pdf->SetXY(1.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->Cell(23.5, 0.60, "", 0, 1,'L', 1); $pdf->SetTextColor(255,255,255); $pdf->SetXY(1.25,$Y); $pdf->Cell(23.5, 0.60, utf8_decode($lblDescri), 0, 1,'L', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(24.5,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.45, 0.60, $lblImport, 0, 1,'R', 1); $Y = $Y+0.7; $Puntero = $Y; if ($Puntero > 19.0) { $pdf->AddPage(); $Y = 2.5; } for ($i = 0; $i < $TotRegsTie; $i++){ $pdf->SetFont('arial','',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, $prebill_SummCha[$i]->TotDis, 0, 1,'R', 0); $pdf->SetXY(1.25,$Y); $pdf->MultiCell(23.5, 0.30, utf8_decode($prebill_SummCha[$i]->Name), 0, 'L', 0); $pdf->SetDrawColor(140,133,169); $pdf->line(1.0, $Y-0.1, 26.95, $Y-0.1); $YY = $pdf->GetY()+0.18; $Puntero = $pdf->GetY(); $Y = $YY; $Regs++; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 2.50; } } $pdf->SetFont('arial','B',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->SetFillColor(238,238,238); $pdf->Cell(23.5, 0.60, $lblTotale, 0, 1,'R', 1); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.60, number_format($prebill_Disbur,2), 0, 1,'R', 1); } #============================================================================================================ #== 2.2 REGISTROS DE TIEMPOS #============================================================================================================ $TotRegsTie = count($bdDatTime); $TotRegsGas = count($bdDatDisb); $TotRegsFix = count($bdDatHonF); if($TotRegsTie > 0){ $Y = $pdf->GetY()+0.20; $Y = $Y+0.5; $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $Regs = 0; $RefAgregPag = 0; $pdf->SetFont('arial','',12); $pdf->SetXY(1.0,$Y); $pdf->SetTextColor(0,0,0); $pdf->Cell(19.5, 0.75, $lblHONORA, 0, 1,'L', 0); $Y = $Y+1.3; TitulosTie($pdf, $Y-0.8, $lblAboFec, $lblHoras, $lblTarifa, $lblImport); $Y = $Y + 0.17; $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $sProyecto = ""; $sIDProyec = ""; $sDescProy = ""; $sRefCliente = ""; $sRefAgente = ""; $nTotImpor = 0.00; $nTotHoras = 0.00; $nTotDisco = 0.00; $iSubTotal = 0; for ($i = 0; $i < $TotRegsTie; $i++) { $lImpReg = true; // Checamos si es españa if($app_name_ZC == "alate-espana") { if($bdDatTime[$i]->dHours <= 0) { $lImpReg = false; } } if($bdDatTime[$i]->Imprimir == "true" && $lImpReg == true) { if($sProyecto != $bdDatTime[$i]->Matter) { if($iSubTotal != 0) { $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } if($prebill_Ajustada == true && $prebill_TipoMovi == "Descuento" ) { $pdf->SetFont('arial','',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); $pdf->Cell(19, 0.30, utf8_decode($lblSubTotals), 0, 1,'R', 0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($nTotImpor,2), 0, 1,'R', 0); $Y = $Y + 0.48; $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); $pdf->Cell(19, 0.30, utf8_decode($lblDesctos), 0, 1,'R', 0); $pdf->SetTextColor(255,0,0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($nTotDisco,2), 0, 1,'R', 0); $Y = $Y + 0.48; $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','B',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); $pdf->Cell(19, 0.30, utf8_decode($lblTotals), 0, 1,'R', 0); $pdf->SetXY(20.00,$Y); $pdf->Cell(2.00, 0.30, number_format($nTotHoras,2), 0, 1,'R', 0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($nTotImpor - $nTotDisco,2), 0, 1,'R', 0); } else { $pdf->SetFont('arial','B',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); $pdf->Cell(19, 0.30, utf8_decode($lblTotals." ".$sIDProyec), 0, 1,'R', 0); $pdf->SetXY(20.00,$Y); $pdf->Cell(2.00, 0.30, number_format($nTotHoras,2), 0, 1,'R', 0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($nTotImpor,2), 0, 1,'R', 0); } $Y = $Y + 0.48; $nTotImpor = 0.00; $nTotHoras = 0.00; $nTotDisco = 0.00; } $iSubTotal = 1; $sProyecto = $bdDatTime[$i]->Matter; foreach ( $bdDatTime[$i] as $nombre => $hexa ) { if($nombre == "Matter.Identity") { $sIDProyec = $hexa; } if($nombre == "Matter.Description") { $sDescProy = $hexa; } if($nombre == "Matter.Ref_Cliente") { $sRefCliente = $hexa; } if($nombre == "Matter.Referencia_Agente") { $sRefAgente = $hexa; } } $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetXY(1.0,$Y-0.05); $pdf->SetFillColor(187,187,187); $pdf->Cell(25.95, 0.40, "", 0, 1,'L', 1); $pdf->SetFont('arial','',10); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); //$pdf->Cell(24.50, 0.30, substr(utf8_decode(trim($bdDatTime[$i]->Matter)),0,90), 0, 1,'L', 0); //$Y = $Y + 0.48; $pdf->MultiCell(25.95, 0.30, utf8_decode(trim($sIDProyec." ".$sDescProy." R.Agt.: ".$sRefAgente." R.Clte.: ".$sRefCliente)), 0, 'L', 1); $YY = $pdf->GetY()+0.18; $Y = $YY; } if($prebill_Ajustada == true && $prebill_TipoMovi == "Ajuste" ) { $nTotImpor = $nTotImpor + $bdDatTime[$i]->Importe_Alias; $nTotHoras = $nTotHoras + $bdDatTime[$i]->Horas_Alias; $nTotDisco = 0; } else { $nTotImpor = $nTotImpor + $bdDatTime[$i]->Import; $nTotHoras = $nTotHoras + $bdDatTime[$i]->dHours; $nTotDisco = $nTotDisco + $bdDatTime[$i]->Importe_Alias; } // if($bdDatTime[$i]->Imprimir == "true") // { $pdf->SetFont('arial','',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.25,$Y); $pdf->Cell(18.0, 0.30, utf8_decode($bdDatTime[$i]->Timekeeper->display_value), 0, 1,'L', 0); if($prebill_Ajustada == true && $prebill_TipoMovi == "Ajuste" ) { $pdf->SetXY(20.00,$Y); $pdf->Cell(2.00, 0.30, number_format($bdDatTime[$i]->Horas_Alias,2), 0, 1,'R', 0); } else { $pdf->SetXY(20.00,$Y); $pdf->Cell(2.00, 0.30, number_format($bdDatTime[$i]->dHours,2), 0, 1,'R', 0); } $pdf->SetXY(22.00,$Y); $pdf->Cell(2.50, 0.30, number_format($bdDatTime[$i]->Rate,2), 0, 1,'R', 0); if($prebill_Ajustada == true && $prebill_TipoMovi == "Ajuste" ) { $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($bdDatTime[$i]->Importe_Alias,2), 0, 1,'R', 0); } else { $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($bdDatTime[$i]->Import,2), 0, 1,'R', 0); } $pdf->SetTextColor(140,133,169); $pdf->SetXY(1.25,$Y+0.30); if($bdDatTime[$i]->Reference_Number != "") { $pdf->MultiCell(18.5, 0.30, utf8_decode($bdDatTime[$i]->WorkDate." ".trim($bdDatTime[$i]->Description." REF.: ".$bdDatTime[$i]->Reference_Number)), 0, 'L', 0); } else { $pdf->MultiCell(18.5, 0.30, utf8_decode($bdDatTime[$i]->WorkDate." ".trim($bdDatTime[$i]->Description)), 0, 'L', 0); } $pdf->SetDrawColor(140,133,169); $pdf->line(1.0, $Y-0.1, 26.95, $Y-0.1); } $YY = $pdf->GetY()+0.18; $Puntero = $pdf->GetY(); $Y = $YY; $Regs++; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.50; } } if($iSubTotal != 0) { $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } if($prebill_Ajustada == true && $prebill_TipoMovi == "Descuento" ) { $pdf->SetFont('arial','',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); $pdf->Cell(19, 0.30, utf8_decode($lblSubTotals), 0, 1,'R', 0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($nTotImpor,2), 0, 1,'R', 0); $Y = $Y + 0.48; $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); $pdf->Cell(19, 0.30, utf8_decode($lblDesctos), 0, 1,'R', 0); $pdf->SetTextColor(255,0,0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($nTotDisco,2), 0, 1,'R', 0); $Y = $Y + 0.48; $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','B',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); $pdf->Cell(19, 0.30, utf8_decode($lblTotals), 0, 1,'R', 0); $pdf->SetXY(20.00,$Y); $pdf->Cell(2.00, 0.30, number_format($nTotHoras,2), 0, 1,'R', 0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($nTotImpor - $nTotDisco,2), 0, 1,'R', 0); } else { $pdf->SetFont('arial','B',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); $pdf->Cell(19, 0.30, utf8_decode($lblTotals." ".$sIDProyec), 0, 1,'R', 0); $pdf->SetXY(20.00,$Y); $pdf->Cell(2.00, 0.30, number_format($nTotHoras,2), 0, 1,'R', 0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($nTotImpor,2), 0, 1,'R', 0); } $nTotImpor = 0.00; $nTotHoras = 0.00; $nTotDisco = 0.00; } $Y = $Y + 0.48; $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','B',9); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->SetFillColor(238,238,238); $pdf->Cell(23.5, 0.60, $lblTotHon, 0, 1,'R', 1); $pdf->SetXY(24.5,$Y); if($prebill_Ajustada == true && $prebill_TipoMovi == "Descuento" ) { $pdf->Cell(2.45, 0.60, number_format($prebill_Fees - $prebill_FeesAlia,2), 0, 1,'R', 1); } else { $pdf->Cell(2.45, 0.60, number_format($prebill_Fees,2), 0, 1,'R', 1); } } #============================================================================================================ #== 2.3 REGISTROS DE HONORARIOS FIJOS #============================================================================================================ if($TotRegsFix > 0){ $Y = $pdf->GetY()+0.20; $Y = $Y+1.0; $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $Regs = 0; $RefAgregPag = 0; $pdf->SetFont('arial','',12); $pdf->SetXY(1.0,$Y); $pdf->SetTextColor(0,0,0); $pdf->Cell(19.5, 0.75, $lblHonFijo, 0, 1,'L', 0); $Y = $Y+1.3; TitulosGas($pdf, $Y-0.8, $lblAboFec, $lblCantid, $lblTarifa, $lblImport); $Y = $Y + 0.17; $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $sProyecto = ""; $sIDProyec = ""; $sDescProy = ""; $sRefCliente = ""; $sRefAgente = ""; $nTotImpor = 0.00; $nTotHoras = 0.00; $nTotDisco = 0.00; $iSubTotal = 0; for ($i = 0; $i < $TotRegsFix; $i++){ if($bdDatHonF[$i]->Imprimir == "true") { if($sProyecto != $bdDatHonF[$i]->Matter) { if($iSubTotal != 0) { $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } if($prebill_Ajustada == true && $prebill_TipoMovi == "Descuento" ) { $pdf->SetFont('arial','',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); $pdf->Cell(19, 0.30, utf8_decode($lblSubTotals), 0, 1,'R', 0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($nTotImpor,2), 0, 1,'R', 0); $Y = $Y + 0.48; $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); $pdf->Cell(19, 0.30, utf8_decode($lblDesctos), 0, 1,'R', 0); $pdf->SetTextColor(255,0,0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($nTotDisco,2), 0, 1,'R', 0); $Y = $Y + 0.48; $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','B',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); $pdf->Cell(19, 0.30, utf8_decode($lblTotals), 0, 1,'R', 0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($nTotImpor - $nTotDisco,2), 0, 1,'R', 0); } else { if ($nTotImpor > 0.00) { $pdf->SetFont('arial','B',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); $pdf->Cell(19, 0.30, utf8_decode($lblTotals." ".$sIDProyec), 0, 1,'R', 0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($nTotImpor,2), 0, 1,'R', 0); } } $Y = $Y + 0.48; $nTotImpor = 0.00; $nTotHoras = 0.00; $nTotDisco = 0.00; } $sProyecto = $bdDatHonF[$i]->Matter; $iSubTotal = 1; foreach ( $bdDatHonF[$i] as $nombre => $hexa ) { if($nombre == "Matter.Identity") { $sIDProyec = $hexa; } if($nombre == "Matter.Description") { $sDescProy = $hexa; } if($nombre == "Matter.Ref_Cliente") { $sRefCliente = $hexa; } if($nombre == "Matter.Referencia_Agente") { $sRefAgente = $hexa; } } $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetXY(1.0,$Y-0.05); $pdf->SetFillColor(187,187,187); $pdf->Cell(25.95, 0.40, "", 0, 1,'L', 1); $pdf->SetFont('arial','',10); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); //$pdf->Cell(24.5, 0.30, substr(utf8_decode(trim($bdDatHonF[$i]->Matter)),0,90), 0, 1,'L', 0); //$Y = $Y + 0.48; $pdf->MultiCell(25.95, 0.30, utf8_decode(trim($sIDProyec." ".$sDescProy." R.Agt.: ".$sRefAgente." R.Clte.: ".$sRefCliente)), 0, 'L', 1); $YY = $pdf->GetY()+0.18; $Y = $YY; } $nTotImpor = $nTotImpor + $bdDatHonF[$i]->Import; $nTotDisco = $nTotDisco + $bdDatHonF[$i]->Importe_Alias; $pdf->SetFont('arial','',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.25,$Y); $pdf->Cell(18.5, 0.30, utf8_decode($bdDatHonF[$i]->Timekeeper->display_value), 0, 1,'L', 0); $pdf->SetXY(20.00,$Y); $pdf->Cell(2.00, 0.30, number_format($bdDatHonF[$i]->Quantity,2), 0, 1,'R', 0); $pdf->SetXY(22.00,$Y); $pdf->Cell(2.50, 0.30, number_format($bdDatHonF[$i]->Cost_Unit,2), 0, 1,'R', 0); $pdf->SetXY(24.50,$Y); $pdf->Cell(2.45, 0.30, number_format($bdDatHonF[$i]->Import,2), 0, 1,'R', 0); $pdf->SetTextColor(140,133,169); $pdf->SetXY(1.25,$Y+0.30); if($bdDatHonF[$i]->Reference_Number != "") { $pdf->MultiCell(18.5, 0.30, utf8_decode($bdDatHonF[$i]->WorkDate." ".trim($bdDatHonF[$i]->Description." REF.: ".$bdDatHonF[$i]->Reference_Number)), 0, 'L', 0); } else { $pdf->MultiCell(18.5, 0.30, utf8_decode($bdDatHonF[$i]->WorkDate." ".trim($bdDatHonF[$i]->Description)), 0, 'L', 0); } $pdf->SetDrawColor(140,133,169); $pdf->line(1.0, $Y-0.1, 26.95, $Y-0.1); $YY = $pdf->GetY()+0.18; $Puntero = $pdf->GetY(); $Y = $YY; $Regs++; if ($Puntero>19.00) { $pdf->AddPage(); $Y = 1.5; } } if($iSubTotal != 0) { $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } if($prebill_Ajustada == true && $prebill_TipoMovi == "Descuento" ) { $pdf->SetFont('arial','',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); $pdf->Cell(19, 0.30, utf8_decode($lblSubTotals), 0, 1,'R', 0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($nTotImpor,2), 0, 1,'R', 0); $Y = $Y + 0.48; $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); $pdf->Cell(19, 0.30, utf8_decode($lblDesctos), 0, 1,'R', 0); $pdf->SetTextColor(255,0,0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($nTotDisco,2), 0, 1,'R', 0); $Y = $Y + 0.48; $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','B',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); $pdf->Cell(19, 0.30, utf8_decode($lblTotals), 0, 1,'R', 0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($nTotImpor - $nTotDisco,2), 0, 1,'R', 0); } else { $pdf->SetFont('arial','B',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); $pdf->Cell(19, 0.30, utf8_decode($lblTotals." ".$sIDProyec), 0, 1,'R', 0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($nTotImpor,2), 0, 1,'R', 0); } $Y = $Y + 0.48; $nTotImpor = 0.00; $nTotHoras = 0.00; $nTotDisco = 0.00; } } $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','B',9); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->SetFillColor(238,238,238); $pdf->Cell(23.5, 0.60, $lblTotHFij, 0, 1,'R', 1); $pdf->SetXY(24.50,$Y); if($prebill_Ajustada == true && $prebill_TipoMovi == "Descuento" ) { $pdf->Cell(2.45, 0.60, number_format($prebill_Fixed - $prebill_FFeesAli,2), 0, 1,'R', 1); } else { $pdf->Cell(2.45, 0.60, number_format($prebill_Fixed,2), 0, 1,'R', 1); } } #============================================================================================================ #== 2.3 REGISTROS DE GASTOS #============================================================================================================ if($TotRegsGas > 0){ $Y = $pdf->GetY()+0.20; $Y = $Y+1.0; $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $Regs = 0; $RefAgregPag = 0; $pdf->SetFont('arial','',12); $pdf->SetXY(1.0,$Y); $pdf->SetTextColor(0,0,0); $pdf->Cell(19.5, 0.75, $lblCarGas, 0, 1,'L', 0); $Y = $Y+1.3; TitulosGas($pdf, $Y-0.8, $lblAboFec, $lblCantid, $lblTarifa, $lblImport); $Y = $Y + 0.17; $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $sProyecto = ""; $sIDProyec = ""; $sDescProy = ""; $sRefCliente = ""; $sRefAgente = ""; $nTotImpor = 0.00; $nTotHoras = 0.00; $iSubTotal = 0; for ($i = 0; $i < $TotRegsGas; $i++){ if( !empty($bdDatDisb[$i]->Imprimir) && ( $bdDatDisb[$i]->Imprimir == "true" || $bdDatDisb[$i]->Imprimir === true || $bdDatDisb[$i]->Imprimir == 1) ) { if(trim($sProyecto) !== trim($bdDatDisb[$i]->Matter->Name)) { if($iSubTotal !== 0) { $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','B',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); $pdf->Cell(19, 0.30, utf8_decode($lblTotals." ".$sIDProyec), 0, 1,'R', 0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($nTotImpor,2), 0, 1,'R', 0); $Y = $Y + 0.48; $nTotImpor = 0.00; $nTotHoras = 0.00; } $sProyecto = $bdDatDisb[$i]->Matter->Name; $iSubTotal = 1; foreach ( $bdDatDisb[$i] as $nombre => $hexa ) { if($nombre == "Matter.Identity") { $sIDProyec = $hexa; } if($nombre == "Matter.Description") { $sDescProy = $hexa; } if($nombre == "Matter.Ref_Cliente") { $sRefCliente = $hexa; } if($nombre == "Matter.Referencia_Agente") { $sRefAgente = $hexa; } } $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetXY(1.0,$Y-0.05); $pdf->SetFillColor(187,187,187); $pdf->Cell(25.95, 0.40, "", 0, 1,'L', 1); $pdf->SetFont('arial','',10); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); //$pdf->Cell(24.5, 0.30, substr(utf8_decode(trim($bdDatDisb[$i]->Matter)),0,90), 0, 1,'L', 0); //$Y = $Y + 0.48; $pdf->MultiCell(25.95, 0.30, utf8_decode(trim($sIDProyec." ".$sDescProy." R.Agt.: ".$sRefAgente." R.Clte.: ".$sRefCliente)), 0, 'L', 1); $YY = $pdf->GetY()+0.18; $Y = $YY; } $nTotImpor = $nTotImpor + $bdDatDisb[$i]->Import; $pdf->SetFont('arial','',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.25,$Y); $nombreTK = isset($bdDatDisb[$i]->Timekeeper->Name) ? $bdDatDisb[$i]->Timekeeper->Name : ''; $pdf->Cell(18.50, 0.30, utf8_decode($nombreTK), 0, 1,'L', 0); $pdf->SetXY(20.00,$Y); $pdf->Cell(2.00, 0.30, number_format($bdDatDisb[$i]->Quantity,2), 0, 1,'R', 0); $pdf->SetXY(22.00,$Y); $pdf->Cell(2.50, 0.30, number_format($bdDatDisb[$i]->Cost_Unit,2), 0, 1,'R', 0); $pdf->SetXY(24.50,$Y); $pdf->Cell(2.45, 0.30, number_format($bdDatDisb[$i]->Import,2), 0, 1,'R', 0); $pdf->SetTextColor(140,133,169); $pdf->SetXY(1.25,$Y+0.30); if($bdDatDisb[$i]->Reference_Number != "") { $pdf->MultiCell(18.50, 0.30, utf8_decode($bdDatDisb[$i]->WorkDate." ".trim($bdDatDisb[$i]->Description." REF.: ".$bdDatDisb[$i]->Reference_Number)), 0, 'L', 0); } else { $pdf->MultiCell(18.50, 0.30, utf8_decode($bdDatDisb[$i]->WorkDate." ".trim($bdDatDisb[$i]->Description)), 0, 'L', 0); } $pdf->SetDrawColor(140,133,169); $pdf->line(1.0, $Y-0.1, 26.95, $Y-0.1); $YY = $pdf->GetY()+0.18; $Puntero = $pdf->GetY(); $Y = $YY; $Regs++; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } } } if($iSubTotal != 0) { $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','B',8); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.00,$Y); $pdf->Cell(19, 0.30, utf8_decode($lblTotals." ".$sIDProyec), 0, 1,'R', 0); $pdf->SetXY(24.5,$Y); $pdf->Cell(2.45, 0.30, number_format($nTotImpor,2), 0, 1,'R', 0); $Y = $Y + 0.48; $nTotImpor = 0.00; $nTotHoras = 0.00; } $Puntero = $Y; if ($Puntero>19.0) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','B',9); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->SetFillColor(238,238,238); $pdf->Cell(23.50, 0.60, $lblTotCar, 0, 1,'R', 1); $pdf->SetXY(24.50,$Y); $pdf->Cell(2.45, 0.60, number_format($prebill_Disbur,2), 0, 1,'R', 1); } #============================================================================================================ #== 4.4 IMPRESIÓN DE LOS SUBTOTALES. #============================================================================================================ if ($Puntero>10.00) { $pdf->AddPage(); $Y = 1.5; } else { $Y = $pdf->GetY()+0.50; } $pdf->SetFont('arial','',10); $pdf->SetXY(1.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->Cell(23.50, 0.60, "", 0, 1,'L', 1); $pdf->SetTextColor(255,255,255); $pdf->SetXY(1.25,$Y); $pdf->Cell(23.50, 0.60, utf8_decode($lblTotale), 0, 1,'L', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(24.50,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.45, 0.60, ' ', 0, 1,'R', 1); $Y = $pdf->GetY()+0.18; $Puntero = $Y; if ($Puntero>19.00) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','',10); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->Cell(23.0, 0.60, $lblTotHonHor , 0, 1,'R', 0); $pdf->SetXY(24.0,$Y); $pdf->Cell(2.95, 0.60, number_format($prebill_Fees,2), 0, 1,'R', 0); if($prebill_Ajustada == true && $prebill_TipoMovi == "Descuento" ) { $Y = $pdf->GetY()+0.10; $Puntero = $Y; if ($Puntero>19.00) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','',10); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->Cell(23.0, 0.60, $lblDisHonTie , 0, 1,'R', 0); $pdf->SetTextColor(255,0,0); $pdf->SetXY(24.0,$Y); $pdf->Cell(2.95, 0.60, number_format($prebill_FeesAlia,2), 0, 1,'R', 0); } $Y = $pdf->GetY()+0.18; $Puntero = $Y; if ($Puntero>19.00) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','',10); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->Cell(23.0, 0.60, $lblTotHonFij , 0, 1,'R', 0); $pdf->SetXY(24.0,$Y); $pdf->Cell(2.95, 0.60, number_format($prebill_Fixed,2), 0, 1,'R', 0); if($prebill_Ajustada == true && $prebill_TipoMovi == "Descuento" ) { $Y = $pdf->GetY()+0.10; $Puntero = $Y; if ($Puntero>19.00) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','',10); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->Cell(23.0, 0.60, $lblDisHonFij , 0, 1,'R', 0); $pdf->SetTextColor(255,0,0); $pdf->SetXY(24.0,$Y); $pdf->Cell(2.95, 0.60, number_format($prebill_FFeesAli,2), 0, 1,'R', 0); } $Y = $pdf->GetY()+0.10; $Puntero = $Y; if ($Puntero>19.00) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetDrawColor(140,133,169); $pdf->line(24.0, $Y, 26.95, $Y); $Y = $pdf->GetY()+0.18; $Puntero = $Y; if ($Puntero>19.00) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','B',10); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->Cell(23.00, 0.60, $lblSubTotHon , 0, 1,'R', 0); $pdf->SetXY(24.00,$Y); if($prebill_Ajustada == true && $prebill_TipoMovi == "Descuento" ) { $pdf->Cell(2.95, 0.60, number_format($prebill_Fees - $prebill_FeesAlia + $prebill_Fixed - $prebill_FFeesAli,2), 0, 1,'R', 0); } else { $pdf->Cell(2.95, 0.60, number_format($prebill_Fees + $prebill_Fixed,2), 0, 1,'R', 0); } $Y = $pdf->GetY()+0.18; $Puntero = $Y; if ($Puntero>19.00) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','',10); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->Cell(23.0, 0.60, $lblTotGastos , 0, 1,'R', 0); $pdf->SetXY(24.0,$Y); $pdf->Cell(2.95, 0.60, number_format($prebill_Disbur,2), 0, 1,'R', 0); $Y = $pdf->GetY()+0.10; $Puntero = $Y; if ($Puntero>19.00) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetDrawColor(140,133,169); $pdf->line(24.0, $Y, 26.95, $Y); $Y = $pdf->GetY()+0.18; $Puntero = $Y; if ($Puntero>19.00) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','B',10); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->Cell(23.0, 0.60, $lblSubTot, 0, 1,'R', 0); $pdf->SetXY(24.0,$Y); $pdf->Cell(2.95, 0.60, number_format($prebill_SubTot,2), 0, 1,'R', 0); $Y = $pdf->GetY()+0.18; $Puntero = $Y; if ($Puntero>19.00) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','',10); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->Cell(23.0, 0.60, $lblImpVal." (".strval($prebill_PorIva)."%)", 0, 1,'R', 0); $pdf->SetXY(24.0,$Y); $pdf->Cell(2.95, 0.60, number_format($prebill_ImpIva,2), 0, 1,'R', 0); $Y = $pdf->GetY()+0.10; $Puntero = $Y; if ($Puntero>19.00) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetDrawColor(140,133,169); $pdf->line(24.0, $Y, 26.95, $Y); $Y = $pdf->GetY()+0.18; $Puntero = $Y; if ($Puntero>19.00) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','',10); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->Cell(23.0, 0.60, $lblSubConIVA, 0, 1,'R', 0); $pdf->SetXY(24.0,$Y); $pdf->Cell(2.95, 0.60, number_format($prebill_SubTot + $prebill_ImpIva,2), 0, 1,'R', 0); $Y = $pdf->GetY()+0.18; $Puntero = $Y; if ($Puntero>19.00) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetFont('arial','',10); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->Cell(23.0, 0.60, $lblDisbNoVat, 0, 1,'R', 0); $pdf->SetXY(24.0,$Y); $pdf->Cell(2.95, 0.60, number_format($prebill_DisNoVat,2), 0, 1,'R', 0); /* if($prebill_Ajustada == true && $prebill_TipoMovi == "Ajuste" ) { $Y = $pdf->GetY()+0.18; $pdf->SetFont('arial','',10); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->Cell(23.50, 0.60, $lblAjustes." ".$lblHonora, 0, 1,'R', 0); $pdf->SetXY(24.50,$Y); $pdf->Cell(2.45, 0.60, number_format($prebill_FeesAlia,2), 0, 1,'R', 0); $Y = $pdf->GetY()+0.18; $pdf->SetFont('arial','',10); $pdf->SetTextColor(0,0,0); $pdf->SetXY(1.0,$Y); $pdf->Cell(23.50, 0.60, $lblAjustes." ".$lblHonoFij, 0, 1,'R', 0); $pdf->SetXY(24.50,$Y); $pdf->Cell(2.45, 0.60, number_format($prebill_FFeesAli,2), 0, 1,'R', 0); } */ $Y = $pdf->GetY()+0.18; $pdf->SetFont('arial','B',11); $pdf->SetTextColor(0,0,0); $pdf->SetXY(19.0,$Y); $pdf->SetFillColor(238,238,238); $pdf->Cell(5.0, 0.60, $lblTotals . " " . $sMonTot, 0, 1,'R', 1); $pdf->SetXY(24.0,$Y); $pdf->Cell(2.95, 0.60, number_format($prebill_Import,2), 0, 1,'R', 1); #============================================================================================================ #== LEYENDAS FINALES DE LA ORDEN DE COBRO #============================================================================================================ /* $Y = $Y + 3.00; $Puntero = $Y; if ($Puntero>25.5) { $pdf->AddPage(); $Y = 1.5; } $pdf->SetTextColor(0,0,0); $pdf->SetFont('arial','',6); $pdf->SetXY(1.0,$Y); //$pdf->Cell(20, 0.60, utf8_decode($prebill_FootOne), 0, 1,'C', 0); $pdf->MultiCell(19.0, 0.30, utf8_decode($prebill_FootOne), 0, 'C', 0); //$Y = $Y + 0.25; $Y = $pdf->GetY()-0.10; $pdf->SetTextColor(0,0,0); $pdf->SetFont('arial','',7); $pdf->SetXY(1.0,$Y); $pdf->Cell(19, 0.60, utf8_decode($prebill_FootTwo), 0, 1,'C', 0); */ /* $Y = $Y + 1.00; $pdf->SetTextColor(0,0,0); $pdf->SetFont('arial','B',10); $pdf->SetXY(0.75,$Y); $pdf->Cell(2.5, 0.25, "N O T A S", 0, 1,'L', 0); $Y = $Y + 0.50; $pdf->SetXY(1.00,$Y); $pdf->MultiCell(20.0, 0.30, utf8_decode($prebill_Notes), 0, 'J', 0); $pdf->Write(0.4,''); $Y = $pdf->GetY(); $Y = $Y + 1.0; $pdf->SetTextColor(0,0,0); $pdf->SetFont('arial','B',10); $pdf->SetXY(0.75,$Y); $pdf->Cell(2.5, 0.25, "TERMINOS Y CONDICIONES", 0, 1,'L', 0); $Y = $Y + 0.50; $pdf->SetXY(1.00,$Y); $pdf->MultiCell(20.0, 0.30, utf8_decode($prebill_TerCon), 0, 'J', 0); $pdf->Write(0.4,''); $Y = $pdf->GetY(); */ #============================================================================================================ #== 2.6 SE GRABA EL DOCUMENTO .PDF EN EL DISCO DURO #============================================================================================================ $pdf->Output($SendaArchsCFDI.$NomArchPDF, 'F'); //$pdf->Output('EC_' . $prebill_client . '-' . $prebill_number . '.pdf', 'F'); #============================================================================================================ #== 2.7 DESCOMENTAR SI ESTÁ UTILIZANDO EL SISTEMA OPERATIVO LINUX. #============================================================================================================ chmod ($SendaArchsCFDI.$NomArchPDF,0777); #============================================================================================================ #== 2.8 SE MUESTRA EL DOCUMENTO .PDF EN EL NAVEGADOR. #============================================================================================================ //$pdf->Output($SendaArchsCFDI.$NomArchPDF, 'I'); #============================================================================================================ # 2.9 Envio del Archivos a Zoho Creator #============================================================================================================ if($invoiceID == "") { $file_name_with_full_path = '/var/www/html/aptusCFDIRF/archs_cfdi/'.$NomArchPDF; //$request_url = 'https://creator.zoho.com/api/xml/fileupload/scope=creatorapi'; $request_url = 'https://creator.zoho.com/api/v2/arochiylindner.aptus/alate/report/Prebills_Report/' . $bRecId . '/File_PDF_OC/upload'; // Checamos si es españa if($app_name_ZC == "alate-espana") { $request_url = 'https://creator.zoho.com/api/v2/arochiylindner.aptus/alate-espana/report/Prebills_Report/' . $bRecId . '/File_PDF_OC/upload'; } if (function_exists('curl_file_create')) { // php 5.6+ $cFile = curl_file_create($file_name_with_full_path); } else { $cFile = '@' . realpath($file_name_with_full_path); } $post = array( // 'authtoken' => $authtoken_ZC, // 'applinkname' => $app_name_ZC, // 'formname' => 'Prebills', // 'fieldname' => 'File_PDF_OC', // 'recordId' => $bRecId, // 'filename' => $NomArchPDF, 'file'=> $cFile); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $request_url); // curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Zoho-oauthtoken ' . $coa_access_token)); $r = curl_exec($ch); curl_close ($ch); } #============================================================================================================ # 2.10 Envio del Archivos a Zoho Books #============================================================================================================ #JFA: Obtenemos el access token de Zoho Books $bRefreshToken = $aDatPac["B_OAuth_refresh_token"]; $bClientId = $aDatPac["B_OAuth_client_id"]; $bClientSecret = $aDatPac["B_OAuth_client_secret"]; $bRedirectUri = $aDatPac["B_OAuth_redirect_uri"]; $bGrantType = $aDatPac["B_OAuth_grant_type"]; $bAuthUrl = "https://accounts.zoho.com/oauth/v2/token"; // $bParams = array( // "refresh_token" => $bRefreshToken, // "client_id" => $bClientId, // "client_secret" => $bClientSecret, // "redirect_uri" => $bRedirectUri, // "grant_type" => $bGrantType // ); // $curl = curl_init(); // curl_setopt($curl, CURLOPT_URL, $bAuthUrl); // curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST'); // curl_setopt($curl, CURLOPT_POSTFIELDS, $bParams); // curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); // curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); // $response = curl_exec($curl); // $array = json_decode($response); // $boa_access_token = $array->access_token; //$boa_access_token = oauth('arochiylindner.aptus', 'ZBooks', $bRefreshToken, $bClientId, $bClientSecret, $bRedirectUri, $bGrantType, $bAuthUrl); $response = OAuthV2::getToken($organi_id_ZB); // Muestra la respuesta para depuración $boa_access_token = $response->token; //echo $token; if($organi_id_ZB <> "" && $invoiceID <> "") { $file_name_with_full_path = '/var/www/html/aptusCFDIRF/archs_cfdi/'.$NomArchPDF; $request_url = 'https://www.zohoapis.com/books/v3/invoices/'.$invoiceID.'/attachment?can_send_in_mail=true'; if (function_exists('curl_file_create')) { // php 5.6+ $cFile = curl_file_create($file_name_with_full_path); } else { $cFile = '@' . realpath($file_name_with_full_path); } $post = array( // 'authtoken' => $authtoken_ZB, 'organization_id' => $organi_id_ZB, //'can_send_in_mail' => 'true', 'attachment'=> $cFile); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $request_url); // curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Zoho-oauthtoken ' . $boa_access_token)); $r = curl_exec($ch); # Usamos la funcion curl_errno() para atrapar cualquier error relacionado con la llamada. if (curl_errno($ch)) { $error_msg = curl_error($ch); } curl_close ($ch); if (isset($error_msg)) { $j_array = array('code' => '666', 'message' => "Error en la llamada curl " . $error_msg); $Resultado = json_encode($j_array); echo $Resultado; return; } else { $ra = json_decode($r); $resultPDF = $ra->code.' - '.$ra->message; $code = (int)$ra->code; if ($code != 0) { $j_array = array('code' => $ra->code, 'message' => "No se pudo adjuntar el archivo a Books, contacte al administrador " . $ra->message); $Resultado = json_encode($j_array); echo $Resultado; return; } } } $j_array = array('code' => "200", 'message' => "Proceso de creacion de Orden de Cobro fue exitoso. OCob No. ".$prebill_InvoNumb); $Resultado = json_encode($j_array); echo $Resultado; return; #============================================================================================================ #== FUNCIONES GENERALES #============================================================================================================ function TitulosTie($pdf, $Y, $lblAboFec, $lblHoras, $lblTarifa, $lblImport){ $Y = $Y + 0.24; $pdf->SetFont('arial','',10); $pdf->SetXY(1.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->Cell(19.0, 0.60, "", 0, 1,'L', 1); $pdf->SetTextColor(255,255,255); $pdf->SetXY(1.25,$Y); $pdf->Cell(19.0, 0.60, utf8_decode($lblAboFec), 0, 1,'L', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(20.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.00, 0.60, $lblHoras, 0, 1,'R', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(22.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.50, 0.60, $lblTarifa, 0, 1,'R', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(24.5,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.45, 0.60, $lblImport, 0, 1,'R', 1); } function TitulosGas($pdf, $Y, $lblAboFec, $lblCantid, $lblTarifa, $lblImport){ $Y = $Y + 0.24; $pdf->SetFont('arial','',10); $pdf->SetXY(1.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->Cell(19.0, 0.60, "", 0, 1,'L', 1); $pdf->SetTextColor(255,255,255); $pdf->SetXY(1.25,$Y); $pdf->Cell(19.0, 0.60, utf8_decode($lblAboFec), 0, 1,'L', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(20.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.00, 0.60, $lblCantid, 0, 1,'R', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(22.0,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.50, 0.60, $lblTarifa, 0, 1,'R', 1); $pdf->SetFont('arial','',10); $pdf->SetXY(24.5,$Y); $pdf->SetFillColor(60,61,58); $pdf->SetTextColor(255,255,255); $pdf->Cell(2.45, 0.60, $lblImport, 0, 1,'R', 1); }