invopop / gobl

Go Business Language
Apache License 2.0
80 stars 5 forks source link

Remove draft flag #350

Closed samlown closed 4 days ago

samlown commented 3 weeks ago

After much debate, this PR finally removes the "draft" boolean property from the envelope headers.

Draft status was previously used to apply additional validation rules to header stamps and special fields like the invoice "code". This functionality has now been moved to the signatures. If an envelope is signed, thus locking in the potential for any changes, the additional validation rules will be run.

This change comes after continued confusion about the role and usefulness of the draft flag. The signature functionality has always been in GOBL and is far easier to understand, so this is a natural replacement.

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 91.15646% with 13 lines in your changes missing coverage. Please review.

Project coverage is 77.30%. Comparing base (b38541f) to head (b6aae1f). Report is 47 commits behind head on main.

Files with missing lines Patch % Lines
bill/invoice_scenarios.go 85.18% 4 Missing and 4 partials :warning:
tax/set.go 70.58% 3 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #350 +/- ## ========================================== + Coverage 76.26% 77.30% +1.03% ========================================== Files 175 179 +4 Lines 8040 8054 +14 ========================================== + Hits 6132 6226 +94 + Misses 1545 1469 -76 + Partials 363 359 -4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

samlown commented 4 days ago

Closing in favour of #359