Browse Source

firstcommit

master
RezaAbyar 3 months ago
commit
30b9223c80
2077 changed files with 232757 additions and 0 deletions
  1. +6
    -0
      .gitignore
  2. +121
    -0
      AccWebApg/1settings.py
  3. +0
    -0
      AccWebApg/__init__.py
  4. +16
    -0
      AccWebApg/asgi.py
  5. +146
    -0
      AccWebApg/settings.py
  6. +8
    -0
      AccWebApg/urls.py
  7. +16
    -0
      AccWebApg/wsgi.py
  8. +3
    -0
      Base/1models.py
  9. +0
    -0
      Base/__init__.py
  10. +6
    -0
      Base/admin.py
  11. +5
    -0
      Base/apps.py
  12. +141
    -0
      Base/forms.py
  13. +139
    -0
      Base/migrations/0001_initial.py
  14. +0
    -0
      Base/migrations/__init__.py
  15. +102
    -0
      Base/models.py
  16. +134
    -0
      Base/templates/Items_list.html
  17. +226
    -0
      Base/templates/base.html
  18. +140
    -0
      Base/templates/customer_list.html
  19. +0
    -0
      Base/templates/customer_listold.html
  20. +130
    -0
      Base/templates/customer_model.html
  21. +33
    -0
      Base/templates/customerdeleted.html
  22. +40
    -0
      Base/templates/deleted.html
  23. +11
    -0
      Base/templates/home.html
  24. +125
    -0
      Base/templates/itemsgrouplist.html
  25. +126
    -0
      Base/templates/itemsofferlist.html
  26. +127
    -0
      Base/templates/itemspricelist.html
  27. +124
    -0
      Base/templates/itemsvahedlist.html
  28. +1026
    -0
      Base/templates/main.html
  29. +79
    -0
      Base/templates/newcustomer.html
  30. +47
    -0
      Base/templates/newitems.html
  31. +30
    -0
      Base/templates/newitemsgroup.html
  32. +54
    -0
      Base/templates/newitemsoffer.html
  33. +30
    -0
      Base/templates/newitemsprice.html
  34. +30
    -0
      Base/templates/newitemsvahed.html
  35. +29
    -0
      Base/templates/newmodel.html
  36. +33
    -0
      Base/templates/update.html
  37. +3
    -0
      Base/tests.py
  38. +41
    -0
      Base/urls.py
  39. +258
    -0
      Base/views.py
  40. +0
    -0
      Khazane/__init__.py
  41. +3
    -0
      Khazane/admin.py
  42. +5
    -0
      Khazane/apps.py
  43. +22
    -0
      Khazane/forms.py
  44. +31
    -0
      Khazane/migrations/0001_initial.py
  45. +0
    -0
      Khazane/migrations/__init__.py
  46. +16
    -0
      Khazane/models.py
  47. +131
    -0
      Khazane/templates/bank_list.html
  48. +42
    -0
      Khazane/templates/newbank.html
  49. +3
    -0
      Khazane/tests.py
  50. +14
    -0
      Khazane/urls.py
  51. +43
    -0
      Khazane/views.py
  52. +51
    -0
      Scripts/Activate.ps1
  53. +76
    -0
      Scripts/activate
  54. +33
    -0
      Scripts/activate.bat
  55. +21
    -0
      Scripts/deactivate.bat
  56. BIN
      Scripts/django-admin.exe
  57. +5
    -0
      Scripts/django-admin.py
  58. BIN
      Scripts/easy_install-3.7.exe
  59. BIN
      Scripts/easy_install.exe
  60. BIN
      Scripts/pip.exe
  61. BIN
      Scripts/pip3.7.exe
  62. BIN
      Scripts/pip3.exe
  63. BIN
      Scripts/python.exe
  64. BIN
      Scripts/pythonw.exe
  65. BIN
      Scripts/sqlformat.exe
  66. BIN
      Scripts/wheel.exe
  67. BIN
      db.sqlite3
  68. +574
    -0
      httpd.conf
  69. +22
    -0
      manage.py
  70. BIN
      mod_wsgi.so
  71. +3
    -0
      pyvenv.cfg
  72. +1
    -0
      readme.txt
  73. +238
    -0
      static/admin/jquery.ui.datepicker.jalali/default.htm
  74. +1419
    -0
      static/admin/jquery.ui.datepicker.jalali/scripts/calendar.all.js
  75. +131
    -0
      static/admin/jquery.ui.datepicker.jalali/scripts/calendar.js
  76. +6
    -0
      static/admin/jquery.ui.datepicker.jalali/scripts/jquery-1.10.2.min.js
  77. +1
    -0
      static/admin/jquery.ui.datepicker.jalali/scripts/jquery-1.10.2.min.map
  78. +11016
    -0
      static/admin/jquery.ui.datepicker.jalali/scripts/jquery-1.12.3.js
  79. +320
    -0
      static/admin/jquery.ui.datepicker.jalali/scripts/jquery.ui.core.js
  80. +103
    -0
      static/admin/jquery.ui.datepicker.jalali/scripts/jquery.ui.datepicker-cc-fa.js
  81. +2069
    -0
      static/admin/jquery.ui.datepicker.jalali/scripts/jquery.ui.datepicker-cc.js
  82. BIN
      static/admin/jquery.ui.datepicker.jalali/themes/base/images1/ui-icons_444444_256x240.png
  83. BIN
      static/admin/jquery.ui.datepicker.jalali/themes/base/images1/ui-icons_555555_256x240.png
  84. BIN
      static/admin/jquery.ui.datepicker.jalali/themes/base/images1/ui-icons_777620_256x240.png
  85. BIN
      static/admin/jquery.ui.datepicker.jalali/themes/base/images1/ui-icons_777777_256x240.png
  86. BIN
      static/admin/jquery.ui.datepicker.jalali/themes/base/images1/ui-icons_cc0000_256x240.png
  87. BIN
      static/admin/jquery.ui.datepicker.jalali/themes/base/images1/ui-icons_ffffff_256x240.png
  88. +7
    -0
      static/admin/jquery.ui.datepicker.jalali/themes/base/jquery-ui.min.css
  89. +1
    -0
      static/admin/js/django_jalali.min.js
  90. +15
    -0
      static/admin/js/main.js
  91. +5903
    -0
      static/css/app.css
  92. +5
    -0
      static/css/bootstrap-datepicker.min.css
  93. +293
    -0
      static/css/bootstrap-select.css
  94. +6
    -0
      static/css/bootstrap.min.css
  95. +1
    -0
      static/css/buttons.dataTables.min.css
  96. +861
    -0
      static/css/custom-style.css
  97. +111
    -0
      static/css/dashboard.css
  98. +1
    -0
      static/css/dataTables.bootstrap.min.css
  99. +4
    -0
      static/css/font-awesome.min.css
  100. +68
    -0
      static/css/fontiran.css

