Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: juntagrico/juntagrico-billing
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.6.3
Choose a base ref
...
head repository: juntagrico/juntagrico-billing
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 14 commits
  • 15 files changed
  • 1 contributor

Commits on Sep 8, 2024

  1. corrected path to datatables static

    samuel-iseli committed Sep 8, 2024
    Copy the full SHA
    095c586 View commit details
  2. increment version to 1.6.4

    samuel-iseli authored Sep 8, 2024
    Copy the full SHA
    652e4f4 View commit details

Commits on Feb 6, 2025

  1. Copy the full SHA
    b61bfda View commit details
  2. Copy the full SHA
    680178f View commit details
  3. set version to 1.6.5

    samuel-iseli committed Feb 6, 2025
    Copy the full SHA
    674b352 View commit details
  4. added settings option for juntagrico compatibility

    samuel-iseli committed Feb 6, 2025
    Copy the full SHA
    b873b0d View commit details
  5. codeclimate fix

    samuel-iseli committed Feb 6, 2025
    Copy the full SHA
    868f0d6 View commit details
  6. Merge pull request #50 from juntagrico/vat_recalc

    Vat recalc
    samuel-iseli authored Feb 6, 2025
    Copy the full SHA
    7d50652 View commit details

Commits on Feb 26, 2025

  1. Copy the full SHA
    1bb1f4b View commit details

Commits on Feb 27, 2025

  1. Copy the full SHA
    27b383d View commit details
  2. set version to 1.6.6

    samuel-iseli committed Feb 27, 2025
    Copy the full SHA
    ee15546 View commit details
  3. Copy the full SHA
    7ee69f3 View commit details
  4. added unit test for generating member balances

    samuel-iseli committed Feb 27, 2025
    Copy the full SHA
    08c38ec View commit details
  5. change github actions upload and download artifacts to V4

    samuel-iseli committed Feb 27, 2025
    Copy the full SHA
    2e3e477 View commit details
4 changes: 2 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ jobs:
- name: Build package
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
@@ -46,7 +46,7 @@ jobs:

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
2 changes: 1 addition & 1 deletion juntagrico_billing/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.6.3'
__version__ = '1.6.6'
43 changes: 40 additions & 3 deletions juntagrico_billing/admin/bill.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from django.utils.translation import gettext as _
from django.urls import reverse
from django.utils.html import mark_safe
from django.contrib.admin import display
from django.contrib.admin import display, SimpleListFilter
from juntagrico.admins import BaseAdmin

from juntagrico_billing.admin.billitem_inline import BillItemInline
from juntagrico_billing.admin.payment_inline import PaymentInline
from juntagrico_billing.util.billing import recalc_bill, publish_bills
from juntagrico_billing.util.billing import recalc_bill, publish_bills, update_vat, add_balancing_payment


def set_notification_sent(modeladmin, request, queryset):
@@ -39,15 +39,52 @@ def do_publish_bills(modeladmin, request, queryset):
do_publish_bills.short_description = _("Publish bills")


def do_update_vat(modeladmin, request, queryset):
for bill in queryset.all():
update_vat(bill)


do_update_vat.short_description = _("Update VAT (from settings)")


def do_add_balancing_payment(modeladmin, request, queryset):
for bill in queryset.all():
add_balancing_payment(request, bill)


do_add_balancing_payment.short_description = _("Balance bill with compensation payment")


class OpenAmountFilter(SimpleListFilter):
title = _('Open amount')
parameter_name = 'open_amount_filter'

def lookups(self, request, model_admin):
return (
('open', _('Open amount > 0')),
('overpaid', _('Open amount < 0 (overpaid)')),
)

def queryset(self, request, queryset):
if self.value() == 'open':
return [obj for obj in queryset.all() if obj.amount_open > 0]
if self.value() == 'overpaid':
objects = [obj for obj in queryset.all() if obj.amount_open < 0]
print("%d objects" % len(objects))
return queryset.filter(id__in=[obj.id for obj in objects])


class BillAdmin(BaseAdmin):
search_fields = ['id', 'member__first_name', 'member__last_name']
list_display = [
'id', 'business_year', 'member', 'bill_date', 'item_kinds',
'amount_f', 'amount_open_f', 'paid', 'published', 'user_bill_link']
list_filter = ['paid', 'published', 'notification_sent', 'business_year', OpenAmountFilter]
readonly_fields = ['vat_rate', 'vat_amount', 'amount_paid', 'amount_open']
inlines = [BillItemInline, PaymentInline, ]
actions = [
do_recalc_bill, do_publish_bills, set_notification_sent,
reset_notification_sent]
reset_notification_sent, do_update_vat, do_add_balancing_payment]

@display(description=_('Amount'))
def amount_f(self, bill):
Binary file modified juntagrico_billing/locale/de/LC_MESSAGES/django.mo
Binary file not shown.
Loading