From: vincent@cubedesigners.com Date: Mon, 15 Feb 2016 18:44:12 +0000 (+0000) Subject: #extranet : new design for invoices & quotation X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=327be7b873621f57be108e5dd93241f47d6030bc;p=cubeextranet.git #extranet : new design for invoices & quotation Add support for 3 and more pages quotes Set everithing as vector Fix TVA number not being displayed --- diff --git a/images/extranet/docs/devis.pdf b/images/extranet/docs/devis.pdf deleted file mode 100644 index 36ee4f47b..000000000 Binary files a/images/extranet/docs/devis.pdf and /dev/null differ diff --git a/images/extranet/docs/devis1.pdf b/images/extranet/docs/devis1.pdf deleted file mode 100644 index ab1914791..000000000 Binary files a/images/extranet/docs/devis1.pdf and /dev/null differ diff --git a/images/extranet/docs/devis2.pdf b/images/extranet/docs/devis2.pdf deleted file mode 100644 index 38e036fd6..000000000 Binary files a/images/extranet/docs/devis2.pdf and /dev/null differ diff --git a/images/extranet/docs/devis3.pdf b/images/extranet/docs/devis3.pdf deleted file mode 100644 index 38b0fff03..000000000 Binary files a/images/extranet/docs/devis3.pdf and /dev/null differ diff --git a/images/extranet/docs/facture.pdf b/images/extranet/docs/facture.pdf deleted file mode 100644 index 9d4faff80..000000000 Binary files a/images/extranet/docs/facture.pdf and /dev/null differ diff --git a/images/extranet/docs/klavika-bold.php b/images/extranet/docs/klavika-bold.php deleted file mode 100644 index 5bc959646..000000000 --- a/images/extranet/docs/klavika-bold.php +++ /dev/null @@ -1,25 +0,0 @@ -750,'Descent'=>-250,'CapHeight'=>666,'Flags'=>32,'FontBBox'=>'[-26 -303 1245 1055]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>616); -$up = -123; -$ut = 20; -$cw = array( - chr(0)=>616,chr(1)=>616,chr(2)=>616,chr(3)=>616,chr(4)=>616,chr(5)=>616,chr(6)=>616,chr(7)=>616,chr(8)=>616,chr(9)=>616,chr(10)=>616,chr(11)=>616,chr(12)=>616,chr(13)=>616,chr(14)=>616,chr(15)=>616,chr(16)=>616,chr(17)=>616,chr(18)=>616,chr(19)=>616,chr(20)=>616,chr(21)=>616, - chr(22)=>616,chr(23)=>616,chr(24)=>616,chr(25)=>616,chr(26)=>616,chr(27)=>616,chr(28)=>616,chr(29)=>616,chr(30)=>616,chr(31)=>616,' '=>210,'!'=>284,'"'=>379,'#'=>678,'$'=>502,'%'=>872,'&'=>646,'\''=>199,'('=>326,')'=>326,'*'=>467,'+'=>517, - ','=>273,'-'=>338,'.'=>274,'/'=>462,'0'=>552,'1'=>389,'2'=>503,'3'=>487,'4'=>562,'5'=>498,'6'=>518,'7'=>457,'8'=>534,'9'=>513,':'=>274,';'=>273,'<'=>566,'='=>525,'>'=>566,'?'=>485,'@'=>722,'A'=>627, - 'B'=>572,'C'=>521,'D'=>598,'E'=>534,'F'=>518,'G'=>584,'H'=>645,'I'=>290,'J'=>275,'K'=>617,'L'=>499,'M'=>786,'N'=>676,'O'=>616,'P'=>584,'Q'=>616,'R'=>643,'S'=>544,'T'=>532,'U'=>622,'V'=>590,'W'=>944, - 'X'=>612,'Y'=>564,'Z'=>566,'['=>319,'\\'=>462,']'=>319,'^'=>466,'_'=>444,'`'=>310,'a'=>499,'b'=>537,'c'=>406,'d'=>537,'e'=>486,'f'=>369,'g'=>484,'h'=>553,'i'=>274,'j'=>264,'k'=>527,'l'=>274,'m'=>837, - 'n'=>553,'o'=>520,'p'=>537,'q'=>537,'r'=>345,'s'=>433,'t'=>360,'u'=>553,'v'=>500,'w'=>705,'x'=>492,'y'=>495,'z'=>460,'{'=>340,'|'=>260,'}'=>340,'~'=>461,chr(127)=>616,chr(128)=>529,chr(129)=>616,chr(130)=>273,chr(131)=>496, - chr(132)=>488,chr(133)=>822,chr(134)=>444,chr(135)=>444,chr(136)=>376,chr(137)=>1285,chr(138)=>544,chr(139)=>343,chr(140)=>892,chr(141)=>616,chr(142)=>566,chr(143)=>616,chr(144)=>616,chr(145)=>268,chr(146)=>258,chr(147)=>483,chr(148)=>483,chr(149)=>348,chr(150)=>478,chr(151)=>628,chr(152)=>417,chr(153)=>452, - chr(154)=>433,chr(155)=>343,chr(156)=>782,chr(157)=>616,chr(158)=>460,chr(159)=>564,chr(160)=>210,chr(161)=>284,chr(162)=>426,chr(163)=>543,chr(164)=>584,chr(165)=>548,chr(166)=>260,chr(167)=>535,chr(168)=>434,chr(169)=>766,chr(170)=>377,chr(171)=>560,chr(172)=>507,chr(173)=>616,chr(174)=>451,chr(175)=>344, - chr(176)=>373,chr(177)=>517,chr(178)=>394,chr(179)=>367,chr(180)=>310,chr(181)=>553,chr(182)=>538,chr(183)=>274,chr(184)=>286,chr(185)=>356,chr(186)=>401,chr(187)=>560,chr(188)=>868,chr(189)=>878,chr(190)=>885,chr(191)=>485,chr(192)=>627,chr(193)=>627,chr(194)=>627,chr(195)=>627,chr(196)=>627,chr(197)=>627, - chr(198)=>855,chr(199)=>521,chr(200)=>534,chr(201)=>534,chr(202)=>534,chr(203)=>534,chr(204)=>290,chr(205)=>290,chr(206)=>290,chr(207)=>290,chr(208)=>624,chr(209)=>676,chr(210)=>616,chr(211)=>616,chr(212)=>616,chr(213)=>616,chr(214)=>616,chr(215)=>480,chr(216)=>616,chr(217)=>622,chr(218)=>622,chr(219)=>622, - chr(220)=>622,chr(221)=>564,chr(222)=>584,chr(223)=>590,chr(224)=>499,chr(225)=>499,chr(226)=>499,chr(227)=>499,chr(228)=>499,chr(229)=>499,chr(230)=>746,chr(231)=>406,chr(232)=>486,chr(233)=>486,chr(234)=>486,chr(235)=>486,chr(236)=>274,chr(237)=>274,chr(238)=>274,chr(239)=>274,chr(240)=>490,chr(241)=>553, - chr(242)=>520,chr(243)=>520,chr(244)=>520,chr(245)=>520,chr(246)=>520,chr(247)=>524,chr(248)=>520,chr(249)=>553,chr(250)=>553,chr(251)=>553,chr(252)=>553,chr(253)=>495,chr(254)=>537,chr(255)=>495); -$enc = 'cp1252'; -$uv = array(0=>array(0,128),128=>8364,130=>8218,131=>402,132=>8222,133=>8230,134=>array(8224,2),136=>710,137=>8240,138=>352,139=>8249,140=>338,142=>381,145=>array(8216,2),147=>array(8220,2),149=>8226,150=>array(8211,2),152=>732,153=>8482,154=>353,155=>8250,156=>339,158=>382,159=>376,160=>array(160,96)); -$file = 'klavika-bold.z'; -$originalsize = 19996; -$subsetted = true; -?> diff --git a/images/extranet/docs/klavika-bold.z b/images/extranet/docs/klavika-bold.z deleted file mode 100644 index cdfaec20d..000000000 Binary files a/images/extranet/docs/klavika-bold.z and /dev/null differ diff --git a/images/extranet/docs/klavika-light.php b/images/extranet/docs/klavika-light.php deleted file mode 100644 index 1e958edaa..000000000 --- a/images/extranet/docs/klavika-light.php +++ /dev/null @@ -1,25 +0,0 @@ -750,'Descent'=>-250,'CapHeight'=>666,'Flags'=>32,'FontBBox'=>'[-15 -251 1152 934]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>666); -$up = -123; -$ut = 20; -$cw = array( - chr(0)=>666,chr(1)=>666,chr(2)=>666,chr(3)=>666,chr(4)=>666,chr(5)=>666,chr(6)=>666,chr(7)=>666,chr(8)=>666,chr(9)=>666,chr(10)=>666,chr(11)=>666,chr(12)=>666,chr(13)=>666,chr(14)=>666,chr(15)=>666,chr(16)=>666,chr(17)=>666,chr(18)=>666,chr(19)=>666,chr(20)=>666,chr(21)=>666, - chr(22)=>666,chr(23)=>666,chr(24)=>666,chr(25)=>666,chr(26)=>666,chr(27)=>666,chr(28)=>666,chr(29)=>666,chr(30)=>666,chr(31)=>666,' '=>220,'!'=>252,'"'=>354,'#'=>719,'$'=>511,'%'=>843,'&'=>617,'\''=>201,'('=>301,')'=>301,'*'=>477,'+'=>536, - ','=>241,'-'=>362,'.'=>242,'/'=>440,'0'=>560,'1'=>326,'2'=>484,'3'=>491,'4'=>540,'5'=>495,'6'=>518,'7'=>427,'8'=>554,'9'=>513,':'=>242,';'=>241,'<'=>550,'='=>509,'>'=>550,'?'=>458,'@'=>751,'A'=>621, - 'B'=>559,'C'=>511,'D'=>590,'E'=>536,'F'=>511,'G'=>571,'H'=>620,'I'=>249,'J'=>234,'K'=>569,'L'=>494,'M'=>795,'N'=>638,'O'=>616,'P'=>544,'Q'=>616,'R'=>619,'S'=>544,'T'=>519,'U'=>630,'V'=>590,'W'=>890, - 'X'=>580,'Y'=>543,'Z'=>576,'['=>311,'\\'=>440,']'=>311,'^'=>454,'_'=>434,'`'=>310,'a'=>485,'b'=>508,'c'=>400,'d'=>513,'e'=>479,'f'=>357,'g'=>513,'h'=>521,'i'=>228,'j'=>223,'k'=>471,'l'=>228,'m'=>819, - 'n'=>521,'o'=>498,'p'=>511,'q'=>508,'r'=>312,'s'=>435,'t'=>371,'u'=>521,'v'=>449,'w'=>702,'x'=>441,'y'=>444,'z'=>437,'{'=>309,'|'=>249,'}'=>309,'~'=>495,chr(127)=>666,chr(128)=>553,chr(129)=>666,chr(130)=>241,chr(131)=>507, - chr(132)=>396,chr(133)=>706,chr(134)=>496,chr(135)=>496,chr(136)=>397,chr(137)=>1212,chr(138)=>544,chr(139)=>292,chr(140)=>895,chr(141)=>666,chr(142)=>576,chr(143)=>666,chr(144)=>666,chr(145)=>241,chr(146)=>221,chr(147)=>396,chr(148)=>396,chr(149)=>382,chr(150)=>496,chr(151)=>626,chr(152)=>410,chr(153)=>522, - chr(154)=>435,chr(155)=>292,chr(156)=>799,chr(157)=>666,chr(158)=>437,chr(159)=>543,chr(160)=>220,chr(161)=>252,chr(162)=>420,chr(163)=>545,chr(164)=>540,chr(165)=>543,chr(166)=>249,chr(167)=>560,chr(168)=>392,chr(169)=>826,chr(170)=>378,chr(171)=>478,chr(172)=>566,chr(173)=>666,chr(174)=>501,chr(175)=>376, - chr(176)=>358,chr(177)=>566,chr(178)=>386,chr(179)=>374,chr(180)=>310,chr(181)=>521,chr(182)=>502,chr(183)=>242,chr(184)=>313,chr(185)=>329,chr(186)=>392,chr(187)=>478,chr(188)=>819,chr(189)=>828,chr(190)=>849,chr(191)=>458,chr(192)=>621,chr(193)=>621,chr(194)=>621,chr(195)=>621,chr(196)=>621,chr(197)=>621, - chr(198)=>839,chr(199)=>511,chr(200)=>536,chr(201)=>536,chr(202)=>536,chr(203)=>536,chr(204)=>249,chr(205)=>249,chr(206)=>249,chr(207)=>249,chr(208)=>627,chr(209)=>638,chr(210)=>616,chr(211)=>616,chr(212)=>616,chr(213)=>616,chr(214)=>616,chr(215)=>548,chr(216)=>616,chr(217)=>630,chr(218)=>630,chr(219)=>630, - chr(220)=>630,chr(221)=>543,chr(222)=>544,chr(223)=>593,chr(224)=>485,chr(225)=>485,chr(226)=>485,chr(227)=>485,chr(228)=>485,chr(229)=>485,chr(230)=>771,chr(231)=>400,chr(232)=>479,chr(233)=>479,chr(234)=>479,chr(235)=>479,chr(236)=>228,chr(237)=>228,chr(238)=>228,chr(239)=>228,chr(240)=>513,chr(241)=>521, - chr(242)=>498,chr(243)=>498,chr(244)=>498,chr(245)=>498,chr(246)=>498,chr(247)=>566,chr(248)=>498,chr(249)=>521,chr(250)=>521,chr(251)=>521,chr(252)=>521,chr(253)=>444,chr(254)=>518,chr(255)=>444); -$enc = 'cp1252'; -$uv = array(0=>array(0,128),128=>8364,130=>8218,131=>402,132=>8222,133=>8230,134=>array(8224,2),136=>710,137=>8240,138=>352,139=>8249,140=>338,142=>381,145=>array(8216,2),147=>array(8220,2),149=>8226,150=>array(8211,2),152=>732,153=>8482,154=>353,155=>8250,156=>339,158=>382,159=>376,160=>array(160,96)); -$file = 'klavika-light.z'; -$originalsize = 20264; -$subsetted = true; -?> diff --git a/images/extranet/docs/klavika-light.z b/images/extranet/docs/klavika-light.z deleted file mode 100644 index a224fe7dd..000000000 Binary files a/images/extranet/docs/klavika-light.z and /dev/null differ diff --git a/images/extranet/docs/klavika-medium.php b/images/extranet/docs/klavika-medium.php deleted file mode 100644 index a9ca27d67..000000000 --- a/images/extranet/docs/klavika-medium.php +++ /dev/null @@ -1,25 +0,0 @@ -750,'Descent'=>-250,'CapHeight'=>666,'Flags'=>32,'FontBBox'=>'[-20 -295 1203 1008]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>636); -$up = -123; -$ut = 20; -$cw = array( - chr(0)=>636,chr(1)=>636,chr(2)=>636,chr(3)=>636,chr(4)=>636,chr(5)=>636,chr(6)=>636,chr(7)=>636,chr(8)=>636,chr(9)=>636,chr(10)=>636,chr(11)=>636,chr(12)=>636,chr(13)=>636,chr(14)=>636,chr(15)=>636,chr(16)=>636,chr(17)=>636,chr(18)=>636,chr(19)=>636,chr(20)=>636,chr(21)=>636, - chr(22)=>636,chr(23)=>636,chr(24)=>636,chr(25)=>636,chr(26)=>636,chr(27)=>636,chr(28)=>636,chr(29)=>636,chr(30)=>636,chr(31)=>636,' '=>210,'!'=>284,'"'=>387,'#'=>698,'$'=>506,'%'=>877,'&'=>655,'\''=>207,'('=>335,')'=>335,'*'=>502,'+'=>528, - ','=>274,'-'=>372,'.'=>274,'/'=>459,'0'=>562,'1'=>384,'2'=>501,'3'=>492,'4'=>565,'5'=>502,'6'=>526,'7'=>460,'8'=>546,'9'=>521,':'=>274,';'=>274,'<'=>586,'='=>539,'>'=>586,'?'=>491,'@'=>738,'A'=>646, - 'B'=>577,'C'=>523,'D'=>604,'E'=>538,'F'=>522,'G'=>584,'H'=>649,'I'=>286,'J'=>271,'K'=>612,'L'=>505,'M'=>816,'N'=>694,'O'=>624,'P'=>576,'Q'=>624,'R'=>650,'S'=>540,'T'=>548,'U'=>632,'V'=>600,'W'=>944, - 'X'=>612,'Y'=>566,'Z'=>575,'['=>328,'\\'=>459,']'=>328,'^'=>475,'_'=>439,'`'=>314,'a'=>491,'b'=>528,'c'=>419,'d'=>533,'e'=>481,'f'=>363,'g'=>489,'h'=>545,'i'=>262,'j'=>255,'k'=>508,'l'=>262,'m'=>833, - 'n'=>545,'o'=>520,'p'=>533,'q'=>528,'r'=>333,'s'=>447,'t'=>355,'u'=>545,'v'=>483,'w'=>704,'x'=>468,'y'=>478,'z'=>460,'{'=>340,'|'=>255,'}'=>340,'~'=>482,chr(127)=>636,chr(128)=>538,chr(129)=>636,chr(130)=>274,chr(131)=>488, - chr(132)=>474,chr(133)=>822,chr(134)=>485,chr(135)=>485,chr(136)=>389,chr(137)=>1258,chr(138)=>540,chr(139)=>298,chr(140)=>896,chr(141)=>636,chr(142)=>575,chr(143)=>636,chr(144)=>636,chr(145)=>274,chr(146)=>264,chr(147)=>474,chr(148)=>474,chr(149)=>369,chr(150)=>500,chr(151)=>645,chr(152)=>423,chr(153)=>501, - chr(154)=>447,chr(155)=>298,chr(156)=>783,chr(157)=>636,chr(158)=>460,chr(159)=>566,chr(160)=>210,chr(161)=>284,chr(162)=>439,chr(163)=>542,chr(164)=>563,chr(165)=>558,chr(166)=>255,chr(167)=>548,chr(168)=>410,chr(169)=>796,chr(170)=>385,chr(171)=>504,chr(172)=>543,chr(173)=>636,chr(174)=>471,chr(175)=>360, - chr(176)=>357,chr(177)=>558,chr(178)=>400,chr(179)=>396,chr(180)=>314,chr(181)=>545,chr(182)=>526,chr(183)=>274,chr(184)=>300,chr(185)=>347,chr(186)=>387,chr(187)=>504,chr(188)=>858,chr(189)=>884,chr(190)=>891,chr(191)=>491,chr(192)=>646,chr(193)=>646,chr(194)=>646,chr(195)=>646,chr(196)=>646,chr(197)=>646, - chr(198)=>862,chr(199)=>523,chr(200)=>538,chr(201)=>538,chr(202)=>538,chr(203)=>538,chr(204)=>286,chr(205)=>286,chr(206)=>286,chr(207)=>286,chr(208)=>638,chr(209)=>694,chr(210)=>624,chr(211)=>624,chr(212)=>624,chr(213)=>624,chr(214)=>624,chr(215)=>495,chr(216)=>624,chr(217)=>632,chr(218)=>632,chr(219)=>632, - chr(220)=>632,chr(221)=>566,chr(222)=>576,chr(223)=>612,chr(224)=>491,chr(225)=>491,chr(226)=>491,chr(227)=>491,chr(228)=>491,chr(229)=>491,chr(230)=>742,chr(231)=>419,chr(232)=>481,chr(233)=>481,chr(234)=>481,chr(235)=>481,chr(236)=>262,chr(237)=>262,chr(238)=>262,chr(239)=>262,chr(240)=>504,chr(241)=>545, - chr(242)=>520,chr(243)=>520,chr(244)=>520,chr(245)=>520,chr(246)=>520,chr(247)=>542,chr(248)=>520,chr(249)=>545,chr(250)=>545,chr(251)=>545,chr(252)=>545,chr(253)=>478,chr(254)=>533,chr(255)=>478); -$enc = 'cp1252'; -$uv = array(0=>array(0,128),128=>8364,130=>8218,131=>402,132=>8222,133=>8230,134=>array(8224,2),136=>710,137=>8240,138=>352,139=>8249,140=>338,142=>381,145=>array(8216,2),147=>array(8220,2),149=>8226,150=>array(8211,2),152=>732,153=>8482,154=>353,155=>8250,156=>339,158=>382,159=>376,160=>array(160,96)); -$file = 'klavika-medium.z'; -$originalsize = 20280; -$subsetted = true; -?> diff --git a/images/extranet/docs/klavika-medium.z b/images/extranet/docs/klavika-medium.z deleted file mode 100644 index c927a3f04..000000000 Binary files a/images/extranet/docs/klavika-medium.z and /dev/null differ diff --git a/images/extranet/docs/klavika-regular.php b/images/extranet/docs/klavika-regular.php deleted file mode 100644 index 386ce6bee..000000000 --- a/images/extranet/docs/klavika-regular.php +++ /dev/null @@ -1,25 +0,0 @@ -750,'Descent'=>-250,'CapHeight'=>666,'Flags'=>32,'FontBBox'=>'[-16 -259 1157 985]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>656); -$up = -123; -$ut = 20; -$cw = array( - chr(0)=>656,chr(1)=>656,chr(2)=>656,chr(3)=>656,chr(4)=>656,chr(5)=>656,chr(6)=>656,chr(7)=>656,chr(8)=>656,chr(9)=>656,chr(10)=>656,chr(11)=>656,chr(12)=>656,chr(13)=>656,chr(14)=>656,chr(15)=>656,chr(16)=>656,chr(17)=>656,chr(18)=>656,chr(19)=>656,chr(20)=>656,chr(21)=>656, - chr(22)=>656,chr(23)=>656,chr(24)=>656,chr(25)=>656,chr(26)=>656,chr(27)=>656,chr(28)=>656,chr(29)=>656,chr(30)=>656,chr(31)=>656,' '=>215,'!'=>266,'"'=>375,'#'=>707,'$'=>518,'%'=>841,'&'=>616,'\''=>209,'('=>304,')'=>304,'*'=>473,'+'=>526, - ','=>254,'-'=>370,'.'=>256,'/'=>446,'0'=>552,'1'=>350,'2'=>486,'3'=>487,'4'=>537,'5'=>496,'6'=>512,'7'=>440,'8'=>544,'9'=>512,':'=>256,';'=>254,'<'=>558,'='=>509,'>'=>558,'?'=>476,'@'=>744,'A'=>622, - 'B'=>571,'C'=>516,'D'=>597,'E'=>540,'F'=>521,'G'=>578,'H'=>637,'I'=>266,'J'=>256,'K'=>588,'L'=>500,'M'=>798,'N'=>660,'O'=>622,'P'=>557,'Q'=>622,'R'=>632,'S'=>540,'T'=>524,'U'=>632,'V'=>592,'W'=>908, - 'X'=>589,'Y'=>548,'Z'=>580,'['=>309,'\\'=>441,']'=>309,'^'=>460,'_'=>430,'`'=>313,'a'=>493,'b'=>519,'c'=>409,'d'=>523,'e'=>481,'f'=>353,'g'=>490,'h'=>533,'i'=>244,'j'=>239,'k'=>484,'l'=>244,'m'=>827, - 'n'=>533,'o'=>506,'p'=>523,'q'=>519,'r'=>308,'s'=>439,'t'=>369,'u'=>533,'v'=>450,'w'=>696,'x'=>448,'y'=>448,'z'=>459,'{'=>313,'|'=>257,'}'=>313,'~'=>500,chr(127)=>656,chr(128)=>543,chr(129)=>656,chr(130)=>254,chr(131)=>495, - chr(132)=>433,chr(133)=>768,chr(134)=>485,chr(135)=>485,chr(136)=>396,chr(137)=>1212,chr(138)=>540,chr(139)=>290,chr(140)=>910,chr(141)=>656,chr(142)=>580,chr(143)=>656,chr(144)=>656,chr(145)=>254,chr(146)=>239,chr(147)=>433,chr(148)=>433,chr(149)=>373,chr(150)=>486,chr(151)=>612,chr(152)=>417,chr(153)=>511, - chr(154)=>439,chr(155)=>290,chr(156)=>793,chr(157)=>656,chr(158)=>459,chr(159)=>548,chr(160)=>215,chr(161)=>266,chr(162)=>424,chr(163)=>533,chr(164)=>556,chr(165)=>550,chr(166)=>257,chr(167)=>551,chr(168)=>391,chr(169)=>805,chr(170)=>379,chr(171)=>484,chr(172)=>551,chr(173)=>656,chr(174)=>471,chr(175)=>371, - chr(176)=>348,chr(177)=>546,chr(178)=>388,chr(179)=>386,chr(180)=>313,chr(181)=>533,chr(182)=>514,chr(183)=>256,chr(184)=>310,chr(185)=>333,chr(186)=>394,chr(187)=>484,chr(188)=>835,chr(189)=>851,chr(190)=>870,chr(191)=>476,chr(192)=>622,chr(193)=>622,chr(194)=>622,chr(195)=>622,chr(196)=>622,chr(197)=>622, - chr(198)=>839,chr(199)=>516,chr(200)=>540,chr(201)=>540,chr(202)=>540,chr(203)=>540,chr(204)=>266,chr(205)=>266,chr(206)=>266,chr(207)=>266,chr(208)=>631,chr(209)=>660,chr(210)=>622,chr(211)=>622,chr(212)=>622,chr(213)=>622,chr(214)=>622,chr(215)=>523,chr(216)=>622,chr(217)=>632,chr(218)=>632,chr(219)=>632, - chr(220)=>632,chr(221)=>548,chr(222)=>554,chr(223)=>594,chr(224)=>493,chr(225)=>493,chr(226)=>493,chr(227)=>493,chr(228)=>493,chr(229)=>493,chr(230)=>767,chr(231)=>409,chr(232)=>481,chr(233)=>481,chr(234)=>481,chr(235)=>481,chr(236)=>244,chr(237)=>244,chr(238)=>244,chr(239)=>244,chr(240)=>518,chr(241)=>533, - chr(242)=>506,chr(243)=>506,chr(244)=>506,chr(245)=>506,chr(246)=>506,chr(247)=>538,chr(248)=>506,chr(249)=>533,chr(250)=>533,chr(251)=>533,chr(252)=>533,chr(253)=>448,chr(254)=>523,chr(255)=>448); -$enc = 'cp1252'; -$uv = array(0=>array(0,128),128=>8364,130=>8218,131=>402,132=>8222,133=>8230,134=>array(8224,2),136=>710,137=>8240,138=>352,139=>8249,140=>338,142=>381,145=>array(8216,2),147=>array(8220,2),149=>8226,150=>array(8211,2),152=>732,153=>8482,154=>353,155=>8250,156=>339,158=>382,159=>376,160=>array(160,96)); -$file = 'klavika-regular.z'; -$originalsize = 20044; -$subsetted = true; -?> diff --git a/images/extranet/docs/klavika-regular.z b/images/extranet/docs/klavika-regular.z deleted file mode 100644 index 6e781efee..000000000 Binary files a/images/extranet/docs/klavika-regular.z and /dev/null differ diff --git a/images/extranet/docs/template.pdf b/images/extranet/docs/template.pdf new file mode 100644 index 000000000..347dff240 Binary files /dev/null and b/images/extranet/docs/template.pdf differ diff --git a/inc/commons/Metier/class.common.utilisateur.php b/inc/commons/Metier/class.common.utilisateur.php index 8435967a2..e7c462e6c 100644 --- a/inc/commons/Metier/class.common.utilisateur.php +++ b/inc/commons/Metier/class.common.utilisateur.php @@ -32,6 +32,7 @@ class commonUtilisateur extends cubeMetier { protected $ws_rights; protected $ws_signatures; protected $ws_domains; + protected $ca; protected $enabled; public function getEmail() { diff --git a/inc/extranet/DAO/class.extranet.dao.devis.php b/inc/extranet/DAO/class.extranet.dao.devis.php index 6a4f12eff..705241f0e 100644 --- a/inc/extranet/DAO/class.extranet.dao.devis.php +++ b/inc/extranet/DAO/class.extranet.dao.devis.php @@ -220,7 +220,7 @@ class extranetDAODevis extends commonDAO { if (file_exists(ROOT . '/docs/devis/' . $devis->devis_id . '.pdf')) { rename(ROOT . '/docs/devis/' . $devis->devis_id . '.pdf', ROOT . '/docs/devis/' . $devis->devis_id . '_' . filemtime(ROOT . '/docs/devis/' . $devis->devis_id . '.pdf') . '.pdf'); } - $pdf->Output(ROOT . '/docs/devis/' . $devis->devis_id . '.pdf'); + $pdf->Output('F',ROOT . '/docs/devis/' . $devis->devis_id . '.pdf'); // Restaure les paramètres de langue de l'utilisateur global $core; cubeLang::set($core->user->lang); diff --git a/inc/extranet/DAO/class.extranet.dao.facture.php b/inc/extranet/DAO/class.extranet.dao.facture.php index 888f2965e..98019000e 100644 --- a/inc/extranet/DAO/class.extranet.dao.facture.php +++ b/inc/extranet/DAO/class.extranet.dao.facture.php @@ -256,7 +256,7 @@ class extranetDAOFacture extends commonDAO { public function saveAsPDF($facture_id) { $facture = $this->selectById($facture_id); $daoUtilisateur = new commonDAOUtilisateur($this->con); - $facture->client = $daoUtilisateur->selectById($facture->client_id); + $facture->client = $daoUtilisateur->selectById($facture->client_id,'clients'); $facture->createur = $daoUtilisateur->selectById($facture->createur_id); if ($facture->status == 4) { $facture->avoir = $this->selectById($facture->avoir); @@ -267,7 +267,7 @@ class extranetDAOFacture extends commonDAO { if (file_exists(ROOT . '/docs/factures/' . $facture->facture_id . '.pdf')) { rename(ROOT . '/docs/factures/' . $facture->facture_id . '.pdf', ROOT . '/docs/factures/' . $facture->facture_id . '_' . filemtime(ROOT . '/docs/factures/' . $facture->facture_id . '.pdf') . '.pdf'); } - $pdf->Output(ROOT . '/docs/factures/' . $facture->facture_id . '.pdf'); + $pdf->Output('F', ROOT . '/docs/factures/' . $facture->facture_id . '.pdf'); } public function savePaiement($data) { diff --git a/inc/extranet/Metier/class.extranet.devis.php b/inc/extranet/Metier/class.extranet.devis.php index 3b3342d0d..ae624c2e1 100644 --- a/inc/extranet/Metier/class.extranet.devis.php +++ b/inc/extranet/Metier/class.extranet.devis.php @@ -1,32 +1,23 @@ fond = SYSIMG . '/devis.png'; - $this->fond1 = SYSIMG . '/devis2page1.png'; - $this->fond2 = SYSIMG . '/devis2page2.png'; + public function getBackground() { + $this->fond = 1; + $this->fond1 = 2; + $this->fond2 = 3; + $this->fond3 = 4; } - protected function documentTitre() - { + protected function documentTitre() { $lang = $this->client->lang; - $titre = __('DEVIS') . "\n"; - if ($lang == 'fr') { - $titre .= strftime('%d %B %Y', $this->date_creation); - } else { - $titre .= date('F jS Y'); - } - $titre .= "\n\n" . $this->nom; + $titre = __('DEVIS'); return $titre; } - protected function isFacture() - { + protected function isFacture() { return false; } } - -?> \ No newline at end of file diff --git a/inc/extranet/Metier/class.extranet.document.php b/inc/extranet/Metier/class.extranet.document.php index 81510f7b2..eb93d5d71 100644 --- a/inc/extranet/Metier/class.extranet.document.php +++ b/inc/extranet/Metier/class.extranet.document.php @@ -12,31 +12,51 @@ abstract class extranetDocument extends cubeMetier { protected $fond; protected $fond1; protected $fond2; + protected $fond3; protected $adresse; // Attributs composés protected $createur; protected $client; + protected $pdf; + protected $euro; public function saveAsPDF() { - $cesure = $this->testPDF(); - if ($this->isFacture() && $cesure) { - $cesure = false; + $pdf = $this->testPDF(); + $pages = $pdf['pages']; + $cesures = $pdf['cesures']; + if ($this->isFacture() && $pages > 1) { + $pages = 1; $displayDescription = false; } else { $displayDescription = true; } - $pdf = new FPDF('P', 'mm', 'A4'); - $pdf->SetAutoPageBreak(false); + $template = ROOT . '/images/extranet/docs/'; + + + $this->euro = ' ' . chr(128); + + $this->pdf = new FPDI(); + $this->pdf->SetAutoPageBreak(false); + $this->pdf->setSourceFile($template . 'template.pdf'); + + $this->pdf->AddFont('KlavikaLight', '', 'klavika-light.php'); + $this->pdf->AddFont('KlavikaLight', 'B', 'klavika-medium.php'); + $this->pdf->AddFont('Klavika', '', 'klavika-regular.php'); + $this->pdf->AddFont('Klavika', 'B', 'klavika-bold.php'); + $this->getBackground(); - if (!$cesure) { - $pdf->AddPage(); - $pdf->Image($this->fond, 10, 10, 194.1); + + $page = 1; + + if ($pages == 1) { + $this->addPage($this->fond); } else { - $pdf->AddPage(); - $pdf->Image($this->fond1, 10, 10, 194.1); + $this->addPage($this->fond1); } - $pdf->SetTextColor(0, 0, 0); + + $this->pdf->SetTextColor(0, 0, 0); + // Bloc adresse if (trim($this->adresse) == '') { $client = self::escape($this->client->rs); @@ -48,12 +68,12 @@ abstract class extranetDocument extends cubeMetier { $client = self::escape($l0); $adresse = self::escape(implode("\n", $l)); } - $pdf->SetXY(114, 45); - $pdf->SetFont('Helvetica', 'B', 11); - $pdf->MultiCell(80, 8, $client, 0, 2); - $pdf->SetX(114); - $pdf->SetFont('Helvetica', '', 11); - $pdf->MultiCell(80, 6, $adresse); + $this->pdf->SetXY(114, 45); + $this->pdf->SetFont('KlavikaLight', 'B', 12); + $this->pdf->MultiCell(80, 8, $client, 0, 2); + $this->pdf->SetX(114); + $this->pdf->SetFont('KlavikaLight', '', 12); + $this->pdf->MultiCell(80, 6, $adresse); // Bloc TVA Intra if ($this instanceof extranetFacture) { $texte_tva = ''; @@ -64,45 +84,65 @@ abstract class extranetDocument extends cubeMetier { $texte_tva .= $this->texte_complementaire; } if ($texte_tva != '') { - $pdf->SetFont('Helvetica', '', 8); - $pdf->setXY(114, 80); - $pdf->MultiCell(80, 6, self::escape(trim($texte_tva))); + $this->pdf->SetFont('KlavikaLight', '', 8); + $this->pdf->setXY(114, 90); + $this->pdf->MultiCell(80, 4, self::escape(trim($texte_tva))); } } // Bloc titre - $pdf->SetXY(15, 70); + $this->pdf->SetXY(6, 60); $titre = $this->documentTitre($this->client->lang); - $pdf->SetFont('Helvetica', 'B', 10); - $pdf->MultiCell(73, 4, self::escape($titre), 0, 'L'); + $this->pdf->SetFont('KlavikaLight', 'B', 15); + $this->pdf->MultiCell(73, 4, self::escape($titre), 0, 'L'); + + $this->pdf->SetXY(6, $this->pdf->GetY() + 3); + $this->pdf->SetFont('KlavikaLight', '', 11); + $titre = ''; + if ($this->client->lang == 'fr') { + $titre .= strftime('%d %B %Y', $this->date_creation); + } else { + $titre .= date('F jS Y'); + } + $titre .= "\n\n" . $this->nom; + $this->pdf->MultiCell(73, 4, self::escape($titre), 0, 'L'); + // blocs - $pdf->setY(105); + $this->pdf->setY(115); foreach ($this->lignes as $i => $ligne) { - if ($cesure && $i == $cesure) { - fb($pdf); - $pdf->AddPage(); - $pdf->Image($this->fond2, 10, 10, 194.1); - $pdf->setY(20); + if ($pages > 1 && $i == $cesures[$page]) { + $page++; + fb($page . '=?' . $pages); + + if ($page == $pages) { + $tpl = $this->fond3; + } else { + $tpl = $this->fond2; + } + + $this->addPage($tpl); + $this->pdf->setY(25); } - $y = $pdf->getY() + 5; + $y = $this->pdf->getY() + 5; - $pdf->SetFont('Helvetica', 'B', 10); + $this->pdf->SetFont('Klavika', '', 10); // Prix - $pdf->SetXY(170, $y); + $this->pdf->SetXY(170, $y); $ligne['montant'] = trim($ligne['montant']); if (is_numeric($ligne['montant'])) { - $pdf->Cell(30, 4, cubePrices::formatAmount($ligne['montant'], $this->client->lang) . ' euros', 0, 0, 'R'); + $this->pdf->Cell(33, 4, cubePrices::formatAmount($ligne['montant'], $this->client->lang) . $this->euro, 0, 0, 'R'); } else { - $pdf->Cell(30, 4, self::escape($ligne['montant']), 0, 0, 'R'); + $this->pdf->Cell(33, 4, self::escape($ligne['montant']), 0, 0, 'R'); } // Titre - $pdf->setXY(13, $y); - $pdf->Cell(151, 4, self::escape(trim($ligne['titre'])), 0, 1); + $this->pdf->SetFont('Klavika', 'B', 10); + $this->pdf->setXY(6, $y); + $this->pdf->Cell(171, 4, self::escape(trim($ligne['titre'])), 0, 1); // Contenu if ($displayDescription) { - $pdf->SetX(13); - $pdf->SetFont('Helvetica', '', 10); - $pdf->MultiCell(151, 4, self::escape($ligne['description'])); + $this->pdf->SetXY(6, $this->pdf->getY() + 1); + $this->pdf->SetFont('Klavika', '', 10); + $this->pdf->MultiCell(171, 4, self::escape($ligne['description'])); } } // Prix @@ -120,78 +160,131 @@ abstract class extranetDocument extends cubeMetier { $ttcf = cubePrices::formatAmount($ttc, $this->client->lang); $taxes = ($tva > 0) ? cubePrices::formatAmount($ttc - $this->total_ht, $this->client->lang, 2) : ''; // Affichage du montant hors taxes - $pdf->setFont('Helvetica', 'B', 10); - if ($cesure) { - $pdf->SetXY(170, 210); + $this->pdf->setFont('KlavikaLight', 'B', 10); + if ($pages == 1) { + //$this->pdf->SetXY(170, 210); + $this->pdf->SetXY(170, 218.5); + $space = 9.5; } else { - $pdf->SetXY(170, 223); + $this->pdf->SetXY(170, 218); + $space = 9.7; } - $space = 8.5; - $pdf->Cell(30, $space, cubePrices::formatAmount($this->total_ht, $this->client->lang) . ' euros', 0, 1, 'R'); - $pdf->SetX(170); - $pdf->setFont('Helvetica', '', 10); + $this->pdf->Cell(32, $space, cubePrices::formatAmount($this->total_ht, $this->client->lang) . $this->euro, 0, 1, 'R'); + $this->pdf->SetX(170); + $this->pdf->setFont('KlavikaLight', '', 10); // Affichage du taux de tva et du montant des taxes - $pdf->Cell(30, $space, $tva_text, 0, 1, 'R'); - $pdf->SetX(170); + $this->pdf->Cell(32, $space, $tva_text, 0, 1, 'R'); + $this->pdf->SetX(170); if ($tva) { - $pdf->Cell(31, $space, $taxes . ' euros', 0, 1, 'R'); + $this->pdf->Cell(32, $space, $taxes . $this->euro, 0, 1, 'R'); } else { - $pdf->Cell(31, $space, '-', 0, 1, 'R'); + $this->pdf->Cell(32, $space, '-', 0, 1, 'R'); } - $pdf->SetX(170); + $this->pdf->SetX(170); - $pdf->SetTextColor(255, 255, 255); - $pdf->setFont('Helvetica', 'B', 10); - $pdf->Cell(30, $space, $ttcf . ' euros', 0, 1, 'R'); + $this->pdf->SetTextColor(255, 255, 255); + $this->pdf->setFont('KlavikaLight', 'B', 10); + $this->pdf->Cell(32, $space + 1, $ttcf . $this->euro, 0, 1, 'R'); if (isset($notes)) { - $pdf->setXY(8, 268); - $pdf->setTextColor(0, 0, 0); - $pdf->setFont('Helvetica', '', 8); - $pdf->Cell(195, 0, self::escape($notes), 0, 1, 'R'); + $this->pdf->setXY(8, 268); + $this->pdf->setTextColor(0, 0, 0); + $this->pdf->setFont('Klavika', '', 8); + $this->pdf->Cell(195, 0, self::escape($notes), 0, 1, 'R'); } - return $pdf; + return $this->pdf; + } + + public function addPage($page) { + $templateIndex = $this->pdf->importPage($page); + $this->pdf->AddPage(); + $this->pdf->useTemplate($templateIndex); } protected function testPDF() { - $pdf = new FPDF('P', 'mm', 'A4'); + $pdf = new FPDF('P', 'mm', array(210, 2000)); + $pdf->AddFont('KlavikaLight', '', 'klavika-light.php'); + $pdf->AddFont('KlavikaLight', 'B', 'klavika-medium.php'); + $pdf->AddFont('Klavika', '', 'klavika-regular.php'); + $pdf->AddFont('Klavika', 'B', 'klavika-bold.php'); $pdf->AddPage(); $pdf->SetAutoPageBreak(false); - $pdf->setY(105); - $pages = 1; + + $lines = array(); + + $lastY = -5; foreach ($this->lignes as $i => $ligne) { $y = $pdf->getY() + 5; - $pdf->SetFont('Helvetica', 'B', 10); + $pdf->SetFont('Klavika', 'B', 10); // Prix $pdf->SetXY(170, $y); $ligne['montant'] = trim($ligne['montant']); if (is_numeric($ligne['montant'])) { - $pdf->Cell(30, 4, cubePrices::formatAmount($ligne['montant'], $this->client->lang) . ' euros', 0, 0, 'R'); + $pdf->Cell(33, 4, cubePrices::formatAmount($ligne['montant'], $this->client->lang) . $this->euro, 0, 0, 'R'); } else { - $pdf->Cell(30, 4, self::escape($ligne['montant']), 0, 0, 'R'); + $pdf->Cell(33, 4, self::escape($ligne['montant']), 0, 0, 'R'); } // Titre $pdf->setXY(13, $y); $pdf->Cell(151, 4, self::escape(trim($ligne['titre'])), 0, 1); // Contenu $pdf->SetX(13); - $pdf->SetFont('Helvetica', '', 10); - $pdf->MultiCell(151, 4, self::escape(trim($ligne['description']))); - fb($pdf->getY()); - if ($pdf->getY() > 225) { - $pages = 2; - } - if ($pdf->getY() > 280) { - return $i; - } + $pdf->SetFont('Klavika', '', 10); + $pdf->MultiCell(171, 4, self::escape(trim($ligne['description']))); + + $y = $pdf->getY(); + $lines[] = $y - $lastY; + $lastY = $y; } - if ($pages == 1) { - return false; + $cesures = array(); + $h = $pdf->getY(); + if ($h <= 105) { + $pages = 1; + } elseif ($h <= 355) { + $pages = 2; } else { - return $i; + $pages = 2 + ceil(($h - 355) / 245); } + + $nb_lines = count($lines); + if ($pages > 1) { + $i = 0; + $y = 0; + for ($page = 1; $page <= $pages; $page++) { + if ($page == 1) { + $limit = 170; + } else if ($page == $pages) { + $limit = 10000; + } else { + $limit = 245; + } + for (; $i <= $nb_lines; $i++) { + $y += $lines[$i]; + if ($y > $limit) { + $cesures[$page] = $i; + $y = $lines[$i]; + continue 2; + } + } + + if ($i >= $nb_lines) { + break; + } + } + } + + $pages=max(count($cesures),$pages); + + if (!isset($cesures[$pages - 1])) { + $cesures[$pages - 1] = $nb_lines - 1; + } + + + $res = array('pages' => $pages, 'cesures' => $cesures); + fb($res); + return $res; } protected function escape($str) { @@ -201,5 +294,3 @@ abstract class extranetDocument extends cubeMetier { abstract protected function documentTitre(); } - -?> \ No newline at end of file diff --git a/inc/extranet/Metier/class.extranet.facture.php b/inc/extranet/Metier/class.extranet.facture.php index e9d00995a..70a4073f3 100644 --- a/inc/extranet/Metier/class.extranet.facture.php +++ b/inc/extranet/Metier/class.extranet.facture.php @@ -1,4 +1,5 @@ status == 0) { - $this->fond1 = $this->fond2 = $this->fond = SYSIMG . '/facture-brouillon.png'; + $this->fond3 = $this->fond1 = $this->fond2 = $this->fond = 5; } else { - $this->fond1 = $this->fond2 = $this->fond = SYSIMG . '/facture.png'; + $this->fond3 = $this->fond1 = $this->fond2 = $this->fond = 5; } } - public function numeroFacture() - { + public function numeroFacture() { return date('ymd', $this->date_creation) . 'XT' . cubeMath::fill($this->facture_id, 5); } - protected function documentTitre() - { + protected function documentTitre() { $lang = $this->client->lang; if ($this->status == 4 || $this->total_ht < 0) { $titre = __('AVOIR'); @@ -35,18 +33,10 @@ class extranetFacture extends extranetDocument { if ($this->status == 4) { $titre .= __('Annule la facture') . ' # ' . $this->avoir->numeroFacture(); } - $titre .= "\n"; - if ($lang == 'fr') { - $titre .= 'Le ' . strftime('%d %B %Y', $this->date_creation); - } else { - $titre .= date('F jS Y', $this->date_creation); - } - $titre .= "\n\n" . $this->nom; return $titre; } - protected function isFacture() - { + protected function isFacture() { return true; } }