Finish Hotfix-66
This commit is contained in:
@@ -90,25 +90,25 @@ public class DocumentDasExport {
|
||||
" FORMAT(ISNULL(dtb_doct.data_doc_val, dtb_doct.data_doc), 'yyyy-MM-dd') as InvoiceDate, " +
|
||||
/*Campo 27: per deposito commerciale e utilizzatore occazionale codice 10 e campo cod_accisa da destinatario,
|
||||
per utilizzatore non censito codice 15, per deposito non censinto codice 16 e campo partita_iva*/
|
||||
" rtrim(ltrim(left(vtb_dest.tipo_negozio, 3))) as DestinationTypeCode , " +
|
||||
" rtrim(ltrim(substring(vtb_dest.tipo_negozio, 4, 2))) as DestinationTypeCode , " +
|
||||
/* DESTINATARIO */
|
||||
" case when rtrim(ltrim(left(vtb_dest.tipo_negozio, 3))) in ('15','16') then gtb_anag.part_iva else vtb_dest.cod_acc end as ConsigneeTraderid," +
|
||||
" case when rtrim(ltrim(substring(vtb_dest.tipo_negozio, 4, 2))) in ('15','16') then gtb_anag.part_iva else vtb_dest.cod_acc end as ConsigneeTraderid," +
|
||||
/*[START] Devono essere presenti nel file xml solo se si tratta di un deposito censito*/
|
||||
" case when rtrim(ltrim(left(vtb_dest.tipo_negozio, 3))) in ('15','16') then vtb_Dest.destinatario else null end as ConsigneeTraderName, " +
|
||||
" case when rtrim(ltrim(left(vtb_dest.tipo_negozio, 3))) in ('15','16') then vtb_dest.indirizzo else null end as ConsigneeStreetName, " +
|
||||
" case when rtrim(ltrim(left(vtb_dest.tipo_negozio, 3))) in ('15','16') then vtb_dest.cap else null end as ConsigneePostcode, " +
|
||||
" case when rtrim(ltrim(left(vtb_dest.tipo_negozio, 3))) in ('15','16') then vtb_dest.citta else null end as ConsigneeCity, " +
|
||||
" case when rtrim(ltrim(left(vtb_dest.tipo_negozio, 3))) in ('15','16') then 'it' else null end as ConsigneeLanguage, " +
|
||||
" case when rtrim(ltrim(substring(vtb_dest.tipo_negozio, 4, 2))) in ('15','16') then vtb_Dest.destinatario else null end as ConsigneeTraderName, " +
|
||||
" case when rtrim(ltrim(substring(vtb_dest.tipo_negozio, 4, 2))) in ('15','16') then vtb_dest.indirizzo else null end as ConsigneeStreetName, " +
|
||||
" case when rtrim(ltrim(substring(vtb_dest.tipo_negozio, 4, 2))) in ('15','16') then vtb_dest.cap else null end as ConsigneePostcode, " +
|
||||
" case when rtrim(ltrim(substring(vtb_dest.tipo_negozio, 4, 2))) in ('15','16') then vtb_dest.citta else null end as ConsigneeCity, " +
|
||||
" case when rtrim(ltrim(substring(vtb_dest.tipo_negozio, 4, 2))) in ('15','16') then 'it' else null end as ConsigneeLanguage, " +
|
||||
/*[END]*/
|
||||
/* LUOGO DI DESTINAZIONE */
|
||||
" case when rtrim(ltrim(left(vtb_dest.tipo_negozio, 3))) in ('15','16') then gtb_anag.part_iva else vtb_dest.cod_acc end DeliveryPlaceTraderid, " +
|
||||
" case when rtrim(ltrim(substring(vtb_dest.tipo_negozio, 4, 2))) in ('15','16') then gtb_anag.part_iva else vtb_dest.cod_acc end DeliveryPlaceTraderid, " +
|
||||
/*[START] Devono essere presenti nel file xml solo se si tratta di un deposito censito e quindi c'è il codice nel luogo di consegna*/
|
||||
" case when rtrim(ltrim(left(vtb_dest.tipo_negozio, 3))) in ('15','16') then vtb_Dest.destinatario else null end as DeliveryPlaceTraderName, " +
|
||||
" case when rtrim(ltrim(left(vtb_dest.tipo_negozio, 3))) in ('15','16') then vtb_dest.indirizzo else null end as DeliveryPlaceStreetName, " +
|
||||
" case when rtrim(ltrim(left(vtb_dest.tipo_negozio, 3))) in ('15','16') then vtb_dest.cap else null end as DeliveryPlacePostcode, " +
|
||||
" case when rtrim(ltrim(left(vtb_dest.tipo_negozio, 3))) in ('15','16') then vtb_dest.citta else null end as DeliveryPlaceCity, " +
|
||||
" case when rtrim(ltrim(left(vtb_dest.tipo_negozio, 3))) in ('15','16') then 'it' else null end as DeliveryPlaceLanguage, " +
|
||||
" case when rtrim(ltrim(left(vtb_dest.tipo_negozio, 3))) in ('15','16') then vtb_Dest.cod_affiliazione else null end as ReferenceNumber, " +
|
||||
" case when rtrim(ltrim(substring(vtb_dest.tipo_negozio, 4, 2))) in ('15','16') then vtb_Dest.destinatario else null end as DeliveryPlaceTraderName, " +
|
||||
" case when rtrim(ltrim(substring(vtb_dest.tipo_negozio, 4, 2))) in ('15','16') then vtb_dest.indirizzo else null end as DeliveryPlaceStreetName, " +
|
||||
" case when rtrim(ltrim(substring(vtb_dest.tipo_negozio, 4, 2))) in ('15','16') then vtb_dest.cap else null end as DeliveryPlacePostcode, " +
|
||||
" case when rtrim(ltrim(substring(vtb_dest.tipo_negozio, 4, 2))) in ('15','16') then vtb_dest.citta else null end as DeliveryPlaceCity, " +
|
||||
" case when rtrim(ltrim(substring(vtb_dest.tipo_negozio, 4, 2))) in ('15','16') then 'it' else null end as DeliveryPlaceLanguage, " +
|
||||
" case when rtrim(ltrim(substring(vtb_dest.tipo_negozio, 4, 2))) in ('15','16') then vtb_Dest.cod_affiliazione else null end as ReferenceNumber, " +
|
||||
/*[END]*/
|
||||
/* TRASPORTO */
|
||||
" " + UtilityDB.valueToString(datiDAS.getTransportModeCode()) + " as TransportModeCode, " +
|
||||
|
||||
Reference in New Issue
Block a user