forked from DGNum/gestioCOF
f73b25e65f
Nouveau relevé: Il faut donner le détail du nombre de chaque pièces/billets pris et laissé en caisse pour calculer les valeurs `balance_new` et `amount_taken` d'un relevé (`CheckoutStatement`). L'erreur est directement calculée par rapport à la balance actuelle de la caisse et ces 2 valeurs. Une erreur positive correspond à un surplus d'argent et inversement. Modification d'un relevé: Il est possible de modifier les infos d'un ancien relevé. L'erreur est ensuite recalculée à partir de ces infos. Important: Dans le cas où `balance_new` est modifiée et qu'il s'agit du relevé le plus récent sur cette caisse. Alors la balance de la caisse est mise à jour en prenant en compte cette correction (et en conservant les modifications s'il y a eu des mouvements sur la caisse)
140 lines
5.2 KiB
Python
140 lines
5.2 KiB
Python
from django.conf.urls import url
|
|
from django.contrib.auth.decorators import permission_required
|
|
from kfet import views
|
|
from kfet import autocomplete
|
|
|
|
urlpatterns = [
|
|
url(r'^$', views.home,
|
|
name = 'kfet.home'),
|
|
url(r'^login/genericteam$', views.login_genericteam,
|
|
name = 'kfet.login.genericteam'),
|
|
|
|
# -----
|
|
# Account urls
|
|
# -----
|
|
|
|
# Account - General
|
|
url(r'^accounts/$', views.account,
|
|
name = 'kfet.account'),
|
|
url(r'^accounts/is_validandfree$', views.account_is_validandfree_ajax,
|
|
name = 'kfet.account.is_validandfree.ajax'),
|
|
|
|
# Account - Create
|
|
url(r'^accounts/new$', views.account_create,
|
|
name = 'kfet.account.create'),
|
|
url(r'^accounts/new/user/(?P<username>.+)$', views.account_create_ajax,
|
|
name = 'kfet.account.create.fromuser'),
|
|
url(r'^accounts/new/clipper/(?P<login_clipper>.+)$', views.account_create_ajax,
|
|
name = 'kfet.account.create.fromclipper'),
|
|
url(r'^accounts/new/empty$', views.account_create_ajax,
|
|
name = 'kfet.account.create.empty'),
|
|
url(r'^autocomplete/account_new$', autocomplete.account_create,
|
|
name = 'kfet.account.create.autocomplete'),
|
|
|
|
# Account - Read
|
|
url(r'^accounts/(?P<trigramme>.{3})$', views.account_read,
|
|
name = 'kfet.account.read'),
|
|
|
|
# Account - Update
|
|
url(r'^accounts/(?P<trigramme>.{3})/edit$', views.account_update,
|
|
name = 'kfet.account.update'),
|
|
|
|
# Account - Groups
|
|
url(r'^accounts/groups$', views.account_group,
|
|
name = 'kfet.account.group'),
|
|
url(r'^accounts/groups/new$',
|
|
permission_required('kfet.manage_perms')(views.AccountGroupCreate.as_view()),
|
|
name = 'kfet.account.group.create'),
|
|
url(r'^accounts/groups/(?P<pk>\d+)/edit$',
|
|
permission_required('kfet.manage_perms')(views.AccountGroupUpdate.as_view()),
|
|
name = 'kfet.account.group.update'),
|
|
|
|
# -----
|
|
# Checkout urls
|
|
# -----
|
|
|
|
# Checkout - General
|
|
url('^checkouts/$',
|
|
permission_required('kfet.is_team')(views.CheckoutList.as_view()),
|
|
name = 'kfet.checkout'),
|
|
# Checkout - Create
|
|
url('^checkouts/new$',
|
|
permission_required('kfet.is_team')(views.CheckoutCreate.as_view()),
|
|
name = 'kfet.checkout.create'),
|
|
# Checkout - Read
|
|
url('^checkouts/(?P<pk>\d+)$',
|
|
permission_required('kfet.is_team')(views.CheckoutRead.as_view()),
|
|
name = 'kfet.checkout.read'),
|
|
# Checkout - Update
|
|
url('^checkouts/(?P<pk>\d+)/edit$',
|
|
permission_required('kfet.is_team')(views.CheckoutUpdate.as_view()),
|
|
name = 'kfet.checkout.update'),
|
|
|
|
### Checkout Statements urls
|
|
|
|
# Checkout Statement - General
|
|
url('^checkouts/statements/$',
|
|
permission_required('kfet.is_team')(views.CheckoutStatementList.as_view()),
|
|
name = 'kfet.checkoutstatement'),
|
|
# Checkout Statement - Create
|
|
url('^checkouts/(?P<pk_checkout>\d+)/statements/add',
|
|
permission_required('kfet.is_team')(views.CheckoutStatementCreate.as_view()),
|
|
name = 'kfet.checkoutstatement.create'),
|
|
# Checkout Statement - Update
|
|
url('^checkouts/(?P<pk_checkout>\d+)/statements/(?P<pk>\d+)/edit',
|
|
permission_required('kfet.is_team')(views.CheckoutStatementUpdate.as_view()),
|
|
name = 'kfet.checkoutstatement.update'),
|
|
|
|
# -----
|
|
# Article urls
|
|
# -----
|
|
|
|
# Article - General
|
|
url('^articles/$',
|
|
permission_required('kfet.is_team')(views.ArticleList.as_view()),
|
|
name = 'kfet.article'),
|
|
# Article - Create
|
|
url('^articles/new$',
|
|
permission_required('kfet.is_team')(views.ArticleCreate.as_view()),
|
|
name = 'kfet.article.create'),
|
|
# Article - Read
|
|
url('^articles/(?P<pk>\d+)$',
|
|
permission_required('kfet.is_team')(views.ArticleRead.as_view()),
|
|
name = 'kfet.article.read'),
|
|
# Article - Update
|
|
url('^articles/(?P<pk>\d+)/edit$',
|
|
permission_required('kfet.is_team')(views.ArticleUpdate.as_view()),
|
|
name = 'kfet.article.update'),
|
|
|
|
# -----
|
|
# K-Psul urls
|
|
# -----
|
|
|
|
url('^k-psul/$', views.kpsul, name = 'kfet.kpsul'),
|
|
url('^k-psul/account_data$', views.kpsul_account_data,
|
|
name = 'kfet.kpsul.account_data'),
|
|
url('^k-psul/checkout_data$', views.kpsul_checkout_data,
|
|
name = 'kfet.kpsul.checkout_data'),
|
|
url('^k-psul/perform_operations$', views.kpsul_perform_operations,
|
|
name = 'kfet.kpsul.perform_operations'),
|
|
url('^k-psul/cancel_operations$', views.kpsul_cancel_operations,
|
|
name = 'kfet.kpsul.cancel_operations'),
|
|
url('^k-psul/history$', views.kpsul_history,
|
|
name = 'kfet.kpsul.history'),
|
|
url('^k-psul/articles_data', views.kpsul_articles_data,
|
|
name = 'kfet.kpsul.articles_data'),
|
|
url('^k-psul/update_addcost$', views.kpsul_update_addcost,
|
|
name = 'kfet.kpsul.update_addcost'),
|
|
url('^k-psul/get_settings$', views.kpsul_get_settings,
|
|
name = 'kfet.kpsul.get_settings'),
|
|
|
|
# -----
|
|
# Settings urls
|
|
|
|
url('^settings/$',
|
|
permission_required('kfet.change_settings')(views.SettingsList.as_view()),
|
|
name = 'kfet.settings'),
|
|
url('^settings/(?P<pk>\d+)/edit$',
|
|
permission_required('kfet.change_settings')(views.SettingsUpdate.as_view()),
|
|
name = 'kfet.settings.update'),
|
|
]
|