Commit e32e29a7 by Owo Sugiana

Tambah Ciamis

1 parent 90da80b7
0.4.9 2023-03-06
----------------
- Tambah Ciamis
0.4.8 2023-01-06 0.4.8 2023-01-06
---------------- ----------------
- Tambah Kabupaten Sukabumi - Tambah Kabupaten Sukabumi
......
...@@ -13,10 +13,6 @@ from sqlalchemy import ( ...@@ -13,10 +13,6 @@ from sqlalchemy import (
ForeignKey, ForeignKey,
) )
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import (
sessionmaker,
scoped_session,
)
Base = declarative_base() Base = declarative_base()
......
from sqlalchemy import (
Column,
Integer,
DateTime,
Text,
UniqueConstraint,
)
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class Kohir(Base):
__tablename__ = 'pad_kohir'
id = Column(Integer, primary_key=True)
tahun = Column(Integer, nullable=False)
usaha_id = Column(Integer)
kohirno = Column(Integer, nullable=False)
kohirtgl = Column(DateTime, nullable=False)
sptpd_id = Column(Integer, nullable=False)
enabled = Column(Integer)
create_date = Column(DateTime)
create_uid = Column(Integer)
write_date = Column(DateTime)
write_uid = Column(Integer)
is_cancel = Column(Integer)
bap_no = Column(Text)
bap_date = Column(DateTime)
cancel_no = Column(Integer)
cancel_date = Column(DateTime)
cancel_uid = Column(Integer)
__table_args__ = (
UniqueConstraint(tahun, kohirno, usaha_id),
dict(schema='pad'))
from .banjar import (
Inquiry as BaseInquiry,
Reversal as BaseReversal,
AvailableInvoice as BaseAvailableInvoice,
)
from ..models.ciamis import Kohir
PREFIX = '3209'
INVOICE_ID = [
('Prefix', 4, 'N'),
('Tahun', 4, 'N'),
('SptNo', 5, 'N'),
]
class Inquiry(BaseInquiry):
invoice_id_structure = INVOICE_ID
def get_kohir_model(self): # Override
return Kohir
class Reversal(BaseReversal):
invoice_id_structure = INVOICE_ID
class AvailableInvoice(BaseAvailableInvoice):
invoice_id_structure = INVOICE_ID
def get_inquiry_class(self): # Override
return Inquiry
def get_invoice_id(self, row): # Override
invoice_id = super().get_invoice_id(row)
invoice_id['Prefix'] = PREFIX
return invoice_id
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!