ETDA / e-TaxInvoice-PDFgen

e-Tax Invoice by Email - PDF Generator on PC
GNU Affero General Public License v3.0
134 stars 89 forks source link

Extract XML generation logic into its own repo and publish a public NuGet package #8

Open varokas opened 7 years ago

varokas commented 7 years ago

This will have many benefits to both the project and the community

  1. People who have their own PDF / Invoice generation program would only be interested only in the xml generation logic
  2. It's easier to add test and understand the code. The generation method also needs fix on edge cases along with many other unimplemented cases.
  3. Possible to use this as a reference implementation to the spec.

Specifically I'm talking about the code around this part

https://github.com/ETDA/e-TaxInvoice-PDFgen/blob/master/eTaxInvoicePdfGenerator/util/getInvoice_Xml.cs

https://github.com/ETDA/e-TaxInvoice-PDFgen/blob/master/eTaxInvoicePdfGenerator/PDFA3/ElectronicDocument.cs

varokas commented 7 years ago

For myself, I don't have a Windows machine. So the only way I can contribute is to work on the logic part that is extracted out of the UI.

The project fail miserably to open in Visual Studio for Mac.

varokas commented 7 years ago

I put some bounty here: https://www.facebook.com/varokas/posts/10155908745593690

So a few people is coming to help with this issue soon. =)

mahasak commented 7 years ago

I want to take this one, however what it the target platform user for this lib ? Should we make it multi-target ?

varokas commented 7 years ago

Windows is fine ( I think ). This is how I imagine this would look like.

There should be a core logic (einvoice) that is multi target, and can be imported by any dotnet platform (core included).

This will open up for any other billing software to import.

We can start by

  1. Start a DotNet Core (einvoice) project (blank + some initial test)
  2. Create empty NuGet pkg, push to public NuGet repo, then add it in to this main project
  3. extract the logic in question out, piece by piece
[ e-TaxInvoice-PDFgen (dotNet, Windows) ] 
|
-- [einvoice (dotNetCore, Multi)]  -- [other billing program (dotNet*, Multi)]                                                     
mahasak commented 7 years ago

I buy in for the idea to expose an API to allow any billing system to import this lib.

Tonight, i will start with read all the codebase before we can go lah.

wk-j commented 7 years ago

I have this kind of implementation written in F#, if you like to grep some codes.

mahasak commented 7 years ago

i am extracted those two class to seperate nuget package, One thing that concerns me is iTextSharp...It's not officialy support dotnetcore, so we might take a look into xmp schema later.

varokas commented 7 years ago

@wk-j we started to put the core code here https://github.com/mahasak/ETDA.Invoice.Api

varokas commented 7 years ago

@mahasak Can we put ETDA.Invoice.Api to NuGet and start integrating with this?

mahasak commented 7 years ago

Done with Integrating with API, PR #11 is waiting to review and merge.

ultimaweapon commented 7 years ago

ผมว่าเราไม่ควรลงมือทำก่อนที่จะได้ความคิดเห็นจากเจ้าของ repo นี้นะครับ ควรจะถามเขาก่อนว่าคิดยังไง มีอะไรที่เขาไม่เข้าใจรึเปล่า ควรจะให้เขาเข้าใจเป้าหมายทั้งหมดก่อนแล้วค่อยลงมือทำ

ยกตัวอย่าง https://github.com/ETDA/e-TaxInvoice-PDFgen/pull/7 ก็ได้ ที่เราช่วยกันอธิบายให้เขาเข้าใจ

mahasak commented 7 years ago

@ExUltima We are already have small a Facebook group together with ETDA engineer to update what we are doing krub, We will let them review :) anyway.