创建精确的在线公司

时间:2017-01-26 07:26:06

标签: exact-online invantive-sql

为了模拟会计环境,我需要创建至少100个Exact Online公司(部门,管理员,档案)。这可以通过手动操作实现,重复100次。并在7个国家重复。在totaal 700次大约一分钟。

有没有办法通过REST或XML API自动创建这些公司数量?

REST API上的文档没有列出POST可能性; XML API没有描述适用的上载/下载功能。

1 个答案:

答案 0 :(得分:2)

精确的在线支持向我解释说,有一种方法,由大型会计师的门户网站使用。

关于XML的Administrations主题在某种程度上支持公司的创建。您为新的Exact Online公司上传XML的公司无关紧要,它将作为独立公司添加。

代码示例创建100家公司,人数为501..600:

insert into UploadXMLTopics 
( topic
, payload
, division_code
, orig_system_reference
, orig_system_group
)
select 'Administrations'
,      '<?xml version="1.0" encoding="utf-8"?>
<eExact xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="eExact-XML.xsd">
    <Administrations>
        <Administration number="' || 500+id || '">
            <Name>Leeg ' || id || '</Name>
            <AddressLine1>Harm Buiterplein ' || id || '</AddressLine1>
            <Postcode>2501 TH</Postcode>
            <City>Den Haag</City>
            <State code="ZH" />
            <Country code="NL" />
            <Currency code="EUR" />
            <Phone>0351448695</Phone>
            <Fax>0351448690</Fax>
            <Email>info@leeg' || id || '.nl</Email>
            <HomePage>www.leeg.nl</HomePage>
            <ChamberOfCommerce>12411369</ChamberOfCommerce>
            <COCEstablishmentNumber>99</COCEstablishmentNumber>
            <ActivitySector code="A" />
            <ActivitySubSector code="01" />
            <SBICode code="014" />
            <CompanySize code="G" />
            <BusinessType code="51" />
            <StartDate>2015-05-13</StartDate>
            <BlockingStatus>0</BlockingStatus>
        </Administration>
    </Administrations>
</eExact>'
,      sdn.code
,      'Create-admin-' || id
,      'Create-admin'
from   exactonlinexml..calendar clr
join   ( select min(code) code from exactonlinerest..systemdivisions ) sdn
where  clr.id between 1 and 100