+ 6
- 0
.gitignore View File

@ -0,0 +1,6 @@
venv
__pycache__
.idea
Include
Lib

+ 121
- 0
AccWebApg/1settings.py View File

@ -0,0 +1,121 @@
"""
Django settings for AccWebApg project.
Generated by 'django-admin startproject' using Django 3.1.1.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'c87ctvpz)9$h138qjhtmi3t%8lq5j%o2-fesbo&dz4iq@8au3&'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'AccWebApg.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [BASE_DIR / 'templates']
,
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'AccWebApg.wsgi.application'
# Database
# https://docs.djangoproject.com/en/3.1/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
# Password validation
# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/3.1/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.1/howto/static-files/
STATIC_URL = '/static/'

+ 0
- 0
AccWebApg/__init__.py View File


+ 16
- 0
AccWebApg/asgi.py View File

@ -0,0 +1,16 @@
"""
ASGI config for AccWebApg project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'AccWebApg.settings')
application = get_asgi_application()

+ 146
- 0
AccWebApg/settings.py View File

@ -0,0 +1,146 @@
"""
Django settings for AccWeb project.
Generated by 'django-admin startproject' using Django 3.1.1.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pathlib import Path
import os
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'ss+8rt_%b#=_7+&8u11bieal7#e-btu1r6dy54j)(j1mbf7huq'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.humanize',
# My Apps Installed
'Base',
'Khazane',
'bootstrap4',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
ROOT_URLCONF = 'AccWebApg.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [BASE_DIR / 'templates']
,
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'AccWebApg.wsgi.application'
# Database
# https://docs.djangoproject.com/en/3.1/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
# 'ENGINE': 'sql_server.pyodbc',
# 'HOST': '127.0.0.1',
# 'PORT': '1433',
# 'NAME': 'AccwebApg',
# 'USER': 'git',
# 'PASSWORD': '123',
# 'OPTIONS': {
# 'driver': 'SQL Server Native Client 11.0',
# 'unicode_results': True,
},
}
# Password validation
# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/3.1/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.1/howto/static-files/
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
]

+ 8
- 0
AccWebApg/urls.py View File

@ -0,0 +1,8 @@
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('Base.urls')),
path('', include('Khazane.urls')),
]

+ 16
- 0
AccWebApg/wsgi.py View File

@ -0,0 +1,16 @@
"""
WSGI config for AccWebApg project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'AccWebApg.settings')
application = get_wsgi_application()

+ 3
- 0
Base/1models.py View File

@ -0,0 +1,3 @@
from django.db import models
## Create your models here.

+ 0
- 0
Base/__init__.py View File


+ 6
- 0
Base/admin.py View File

@ -0,0 +1,6 @@
from django.contrib import admin
from .models import Customer, CustomerModel
admin.site.register(Customer)
admin.site.register(CustomerModel)

+ 5
- 0
Base/apps.py View File

@ -0,0 +1,5 @@
from django.apps import AppConfig
class BaseConfig(AppConfig):
name = 'Base'

+ 141
- 0
Base/forms.py View File

