{"action":"created","issue":{"url":"https://api.github.com/repos/pufexi/multiorder/issues/317","repository_url":"https://api.github.com/repos/pufexi/multiorder","labels_url":"https://api.github.com/repos/pufexi/multiorder/issues/317/labels{/name}","comments_url":"https://api.github.com/repos/pufexi/multiorder/issues/317/comments","events_url":"https://api.github.com/repos/pufexi/multiorder/issues/317/events","html_url":"https://github.com/pufexi/multiorder/issues/317","id":211028309,"number":317,"title":"Oprava funkce \"Učtovat bez DPH\"","user":{"login":"pufexi","id":10209182,"avatar_url":"https://avatars3.githubusercontent.com/u/10209182?v=3","gravatar_id":"","url":"https://api.github.com/users/pufexi","html_url":"https://github.com/pufexi","followers_url":"https://api.github.com/users/pufexi/followers","following_url":"https://api.github.com/users/pufexi/following{/other_user}","gists_url":"https://api.github.com/users/pufexi/gists{/gist_id}","starred_url":"https://api.github.com/users/pufexi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pufexi/subscriptions","organizations_url":"https://api.github.com/users/pufexi/orgs","repos_url":"https://api.github.com/users/pufexi/repos","events_url":"https://api.github.com/users/pufexi/events{/privacy}","received_events_url":"https://api.github.com/users/pufexi/received_events","type":"User","site_admin":false},"labels":[{"id":168648648,"url":"https://api.github.com/repos/pufexi/multiorder/labels/high%20priority","name":"high priority","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"ok2cqr","id":347833,"avatar_url":"https://avatars3.githubusercontent.com/u/347833?v=3","gravatar_id":"","url":"https://api.github.com/users/ok2cqr","html_url":"https://github.com/ok2cqr","followers_url":"https://api.github.com/users/ok2cqr/followers","following_url":"https://api.github.com/users/ok2cqr/following{/other_user}","gists_url":"https://api.github.com/users/ok2cqr/gists{/gist_id}","starred_url":"https://api.github.com/users/ok2cqr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ok2cqr/subscriptions","organizations_url":"https://api.github.com/users/ok2cqr/orgs","repos_url":"https://api.github.com/users/ok2cqr/repos","events_url":"https://api.github.com/users/ok2cqr/events{/privacy}","received_events_url":"https://api.github.com/users/ok2cqr/received_events","type":"User","site_admin":false},"assignees":[{"login":"ok2cqr","id":347833,"avatar_url":"https://avatars3.githubusercontent.com/u/347833?v=3","gravatar_id":"","url":"https://api.github.com/users/ok2cqr","html_url":"https://github.com/ok2cqr","followers_url":"https://api.github.com/users/ok2cqr/followers","following_url":"https://api.github.com/users/ok2cqr/following{/other_user}","gists_url":"https://api.github.com/users/ok2cqr/gists{/gist_id}","starred_url":"https://api.github.com/users/ok2cqr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ok2cqr/subscriptions","organizations_url":"https://api.github.com/users/ok2cqr/orgs","repos_url":"https://api.github.com/users/ok2cqr/repos","events_url":"https://api.github.com/users/ok2cqr/events{/privacy}","received_events_url":"https://api.github.com/users/ok2cqr/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/pufexi/multiorder/milestones/5","html_url":"https://github.com/pufexi/multiorder/milestone/5","labels_url":"https://api.github.com/repos/pufexi/multiorder/milestones/5/labels","id":959911,"number":5,"title":"Verze VI","description":null,"creator":{"login":"pufexi","id":10209182,"avatar_url":"https://avatars3.githubusercontent.com/u/10209182?v=3","gravatar_id":"","url":"https://api.github.com/users/pufexi","html_url":"https://github.com/pufexi","followers_url":"https://api.github.com/users/pufexi/followers","following_url":"https://api.github.com/users/pufexi/following{/other_user}","gists_url":"https://api.github.com/users/pufexi/gists{/gist_id}","starred_url":"https://api.github.com/users/pufexi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pufexi/subscriptions","organizations_url":"https://api.github.com/users/pufexi/orgs","repos_url":"https://api.github.com/users/pufexi/repos","events_url":"https://api.github.com/users/pufexi/events{/privacy}","received_events_url":"https://api.github.com/users/pufexi/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":64,"state":"open","created_at":"2015-02-01T01:38:44Z","updated_at":"2017-04-01T21:17:34Z","due_on":null,"closed_at":null},"comments":21,"created_at":"2017-03-01T09:47:10Z","updated_at":"2017-04-04T08:17:01Z","closed_at":null,"body":"V detailu objednavky najdete zaskrtavatko Uctovat bez DPH, je to z duvodu prodeje zbozi jako platce dph do zahranici jinym platcum, pak zakon pravi, ze se jim prodava bez DPH a oni dph odvedou ve svem state. Typicky je to prodej z GourmetKava na Slovensko jine firme. \r\n\r\nV objednavce se to projevi orders.nodph=1\r\n\r\nTedy je to primitivni, co by se melo dit, je ze se vypocte zaklad DPH a dph 0% a vysledna cena je zaklad DPH. Dobre nam to jiz funguje v PDF fakture, tam je to spravne. \r\n\r\nSpatne to funguje:\r\n1) v seznamu objednávek je vysledna cena, je tam nejaky nizsi nesmysl, opravte to dle vypoctu DPH ve PDF fakture\r\n\r\n2) dole pod seznamem objednavek je Export CSV, je to export CSV objednavek pro dopravce, sem se exportuje cena objednavky jako udana cena a jako cena dobirky. Exportuje se pouze v pripade ze ma zaskrtnuty ten checkbox (ctverecek) napravo ve vypisu objednavek) tj. orders.checked=1 (to je jen takove manualni zaskrtavatko). Vytvorte si tam tedy cvicne objednavku, kde bude platba dobirka, dopravce GLS, dopravce ZA-POB (Zasilkovna pobočka), DR (balík do ruky ceska posta) a meli by vam tam vyjet 3 CSV, ve kterych by mela byt spravne cena dobirky, snad nejak intuitivne poznate, kdyztak volejte.\r\n\r\n3) v XML exportu pro Pohoda, dela se to tak, ze se klikne na detail objednavky a tam je XML faktura, ta je struktura spravne, ale jsou tam spatny ceny vuci PDF. Podobne se daji tyhle faktury generovat hromadne do ZIP, kdyz se sjede uplne dolu v Objednavkach je tam Export XML faktur, tak tim se vyexportuji vsechny faktury, ktere jsou v tom seznamu, tj. treba v tom za poslednich 14 dni. Ale podle me to pouziva stejnou fukcni, spis to jenom over. Diky\r\n- POZOR, ty faktury se ukladaji do slozky faktury a kdyz je vygenerovana, z te se to nacita, takze takhle muzes delat upravy donekonecna a nic se nestane, je treba vzdy smaznout cache a obsah slozky faktury/xml\r\n\r\n**Tady se nabizi otazka, je dostatecne srozumitelne jak se pocita dph v PDF fakture?** Abyste to od toho mohl obslehnout a nestalo se ze kazda cast MO to pocita trochu jinak? Pripadne je to mozne sjednotit, ale k tomu, cemu jsme dosli v te PDF fakture vedla nejaka cesta, ktera davala smysl, aby to pak dobre importoval ucetni program POHODA.\r\n\r\nJe asi nutne mi nejdrive zodpovedet tuto otazku :-)"},"comment":{"url":"https://api.github.com/repos/pufexi/multiorder/issues/comments/291427511","html_url":"https://github.com/pufexi/multiorder/issues/317#issuecomment-291427511","issue_url":"https://api.github.com/repos/pufexi/multiorder/issues/317","id":291427511,"user":{"login":"pufexi","id":10209182,"avatar_url":"https://avatars3.githubusercontent.com/u/10209182?v=3","gravatar_id":"","url":"https://api.github.com/users/pufexi","html_url":"https://github.com/pufexi","followers_url":"https://api.github.com/users/pufexi/followers","following_url":"https://api.github.com/users/pufexi/following{/other_user}","gists_url":"https://api.github.com/users/pufexi/gists{/gist_id}","starred_url":"https://api.github.com/users/pufexi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pufexi/subscriptions","organizations_url":"https://api.github.com/users/pufexi/orgs","repos_url":"https://api.github.com/users/pufexi/repos","events_url":"https://api.github.com/users/pufexi/events{/privacy}","received_events_url":"https://api.github.com/users/pufexi/received_events","type":"User","site_admin":false},"created_at":"2017-04-04T08:17:01Z","updated_at":"2017-04-04T08:17:01Z","body":"tak myslim, ze jsme na dobry ceste :-) funguje moznost s DPH, s DPH EUR a bez DPH se zobrazuje a pocita spravne postovne, spravne tam jsou ty sazby 0%, takze tenhle zaklad uz mame dobrej a jen jsou spatn UnitPrice, \r\n\r\n1) ten produkt Testovaci produkt 21 je uplne normalni produkt (zadne quantity a materske polozky) a ma <typ:unitPrice>0.0191</typ:unitPrice> ale v objednavce je 0,11 (coz je jakoby s DPH), tj. pokud to vypoctu bez je to 0,11 -> **0,0909** ... to je tusim podle tohodle vypoctu, ale to uz moc dobre znate jak vypocitat cenu bez DPH $item->price - ($item->price * round($ware->dph*100 / (100 + $ware->dph*100),4)) : 0}\r\n\r\n2) ten produkt 851 \tKáva 250g ma v MO 22 jakoby s DPH, ale tady ho musime zobrazit bez DPH viz jako vyse, ale zaroven je to produkt, co ma materskou polozku Káva 1kg, takze se musi prepocitat, to se spranvne prepocitalo jiz <inv:quantity> z 1 na 0,25 a cena by se mela prepocitat taky z 22 na 88 a prepocitat na bez DPH na **72,7272**\r\n\r\nTy tucne proste musi byt v tom XML jako UnitPrice jak ne, je to blbe :-)"}}
{"actor":{"display_login":"pufexi"}}