SELECT
A.Status as Status,
A.ExtraType as Extra,
Sum(A.IntrastatAmount) as Amount,
Sum(A.LocalIntrastatAmount) as LocalAmount,
Sum(A.StatisticAmount) as StatisticAmount,
A.Currency_ID as Currency_ID,
A.CountryCode as CountryCode,
A.IntrastatRegionCode as IntrastatRegionCode,
A.CommodityCode as CommodityCode,
A.DeliveryTermCode as DeliveryTermCode,
A.TransportationTypeCode as TransportationTypeCode,
A.TransactionTypeCode as TransactionTypeCode,
Max(A.IntrastatUnitCode) as IntrastatUnitCode,
Sum(A.IntrastatQuantity) as IntrastatQuantity,
Sum(A.Weight) as Weight,
A.WeightUnit as WeightUnit,
A.OriginCountryCode as OriginCountryCode,
Max(A.IntrastatOriginCountry_ID) as IntrastatOriginCountry_ID,
Max(A.WeightIsOptional) as WeightIsOptional,
Max(A.CommodityDescription) as CommodityDescription ,
Max(A.ConstantWeight) as ConstantWeight,
Max(A.Country_ID) as Country,
Max(A.IntrastatRegion_ID) as IntrastatRegion,
Max(A.Commodity_ID) as Commodity_ID,
Max(A.DeliveryTerm_ID) as DeliveryTerm_ID,
Max(A.TransportationType_ID) as TransportationType_ID,
Max(A.TransactionType_ID) as TransactionType_ID,
Max(A.Extra_ID) as Extra_ID,
A.TAXIdentNumber as TAXIdentNumber
FROM
IntrastatExport({$AVATDATEFROM},{$AVATDATETO}, {$FirmSelID}, {$DivisionsSelID}, {$BusOrdersSelID}, {$BusTransactionsSelID}, {$BusProjectsSelID},
{$DivisionsWithChilds}, {$BusOrdersWithChilds}, {$BusTransactionsWithChilds}, {$BusProjectsWithChilds},
{$ACountrySelID}, {$ACurrencySelID}, {$AStoreSelID}, {$AStoreCardSelID},
{$ACreatedBySelID}, {$ACorrectedBySelID}, {$BusOrdersWithNull}, {$BusTransactionsWithNull},
{$BusProjectsWithNull})
A
{WHERE}
Group By
A.Status,
A.Currency_ID,
A.CountryCode,
A.IntrastatRegionCode,
A.CommodityCode,
A.DeliveryTermCode,
A.TransportationTypeCode,
A.TransactionTypeCode,
A.ExtraType,
A.WeightUnit,
A.OriginCountryCode,
A.TAXIdentNumber
| Jméno | Typ | Velikost | Výraz | CLSID | Popis |
|---|---|---|---|---|---|
| Amount | dtFloat | 10 | Částka | ||
| CommodityCode | dtString | 10 | Kód komodity | ||
| CommodityDescription | dtString | 240 | Popis komodity | ||
| ConstantWeight | dtFloat | 15 | Konstantní hmotnost | ||
| CountryCode | dtString | 3 | Kód země | ||
| Currency_ID | dtString | 10 | 4R5FINKNYNDL3C5P00CA141B44 | Měna | |
| DeliveryTermCode | dtString | 3 | Kód dodací podmínky | ||
| Extra | dtString | 2 | Zvláštní pohyb | ||
| IntrastatQuantity | dtFloat | 10 | Množství INTRASTAT | ||
| IntrastatRegionCode | dtString | 10 | Kód kraje | ||
| IntrastatUnitCode | dtString | 3 | Jednotka INTRASTAT | ||
| LocalAmount | dtFloat | 10 | Částka v lokální měně | ||
| OriginCountryCode | dtString | 3 | Kód země původu | ||
| StatisticAmount | dtFloat | 10 | Statistická hodnota | ||
| Status | dtString | 1 | Typ pohybu | ||
| TAXIdentNumber | dtString | 20 | IČD | ||
| TransactionTypeCode | dtString | 2 | Kód povahy transakce | ||
| TransportationTypeCode | dtString | 1 | Kód druhu dopravy | ||
| Weight | dtFloat | 10 | Hmotnost | ||
| WeightIsOptional | dtBoolean | 1 | Nepovinná hmotnost | ||
| WeightUnit | dtInteger | 10 | Hmotnostní jednotka |
P.DocDate$DATE >= {:LOW} and
P.DocDate$DATE < {:HIGH}
Generated by ABRA Software a.s. 27.10.2021 16:35