@ -0,0 +1,141 @@
from django import forms
from .models import CustomerModel, Customer, ItemsGroup, Itemsvahed, ItemsPrice, ItemsOffer, Items
PriceStatus = [('1', 'فروش'), ('2', 'خرید')]
PriceGroup = [('1', 'درصدی'), ('2', 'ریالی')]
PriceGo = [('1', 'کاهش'), ('2', 'افزایش')]
class ItemsNewGroup(forms.ModelForm):
class Meta:
model = ItemsGroup
fields = ['ItemsGroupInfo']
labels = {'ItemsGroupInfo': 'شرح'}
widgets = {
'ItemsGroupInfo': forms.TextInput(attrs={'class': 'form-control'}),
}
class ModelForm(forms.ModelForm):
class Meta:
model = CustomerModel
fields = ['ModelInfo']
labels = {'ModelInfo': 'شرح'}
widgets = {
'ModelInfo': forms.TextInput(attrs={'class': 'form-control'}),
}
class CustomerForm(forms.ModelForm):
class Meta:
# choices = CustomerModel.objects.all().values_list('id', 'ModelInfo')
model = Customer
fields = [
'CustomerActive', 'CustomerCode', 'CustomerName', 'CustomerModel', 'CustomerAddress', 'CustomerTell',
'CustomerEmail'
]
labels = {
'CustomerTell': 'تلفن', 'CustomerModel': 'نوع حساب', 'CustomerActive': 'مشتری فعال است',
'CustomerAddress': 'آدرس', 'CustomerName': 'نام مشتری', 'CustomerCode': 'کدملی',
'CustomerEmail': 'ایمیل'
}
widgets = {
'CustomerCode': forms.TextInput(attrs={'class': 'form-control mt-2 mb-3',
'placeholder': 'کد ملی ده رقمی بدون خط تیره وارد کنید'}),
'CustomerName': forms.TextInput(attrs={'class': 'form-control mb-3'}),
'CustomerModel': forms.Select(attrs={'class': 'form-control'}),
'CustomerAddress': forms.Textarea(attrs={'class': 'form-control'}),
'CustomerTell': forms.TextInput(attrs={'class': 'form-control'}),
'CustomerEmail': forms.EmailInput(attrs={'class': 'form-control'}),
# 'CustomerActive': forms.CheckboxInput(attrs={'class': 'form-control'}),
}
class ItemVahedNew(forms.ModelForm):
class Meta:
choices = [('1', 'مقداری'), ('2', 'وزنی')]
model = Itemsvahed
fields = ['ItemsVahedName', 'ItemsVahedStatus', 'ItemsVahedInfo']
labels = {'ItemsVahedName': 'نام', 'ItemsVahedStatus': 'نام واحد', 'ItemsVahedInfo': 'شرح'}
widgets = {
'ItemsVahedName': forms.TextInput(attrs={'class': 'form-control'}),
'ItemsVahedStatus': forms.Select(choices=choices, attrs={'class': 'form-control'}),
'ItemsVahedInfo': forms.Textarea(attrs={'class': 'form-control'}),
}
class ItemPriceNew(forms.ModelForm):
class Meta:
model = ItemsPrice
fields = ['ItemsPriceName', 'ItemsPriceStatus',
'ItemsPriceGroup', 'ItemsPriceInt', 'ItemsPriceGo', 'ItemsPriceInfo']
labels = {'ItemsPriceName': 'نام', 'ItemsPriceStatus': 'دسته بندی',
'ItemsPriceGroup': 'نوع', 'ItemsPriceGo': 'مدل', 'ItemsPriceInt': 'مقدار', 'ItemsPriceInfo': 'شرح'}
widgets = {
'ItemsPriceName': forms.TextInput(attrs={'class': 'form-control'}),
'ItemsPriceStatus': forms.Select(choices=PriceStatus, attrs={'class': 'form-control'}),
'ItemsPriceGroup': forms.Select(choices=PriceGroup, attrs={'class': 'form-control'}),
'ItemsPriceGo': forms.Select(choices=PriceGo, attrs={'class': 'form-control'}),
'ItemsPriceInt': forms.TextInput(attrs={'class': 'form-control'}),
'ItemsPriceInfo': forms.Textarea(attrs={'class': 'form-control'}),
}
class DateInput(forms.DateInput):
input_type = 'date'
class ItemsOfferForm(forms.ModelForm):
class Meta:
model = ItemsOffer
fields = ['ItemsOfferName', 'ItemsOfferStatus', 'ItemsOfferDateIn', 'ItemsOfferDateOut', 'ItemsOfferInt']
labels = {'ItemsOfferName': 'عنوان', 'ItemsOfferStatus': 'نوع', 'ItemsOfferDateIn': 'از تاریخ',
'ItemsOfferDateOut': 'تا تاریخ', 'ItemsOfferInt': 'مقدار'}
widgets = {
'ItemsOfferName': forms.TextInput(attrs={'class': 'form-control'}),
'ItemsOfferDateIn': forms.DateInput(attrs={'id': 'datepicker0'}),
'ItemsOfferDateOut': forms.DateInput(attrs={'id': 'datepicker1'}),
'ItemsOfferStatus': forms.Select(choices=PriceGroup, attrs={'class': 'form-control'}),
'ItemsOfferInt': forms.TextInput(attrs={'class': 'form-control'}),
}
class ItemsForm(forms.ModelForm):
class Meta:
model = Items
fields = ['ItemsBarcode', 'ItemsName', 'ItemsGroup', 'ItemsInput', 'ItemsUnit', 'ItemsOffer',
'ItemsPriceInput', 'ItemsPriceSell', 'ItemsInfo', 'ItemsCreate', 'ItemsModel', 'ItemsStartCounter',
'ItemsStorage', 'ItemsPriceUnit', 'ItemsMalyat', 'ItemsAvarez', 'ItemsIsSell']
widgets = {
'ItemsBarcode': forms.TextInput(attrs={'class': 'form-control mt-2 mb-3'}),
'ItemsName': forms.TextInput(attrs={'class': 'form-control mb-3', 'data-toggle': 'tooltip'}),
'ItemsGroup': forms.Select(attrs={'class': 'form-control'}),
'ItemsInput': forms.TextInput(attrs={'class': 'form-control mb-3'}),
'ItemsUnit': forms.Select(attrs={'class': 'form-control'}),
'ItemsOffer': forms.Select(attrs={'class': 'form-control'}),
'ItemsPriceInput': forms.NumberInput(attrs={'class': 'form-control', 'id': 'demo2', 'step': 1}),
'ItemsPriceSell': forms.NumberInput(attrs={'class': 'form-control', 'id': 'demo3', 'step': 1.00}),
'ItemsInfo': forms.Textarea(attrs={'class': 'form-control'}),
'ItemsCreate': forms.TextInput(attrs={'class': 'form-control'}),
'ItemsModel': forms.TextInput(attrs={'class': 'form-control'}),
'ItemsStartCounter': forms.TextInput(attrs={'class': 'form-control'}),
'ItemsStorage': forms.Select(attrs={'class': 'form-control'}),
'ItemsPriceUnit': forms.TextInput(attrs={'class': 'form-control'}),
'ItemsMalyat': forms.CheckboxInput(attrs={'class': 'form-check-input'}),
}
class SearchForm(forms.Form):
search = forms.CharField(label='جستجو', required=False)

+ 139
- 0
Base/migrations/0001_initial.py View File

