vaizard / glued-archived

2 stars 3 forks source link

Update the accounting cost schema #77

Open killua-eu opened 5 years ago

killua-eu commented 5 years ago

New schema might work like this:

{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "acc_total_novat": {
          "type": "number",
          "title": "Price without VAT"
        },
        "acc_total_vat": {
          "type": "number",
          "title": "Price with VAT"
        },
        "acc_curr": {
          "type": "string",
          "title": "Accounting currency"
        },
        "inv_total_novat": {
          "type": "number",
          "title": "Price without VAT"
        },
        "inv_total_vat": {
          "type": "number",
          "title": "Price with VAT"
        },
        "inv_curr": {
          "type": "string",
          "title": "Transaction currency"
        },
        "xr": {
          "type": "string",
          "title": "Exchange rate"
        },
        "dt_taxable": {
          "type": "string",
          "format": "date",
          "title": "Date taxable supply"
        },
        "dt_due": {
          "type": "string",
          "format": "date",
          "title": "Date taxable supply"
        },
        "inv_nr": {
          "type": "string",
          "title": "Invoice number"
        },
        "exp_type": {
          "type": "string",
          "title": "Expenditure type"
        },
        "note": {
          "type": "string",
          "title": "Note"
        },
        "supplier": {
          "title": "Supplier",
          "type": "object",
          "properties": {
            "contact_id": {
              "type": "string",
              "title": "Id of link to our db"
            },
            "name": {
              "type": "string",
              "title": "Name"
            },
            "regid": {
              "type": "string",
              "title": "IČ"
            },
            "vatid": {
              "type": "string",
              "title": "DIČ"
            },
            "dob": {
              "type": "string",
              "title": "Date of birth"
            },
            "address": {
              "type": "string",
              "title": "Address"
            }
          }
        },
        "managerial_acc": {
          "type": "array",
          "title": "Managerial accounting",
          "items": {
            "type": "object",
            "properties": {
              "price-novat": {
                "type": "string",
                "title": "Price fraction (without VAT)"
              },
              "price-fract": {
                "type": "string",
                "title": "Percentile fraction"
              },
              "note": {
                "type": "string",
                "title": "Note"
              },
              "pixel_id": {
                "type": "string",
                "title": "Project ID"
              }
            }
          }
        },
        "financial_acc": {
          "type": "array",
          "title": "Financial accounting",
          "items": {
            "type": "object",
            "properties": {
              "price-novat": {
                "type": "string",
                "title": "Price fraction (without VAT)"
              },
              "price-fract": {
                "type": "string",
                "title": "Percentile fraction"
              },
              "note": {
                "type": "string",
                "title": "Note"
              },
              "pixel_id": {
                "type": "string",
                "title": "Project ID"
              }
            }
          }
        },
        "ext_id": {
          "type": "array",
          "title": "External links",
          "items": {
            "type": "object",
            "properties": {
              "id1": {
                "type": "string",
                "title": "ID1"
              },
              "id2": {
                "type": "string",
                "title": "ID2"
              },
              "svc": {
                "type": "string",
                "title": "Service name"
              }
            }
          }
        },
        "files": {
          "type": "array",
          "title": "Multiple files",
          "items": {
            "type": "string",
            "format": "data-url"
          }
        },
        "_id": {
          "type": "string",
          "title": "Inner record id"
        },
        "creator": {
          "type": "string",
          "title": "Creator"
        },
        "dt_created": {
          "type": "string",
          "title": "Date of creation"
        }
      }
    }
  }
}

Prosím předvyplň formdata minimálně takto

UI schema takto:

killua-eu commented 5 years ago

:warning: aj karamba! v schematu #77 a v nastylovaném html/formu #87 je jedna chyba! - analytika neměla být metadata.analytics ale v managerial accounting a financial accounting. důvod je zřejmý, faktury se rozúčtovávají podle typu výdaje (analytiky/účetní skupiny) ... potřebujeme jich víc na jednu účtenku a ke každé analytice potřebujeme dát částku a poznámku.

killua-eu commented 5 years ago

  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "acc_total_novat": {
          "type": "number",
          "title": "Price without VAT"
        },
        "acc_total_vat": {
          "type": "number",
          "title": "Price with VAT"
        },
        "acc_curr": {
          "type": "string",
          "title": "Accounting currency"
        },
        "inv_total_novat": {
          "type": "number",
          "title": "Price without VAT"
        },
        "inv_total_vat": {
          "type": "number",
          "title": "Price with VAT"
        },
        "inv_curr": {
          "type": "string",
          "title": "Transaction currency"
        },
        "xr": {
          "type": "string",
          "title": "Exchange rate"
        },
        "dt_taxable": {
          "type": "string",
          "format": "date",
          "title": "Date taxable supply"
        },
        "dt_due": {
          "type": "string",
          "format": "date",
          "title": "Date taxable supply"
        },
        "inv_nr": {
          "type": "string",
          "title": "Invoice number"
        },
        "note": {
          "type": "string",
          "title": "Note"
        },
        "supplier": {
          "title": "Supplier",
          "type": "object",
          "properties": {
            "contact_id": {
              "type": "string",
              "title": "Id of link to our db"
            },
            "name": {
              "type": "string",
              "title": "Name"
            },
            "regid": {
              "type": "string",
              "title": "IČ"
            },
            "vatid": {
              "type": "string",
              "title": "DIČ"
            },
            "dob": {
              "type": "string",
              "title": "Date of birth"
            },
            "address": {
              "type": "string",
              "title": "Address"
            }
          }
        },
        "managerial_acc": {
          "type": "array",
          "title": "Managerial accounting",
          "items": {
            "type": "object",
            "properties": {
              "price-novat": {
                "type": "string",
                "title": "Price fraction (without VAT)"
              },
              "price-fract": {
                "type": "string",
                "title": "Percentile fraction"
              },
              "note": {
                "type": "string",
                "title": "Note"
              },
              "acc_group": {
                "type": "string",
                "title": "Account group"
              },
              "pixel_id": {
                "type": "string",
                "title": "Project ID"
              }
            }
          }
        },
        "financial_acc": {
          "type": "array",
          "title": "Financial accounting",
          "items": {
            "type": "object",
            "properties": {
              "price-novat": {
                "type": "string",
                "title": "Price fraction (without VAT)"
              },
              "price-fract": {
                "type": "string",
                "title": "Percentile fraction"
              },
              "note": {
                "type": "string",
                "title": "Note"
              },
              "acc_group": {
                "type": "string",
                "title": "Account group"
              },
              "pixel_id": {
                "type": "string",
                "title": "Project ID"
              }
            }
          }
        },
        "ext_id": {
          "type": "array",
          "title": "External links",
          "items": {
            "type": "object",
            "properties": {
              "id1": {
                "type": "string",
                "title": "ID1"
              },
              "id2": {
                "type": "string",
                "title": "ID2"
              },
              "svc": {
                "type": "string",
                "title": "Service name"
              }
            }
          }
        },
        "files": {
          "type": "array",
          "title": "Multiple files",
          "items": {
            "type": "string",
            "format": "data-url"
          }
        },
        "_id": {
          "type": "string",
          "title": "Inner record id"
        },
        "creator": {
          "type": "string",
          "title": "Creator"
        },
        "dt_created": {
          "type": "string",
          "title": "Date of creation"
        }
      }
    }
  }
}
pohadkar commented 5 years ago

do suppliera byl pridan novy parametr "entity_type": { "type": "string", "title": "Name", "enum": ["legal","private"], "default": "legal" },