mirror of
https://github.com/serty2005/rmser.git
synced 2026-02-04 19:02:33 -06:00
редактирование и удаление сопоставлений
список накладных с позициями
This commit is contained in:
@@ -28,9 +28,11 @@ type DraftInvoice struct {
|
||||
SenderPhotoURL string `gorm:"type:text" json:"photo_url"`
|
||||
Status string `gorm:"type:varchar(50);default:'PROCESSING'" json:"status"`
|
||||
|
||||
DocumentNumber string `gorm:"type:varchar(100)" json:"document_number"`
|
||||
DateIncoming *time.Time `json:"date_incoming"`
|
||||
SupplierID *uuid.UUID `gorm:"type:uuid" json:"supplier_id"`
|
||||
DocumentNumber string `gorm:"type:varchar(100)" json:"document_number"`
|
||||
// Входящий номер документа
|
||||
IncomingDocumentNumber string `gorm:"type:varchar(100)" json:"incoming_document_number"`
|
||||
DateIncoming *time.Time `json:"date_incoming"`
|
||||
SupplierID *uuid.UUID `gorm:"type:uuid" json:"supplier_id"`
|
||||
|
||||
StoreID *uuid.UUID `gorm:"type:uuid" json:"store_id"`
|
||||
Store *catalog.Store `gorm:"foreignKey:StoreID" json:"store,omitempty"`
|
||||
@@ -67,6 +69,7 @@ type DraftInvoiceItem struct {
|
||||
type Repository interface {
|
||||
Create(draft *DraftInvoice) error
|
||||
GetByID(id uuid.UUID) (*DraftInvoice, error)
|
||||
GetByRMSInvoiceID(rmsInvoiceID uuid.UUID) (*DraftInvoice, error)
|
||||
Update(draft *DraftInvoice) error
|
||||
CreateItems(items []DraftInvoiceItem) error
|
||||
UpdateItem(itemID uuid.UUID, productID *uuid.UUID, containerID *uuid.UUID, qty, price decimal.Decimal) error
|
||||
@@ -76,4 +79,7 @@ type Repository interface {
|
||||
|
||||
// GetActive возвращает активные черновики для СЕРВЕРА (а не юзера)
|
||||
GetActive(serverID uuid.UUID) ([]DraftInvoice, error)
|
||||
|
||||
// GetRMSInvoiceIDToPhotoURLMap возвращает мапу rms_invoice_id -> sender_photo_url для сервера, где rms_invoice_id не NULL
|
||||
GetRMSInvoiceIDToPhotoURLMap(serverID uuid.UUID) (map[uuid.UUID]string, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user