@ -0,0 +1,139 @@
# Generated by Django 2.1.15 on 2020-10-13 17:31
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Customer',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('CustomerCode', models.CharField(error_messages={'required': 'eybaba'}, max_length=10)),
('CustomerName', models.CharField(max_length=100)),
('CustomerAddress', models.TextField(blank=True)),
('CustomerTell', models.CharField(blank=True, max_length=100)),
('CustomerActive', models.BooleanField(default=True)),
('CustomerDateCreate', models.DateTimeField(auto_now_add=True)),
('CustomerEmail', models.EmailField(blank=True, max_length=254)),
],
),
migrations.CreateModel(
name='CustomerModel',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('ModelInfo', models.CharField(max_length=100)),
],
),
migrations.CreateModel(
name='Items',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('ItemsBarcode', models.CharField(max_length=100, verbose_name='بارکد')),
('ItemsName', models.CharField(max_length=200, verbose_name='نام کالا')),
('ItemsInput', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True, verbose_name='نقطه سفارش')),
('ItemsPriceInput', models.DecimalField(decimal_places=0, max_digits=20, verbose_name='قیمت خرید')),
('ItemsPriceSell', models.DecimalField(decimal_places=0, max_digits=20, verbose_name='قیمت فروش')),
('ItemsInfo', models.TextField(blank=True, null=True, verbose_name='توضیحات')),
('ItemsCreate', models.CharField(blank=True, max_length=100, null=True, verbose_name='سازنده')),
('ItemsModel', models.CharField(blank=True, max_length=100, null=True, verbose_name='مدل')),
('ItemsStartCounter', models.DecimalField(blank=True, decimal_places=2, max_digits=20, null=True, verbose_name='موجودی اولیه')),
('ItemsPriceUnit', models.DecimalField(blank=True, decimal_places=0, max_digits=20, null=True, verbose_name='قیمت اولیه هر واحد')),
('ItemsMalyat', models.BooleanField(default=False, verbose_name='مشمول مالیات')),
('ItemsAvarez', models.BooleanField(default=False, verbose_name='مشمول عوارض')),
('ItemsIsSell', models.BooleanField(default=True, verbose_name='قابل فروش')),
('ItemsDateCreate', models.DateTimeField(auto_now_add=True, null=True)),
('ItemsDateUpdate', models.DateTimeField(auto_now=True)),
],
),
migrations.CreateModel(
name='ItemsGroup',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('ItemsGroupInfo', models.CharField(max_length=100)),
],
),
migrations.CreateModel(
name='ItemsOffer',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('ItemsOfferName', models.CharField(max_length=100)),
('ItemsOfferStatus', models.CharField(max_length=10)),
('ItemsOfferDateIn', models.CharField(max_length=10)),
('ItemsOfferDateOut', models.CharField(max_length=10)),
('ItemsOfferInt', models.DecimalField(decimal_places=2, max_digits=10)),
],
),
migrations.CreateModel(
name='ItemsPrice',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('ItemsPriceName', models.CharField(max_length=100)),
('ItemsPriceStatus', models.CharField(max_length=100)),
('ItemsPriceGroup', models.CharField(max_length=100)),
('ItemsPriceInt', models.DecimalField(decimal_places=2, max_digits=10)),
('ItemsPriceGo', models.CharField(max_length=100)),
('ItemsPriceInfo', models.TextField(blank=True)),
],
),
migrations.CreateModel(
name='Itemsvahed',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('ItemsVahedName', models.CharField(max_length=100)),
('ItemsVahedStatus', models.CharField(max_length=100)),
('ItemsVahedInfo', models.TextField(blank=True)),
],
),
migrations.CreateModel(
name='Storage',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('StorageInfo', models.CharField(max_length=200)),
],
),
migrations.AddField(
model_name='items',
name='ItemsGroup',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Base.ItemsGroup', verbose_name='گروه کالا'),
),
migrations.AddField(
model_name='items',
name='ItemsOffer',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='Base.ItemsOffer', verbose_name='نوع تخفیف'),
),
migrations.AddField(
model_name='items',
name='ItemsStorage',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='Base.Storage', verbose_name='انبار'),
),
migrations.AddField(
model_name='items',
name='ItemsUnit',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Base.Itemsvahed', verbose_name='واحد'),
),
migrations.AddField(
model_name='items',
name='ItemsUser',
field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='customer',
name='CustomerModel',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Base.CustomerModel'),
),
migrations.AddField(
model_name='customer',
name='CustomerUser',
field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
),
]

+ 0
- 0
Base/migrations/__init__.py View File


+ 102
- 0
Base/models.py View File

@ -0,0 +1,102 @@
from django.db import models
from django.urls import reverse
from django.contrib.auth.models import User
# Create your models here.
class CustomerModel(models.Model):
ModelInfo = models.CharField(max_length=100)
def __str__(self):
return self.ModelInfo
class Customer(models.Model):
CustomerCode = models.CharField(error_messages={'required': 'eybaba'}, max_length=10)
CustomerName = models.CharField(max_length=100)
CustomerUser = models.ForeignKey(User, on_delete=models.CASCADE, blank=True, null=True)
CustomerAddress = models.TextField(blank=True)
CustomerTell = models.CharField(max_length=100, blank=True)
CustomerActive = models.BooleanField(default=True)
CustomerModel = models.ForeignKey(CustomerModel, on_delete=models.CASCADE)
CustomerDateCreate = models.DateTimeField(auto_now_add=True)
CustomerEmail = models.EmailField(max_length=254, blank=True)
def __str__(self):
return self.CustomerName
class ItemsGroup(models.Model):
ItemsGroupInfo = models.CharField(max_length=100)
def __str__(self):
return self.ItemsGroupInfo
class Itemsvahed(models.Model):
ItemsVahedName = models.CharField(max_length=100)
ItemsVahedStatus = models.CharField(max_length=100)
ItemsVahedInfo = models.TextField(blank=True)
def __str__(self):
return self.ItemsVahedName
class ItemsPrice(models.Model):
ItemsPriceName = models.CharField(max_length=100)
ItemsPriceStatus = models.CharField(max_length=100)
ItemsPriceGroup = models.CharField(max_length=100)
ItemsPriceInt = models.DecimalField(max_digits=10, decimal_places=2)
ItemsPriceGo = models.CharField(max_length=100)
ItemsPriceInfo = models.TextField(blank=True)
def __str__(self):
return self.ItemsPriceName
class ItemsOffer(models.Model):
ItemsOfferName = models.CharField(max_length=100)
ItemsOfferStatus = models.CharField(max_length=10)
ItemsOfferDateIn = models.CharField(max_length=10)
ItemsOfferDateOut = models.CharField(max_length=10)
ItemsOfferInt = models.DecimalField(max_digits=10, decimal_places=2)
def __str__(self):
return "%s, %s" % (self.ItemsOfferName, self.ItemsOfferDateIn)
class Storage(models.Model):
StorageInfo = models.CharField(max_length=200)
def __str__(self):
return self.StorageInfo
class Items(models.Model):
ItemsBarcode = models.CharField(max_length=100, verbose_name="بارکد")
ItemsName = models.CharField(max_length=200, verbose_name="نام کالا")
ItemsGroup = models.ForeignKey(ItemsGroup, on_delete=models.CASCADE, verbose_name="گروه کالا")
ItemsInput = models.DecimalField(max_digits=20, decimal_places=2, verbose_name= "نقطه سفارش", blank=True, null=True)
ItemsUnit = models.ForeignKey(Itemsvahed, on_delete=models.CASCADE, verbose_name="واحد")
ItemsOffer = models.ForeignKey(ItemsOffer, on_delete=models.CASCADE, verbose_name="نوع تخفیف", blank=True,
null=True)
ItemsPriceInput = models.DecimalField(max_digits=20, decimal_places=0, verbose_name="قیمت خرید")
ItemsPriceSell = models.DecimalField(max_digits=20, decimal_places=0, verbose_name="قیمت فروش")
ItemsInfo = models.TextField(verbose_name="توضیحات", blank=True, null=True)
ItemsCreate = models.CharField(max_length=100, verbose_name="سازنده", blank=True, null=True)
ItemsModel = models.CharField(max_length=100, verbose_name="مدل", blank=True, null=True)
ItemsStartCounter = models.DecimalField(max_digits=20, decimal_places=2, verbose_name="موجودی اولیه", blank=True, null=True)
ItemsStorage = models.ForeignKey(Storage, on_delete=models.CASCADE, verbose_name="انبار", blank=True, null=True)
ItemsPriceUnit = models.DecimalField(max_digits=20, decimal_places=0, verbose_name="قیمت اولیه هر واحد", blank=True, null=True)
ItemsMalyat = models.BooleanField(default=False, verbose_name="مشمول مالیات")
ItemsAvarez = models.BooleanField(default=False, verbose_name="مشمول عوارض")
ItemsIsSell = models.BooleanField(default=True, verbose_name="قابل فروش")
ItemsDateCreate = models.DateTimeField(auto_now_add=True, blank=True, null=True)
ItemsUser = models.ForeignKey(User, on_delete=models.CASCADE, blank=True, null=True)
ItemsDateUpdate = models.DateTimeField(auto_now=True)
def __str__(self):
return self.ItemsName

