Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Morten-Svea
    @Morten-Svea
    Viste seg å være en brukerfeil.. brukte action=payinvoice når det korrekte var action=payInvoice..
    Morten-Svea
    @Morten-Svea
    Hei, har nå registrert 2 delbetalinger på en faktura via /api/biz/invoices/:InvoiceID?action=payInvoice. Hvordan kan jeg slå opp disse delbetalingene igjen? (kan jeg bruke expand på /invoices?)
    Rune Riskedal
    @runerisk
    Hei, er ny til unimicro, har fått sertifikat og satt opp test-site. Sliter med å få kjørt tutorial for server2server kobling. Får System.Exception : invalid_scope. Bruker AppFramework som scope. Noen tips?
    Rune Riskedal
    @runerisk
    Og, er den noen som har erfaring med å koble opp mot APIet fra en Oracle Apex løsning?
    dennishuiskens
    @dennishuiskens
    @Morten-Svea prøv: GET /api/statistics?model=customerinvoice&select=customerinvoice.invoicenumber,postpost.amount,postpost.amountcurrency,currencycode.code&filter=customerinvoice.id eq 1234&join=customerinvoice.journalentryid eq journalentryline.journalentryid and journalentryline.journalentryid eq postpost.journalentryline2id and postpost.currencycodeid eq currencycode.id
    dennishuiskens
    @dennishuiskens
    Fi: Når du bruker den action payInvoice, opprette vi en bilag som blir post post markert hos den bilag som tilhører den faktura. Så den har ingen payments som du kan vise med expand=payments. Når dette gjelder en "ekte" innbetaling som kommer etter innlesing fra bankfiler, da kan du bruker expand=payments.
    Morten-Svea
    @Morten-Svea
    @dennishuiskens , ser ikke ut som den vil returnere betalingsdata, får følgende tilbake på en faktura jeg har delbetalt i GUI + delbetalt vi API:{
    "Data": [
    {
    "customerinvoiceInvoiceNumber": "122",
    "postpostAmount": null,
    "postpostAmountCurrency": null,
    "currencycodeCode": null
    }
    ],
    "Success": true,
    "Message": ""
    }
    dennishuiskens
    @dennishuiskens
    @Morten-Svea vennligst prøv: GET api/statistics?model=customerinvoice&select=customerinvoice.invoicenumber,postpost.amount,postpost.amountcurrency,currencycode.code&filter=customerinvoice.id eq 126 and account.usepostpost eq 1&join=customerinvoice.journalentryid eq journalentryline.journalentryid and journalentryline.id eq postpost.journalentryline2id and postpost.currencycodeid eq currencycode.id and journalentryline.accountid eq account.id
    Morten-Svea
    @Morten-Svea
    @dennishuiskens med denne forespørselen får jeg dette i svar: {
    "Message": "RAGU58HA: Not found",
    "StackTrace": "",
    "Source": "",
    "InnerException": null,
    "ErrorReference": "RAGU58HA"
    }
    dennishuiskens
    @dennishuiskens
    @Morten-Svea Fra error log ser jeg at du bruker : https://test-api.unieconomy.no/api/biz/statistics?... i stedet for https://test-api.unieconomy.no/api/statistics?...
    vennligst fjern /biz/ fra spørring
    Morten-Svea
    @Morten-Svea
    @dennishuiskens Trodde jeg testet med både biz og uten, men ser nå at uten biz får jeg et litt mer fornuftig svar: {
    "Data": null,
    "Success": false,
    "Message": "Unable to map field:CurrenCode.Code"
    }
    Morten-Svea
    @Morten-Svea
    @dennishuiskens Hvis jeg bytter ut currencycode.code med CustomerInvoice.CurrencyCodeId så får jeg i alle fall frem betalingene (og valutakoden)
    Morten-Svea
    @Morten-Svea
    @dennishuiskens skrivefeil identifisert - sorry, nå virker det:) takk for hjelpen
    dennishuiskens
    @dennishuiskens
    @Morten-Svea Bare hyggelig :-)
    Nikolai Ommundsen
    @niikoo
    Kan man filtrere på CustomValues?
    Sveinung Farestveit
    @fsveinung
    @niikoo Ja, du skal kunne filtrere på customfields på samme måte som andre felt
    Nikolai Ommundsen
    @niikoo
    @fsveinung Når jeg poster CustomValues så kommer det ikke opp når jeg kjører GET

    Eksempel på Customer:

    PUT https://test-api.unieconomy.no:443/api/biz/customers/41

    {
        "CustomValues": {
            "ExternalDebtorNumber": "test123"
        },
        "AcceptableDelta4CustomerPayment": 0.0000,
        "AcceptableDelta4CustomerPaymentAccountID": null,
        "AvtaleGiro": false,
        "AvtaleGiroNotification": false,
        "BusinessRelationID": 44,
        "CreatedAt": "2020-03-19T10:54:20.987Z",
        "CreatedBy": "e4c5d14a-df05-4429-aef1-629de96735c9",
        "CreditDays": null,
        "CurrencyCodeID": null,
        "CustomerInvoiceReminderSettingsID": null,
        "CustomerNumber": 100020,
        "CustomerNumberKidAlias": null,
        "DefaultCustomerInvoiceReportID": 0,
        "DefaultCustomerOrderReportID": 0,
        "DefaultCustomerQuoteReportID": 0,
        "DefaultDistributionsID": null,
        "DefaultSellerID": null,
        "Deleted": false,
        "DeliveryTermsID": null,
        "DimensionsID": null,
        "DontSendReminders": false,
        "EfakturaIdentifier": null,
        "EInvoiceAgreementReference": null,
        "FactoringNumber": null,
        "GLN": null,
        "ID": 41,
        "IsPrivate": false,
        "Localization": null,
        "OrgNumber": "988414859",
        "PaymentTermsID": null,
        "PeppolAddress": null,
        "ReminderEmailAddress": null,
        "StatusCode": 30001,
        "SubAccountNumberSeriesID": 6,
        "UpdatedAt": "2020-03-19T10:54:21.097Z",
        "UpdatedBy": "e4c5d14a-df05-4429-aef1-629de96735c9",
        "WebUrl": null,
        "Info": {
            "CustomValues": {},
            "CreatedAt": "2020-03-19T10:54:20.98Z",
            "CreatedBy": "e4c5d14a-df05-4429-aef1-629de96735c9",
            "DefaultBankAccountID": null,
            "DefaultContactID": null,
            "DefaultEmailID": 42,
            "DefaultPhoneID": null,
            "Deleted": false,
            "ID": 44,
            "InvoiceAddressID": 44,
            "Name": "Kenneth Nilsen",
            "ShippingAddressID": 44,
            "StatusCode": null,
            "UpdatedAt": null,
            "UpdatedBy": null,
            "Phones": [],
            "Emails": [
                {
                    "CustomValues": {},
                    "BusinessRelationID": 44,
                    "CreatedAt": "2020-03-19T10:54:20.97Z",
                    "CreatedBy": "e4c5d14a-df05-4429-aef1-629de96735c9",
                    "Deleted": false,
                    "Description": null,
                    "EmailAddress": "post@irauto.no",
                    "ID": 42,
                    "StatusCode": null,
                    "Type": null,
                    "UpdatedAt": null,
                    "UpdatedBy": null
                }
            ],
            "Addresses": [
                {
                    "CustomValues": {},
                    "AddressLine1": "Harald Halvorsens vei 45 J",
                    "AddressLine2": "",
                    "AddressLine3": null,
                    "BusinessRelationID": 44,
                    "City": "Oslo",
                    "Country": "Norway",
                    "CountryCode": "NO",
                    "CreatedAt": "2020-03-19T10:54:20.96Z",
                    "CreatedBy": "e4c5d14a-df05-4429-aef1-629de96735c9",
                    "Deleted": false,
                    "ID": 44,
                    "PostalCode": "0666",
                    "Region": null,
                    "StatusCode": null,
                    "UpdatedAt": null,
                    "UpdatedBy": null
                }
            ],
            "BankAccounts": []
        },
        "Distributions": null
    }
    Nikolai Ommundsen
    @niikoo
    Respons:
    {
        "CustomerNumber": 100020,
        "CustomerNumberKidAlias": null,
        "BusinessRelationID": 44,
        "OrgNumber": "988414859",
        "IsPrivate": false,
        "Info": {
            "Name": "Kenneth Nilsen",
            "DefaultContactID": null,
            "DefaultContact": null,
            "Contacts": null,
            "Addresses": [
                {
                    "BusinessRelationID": 44,
                    "BusinessRelation": null,
                    "AddressLine1": "Harald Halvorsens vei 45 J",
                    "AddressLine2": "",
                    "AddressLine3": null,
                    "PostalCode": "0666",
                    "City": "Oslo",
                    "Country": "Norway",
                    "CountryCode": "NO",
                    "Region": null,
                    "StatusCode": null,
                    "CustomValues": null,
                    "ID": 44,
                    "Deleted": false,
                    "CreatedAt": "2020-03-19T10:54:20.96Z",
                    "UpdatedAt": null,
                    "CreatedBy": "e4c5d14a-df05-4429-aef1-629de96735c9",
                    "UpdatedBy": null,
                    "_validationResults": {}
                }
            ],
            "Phones": [],
            "Emails": [
                {
                    "EmailAddress": "post@irauto.no",
                    "Description": null,
                    "Type": null,
                    "BusinessRelationID": 44,
                    "StatusCode": null,
                    "CustomValues": null,
                    "ID": 42,
                    "Deleted": false,
                    "CreatedAt": "2020-03-19T10:54:20.97Z",
                    "UpdatedAt": null,
                    "CreatedBy": "e4c5d14a-df05-4429-aef1-629de96735c9",
                    "UpdatedBy": null,
                    "_validationResults": {}
                }
            ],
            "BankAccounts": [],
            "InvoiceAddress": null,
            "InvoiceAddressID": 44,
            "ShippingAddress": null,
            "ShippingAddressID": 44,
            "DefaultPhone": null,
            "DefaultPhoneID": null,
            "DefaultEmail": null,
            "DefaultEmailID": 42,
            "DefaultBankAccountID": null,
            "DefaultBankAccount": null,
            "StatusCode": null,
            "CustomValues": null,
            "ID": 44,
            "Deleted": false,
            "CreatedAt": "2020-03-19T10:54:20.98Z",
            "UpdatedAt": null,
            "CreatedBy": "e4c5d14a-df05-4429-aef1-629de96735c9",
            "UpdatedBy": null,
            "_validationResults": {}
        },
        "CreditDays": null,
        "DefaultDistributionsID": null,
        "Distributions": null,
        "PaymentTermsID": null,
        "PaymentTerms": null,
        "DeliveryTermsID": null,
        "DeliveryTerms": null,
        "WebUrl": null,
        "DimensionsID": null,
        "Dimensions": null,
        "GLN": null,
        "PeppolAddress": null,
        "EfakturaIdentifier": null,
        "EInvoiceAgreementReference": null,
        "CustomerInvoiceReminderSettingsID": null,
        "CustomerInvoiceReminderSettings": null,
        "DontSendReminders": false,
        "CustomerQuotes": null,
        "CustomerOrders": null,
        "CustomerInvoices": null,
        "CurrencyCodeID": null,
        "CurrencyCode": null,
        "AcceptableDelta4CustomerPaymentAccountID": null,
        "AcceptableDelta4CustomerPaymentAccount": null,
        "AcceptableDelta4CustomerPayment": 0.0,
        "SubAccountNumberSeriesID": 6,
        "SubAccountNumberSeries": null,
        "DefaultSellerID": null,
        "DefaultSeller": null,
        "Sellers": null,
        "ReminderEmailAddress": null,
        "Companies": null,
        "Account": null,
        "Localization": null,
        "DefaultCustomerInvoiceReportID": 0,
        "DefaultCustomerOrderReportID": 0,
        "DefaultCustomerQuoteReportID": 0,
        "FactoringNumber": null,
        "AvtaleGiro": false,
        "AvtaleGiroNotification": false,
        "StatusCode": 30001,
        "CustomValues": {
            "ExternalDebtorNumber": "test123"
        },
        "ID": 41,
        "Deleted": false,
        "CreatedAt": "2020-03-19T10:54:20.987Z",
        "UpdatedAt": "2020-03-19T10:54:21.097Z",
        "CreatedBy": "e4c5d14a-df05-4429-aef1-629de96735c9",
        "UpdatedBy": "e4c5d14a-df05-4429-aef1-629de96735c9",
        "_validationResults": {}
    }
    GET https://test-api.unieconomy.no:443/api/biz/customers/41
    {
        "CustomValues": {},
        "AcceptableDelta4CustomerPayment": 0.0000,
        "AcceptableDelta4CustomerPaymentAccountID": null,
        "AvtaleGiro": false,
        "AvtaleGiroNotification": false,
        "BusinessRelationID": 44,
        "CreatedAt": "2020-03-19T10:54:20.987Z",
        "CreatedBy": "e4c5d14a-df05-4429-aef1-629de96735c9",
        "CreditDays": null,
        "CurrencyCodeID": null,
        "CustomerInvoiceReminderSettingsID": null,
        "CustomerNumber": 100020,
        "CustomerNumberKidAlias": null,
        "DefaultCustomerInvoiceReportID": 0,
        "DefaultCustomerOrderReportID": 0,
        "DefaultCustomerQuoteReportID": 0,
        "DefaultDistributionsID": null,
        "DefaultSellerID": null,
        "Deleted": false,
        "DeliveryTermsID": null,
        "DimensionsID": null,
        "DontSendReminders": false,
        "EfakturaIdentifier": null,
        "EInvoiceAgreementReference": null,
        "FactoringNumber": null,
        "GLN": null,
        "ID": 41,
        "IsPrivate": false,
        "Localization": null,
        "OrgNumber": "988414859",
        "PaymentTermsID": null,
        "PeppolAddress": null,
        "ReminderEmailAddress": null,
        "StatusCode": 30001,
        "SubAccountNumberSeriesID": 6,
        "UpdatedAt": "2020-03-19T10:54:21.097Z",
        "UpdatedBy": "e4c5d14a-df05-4429-aef1-629de96735c9",
        "WebUrl": null
    }
    Der ser man at "CustomValues" ikke kommer med på GET requesten etterpå.
    dennishuiskens
    @dennishuiskens
    Nikolai Ommundsen
    @niikoo
    @dennishuiskens
    GET https://test-api.unieconomy.no/api/biz/customers/41?expand=CustomerValues
    {
        "CustomValues": {},
        "AcceptableDelta4CustomerPayment": 0.0000,
        "AcceptableDelta4CustomerPaymentAccountID": null,
        "AvtaleGiro": false,
        "AvtaleGiroNotification": false,
        "BusinessRelationID": 44,
        "CreatedAt": "2020-03-19T10:54:20.987Z",
        "CreatedBy": "e4c5d14a-df05-4429-aef1-629de96735c9",
        "CreditDays": null,
        "CurrencyCodeID": null,
        "CustomerInvoiceReminderSettingsID": null,
        "CustomerNumber": 100020,
        "CustomerNumberKidAlias": null,
        "DefaultCustomerInvoiceReportID": 0,
        "DefaultCustomerOrderReportID": 0,
        "DefaultCustomerQuoteReportID": 0,
        "DefaultDistributionsID": null,
        "DefaultSellerID": null,
        "Deleted": false,
        "DeliveryTermsID": null,
        "DimensionsID": null,
        "DontSendReminders": false,
        "EfakturaIdentifier": null,
        "EInvoiceAgreementReference": null,
        "FactoringNumber": null,
        "GLN": null,
        "ID": 41,
        "IsPrivate": false,
        "Localization": null,
        "OrgNumber": "988414859",
        "PaymentTermsID": null,
        "PeppolAddress": null,
        "ReminderEmailAddress": null,
        "StatusCode": 30001,
        "SubAccountNumberSeriesID": 6,
        "UpdatedAt": "2020-03-19T10:54:21.097Z",
        "UpdatedBy": "e4c5d14a-df05-4429-aef1-629de96735c9",
        "WebUrl": null
    }
    Samme er det med GET https://test-api.unieconomy.no/api/biz/customers/41?expand=CustomValues
    Er det CustomValues eller CustomerValues @dennishuiskens ?
    dennishuiskens
    @dennishuiskens
    @niikoo kanskje du har ikke aktivert de custom fields

    Er det CustomValues eller CustomerValues @dennishuiskens ?

    CustomValues

    Nikolai Ommundsen
    @niikoo
    @dennishuiskens Takk for info, var ikke klart for meg at man måtte aktivere dem etter å lage dem. Kan man lage felter som virker på alle modeller?
    dennishuiskens
    @dennishuiskens
    @niikoo Tror ikke at dette er mulig per i dag. Men du kan "expande" Customer info på f.eks en CustomerInvoice, Så vil den inneholder den Custom felt som ligger under Customer.
    GET https://test-api.unieconomy.no/api/biz/customerinvoices/123?expand=Customer
    Successive Norge
    @martinsuccessive
    image.png
    Jeg får ikke til å lage fakturaer i vår testkonto 'Kredinas' og jeg skjønner ikke hvorfor... Noen som kan hjelpe?
    OK, fant ut av det, jeg måtte opprette regnskapsåret 2020
    Successive Norge
    @martinsuccessive
    For Uni Economy sine brukere sin del, bør det kanskje være en litt mer menneskelig feilmelding her om regnskapsår ikke er opprettet enda med en link til hvor/hvordan man gjør det ^^
    Sveinung Farestveit
    @fsveinung
    Godt poeng :)
    Olav Lindekleiv
    @oal
    Hei. Vi har en overføringsmodul som sender timer inn i Uni. Timer blir overført, og vi får Uni-ID i retur lagrer dette hos oss. Etter overføring, kjører vi et kall: https://pilot-api.unieconomy.no/api/biz/workitemgroups?action=create-from-items&workrelationid=1&fromdate=2020-02-28&todate=2020-03-27 for å godkjenne timene.
    Vi testa med timer for en ansatt, som har ID 12 i Uni, men fikk "DEVA23IE: Access denied for user 19" i retur. Det er ikke overført noen timer for bruker med ID 19
    Jo Are Ingvaldsen Rivelsrud
    @sm4llfish
    Hei, vil anta at ID 19 er brukeren som utfører operasjonen / eller maskinen
    Så her har nok ikke denne brukeren tilgang
    Olav Lindekleiv
    @oal
    Ja visst, det gir jo mening. Sjekker. Takk!
    Erik Andreas Larsen
    @larsensolutions
    Hoisann, er det mulig å få tak i faktura på pdf via API'et? /api/biz/files/customerinvoice/{id} gir bare ut eventuelle vedlegg som er lastet opp på en faktura. Men vi er ute etter selve faktura på pdf tilsvarende den som blir sendt ut på epost .
    Nikolai Ommundsen
    @niikoo
    Prøver å sende inn en Invoice med journal entries
    {"AccrualID":null,"AmountRegards":null,"BankAccountID":null,"CollectorStatusCode":null,"Comment":null,"CreditDays":null,"Credited":null,"CreditedAmount":null,"CreditedAmountCurrency":null,"CurrencyCodeID":1,"CurrencyExchangeRate":null,"CustomerID":1,"CustomerName":"Alfred S.","CustomerOrgNumber":"","CustomerPerson":null,"DefaultDimensionsID":null,"DefaultSellerID":null,"DeliveryDate":null,"DeliveryMethod":null,"DeliveryName":"Alfred S.","DeliveryTerm":null,"DeliveryTermsID":null,"DistributionPlanID":null,"DontSendReminders":null,"EmailAddress":"","ExternalReference":null,"FreeTxt":null,"InternalNote":null,"InvoiceAddressLine1":null,"InvoiceAddressLine2":null,"InvoiceAddressLine3":null,"InvoiceCity":null,"InvoiceCountry":null,"InvoiceCountryCode":null,"InvoiceDate":"2020-03-24","InvoiceNumber":"102995","InvoiceNumberSeriesID":3,"InvoicePostalCode":null,"InvoiceReceiverName":"Alfred S.","InvoiceReferenceID":null,"InvoiceType":0,"JournalEntryID":null,"OurReference":null,"PayableRoundingAmount":null,"PayableRoundingCurrencyAmount":null,"Payment":null,"PaymentDueDate":"2020-04-03","PaymentID":null,"PaymentInformation":null,"PaymentInfoTypeID":null,"PaymentTerm":null,"PaymentTermsID":null,"PrintStatus":null,"Requisition":null,"RestAmount":null,"RestAmountCurrency":null,"SalesPerson":null,"ShippingAddressLine1":"","ShippingAddressLine2":"","ShippingAddressLine3":null,"ShippingCity":"","ShippingCountry":null,"ShippingCountryCode":null,"ShippingPostalCode":"","SupplierOrgNumber":null,"TaxExclusiveAmount":null,"TaxExclusiveAmountCurrency":3122.5000000000000000000,"TaxInclusiveAmount":null,"TaxInclusiveAmountCurrency":3903.0000000000000000000,"UpdateCurrencyAmountsOnDateChange":null,"UseReportID":null,"VatTotalsAmount":null,"VatTotalsAmountCurrency":780.5000000000000000000,"YourReference":"","Payments":null,"JournalEntry":{"CanSkipMandatoryDimension":null,"Description":null,"FinancialYearID":1,"JournalEntryAccrualID":null,"JournalEntryDraftGroup":null,
    "JournalEntryNumber":null,"JournalEntryNumberNumeric":null,"NumberSeriesID":null,"NumberSeriesTaskID":null,"Lines":null,"DraftLines":[{"Dimensions":{},"AccountID":283,"AccrualID":null,"Amount":null,"AmountCurrency":-3903.0000000000000000000,"BatchNumber":null,"CurrencyCodeID":1,"CurrencyExchangeRate":null,"CustomerInvoiceID":null,"CustomerOrderID":null,"Description":"Faktura 102995","DimensionsID":null,"DueDate":"2020-04-03","FinancialDate":"2020-03-24","InvoiceNumber":"102995","JournalEntryID":null,"JournalEntryNumber":null,"JournalEntryNumberNumeric":null,"JournalEntryTypeID":8,"PaymentID":null,"PaymentInfoTypeID":null,"PaymentReferenceID":null,"PeriodID":null,"PostPostJournalEntryLineID":null,"RegisteredDate":"2020-03-24","Signature":null,"StatusCode":null,"SubAccountID":null,"SupplierInvoiceID":null,"TaxBasisAmount":null,"TaxBasisAmountCurrency":780.6000000000000000000,"VatDate":"2020-03-24T00:00:00+01:00","VatDeductionPercent":null,"VatPercent":null,"VatPeriodID":null,"VatTypeID":11,"Accrual":null,"CustomValues":{"CustomExternalInvoiceNumber":"102995","CustomExternalVoucherNumber":"102995","CustomExternalCreditInvoiceNumber":null}},{"Dimensions":{},"AccountID":662,"AccrualID":null,"Amount":null,"AmountCurrency":3903.0000000000000000000,"BatchNumber":null,"CurrencyCodeID":1,"CurrencyExchangeRate":null,"CustomerInvoiceID":null,"CustomerOrderID":null,"Description":"Faktura 102995","DimensionsID":null,"DueDate":"2020-04-03","FinancialDate":"2020-03-24","InvoiceNumber":"102995","JournalEntryID":null,"JournalEntryNumber":null,"JournalEntryNumberNumeric":null,"JournalEntryTypeID":8,"PaymentID":null,"PaymentInfoTypeID":null,"PaymentReferenceID":null,"PeriodID":null,"PostPostJournalEntryLineID":null,"RegisteredDate":"2020-03-24","Signature":null,"StatusCode":null,"SubAccountID":null,"SupplierInvoiceID":null,"TaxBasisAmount":null,"TaxBasisAmountCurrency":0.0,"VatDate":"2020-03-24T00:00:00+01:00","VatDeductionPercent":null,"VatPercent":null,
    "VatPeriodID":null,"VatTypeID":null,"Accrual":null,"CustomValues":{"CustomExternalInvoiceNumber":"102995","CustomExternalVoucherNumber":"102995","CustomExternalCreditInvoiceNumber":null}}],"JournalEntryAccrual":null,"FileIDs":[],"Payments":[],"CreatedAt":"2020-03-31T12:37:58.4841675+02:00","CreatedBy":"41495aa7-6dd3-4d21-a619-964028746ac9","CustomValues":{"CustomExternalVoucherNumber":"102995","CustomSourceEntryId":null}},"PaymentTerms":null,"DeliveryTerms":null,"Customer":null,"Items":[{"AccountID":null,"AccountingCost":null,"CalculateGrossPriceBasedOnNetPrice":null,"Comment":"Auto generated","CurrencyCodeID":null,"CurrencyExchangeRate":null,"CustomerInvoiceID":null,"DimensionsID":null,"Discount":null,"DiscountCurrency":null,"DiscountPercent":null,"InvoicePeriodEndDate":null,"InvoicePeriodStartDate":null,"ItemSourceID":null,"ItemText":"Summary","NumberOfItems":1.0,"OrderItemId":null,"PriceExVat":null,"PriceExVatCurrency":3122.5000000000000000000,"PriceIncVat":null,"PriceSetByUser":null,"ProductID":null,"SortIndex":null,"SumTotalExVat":null,"SumTotalExVatCurrency":3122.5000000000000000000,"SumTotalIncVat":null,"SumTotalIncVatCurrency":3903.0000000000000000000,"SumVat":null,"SumVatCurrency":780.5000000000000000000,"Unit":null,"VatDate":null,"VatPercent":null,"VatTypeID":null,"Dimensions":null,"ItemSource":null,"CustomValues":{}}],"DefaultDimensions":null,"Accrual":null,"DefaultSeller":null,"CustomerInvoiceReminders":null,"Sellers":null,"DistributionPlan":null,"Deleted":false,"StatusCode":"Invoiced", "CustomValues":{"CustomExternalOrderNumber":null,"CustomExternalInvoiceNumber":"102995","CustomExternalVoucherNumber":"102995","CustomExternalDebtorNumber":"30219","CustomSourceEntryId":null}}

    Men får denne responsen:

    {
      "Messages": [
        {
          "ID": 0,
          "EntityID": 0,
          "PropertyName": "",
          "EntityType": null,
          "Message": "Invoice have been changed since creation og journalentry draft.",
          "Level": 30,
          "EntityValidationRule": null,
          "ComplexValidationRule": null
        }
      ],
      "ErrorsCount": 1,
      "WarningsCount": 0,
      "InfosCount": 0
    }

    (Måtte dele opp requesten pga. lengden)
    Hva er grunnen / feilen? Kunne det gått an å få mer spesifikke feilmeldinger?

    Sveinung Farestveit
    @fsveinung
    @niikoo en faktura opprettes vanligvis uten bilagslinjer. Dvs. linjene produseres av backend når fakturaen opprettes. Bilaget produseres da basert på produktlinjene i fakturaen.
    Produktlinjene summeres (og mvabehandles) og det er dette som blir totalsummen på fakturaen. Dvs. du skal i prinsippet ikke kalkulere totalsummer, eller mva selv.
    POST /api/biz/invoices
    {
        "CustomerID": 1,
        "CustomerName": "Name of Customer-1",
        "InvoiceDate": "2020-03-31",
        "PaymentDueDate": "2020-04-30",
        "Items": [{
                "ItemText": "Summary",
                "NumberOfItems": 1.0,
                "PriceExVat": 1000.00,
                "ProductID": 1,
            }
        ]
    }
    Sveinung Farestveit
    @fsveinung
    Som du ser er det ikke mange påkrevde felt