+ 134
- 0
Base/templates/Items_list.html View File

@ -0,0 +1,134 @@
{% extends 'base.html' %}
{% block title %}
لیست کالا
{% endblock %}
{% load static %}
{% block content %}
<div class="panel-heading">فهرست کالا</div>
<link rel="stylesheet" href="{% static '/css/tblsort.css' %}">
<form action="">
<div class="panel-body">
<div class="tab-content ">
<div id="همه" class="tab-pane fade in active">
<div class="row m-b">
<div class="col-sm-8">
<a class="btn btn-default m-b" href="{% url 'Base:newitems' %}">
<span class="fa fa-plus" aria-hidden="true"></span>&nbsp; افزودن </a>
<a class="btn btn-default m-b" onclick="PrintDiv('example');">
<span class="fa fa-print" aria-hidden="true"></span>
چاپ
</a>
<a class="btn btn-default m-b" onclick="show_excel_modal();">
<span class="fa fa-file" aria-hidden="true"></span>
ورود از اکسل
</a>
</div>
</div>
</div>
</div>
<script type="text/javascript" class="init">
$(document).ready(function () {
$('#dtBasicExample').DataTable();
});
</script>
<!-- table start -->
<table id="dtBasicExample" class="table table-striped table-bordered">
<thead>
<tr>
<th style="text-align:right" scope="col">ردیف</th>
<th style="width:15%; text-align:center" scope="col">بارکد کالا</th>
<th style="width:20%;text-align:right" scope="col">گروه</th>
<th style="width:30%; text-align:right" scope="col">عنوان</th>
<th style="text-align:right" scope="col">قیمت خرید</th>
<th style="text-align:right" scope="col">قیمت فروش</th>
<th style="text-align:left" scope="col"></th>
<th></th>
</tr>
</thead>
<tbody>
{% for Items in Itemss %}
<tr onclick="window.location.href='{% url 'Base:items_update' pk=Items.id %}'">
<th style="text-align:center" scope="row">{{ forloop.counter }}</th>
<td style="text-align:center">{{ Items.ItemsBarcode }}</td>
<td style="text-align:right"> {{ Items.ItemsGroup }}</td>
<td style="text-align:right">{{ Items.ItemsName }}</td>
<td style="text-align:center">{{ Items.ItemsPriceInput }}</td>
<td style="text-align:center">{{ Items.ItemsPriceSell }}</td>
<td><a type="button" class="btn btn-warning" href="#">گزارش کاردکس انبار</a></td>
<td><a type="button" class="btn btn-danger" href="{% url 'Base:items_deleted' Items.id %}">حذف</a>
</td>
</tr>
{% endfor %}
</tfoot>
</table>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h5 class="modal-title" id="exampleModalLabel">ورود از اکسل</h5>
</div>
<div class="modal-body">
<div class="row">
<div class="col-xs-12">
کاربر گرامی برای ورود اطلاعات از اکسل برای قسمت طرف حساب ابتدا فایل نمونه را دانلود
کرده و
توجه داشته باشید که موارد ارسالی دقیقا باید مشابه تمپلیت باشد در غیر این صورت سیستم
آن را نادرست
در نظر گرفته و عملیات انجام نمی گیرد
توجه داشته باشید که
<br><br> 1- کدملی طرف حساب نباید تکراری باشد
<br> 2- اسامی باید وارد شود
<br> 5- فایل مورد نظر حتما باید با پسوند xlsx باشد
<br><br> <a style="color: #888aff;"
href="https://kasb.abrestan.com/public/templates/template.xlsx">دانلود
نمونه</a>
</div>
</div>
<form style="border: 4px solid #a1a1a1;margin-top: 15px;padding: 20px;"
action="https://kasb.abrestan.com/excel/test" class="form-horizontal" method="post"
enctype="multipart/form-data">
<input type="file" name="import_file"/>
<input type="hidden" name="_token" value="GtDPYj2ZcPCO8ltxGM1soowVUrEfy47V90abwrH5">
<br/>
<button class="btn btn-primary">آپلود فایل</button>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-warning" data-dismiss="modal">بستن</button>
</div>
</div>
</div>
</div>
</div>
</form>
{% endblock %}

+ 226
- 0
Base/templates/base.html View File

@ -0,0 +1,226 @@
{% load static %}
<!doctype html>
<html lang="fa" dir="rtl">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--[if IE]>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'><![endif]-->
<meta name="_token" content="TrQniX7cnaSF1oNRabBaP54pjpe59Gmvi05gk1rh"/>
<meta name="description" content="به دوستان خود هدیه دهید و رایگان استفاده کنید. نرم افزار حسابداری آنلاین ابرستان">
<meta name="author" content="kiumars babolhavaeji">
<meta name="keyword" content="">
<title> نرم افزار حسابداری آنلاین کسب </title>
<!-- social network cards -->
<meta property="og:locale" content="fa_IR" />
<meta property="og:type" content="website" />
<meta property="og:image" content="kasb.abrestan.com/public/img/abrestan.jpg" />
<meta property="og:image:width" content="" />
<meta property="og:image:height" content="" />
<meta property="og:title" content="به دوستان خود هدیه دهید و رایگان استفاده کنید. نرم افزار حسابداری آنلاین ابرستان" />
<meta property="og:description" content="با استفاده از لینک زیر میتوانید در سامانه حسابداری آنلاین ابرستان ثبت نام کرده و از آن استفاده کنید" />
<meta property="og:url" content="kasb.abrestan.com/user/invite/abr-9682" />
<meta property="og:site_name" content="kasb.abrestan.com" />
<!-- Twitter -->
<meta property="twitter:card" content="summary" />
<meta property="twitter:description" content="با استفاده از لینک زیر میتوانید در سامانه حسابداری آنلاین ابرستان ثبت نام کرده و از آن استفاده کنید" />
<meta property="twitter:title" content="به دوستان خود هدیه دهید و رایگان استفاده کنید. نرم افزار حسابداری آنلاین ابرستان" />
<meta property="twitter:site" content="kasb.abrestan.com/user/invite/abr-9682" />
<meta property="twitter:image" content="http://kasb.abrestan.com/public/img/abrestan.jpg" />
<!-- Bootstrap core CSS -->
{% block css %}{% endblock %}
{% include 'css.html' %}
</head>
<body>
<div class="se-pre-con">
<h3 class="text-center" style="margin-top: 50px;">لطفا شکیبا باشید</h3>
</div>
<div class="page-container">
<div class="page-content">
{% include 'menu.html' %}
<div class="content-wrapper">
<header class="header-box">
<div class="header-top">
<span class="item-header-top btn-show-menu">
<a href="#">
<img id="HideMenu" src="{% static '/images/svg/HideMenu.svg' %}" alt="HideMenu">
<img id="ShowMenu" class="hide-menu-responsive" src="{% static '/images/svg/ShowMenu.svg' %}" alt="ShowMenu">
<img id="ShowMenu" class="show-menu-responsive" src="{% static '/images/svg/listMenu.svg' %}" alt="ShowMenu">
</a>
</span>
<span class="item-header-top license-status" style="color: red;">حساب کاربری شما منقضی شده است. <a href="https://kasb.abrestan.com/user/license">تمدید</a></span>
<span class="item-header-top introduce-friends">
<a href="https://kasb.abrestan.com/user/invite">
<img src="{% static '/images/svg/heart-shape-silhouette.svg' %}" alt="heart-shape-silhouette">
</a>
</span>
<span class="item-header-top question">
<a href="https://abrestan.com/help/%d8%b4%d8%b1%d9%88%d8%b9-%d8%a8%d9%87-%da%a9%d8%a7%d8%b1-%d8%a7%d8%a8%d8%b1%d8%b3%d8%aa%d8%a7%d9%86/" target="_blank">
<img style="height: 18px;" src="{% static '/images/svg/QuestionSign.svg' %}" alt="QuestionSign">
</a>
</span>
<span class="item-header-top user-account">
<a href="https://kasb.abrestan.com/user/profile" class="user-profile-img">
<img src="{% static '/images/svg/UserShape.svg' %}" alt="UserShape">
</a>
<i>
reza
abyar
</i>
<a href="#" id="showUserAccountItems">
<img id="downShowUser" src="{% static '/images/svg/down.svg' %}" alt="down">
<img id="upShowUser" style="display: none;" src="{% static '/images/svg/up.svg' %}" alt="up">
</a>
<div class="items-user-account" style="display: none;">
<a href="https://kasb.abrestan.com/user/profile">
<img src="{% static '/images/svg/cog-wheel-silhouette.svg' %}" alt="cog-wheel-silhouette">
<span>تنظیمات حساب کاربری</span>
</a>
<a href="https://kasb.abrestan.com/user/choose_company">
<img src="{% static '/images/svg/list.svg' %}" alt="list">
<span>کسب و کارهای من</span>
</a>
<a href="https://kasb.abrestan.com/user/transactions">
<img src="{% static '/images/svg/bank.svg' %}" alt="bank">
<span>تراکنش های من</span>
</a>
<a href="https://kasb.abrestan.com/user/profile/update/password">
<img src="{% static '/images/svg/security.svg' %}" alt="security">
<span>تغییر رمز عبور</span>
</a>
<a href="https://kasb.abrestan.com/user/logout">
<img src="{% static '/images/svg/sign-out-option.svg' %}" alt="sign-out-option">
<span>خروج</span>
</a>
</div>
</span>
</div>
<div class="header-top header-top-responsive">
<span class="item-header-top user-account">
<a href="" class="user-profile-img">
<img src="{% static '/images/svg/UserShape.svg' %}" alt="UserShape">
</a>
<i>
reza
abyar
</i>
<a href="#" id="showUserAccountItemsResponsive">
<img id="downShowUser" src="{% static '/images/svg/down.svg' %}" alt="down">
<img id="upShowUser" style="display: none;" src="{% static '/images/svg/up.svg' %}" alt="up">
</a>
<div class="items-user-account" style="display: none;">
<a href="https://kasb.abrestan.com/user/profile">
<img src="{% static '/images/svg/cog-wheel-silhouette.svg' %}" alt="cog-wheel-silhouette">
<span>تنظیمات حساب کاربری</span>
</a>
<a href="https://kasb.abrestan.com/user/choose_company">
<img src="{% static '/images/svg/list.svg' %}" alt="list">
<span>کسب و کارهای من</span>
</a>
<a href="https://kasb.abrestan.com/user/report/comparative_report">
<img src="{% static '/images/svg/bank.svg' %}" alt="bank">
<span>تراکنش های من</span>
</a>
<a href="https://kasb.abrestan.com/user/profile/update/password">
<img src="{% static '/images/svg/security.svg' %}" alt="security">
<span>تغییر رمز عبور</span>
</a>
<a href="https://kasb.abrestan.com/user/logout">
<img src="{% static '/images/svg/sign-out-option.svg' %}" alt="sign-out-option">
<span>خروج</span>
</a>
</div>
</span>
</div>
<div class="header-button">
<div class="">
<!--breadcrumbs start -->
<ul class="breadcrumb">
<li><a href="#"><i class="icon-home"></i>فثسف</a></li>
<li><a href="#"></a>داشبورد</li>
</ul>
</div>
</div>
</header>
<main class="main-box">
<div class="col-lg-12 col-sm-12 col-xs-12 pull-left m-b">
<div class="panel-group">
<div class="panel panel-default">
<div class="panel-heading">داشبورد</div>
<br>
{% block content %}{% endblock %}
{#<div class="alert alert-warning">#}
{# <a href="#" class="close" data-dismiss="alert" aria-label="close" title="close">×</a>#}
{# کاربر گرامی، لطفا جهت تکمیل اطلاعات ثبت نامی خود به قسمت#}
{# <a href="https://kasb.abrestan.com/user/profile" target="_self" style="text-decoration: underline;" >[ تنظیمات حساب کاربری ]</a>#}{# مراجعه نمایید.#}
</div>
</div>
</div>
</main>
{% include 'menumobail.html' %}
<div class="panel-footer" >
</div>
<!-- Modal -->
<div class="modal fade" id="dashboard_notice_modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content text-right">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h5 class="modal-title" id="dashboard_notice_title"></h5>
</div>
<div class="modal-body" id="dashboard_notice_body"></div>
<div class="modal-footer" id="notice_preview_body">
<div class="form-group">
<button type="button" class="btn btn-warning" data-dismiss="modal" onclick="set_notice_in_ignored()">بستن</button>
&nbsp;&nbsp;
<input type="checkbox" class="form-check" value="" name="notice_ignore_checkbox" id="notice_ignore_checkbox" />
<label for="" style="padding-right: 0 !important;">دیگر این اطلاعیه را نشان نده !</label>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
</div>
</div>
{% include 'script.html' %}
{% block script %}{% endblock %}
</body>
</html>

+ 140
- 0
Base/templates/customer_list.html View File

@ -0,0 +1,140 @@
{% extends 'base.html' %}
{% block title %}
لیست طرف حساب
{% endblock %}
{% load static %}
{% block content %}
<div class="panel-heading">فهرست طرف حساب</div>
<link rel="stylesheet" href="{% static '/css/tblsort.css' %}">
<form action="">
<div class="panel-body">
<ul class="nav nav-tabs m-b">
<li class="active"><a data-toggle="tab" href="#همه">همه </a></li>
{% for customermodel in customermodels %}
<li><a id="myInput" data-toggle="tab" href="#{{ customermodel.ModelInfo }}"> {{ customermodel.ModelInfo }}</a></li>
{% endfor %}
</ul>
<div class="tab-content ">
<div id="همه" class="tab-pane fade in active">
<div class="row m-b">
<div class="col-sm-8">
<a class="btn btn-default m-b" href="{% url 'Base:newcustomer' %}">
<span class="fa fa-plus" aria-hidden="true"></span>&nbsp; افزودن </a>
<a class="btn btn-default m-b" onclick="PrintDiv('example');">
<span class="fa fa-print" aria-hidden="true"></span>
چاپ
</a>
<a class="btn btn-default m-b" onclick="show_excel_modal();">
<span class="fa fa-file" aria-hidden="true"></span>
ورود از اکسل
</a>
</div>
</div>
</div>
</div>
<script type="text/javascript" class="init">
$(document).ready(function() {
$('#dtBasicExample').DataTable();
} );
</script>
<!-- table start -->
<table id="dtBasicExample" class="table table-striped table-bordered">
<thead>
<tr>
<th style="text-align:right" scope="col">ردیف</th>
<th style="width:20%; text-align:right" scope="col">نام طرف حساب</th>
<th style="text-align:right" scope="col">کد طرف حساب</th>
<th style="width:10%; text-align:center" scope="col">تلفن</th>
<th style="text-align:right" scope="col">نوع حساب</th>
<th style="width:30%; text-align:right" scope="col">آدرس</th>
<th style="text-align:left" scope="col"> </th>
<th></th>
</tr>
</thead>
<tbody>
{% for customer in customers %}
<tr onclick="window.location.href='{% url 'Base:customer_update' pk=customer.id %}'">
<th style="text-align:center" scope="row">{{ forloop.counter }}</th>
<td>{{ customer.CustomerName }}</td>
<td style="text-align:center"> {{ customer.CustomerCode }}</td>
<td style="text-align:left">{{ customer.CustomerTell }}</td>
<td style="text-align:center">{{ customer.CustomerModel }}</td>
<td>{{ customer.CustomerAddress }}</td>
<td><a type="button" class="btn btn-warning" href="#">گزارش گردش حساب</a></td>
<td><a type="button" class="btn btn-danger" href="{% url 'Base:customer_deleted' customer.id %}">حذف</a></td>
</tr>
{% endfor %}
</tfoot>
</table>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h5 class="modal-title" id="exampleModalLabel">ورود از اکسل</h5>
</div>
<div class="modal-body">
<div class="row">
<div class="col-xs-12">
کاربر گرامی برای ورود اطلاعات از اکسل برای قسمت طرف حساب ابتدا فایل نمونه را دانلود کرده و
توجه داشته باشید که موارد ارسالی دقیقا باید مشابه تمپلیت باشد در غیر این صورت سیستم آن را نادرست
در نظر گرفته و عملیات انجام نمی گیرد
توجه داشته باشید که
<br><br> 1- کدملی طرف حساب نباید تکراری باشد
<br> 2- اسامی باید وارد شود
<br> 5- فایل مورد نظر حتما باید با پسوند xlsx باشد
<br><br> <a style="color: #888aff;" href="https://kasb.abrestan.com/public/templates/template.xlsx">دانلود
نمونه</a>
</div>
</div>
<form style="border: 4px solid #a1a1a1;margin-top: 15px;padding: 20px;"
action="https://kasb.abrestan.com/excel/test" class="form-horizontal" method="post"
enctype="multipart/form-data">
<input type="file" name="import_file"/>
<input type="hidden" name="_token" value="GtDPYj2ZcPCO8ltxGM1soowVUrEfy47V90abwrH5">
<br/>
<button class="btn btn-primary">آپلود فایل</button>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-warning" data-dismiss="modal">بستن</button>
</div>
</div>
</div>
</div>
</div>
</form>
{% endblock %}

+ 0
- 0
Base/templates/customer_listold.html View File


+ 130
- 0
Base/templates/customer_model.html View File

@ -0,0 +1,130 @@
{% extends 'base.html' %}
{% block title %}
لیست گروه حساب
{% endblock %}
{% load static %}
{% block content %}
<div class="panel-heading">فهرست گروه حساب</div>
<form action="">
<div class="panel-body">
<div class="tab-content ">
<div id="همه" class="tab-pane fade in active">
<div class="row m-b">
<div class="col-sm-8">
<a class="btn btn-default m-b" href="{% url 'Base:newmodel' %}">
<span class="fa fa-plus" aria-hidden="true"></span>&nbsp; افزودن </a>
<a class="btn btn-default m-b" onclick="PrintDiv('example');">
<span class="fa fa-print" aria-hidden="true"></span>
چاپ
</a>
<a class="btn btn-default m-b" onclick="show_excel_modal();">
<span class="fa fa-file" aria-hidden="true"></span>
ورود از اکسل
</a>
</div>
</div>
</div>
</div>
<div class="modal-footer">
</div>
<script type="text/javascript" class="init">
$(document).ready(function () {
$('#dtBasicExample').DataTable();
});
</script>
<!-- table start -->
<table id="dtBasicExample" class="table table-striped table-bordered">
<thead>
<th style="text-align:right" scope="col">ردیف</th>
<th style="text-align:right" scope="col">نام گروه حساب</th>
<th></th>
</thead>
<tbody>
{% for model in models %}
<tr onclick="window.location.href='{% url 'Base:model_update' pk=model.id %}'">
<th style="text-align:right" scope="row">{{ forloop.counter }}</th>
<td>{{ model.ModelInfo }}</td>
<td><a type="button" class="btn btn-danger"
href="{% url 'Base:model_deleted' model.id %}">حذف</a></td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h5 class="modal-title" id="exampleModalLabel">ورود از اکسل</h5>
</div>
<div class="modal-body">
<div class="row">
<div class="col-xs-12">
کاربر گرامی برای ورود اطلاعات از اکسل برای قسمت طرف حساب ابتدا فایل نمونه را دانلود
کرده و
توجه داشته باشید که موارد ارسالی دقیقا باید مشابه تمپلیت باشد در غیر این صورت سیستم
آن را نادرست
در نظر گرفته و عملیات انجام نمی گیرد
توجه داشته باشید که
<br><br> 1- کدملی طرف حساب نباید تکراری باشد
<br> 2- اسامی باید وارد شود
<br> 5- فایل مورد نظر حتما باید با پسوند xlsx باشد
<br><br> <a style="color: #888aff;"
href="https://kasb.abrestan.com/public/templates/template.xlsx">دانلود
نمونه</a>
</div>
</div>
<form style="border: 4px solid #a1a1a1;margin-top: 15px;padding: 20px;"
action="https://kasb.abrestan.com/excel/test" class="form-horizontal" method="post"
enctype="multipart/form-data">
<input type="file" name="import_file"/>
<input type="hidden" name="_token" value="GtDPYj2ZcPCO8ltxGM1soowVUrEfy47V90abwrH5">
<br/>
<button class="btn btn-primary">آپلود فایل</button>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-warning" data-dismiss="modal">بستن</button>
</div>
</div>
</div>
</div>
</div>
</form>
{% endblock %}

+ 33
- 0
Base/templates/customerdeleted.html View File

@ -0,0 +1,33 @@
{% extends 'base.html' %}
{% load static %}
{% block content %}
<div class="panel-heading"> حذف</div>
<form method="post">
<div class="panel-body">
{% csrf_token %}
<div class="alert alert-danger" role="alert">
حذف طرف حساب با نام <a href="{% url 'Base:customer_update' pk=customer.id %}" class="alert-link">{{ customer.CustomerName }}</a> آیا اطمینان دارید ؟
</div>
<div class="modal-footer">
<input id="addbtn" type="submit" class="btn btn-success" value=" حذف طرف حساب"/>
<button class="btn btn-warning m-b "
onclick="window.location.href='{% url 'Base:customer_list' %}'">
<span class="fa fa-remove" aria-hidden="true"></span>&nbsp; بستن </button>
</div>
<br/>
<br/>
</div>
</form>
{% endblock %}

+ 40
- 0
Base/templates/deleted.html View File

@ -0,0 +1,40 @@
{% extends 'base.html' %}
{% load static %}
{% block title %}
id="titrid" فرم حذف اطلاعات
{% endblock %}
{% block content %}
<div class="panel-heading"> فرم حذف اطلاعات</div>
<form method="post">
<div class="panel-body">
{% csrf_token %}
<div class="alert alert-danger" role="alert">
عملیات حذف یک رکورد . <a class="alert-link"> آیا اطمینان دارید ؟</a>
</div>
<div class="alert alert-warning" role="alert">
<strong>تدکر مهم!</strong> اگر این آیتم در هر فرم دیگری استفاده شده باشد تمامی آن اطلاعات و اسناد نیز
حذف می شوند.
</div>
<div class="modal-footer">
<input id="addbtn" type="submit" class="btn btn-success" value=" حذف "/>
<a class="btn btn-warning m-b "
onclick="window.history.back()">
<span class="fa fa-remove" aria-hidden="true"></span>&nbsp; بستن </a>
</div>
<br/>
<br/>
</div>
</form>
{% endblock %}

+ 11
- 0
Base/templates/home.html View File

@ -0,0 +1,11 @@
{% extends 'base.html' %}
{% block content %}
<div class="form-group">
<h1 class="text-center"> Welcome To Apg Soft</h1>
</div>
{% endblock %}

+ 125
- 0
Base/templates/itemsgrouplist.html View File

@ -0,0 +1,125 @@
{% extends 'base.html' %}
{% block title %}
لیست گروه کالا
{% endblock %}
{% load static %}
{% block content %}
<div class="panel-heading">فهرست گروه کالا</div>
<form action="">
<div class="panel-body">
<div class="tab-content ">
<div id="همه" class="tab-pane fade in active">
<div class="row m-b">
<div class="col-sm-8">
<a class="btn btn-default m-b" href="{% url 'Base:newitemsgroup' %}">
<span class="fa fa-plus" aria-hidden="true"></span>&nbsp; افزودن </a>
<a class="btn btn-default m-b" onclick="PrintDiv('example');">
<span class="fa fa-print" aria-hidden="true"></span>
چاپ
</a>
<a class="btn btn-default m-b" onclick="show_excel_modal();">
<span class="fa fa-file" aria-hidden="true"></span>
ورود از اکسل
</a>
</div>
</div>
</div>
</div>
<script type="text/javascript" class="init">
$(document).ready(function () {
$('#dtBasicExample').DataTable();
});
</script>
<!-- table start -->
<table id="dtBasicExample" class="table table-striped table-bordered">
<thead>
<th style="text-align:right" scope="col">ردیف</th>
<th style="text-align:right" scope="col">نام گروه حساب</th>
<td></td>
</thead>
<tbody>
{% for ItemsGroup in ItemGroups %}
<tr onclick="window.location.href='{% url 'Base:itemsgroup_update' pk=ItemsGroup.id %}'">
<th style="text-align:right" scope="row">{{ forloop.counter }}</th>
<td>{{ ItemsGroup.ItemsGroupInfo }}</td>
<td><a type="button" class="btn btn-danger"
href="{% url 'Base:itemsgroup_deleted' ItemsGroup.id %}">حذف</a></td>
</tr>
</tbody>
{% endfor %}
</table>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<