94 lines
164 KiB
MySQL
94 lines
164 KiB
MySQL
|
-- IDEMPIERE-3595
|
||
|
SELECT register_migration_script('202202151954_IDEMPIERE-3595.sql') FROM dual;
|
||
|
|
||
|
-- Feb 15, 2022, 7:10:49 PM CET
|
||
|
UPDATE AD_ViewColumn SET ColumnSQL='COALESCE(l.postal,'''') || COALESCE(l.postal_add,'''')',Updated=TO_TIMESTAMP('2022-02-15 19:10:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ViewColumn_ID=200509
|
||
|
;
|
||
|
|
||
|
-- Feb 15, 2022, 7:11:46 PM CET
|
||
|
CREATE OR REPLACE VIEW C_Dunning_Header_v(AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, AD_Language, C_DunningRun_ID, C_DunningRunEntry_ID, DunningDate, PrintName, DocumentNote, C_BPartner_ID, BPValue, BPTaxID, NAICS, DUNS, Org_Location_ID, TaxID, SalesRep_ID, SalesRep_Name, BPGreeting, Name, Name2, BPContactGreeting, Title, Phone, ContactName, C_Location_ID, ReferenceNo, Postal, Amt, Qty, Note, Logo_ID, C_Dunning_ID, C_DunningRun_C_DunningLevel_ID, c_dunningrun_description, Processed, Processing, SendIt, C_DunningRunEntry_AD_Org_ID, AD_User_ID, C_BPartner_Location_ID, C_Currency_ID, C_DunRunEntry_C_DunLevel_ID, c_dunningrunentry_created, C_DunningRunEntry_CreatedBy, c_dunningrunentry_isactive, c_dunningrunentry_processed, c_dunningrunentry_updated, C_DunningRunEntry_UpdatedBy, C_DunningLevel_AD_Org_ID, C_DunningLevel_C_Dunning_ID, ChargeFee, ChargeInterest, C_PaymentTerm_ID, DaysAfterDue, DaysBetweenDunning, c_dunninglevel_description, Dunning_PrintFormat_ID, FeeAmt, InterestPercent, InvoiceCollectionType, c_dunninglevel_isactive, IsSetCreditStop, IsSetPaymentTerm, IsShowAllDue, IsShowNotDue, IsStatement, c_dunninglevel_name, c_bpartner_acqusitioncost, c_bpartner_actuallifetimevalue, c_bpartner_ad_language, C_BPartner_AD_OrgBP_ID, C_BPartner_AD_Org_ID, C_BPartner_BPartner_Parent_ID, C_BPartner_C_BP_Group_ID, C_BPartner_C_Greeting_ID, C_BPartner_InvoiceSchedule_ID, C_BPartner_C_PaymentTerm_ID, c_bpartner_created, C_BPartner_CreatedBy, C_BPartner_C_TaxGroup_ID, c_bpartner_deliveryrule, c_bpartner_deliveryviarule, c_bpartner_description, c_bpartner_dunninggrace, c_bpartner_firstsale, c_bpartner_flatdiscount, c_bpartner_freightcostrule, c_bpartner_invoicerule, c_bpartner_isactive, c_bpartner_iscustomer, c_bpartner_isdiscountprinted, c_bpartner_isemployee, c_bpartner_ismanufacturer, c_bpartner_isonetime, c_bpartner_ispotaxexempt, c_bpartner_isprospect, c_bpartner_issalesrep, c_bpartner_issummary, c_bpartner_istaxexempt, c_bpartner_isvendor, C_BPartner_Logo_ID, C_BPartner_M_DiscountSchema_ID, C_BPartner_M_PriceList_ID, c_bpartner_naics, c_bpartner_numberemployees, c_bpartner_paymentrule, c_bpartner_paymentrulepo, C_BPartnerPO_DiscountSchema_ID, C_BPartner_PO_PaymentTerm_ID, C_BPartner_PO_PriceList_ID, c_bpartner_poreference, c_bpartner_potentiallifetimev, c_bpartner_rating, C_BPartner_SalesRep_ID, c_bpartner_salesvolume, c_bpartner_sendemail, c_bpartner_shareofcustomer, c_bpartner_shelflifeminpct, c_bpartner_so_creditlimit, c_bpartner_socreditstatus, c_bpartner_so_creditused, c_bpartner_so_description, c_bpartner_totalopenbalance, c_bpartner_updated, C_BPartner_UpdatedBy, c_bpartner_url, C_BPartner_Greeting_AD_Org_ID, c_bpartner_greeting_isactive, c_bpartner_greeting_isfirstna, c_bpartner_greeting_name, C_BPartner_Location_AD_Org_ID, c_bpartner_location_created, C_BPartner_Location_CreatedBy, C_SalesRegion_ID, c_bpartner_location_fax, c_bpartner_location_isactive, IsBillTo, ISDN, IsPayFrom, IsRemitTo, IsShipTo, c_bpartner_location_name, c_bpartner_location_phone, c_bpartner_location_phone2, c_bpartner_location_updated, C_BPartner_Location_UpdatedBy, Address1, Address2, Address3, Address4, C_Location_AD_Org_ID, C_City_ID, C_Country_ID, City, c_location_created, C_Location_CreatedBy, C_Region_ID, c_location_isactive, Postal_Add, RegionName, c_location_updated, C_Location_UpdatedBy, AD_User_AD_Org_ID, AD_User_AD_AD_OrgTrx_ID, ad_user_ad_birthday, AD_User_C_BPartner_ID, AD_User_C_BPartner_Location_ID, AD_User_C_Greeting_ID, ad_user_comments, ad_user_created, AD_User_CreatedBy, ad_user_description, ad_user_email, ad_user_fax, ad_user_isactive, ad_user_lastcontact, ad_user_lastresult, ad_user_name, ad_user_phone2, AD_User_Supervisor_ID, ad_user_updated, AD_User_UpdatedBy, ad_user_value, C_User_Greeting_AD_Org_ID, c_user_greeting_isactive, c_user_greeting_isfirstnameon, c_user_greeting_name, AD_OrgInfo_AD_Org_ID, AD_OrgType_ID, C_Calendar_ID, ad_orginfo_created, AD_OrgInfo_CreatedBy, DropShip_Warehouse_ID, ad_orginfo_duns, ad_orginfo_email, ad_orginfo_fax, ad_orginfo_isactive, M_Warehouse_ID, Parent_Org
|
||
|
;
|
||
|
|
||
|
|
||
|
-- Feb 15, 2022, 7:54:03 PM CET
|
||
|
UPDATE AD_ViewColumn SET ColumnSQL='COALESCE(l.postal,'''') || COALESCE(l.postal_add,'''')',Updated=TO_TIMESTAMP('2022-02-15 19:54:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ViewColumn_ID=200798
|
||
|
;
|
||
|
|
||
|
-- Feb 15, 2022, 7:54:22 PM CET
|
||
|
CREATE OR REPLACE VIEW C_Dunning_Header_vt(AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, AD_Language, C_DunningRun_ID, C_DunningRunEntry_ID, DunningDate, PrintName, DocumentNote, C_BPartner_ID, BPValue, BPTaxID, NAICS, DUNS, Org_Location_ID, TaxID, SalesRep_ID, SalesRep_Name, BPGreeting, Name, Name2, BPContactGreeting, Title, Phone, ContactName, C_Location_ID, ReferenceNo, Postal, Amt, Qty, Note, Logo_ID, C_Dunning_ID, C_DunningRun_C_DunningLevel_ID, c_dunningrun_description, Processed, Processing, SendIt, C_DunningRunEntry_AD_Org_ID, AD_User_ID, C_BPartner_Location_ID, C_Currency_ID, C_DunRunEntry_C_DunLevel_ID, c_dunningrunentry_created, C_DunningRunEntry_CreatedBy, c_dunningrunentry_isactive, c_dunningrunentry_processed, c_dunningrunentry_updated, C_DunningRunEntry_UpdatedBy, C_DunningLevel_AD_Org_ID, C_DunningLevel_C_Dunning_ID, ChargeFee, ChargeInterest, C_PaymentTerm_ID, DaysAfterDue, DaysBetweenDunning, c_dunninglevel_description, Dunning_PrintFormat_ID, FeeAmt, InterestPercent, InvoiceCollectionType, c_dunninglevel_isactive, IsSetCreditStop, IsSetPaymentTerm, IsShowAllDue, IsShowNotDue, IsStatement, c_dunninglevel_name, c_bpartner_acqusitioncost, c_bpartner_actuallifetimevalue, c_bpartner_ad_language, C_BPartner_AD_OrgBP_ID, C_BPartner_AD_Org_ID, C_BPartner_BPartner_Parent_ID, C_BPartner_C_BP_Group_ID, C_BPartner_C_Greeting_ID, C_BPartner_InvoiceSchedule_ID, C_BPartner_C_PaymentTerm_ID, c_bpartner_created, C_BPartner_CreatedBy, C_BPartner_C_TaxGroup_ID, c_bpartner_deliveryrule, c_bpartner_deliveryviarule, c_bpartner_description, c_bpartner_dunninggrace, c_bpartner_firstsale, c_bpartner_flatdiscount, c_bpartner_freightcostrule, c_bpartner_invoicerule, c_bpartner_isactive, c_bpartner_iscustomer, c_bpartner_isdiscountprinted, c_bpartner_isemployee, c_bpartner_ismanufacturer, c_bpartner_isonetime, c_bpartner_ispotaxexempt, c_bpartner_isprospect, c_bpartner_issalesrep, c_bpartner_issummary, c_bpartner_istaxexempt, c_bpartner_isvendor, C_BPartner_Logo_ID, C_BPartner_M_DiscountSchema_ID, C_BPartner_M_PriceList_ID, c_bpartner_naics, c_bpartner_numberemployees, c_bpartner_paymentrule, c_bpartner_paymentrulepo, C_BPartnerPO_DiscountSchema_ID, C_BPartner_PO_PaymentTerm_ID, C_BPartner_PO_PriceList_ID, c_bpartner_poreference, c_bpartner_potentiallifetimev, c_bpartner_rating, C_BPartner_SalesRep_ID, c_bpartner_salesvolume, c_bpartner_sendemail, c_bpartner_shareofcustomer, c_bpartner_shelflifeminpct, c_bpartner_so_creditlimit, c_bpartner_socreditstatus, c_bpartner_so_creditused, c_bpartner_so_description, c_bpartner_totalopenbalance, c_bpartner_updated, C_BPartner_UpdatedBy, c_bpartner_url, C_BPartner_Greeting_AD_Org_ID, c_bpartner_greeting_isactive, c_bpartner_greeting_isfirstna, c_bpartner_greeting_name, C_BPartner_Location_AD_Org_ID, c_bpartner_location_created, C_BPartner_Location_CreatedBy, C_SalesRegion_ID, c_bpartner_location_fax, c_bpartner_location_isactive, IsBillTo, ISDN, IsPayFrom, IsRemitTo, IsShipTo, c_bpartner_location_name, c_bpartner_location_phone, c_bpartner_location_phone2, c_bpartner_location_updated, C_BPartner_Location_UpdatedBy, Address1, Address2, Address3, Address4, C_Location_AD_Org_ID, C_City_ID, C_Country_ID, City, c_location_created, C_Location_CreatedBy, C_Region_ID, c_location_isactive, Postal_Add, RegionName, c_location_updated, C_Location_UpdatedBy, AD_User_AD_Org_ID, AD_User_AD_AD_OrgTrx_ID, ad_user_ad_birthday, AD_User_C_BPartner_ID, AD_User_C_BPartner_Location_ID, AD_User_C_Greeting_ID, ad_user_comments, ad_user_created, AD_User_CreatedBy, ad_user_description, ad_user_email, ad_user_fax, ad_user_isactive, ad_user_lastcontact, ad_user_lastresult, ad_user_name, ad_user_phone2, AD_User_Supervisor_ID, ad_user_updated, AD_User_UpdatedBy, ad_user_value, C_User_Greeting_AD_Org_ID, c_user_greeting_isactive, c_user_greeting_isfirstnameon, c_user_greeting_name, AD_OrgInfo_AD_Org_ID, AD_OrgType_ID, C_Calendar_ID, ad_orginfo_created, AD_OrgInfo_CreatedBy, DropShip_Warehouse_ID, ad_orginfo_duns, ad_orginfo_email, ad_orginfo_fax, ad_orginfo_isactive, M_Warehouse_ID, Parent_Or
|
||
|
;
|
||
|
|
||
|
-- Feb 15, 2022, 7:57:39 PM CET
|
||
|
UPDATE AD_ViewColumn SET ColumnSQL='COALESCE(l.postal,'''') || COALESCE(l.postal_add,'''')',Updated=TO_TIMESTAMP('2022-02-15 19:57:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ViewColumn_ID=201425
|
||
|
;
|
||
|
|
||
|
-- Feb 15, 2022, 7:58:06 PM CET
|
||
|
CREATE OR REPLACE VIEW C_Invoice_Header_v(AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, AD_Language, C_Invoice_ID, IsSOTrx, DocumentNo, DocStatus, C_DocType_ID, C_BPartner_ID, BPValue, BPTaxID, NAICS, DUNS, Org_Location_ID, TaxID, DocumentType, DocumentTypeNote, C_Order_ID, SalesRep_ID, SalesRep_Name, DateInvoiced, BPGreeting, Name, Name2, BPContactGreeting, Title, Phone, ContactName, C_Location_ID, ReferenceNo, Postal, Description, POReference, DateOrdered, C_Currency_ID, PaymentTerm, PaymentTermNote, C_Charge_ID, ChargeAmt, TotalLines, GrandTotal, AmtInWords, M_PriceList_ID, IsTaxIncluded, C_Campaign_ID, C_Project_ID, C_Activity_ID, IsPaid, Logo_ID, C_Invoice_AD_OrgTrx_ID, AD_User_ID, C_BPartner_Location_ID, C_ConversionType_ID, C_DocTypeTarget_ID, C_DunningLevel_ID, C_Payment_ID, DateAcct, DatePrinted, DocAction, DunningGrace, GenerateTo, InvoiceCollectionType, IsApproved, IsDiscountPrinted, IsInDispute, IsPayScheduleValid, IsPrinted, c_invoice_isselfservice, IsTransferred, M_RMA_ID, PaymentRule, Posted, ProcessedOn, Processing, Ref_Invoice_ID, Reversal_ID, SendEMail, User1_ID, User2_ID, C_PaymentTerm_AD_Org_ID, AfterDelivery, C_PaymentTerm_ID, c_paymentterm_description, Discount, Discount2, DiscountDays, DiscountDays2, FixMonthCutoff, FixMonthDay, FixMonthOffset, GraceDays, c_paymentterm_isactive, IsDefault, IsDueFixed, IsNextBusinessDay, IsValid, NetDay, NetDays, PaymentTermUsage, c_paymentterm_value, bp_acqusitioncost, bp_actuallifetimevalue, bp_ad_language, BP_AD_OrgBP_ID, BP_AD_Org_ID, BP_BPartner_Parent_ID, BP_C_BP_Group_ID, BP_C_Dunning_ID, BP_C_Greeting_ID, BP_C_InvoiceSchedule_ID, BP_C_PaymentTerm_ID, bp_created, BP_CreatedBy, BP_C_TaxGroup_ID, bp_deliveryrule, bp_deliveryviarule, bp_description, bp_dunninggrace, bp_firstsale, bp_flatdiscount, bp_freightcostrule, bp_invoicerule, bp_isactive, bp_iscustomer, bp_isdiscountprinted, bp_isemployee, bp_ismanufacturer, bp_isonetime, bp_ispotaxexempt, bp_isprospect, bp_issalesrep, bp_issummary, bp_istaxexempt, bp_isvendor, BP_Logo_ID, BP_M_DiscountSchema_ID, BP_M_PriceList_ID, bp_naics, bp_numberemployees, bp_paymentrule, bp_paymentrulepo, BP_PO_DiscountSchema_ID, BP_PO_PaymentTerm_ID, BP_PO_PriceList_ID, bp_poreference, bp_potentiallifetimevalue, bp_rating, BP_SalesRep_ID, bp_salesvolume, bp_sendemail, bp_shareofcustomer, bp_shelflifeminpct, bp_so_creditlimit, bp_socreditstatus, bp_so_creditused, bp_so_description, bp_totalopenbalance, bp_updated, BP_UpdatedBy, bp_url, c_greeting_isactive, IsFirstNameOnly, c_greeting_name, BP_Location_AD_Org_ID, BP_Location_C_BPartner_ID, bp_location_created, BP_Location_CreatedBy, C_SalesRegion_ID, bp_location_fax, bp_location_isactive, IsBillTo, ISDN, IsPayFrom, IsRemitTo, IsShipTo, bp_location_name, bp_location_phone, bp_location_phone2, bp_location_updated, BP_Location_UpdatedBy, Address1, Address2, Address3, Address4, C_Location_AD_Org_ID, C_City_ID, C_Country_ID, City, c_location_created, C_Location_CreatedBy, C_Region_ID, c_location_isactive, RegionName, c_location_updated, C_Location_UpdatedBy, AD_User_AD_Org_ID, AD_User_AD_AD_OrgTrx_ID, ad_user_ad_birthday, AD_User_C_BPartner_ID, AD_User_C_BPartner_Location_ID, AD_User_C_Greeting_ID, ad_user_comments, ad_user_created, AD_User_CreatedBy, ad_user_description, ad_user_email, ad_user_fax, ad_user_isactive, ad_user_lastcontact, ad_user_lastresult, ad_user_phone2, AD_User_Supervisor_ID, ad_user_updated, AD_User_UpdatedBy, ad_user_value, user_greeting_isactive, user_greeting_isfirstnameonly, user_greeting_name, AD_OrgInfo_AD_Org_ID, AD_OrgType_ID, C_Calendar_ID, ad_orginfo_created, AD_OrgInfo_CreatedBy, DropShip_Warehouse_ID, ad_orginfo_duns, ad_orginfo_email, ad_orginfo_fax, ad_orginfo_isactive, M_Warehouse_ID, Parent_Org_ID, ad_orginfo_phone, ad_orginfo_phone2, ReceiptFooterMsg, Supervisor_ID, ad_orginfo_updated, AD_OrgInfo_UpdatedBy, SalesRep_AD_Org_ID, SalesRep_AD_AD_OrgTrx_ID, salesrep_ad_birthday, SalesRep_C_BPartner_ID, SalesRep_C_BP_Location_ID, SalesRep_C_Greeting_ID, salesrep_comments, salesrep_created, SalesRep_CreatedBy, salesrep_descriptio
|
||
|
;
|
||
|
|
||
|
-- Feb 15, 2022, 8:02:19 PM CET
|
||
|
UPDATE AD_ViewColumn SET ColumnSQL='COALESCE(l.postal,'''') || COALESCE(l.postal_add,'''')',Updated=TO_TIMESTAMP('2022-02-15 20:02:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ViewColumn_ID=201755
|
||
|
;
|
||
|
|
||
|
-- Feb 15, 2022, 8:02:30 PM CET
|
||
|
CREATE OR REPLACE VIEW C_Invoice_Header_vt(AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, AD_Language, C_Invoice_ID, IsSOTrx, DocumentNo, DocStatus, C_DocType_ID, C_BPartner_ID, BPValue, BPTaxID, NAICS, DUNS, Org_Location_ID, TaxID, DocumentType, DocumentTypeNote, C_Order_ID, SalesRep_ID, SalesRep_Name, DateInvoiced, BPGreeting, Name, Name2, BPContactGreeting, Title, Phone, ContactName, C_Location_ID, ReferenceNo, Postal, Description, POReference, DateOrdered, C_Currency_ID, PaymentTerm, PaymentTermNote, C_Charge_ID, ChargeAmt, TotalLines, GrandTotal, AmtInWords, M_PriceList_ID, IsTaxIncluded, C_Campaign_ID, C_Project_ID, C_Activity_ID, IsPaid, Logo_ID, C_Invoice_AD_OrgTrx_ID, AD_User_ID, C_BPartner_Location_ID, C_ConversionType_ID, C_DocTypeTarget_ID, C_DunningLevel_ID, C_Payment_ID, DateAcct, DatePrinted, DocAction, DunningGrace, GenerateTo, InvoiceCollectionType, IsApproved, IsDiscountPrinted, IsInDispute, IsPayScheduleValid, IsPrinted, c_invoice_isselfservice, IsTransferred, M_RMA_ID, PaymentRule, Posted, ProcessedOn, Processing, Ref_Invoice_ID, Reversal_ID, SendEMail, User1_ID, User2_ID, C_PaymentTerm_AD_Org_ID, AfterDelivery, C_PaymentTerm_ID, c_paymentterm_description, Discount, Discount2, DiscountDays, DiscountDays2, FixMonthCutoff, FixMonthDay, FixMonthOffset, GraceDays, c_paymentterm_isactive, IsDefault, IsDueFixed, IsNextBusinessDay, IsValid, NetDay, NetDays, PaymentTermUsage, c_paymentterm_value, bp_acqusitioncost, bp_actuallifetimevalue, bp_ad_language, BP_AD_OrgBP_ID, BP_AD_Org_ID, BP_BPartner_Parent_ID, BP_C_BP_Group_ID, BP_C_Dunning_ID, BP_C_Greeting_ID, BP_C_InvoiceSchedule_ID, BP_C_PaymentTerm_ID, bp_created, BP_CreatedBy, BP_C_TaxGroup_ID, bp_deliveryrule, bp_deliveryviarule, bp_description, bp_dunninggrace, bp_firstsale, bp_flatdiscount, bp_freightcostrule, bp_invoicerule, bp_isactive, bp_iscustomer, bp_isdiscountprinted, bp_isemployee, bp_ismanufacturer, bp_isonetime, bp_ispotaxexempt, bp_isprospect, bp_issalesrep, bp_issummary, bp_istaxexempt, bp_isvendor, BP_Logo_ID, BP_M_DiscountSchema_ID, BP_M_PriceList_ID, bp_naics, bp_numberemployees, bp_paymentrule, bp_paymentrulepo, BP_PO_DiscountSchema_ID, BP_PO_PaymentTerm_ID, BP_PO_PriceList_ID, bp_poreference, bp_potentiallifetimevalue, bp_rating, BP_SalesRep_ID, bp_salesvolume, bp_sendemail, bp_shareofcustomer, bp_shelflifeminpct, bp_so_creditlimit, bp_socreditstatus, bp_so_creditused, bp_so_description, bp_totalopenbalance, bp_updated, BP_UpdatedBy, bp_url, c_greeting_isactive, IsFirstNameOnly, c_greeting_name, BP_Location_AD_Org_ID, BP_Location_C_BPartner_ID, bp_location_created, BP_Location_CreatedBy, C_SalesRegion_ID, bp_location_fax, bp_location_isactive, IsBillTo, ISDN, IsPayFrom, IsRemitTo, IsShipTo, bp_location_name, bp_location_phone, bp_location_phone2, bp_location_updated, BP_Location_UpdatedBy, Address1, Address2, Address3, Address4, C_Location_AD_Org_ID, C_City_ID, C_Country_ID, City, c_location_created, C_Location_CreatedBy, C_Region_ID, c_location_isactive, RegionName, c_location_updated, C_Location_UpdatedBy, AD_User_AD_Org_ID, AD_User_AD_AD_OrgTrx_ID, ad_user_ad_birthday, AD_User_C_BPartner_ID, AD_User_C_BPartner_Location_ID, AD_User_C_Greeting_ID, ad_user_comments, ad_user_created, AD_User_CreatedBy, ad_user_description, ad_user_email, ad_user_fax, ad_user_isactive, ad_user_lastcontact, ad_user_lastresult, ad_user_phone2, AD_User_Supervisor_ID, ad_user_updated, AD_User_UpdatedBy, ad_user_value, user_greeting_isactive, user_greeting_isfirstnameonly, user_greeting_name, AD_OrgInfo_AD_Org_ID, AD_OrgType_ID, C_Calendar_ID, ad_orginfo_created, AD_OrgInfo_CreatedBy, DropShip_Warehouse_ID, ad_orginfo_duns, ad_orginfo_email, ad_orginfo_fax, ad_orginfo_isactive, M_Warehouse_ID, Parent_Org_ID, ad_orginfo_phone, ad_orginfo_phone2, ReceiptFooterMsg, Supervisor_ID, ad_orginfo_updated, AD_OrgInfo_UpdatedBy, SalesRep_AD_Org_ID, SalesRep_AD_AD_OrgTrx_ID, salesrep_ad_birthday, SalesRep_C_BPartner_ID, SalesRep_C_BP_Location_ID, SalesRep_C_Greeting_ID, salesrep_comments, salesrep_created, SalesRep_CreatedBy, salesrep_descripti
|
||
|
;
|
||
|
|
||
|
-- Feb 15, 2022, 8:04:46 PM CET
|
||
|
UPDATE AD_ViewColumn SET ColumnSQL='COALESCE(l.postal,'''') || COALESCE(l.postal_add,'''')',Updated=TO_TIMESTAMP('2022-02-15 20:04:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ViewColumn_ID=204722
|
||
|
;
|
||
|
|
||
|
-- Feb 15, 2022, 8:04:56 PM CET
|
||
|
CREATE OR REPLACE VIEW C_Order_Header_v(AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, AD_Language, C_Order_ID, IsSOTrx, DocumentNo, DocStatus, C_DocType_ID, C_BPartner_ID, BPValue, BPTaxID, NAICS, DUNS, Org_Location_ID, TaxID, M_Warehouse_ID, Warehouse_Location_ID, DocumentType, DocumentTypeNote, SalesRep_ID, SalesRep_Name, DateOrdered, DatePromised, BPGreeting, Name, Name2, BPContactGreeting, Title, Phone, ContactName, C_Location_ID, Postal, ReferenceNo, Bill_BPartner_ID, Bill_Location_ID, Bill_User_ID, Bill_BPValue, Bill_BPTaxID, Bill_Name, Bill_Name2, Bill_Title, Bill_Phone, Bill_ContactName, Bill_C_Location_ID, Description, POReference, C_Currency_ID, PaymentTerm, PaymentTermNote, C_Charge_ID, ChargeAmt, TotalLines, GrandTotal, AmtInWords, M_PriceList_ID, IsTaxIncluded, Volume, Weight, C_Campaign_ID, C_Project_ID, C_Activity_ID, M_Shipper_ID, DeliveryRule, DeliveryViaRule, PriorityRule, InvoiceRule, Logo_ID, AD_OrgTrx_ID, AD_User_ID, AmountRefunded, AmountTendered, C_BPartner_Location_ID, C_CashLine_ID, C_CashPlanLine_ID, C_ConversionType_ID, C_DocTypeTarget_ID, CopyFrom, C_Payment_ID, C_PaymentTerm_ID, C_POS_ID, DateAcct, DatePrinted, DocAction, DropShip_BPartner_ID, DropShip_Location_ID, DropShip_User_ID, FreightAmt, FreightCostRule, IsApproved, IsCreditApproved, IsDelivered, IsDiscountPrinted, IsDropShip, IsInvoiced, IsPayScheduleValid, IsPrinted, IsSelected, IsSelfService, IsTransferred, Link_Order_ID, M_FreightCategory_ID, OrderType, Pay_BPartner_ID, Pay_Location_ID, PaymentRule, Posted, Processed, ProcessedOn, PromotionCode, Ref_Order_ID, SendEMail, User1_ID, User2_ID, M_Warehouse_AD_Org_ID, m_warehouse_description, m_warehouse_isactive, IsDisallowNegativeInv, IsInTransit, M_WarehouseSource_ID, m_warehouse_name, ReplenishmentClass, Separator, m_warehouse_value, C_PaymentTerm_AD_Org_ID, AfterDelivery, c_paymentterm_description, Discount, Discount2, DiscountDays, DiscountDays2, FixMonthCutoff, FixMonthDay, FixMonthOffset, GraceDays, c_paymentterm_isactive, IsDefault, IsDueFixed, IsNextBusinessDay, IsValid, NetDay, NetDays, PaymentTermUsage, m_paymentterm_value, bp_acqusitioncost, bp_actuallifetimevalue, bp_ad_language, BP_AD_OrgBP_ID, BP_AD_Org_ID, BP_BPartner_Parent_ID, BP_C_BP_Group_ID, BP_C_Dunning_ID, BP_C_Greeting_ID, BP_C_InvoiceSchedule_ID, BP_C_PaymentTerm_ID, bp_created, BP_CreatedBy, BP_C_TaxGroup_ID, bp_deliveryrule, bp_deliveryviarule, bp_description, bp_dunninggrace, bp_firstsale, bp_flatdiscount, bp_freightcostrule, bp_invoicerule, bp_isactive, bp_iscustomer, bp_isdiscountprinted, bp_isemployee, bp_ismanufacturer, bp_isonetime, bp_ispotaxexempt, bp_isprospect, bp_issalesrep, bp_issummary, bp_istaxexempt, bp_isvendor, BP_Logo_ID, BP_M_DiscountSchema_ID, BP_M_PriceList_ID, bp_numberemployees, bp_paymentrule, bp_paymentrulepo, BP_PO_DiscountSchema_ID, BP_PO_PaymentTerm_ID, BP_PO_PriceList_ID, bp_poreference, bp_potentiallifetimevalue, bp_rating, BP_SalesRep_ID, bp_salesvolume, bp_sendemail, bp_shareofcustomer, bp_shelflifeminpct, bp_so_creditlimit, bp_socreditstatus, bp_so_creditused, bp_so_description, bp_totalopenbalance, bp_updated, BP_UpdatedBy, bp_url, C_Greeting_AD_Org_ID, c_greeting_isactive, IsFirstNameOnly, c_greeting_name, BP_Location_AD_Org_ID, BP_Location_C_BPartner_ID, bp_location_created, BP_Location_CreatedBy, BP_Location_C_SalesRegion_ID, bp_location_fax, bp_location_isactive, bp_location_isbillto, bp_location_isdn, bp_location_ispayfrom, bp_location_isremitto, bp_location_isshipto, bp_location_name, bp_location_phone, bp_location_phone2, bp_location_updated, BP_Location_UpdatedBy, Address1, Address2, Address3, Address4, C_Location_AD_Org_ID, C_City_ID, C_Country_ID, City, c_location_created, C_Location_CreatedBy, C_Region_ID, c_location_isactive, RegionName, c_location_updated, C_Location_UpdatedBy, AD_User_AD_Org_ID, AD_User_AD_OrgTrx_ID, ad_user_ad_birthday, AD_User_C_BPartner_ID, AD_User_C_BPartner_Location_ID, AD_User_C_Greeting_ID, ad_user_comments, ad_user_created, AD_User_CreatedBy, ad_user_description, ad_user_email, ad_user_fax, ad_user_isactive,
|
||
|
;
|
||
|
|
||
|
-- Feb 15, 2022, 8:07:14 PM CET
|
||
|
UPDATE AD_ViewColumn SET ColumnSQL='COALESCE(l.postal,'''') || COALESCE(l.postal_add,'''')',Updated=TO_TIMESTAMP('2022-02-15 20:07:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ViewColumn_ID=205195
|
||
|
;
|
||
|
|
||
|
-- Feb 15, 2022, 8:07:37 PM CET
|
||
|
CREATE OR REPLACE VIEW C_Order_Header_vt(AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, AD_Language, C_Order_ID, IsSOTrx, DocumentNo, DocStatus, C_DocType_ID, C_BPartner_ID, BPValue, BPTaxID, NAICS, DUNS, Org_Location_ID, TaxID, M_Warehouse_ID, Warehouse_Location_ID, DocumentType, DocumentTypeNote, SalesRep_ID, SalesRep_Name, DateOrdered, DatePromised, BPGreeting, Name, Name2, BPContactGreeting, Title, Phone, ContactName, C_Location_ID, Postal, ReferenceNo, Bill_BPartner_ID, Bill_Location_ID, Bill_User_ID, Bill_BPValue, Bill_BPTaxID, Bill_Name, Bill_Name2, Bill_Title, Bill_Phone, Bill_ContactName, Bill_C_Location_ID, Description, POReference, C_Currency_ID, PaymentTerm, PaymentTermNote, C_Charge_ID, ChargeAmt, TotalLines, GrandTotal, AmtInWords, M_PriceList_ID, IsTaxIncluded, Volume, Weight, C_Campaign_ID, C_Project_ID, C_Activity_ID, M_Shipper_ID, DeliveryRule, DeliveryViaRule, PriorityRule, InvoiceRule, Logo_ID, AD_OrgTrx_ID, AD_User_ID, AmountRefunded, AmountTendered, C_BPartner_Location_ID, C_CashLine_ID, C_CashPlanLine_ID, C_ConversionType_ID, C_DocTypeTarget_ID, CopyFrom, C_Payment_ID, C_PaymentTerm_ID, C_POS_ID, DateAcct, DatePrinted, DocAction, DropShip_BPartner_ID, DropShip_Location_ID, DropShip_User_ID, FreightAmt, FreightCostRule, IsApproved, IsCreditApproved, IsDelivered, IsDiscountPrinted, IsDropShip, IsInvoiced, IsPayScheduleValid, IsPrinted, IsSelected, IsSelfService, IsTransferred, Link_Order_ID, M_FreightCategory_ID, OrderType, Pay_BPartner_ID, Pay_Location_ID, PaymentRule, Posted, Processed, ProcessedOn, PromotionCode, Ref_Order_ID, SendEMail, User1_ID, User2_ID, M_Warehouse_AD_Org_ID, m_warehouse_description, m_warehouse_isactive, IsDisallowNegativeInv, IsInTransit, M_WarehouseSource_ID, m_warehouse_name, ReplenishmentClass, Separator, m_warehouse_value, C_PaymentTerm_AD_Org_ID, AfterDelivery, c_paymentterm_description, Discount, Discount2, DiscountDays, DiscountDays2, FixMonthCutoff, FixMonthDay, FixMonthOffset, GraceDays, c_paymentterm_isactive, IsDefault, IsDueFixed, IsNextBusinessDay, IsValid, NetDay, NetDays, PaymentTermUsage, m_paymentterm_value, bp_acqusitioncost, bp_actuallifetimevalue, bp_ad_language, BP_AD_OrgBP_ID, BP_AD_Org_ID, BP_BPartner_Parent_ID, BP_C_BP_Group_ID, BP_C_Dunning_ID, BP_C_Greeting_ID, BP_C_InvoiceSchedule_ID, BP_C_PaymentTerm_ID, bp_created, BP_CreatedBy, BP_C_TaxGroup_ID, bp_deliveryrule, bp_deliveryviarule, bp_description, bp_dunninggrace, bp_firstsale, bp_flatdiscount, bp_freightcostrule, bp_invoicerule, bp_isactive, bp_iscustomer, bp_isdiscountprinted, bp_isemployee, bp_ismanufacturer, bp_isonetime, bp_ispotaxexempt, bp_isprospect, bp_issalesrep, bp_issummary, bp_istaxexempt, bp_isvendor, BP_Logo_ID, BP_M_DiscountSchema_ID, BP_M_PriceList_ID, bp_numberemployees, bp_paymentrule, bp_paymentrulepo, BP_PO_DiscountSchema_ID, BP_PO_PaymentTerm_ID, BP_PO_PriceList_ID, bp_poreference, bp_potentiallifetimevalue, bp_rating, BP_SalesRep_ID, bp_salesvolume, bp_sendemail, bp_shareofcustomer, bp_shelflifeminpct, bp_so_creditlimit, bp_socreditstatus, bp_so_creditused, bp_so_description, bp_totalopenbalance, bp_updated, BP_UpdatedBy, bp_url, C_Greeting_AD_Org_ID, c_greeting_isactive, IsFirstNameOnly, c_greeting_name, BP_Location_AD_Org_ID, BP_Location_C_BPartner_ID, bp_location_created, BP_Location_CreatedBy, BP_Location_C_SalesRegion_ID, bp_location_fax, bp_location_isactive, bp_location_isbillto, bp_location_isdn, bp_location_ispayfrom, bp_location_isremitto, bp_location_isshipto, bp_location_name, bp_location_phone, bp_location_phone2, bp_location_updated, BP_Location_UpdatedBy, Address1, Address2, Address3, Address4, C_Location_AD_Org_ID, C_City_ID, C_Country_ID, City, c_location_created, C_Location_CreatedBy, C_Region_ID, c_location_isactive, RegionName, c_location_updated, C_Location_UpdatedBy, AD_User_AD_Org_ID, AD_User_AD_OrgTrx_ID, ad_user_ad_birthday, AD_User_C_BPartner_ID, AD_User_C_BPartner_Location_ID, AD_User_C_Greeting_ID, ad_user_comments, ad_user_created, AD_User_CreatedBy, ad_user_description, ad_user_email, ad_user_fax, ad_user_isactive,
|
||
|
;
|
||
|
|
||
|
-- Feb 15, 2022, 8:09:18 PM CET
|
||
|
UPDATE AD_ViewColumn SET ColumnSQL='COALESCE(l.postal,'''') || COALESCE(l.postal_add,'''')',Updated=TO_TIMESTAMP('2022-02-15 20:09:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ViewColumn_ID=210292
|
||
|
;
|
||
|
|
||
|
-- Feb 15, 2022, 8:09:26 PM CET
|
||
|
CREATE OR REPLACE VIEW DD_Order_Header_v(AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, AD_Language, DD_Order_ID, C_Order_ID, IsSOTrx, DocumentNo, DocStatus, C_DocType_ID, C_BPartner_ID, BPValue, BPTaxID, NAICS, DUNS, Org_Location_ID, TaxID, M_Warehouse_ID, Warehouse_Location_ID, DocumentType, DocumentTypeNote, SalesRep_ID, SalesRep_Name, DateOrdered, DatePromised, BPGreeting, Name, Name2, BPContactGreeting, Title, Phone, ContactName, C_Location_ID, Postal, ReferenceNo, Description, POReference, C_Charge_ID, ChargeAmt, Volume, Weight, C_Campaign_ID, C_Project_ID, C_Activity_ID, M_Shipper_ID, DeliveryRule, DeliveryViaRule, PriorityRule, Logo_ID) AS SELECT o.ad_client_id AS AD_Client_ID, o.ad_org_id AS AD_Org_ID, o.isactive AS IsActive, o.created AS Created, o.createdby AS CreatedBy, o.updated AS Updated, o.updatedby AS UpdatedBy, CAST('en_US' AS CHARACTER VARYING(6)) AS AD_Language, o.dd_order_id AS DD_Order_ID, o.c_order_id AS C_Order_ID, o.issotrx AS IsSOTrx, o.documentno AS DocumentNo, o.docstatus AS DocStatus, o.c_doctype_id AS C_DocType_ID, o.c_bpartner_id AS C_BPartner_ID, bp.value AS BPValue, bp.taxid AS BPTaxID, bp.naics AS NAICS, bp.duns AS DUNS, oi.c_location_id AS Org_Location_ID, oi.taxid AS TaxID, o.m_warehouse_id AS M_Warehouse_ID, wh.c_location_id AS Warehouse_Location_ID, dt.printname AS DocumentType, dt.documentnote AS DocumentTypeNote, o.salesrep_id AS SalesRep_ID, COALESCE(ubp.name, u.name) AS SalesRep_Name, o.dateordered AS DateOrdered, o.datepromised AS DatePromised, bpg.greeting AS BPGreeting, bp.name AS Name, bp.name2 AS Name2, bpcg.greeting AS BPContactGreeting, bpc.title AS Title, bpc.phone AS Phone, NULLIF(bpc.name, bp.name) AS ContactName, bpl.c_location_id AS C_Location_ID, COALESCE(l.postal,'') || COALESCE(l.postal_add,'') AS Postal, bp.referenceno AS ReferenceNo, o.description AS Description, o.poreference AS POReference, o.c_charge_id AS C_Charge_ID, o.chargeamt AS ChargeAmt, o.volume AS Volume, o.weight AS Weight, o.c_campaign_id AS C_Campaign_ID, o.c_project_id AS C_Project_ID, o.c_activity_id AS C_Activity_ID, o.m_shipper_id AS M_Shipper_ID, o.deliveryrule AS DeliveryRule, o.deliveryviarule AS DeliveryViaRule, o.priorityrule AS PriorityRule, COALESCE(oi.logo_id, ci.logo_id) AS Logo_ID FROM dd_order o JOIN c_doctype dt ON o.c_doctype_id = dt.c_doctype_id JOIN m_warehouse wh ON o.m_warehouse_id = wh.m_warehouse_id JOIN c_bpartner bp ON o.c_bpartner_id = bp.c_bpartner_id LEFT JOIN c_greeting bpg ON bp.c_greeting_id = bpg.c_greeting_id JOIN c_bpartner_location bpl ON o.c_bpartner_location_id = bpl.c_bpartner_location_id JOIN c_location l ON bpl.c_location_id = l.c_location_id LEFT JOIN ad_user bpc ON o.ad_user_id = bpc.ad_user_id LEFT JOIN c_greeting bpcg ON bpc.c_greeting_id = bpcg.c_greeting_id JOIN ad_orginfo oi ON o.ad_org_id = oi.ad_org_id JOIN ad_clientinfo ci ON o.ad_client_id = ci.ad_client_id LEFT JOIN ad_user u ON o.salesrep_id = u.ad_user_id LEFT JOIN c_bpartner ubp ON u.c_bpartner_id = ubp.c_bpartner_id
|
||
|
;
|
||
|
|
||
|
-- Feb 15, 2022, 8:10:29 PM CET
|
||
|
UPDATE AD_ViewColumn SET ColumnSQL='COALESCE(l.postal,'''') || COALESCE(l.postal_add,'''')',Updated=TO_TIMESTAMP('2022-02-15 20:10:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ViewColumn_ID=210345
|
||
|
;
|
||
|
|
||
|
-- Feb 15, 2022, 8:10:44 PM CET
|
||
|
CREATE OR REPLACE VIEW DD_Order_Header_vt(AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, AD_Language, DD_Order_ID, C_Order_ID, IsSOTrx, DocumentNo, DocStatus, C_DocType_ID, C_BPartner_ID, BPValue, BPTaxID, NAICS, DUNS, Org_Location_ID, TaxID, M_Warehouse_ID, Warehouse_Location_ID, DocumentType, DocumentTypeNote, SalesRep_ID, SalesRep_Name, DateOrdered, DatePromised, BPGreeting, Name, Name2, BPContactGreeting, Title, Phone, ContactName, C_Location_ID, Postal, ReferenceNo, Description, POReference, C_Charge_ID, ChargeAmt, Volume, Weight, C_Campaign_ID, C_Project_ID, C_Activity_ID, M_Shipper_ID, DeliveryRule, DeliveryViaRule, PriorityRule, Logo_ID) AS SELECT o.ad_client_id AS AD_Client_ID, o.ad_org_id AS AD_Org_ID, o.isactive AS IsActive, o.created AS Created, o.createdby AS CreatedBy, o.updated AS Updated, o.updatedby AS UpdatedBy, dt.ad_language AS AD_Language, o.dd_order_id AS DD_Order_ID, o.c_order_id AS C_Order_ID, o.issotrx AS IsSOTrx, o.documentno AS DocumentNo, o.docstatus AS DocStatus, o.c_doctype_id AS C_DocType_ID, o.c_bpartner_id AS C_BPartner_ID, bp.value AS BPValue, bp.taxid AS BPTaxID, bp.naics AS NAICS, bp.duns AS DUNS, oi.c_location_id AS Org_Location_ID, oi.taxid AS TaxID, o.m_warehouse_id AS M_Warehouse_ID, wh.c_location_id AS Warehouse_Location_ID, dt.printname AS DocumentType, dt.documentnote AS DocumentTypeNote, o.salesrep_id AS SalesRep_ID, COALESCE(ubp.name, u.name) AS SalesRep_Name, o.dateordered AS DateOrdered, o.datepromised AS DatePromised, bpg.greeting AS BPGreeting, bp.name AS Name, bp.name2 AS Name2, bpcg.greeting AS BPContactGreeting, bpc.title AS Title, bpc.phone AS Phone, NULLIF(bpc.name, bp.name) AS ContactName, bpl.c_location_id AS C_Location_ID, COALESCE(l.postal,'') || COALESCE(l.postal_add,'') AS Postal, bp.referenceno AS ReferenceNo, o.description AS Description, o.poreference AS POReference, o.c_charge_id AS C_Charge_ID, o.chargeamt AS ChargeAmt, o.volume AS Volume, o.weight AS Weight, o.c_campaign_id AS C_Campaign_ID, o.c_project_id AS C_Project_ID, o.c_activity_id AS C_Activity_ID, o.m_shipper_id AS M_Shipper_ID, o.deliveryrule AS DeliveryRule, o.deliveryviarule AS DeliveryViaRule, o.priorityrule AS PriorityRule, COALESCE(oi.logo_id, ci.logo_id) AS Logo_ID FROM dd_order o JOIN c_doctype_trl dt ON o.c_doctype_id = dt.c_doctype_id JOIN m_warehouse wh ON o.m_warehouse_id = wh.m_warehouse_id JOIN c_bpartner bp ON o.c_bpartner_id = bp.c_bpartner_id LEFT JOIN c_greeting_trl bpg ON bp.c_greeting_id = bpg.c_greeting_id AND dt.ad_language = bpg.ad_language JOIN c_bpartner_location bpl ON o.c_bpartner_location_id = bpl.c_bpartner_location_id JOIN c_location l ON bpl.c_location_id = l.c_location_id LEFT JOIN ad_user bpc ON o.ad_user_id = bpc.ad_user_id LEFT JOIN c_greeting_trl bpcg ON bpc.c_greeting_id = bpcg.c_greeting_id AND dt.ad_language = bpcg.ad_language JOIN ad_orginfo oi ON o.ad_org_id = oi.ad_org_id JOIN ad_clientinfo ci ON o.ad_client_id = ci.ad_client_id LEFT JOIN ad_user u ON o.salesrep_id = u.ad_user_id LEFT JOIN c_bpartner ubp ON u.c_bpartner_id = ubp.c_bpartner_id
|
||
|
;
|
||
|
|
||
|
-- Feb 15, 2022, 8:12:52 PM CET
|
||
|
UPDATE AD_ViewColumn SET ColumnSQL='COALESCE(l.postal,'''') || COALESCE(l.postal_add,'''')',Updated=TO_TIMESTAMP('2022-02-15 20:12:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ViewColumn_ID=210579
|
||
|
;
|
||
|
|
||
|
-- Feb 15, 2022, 8:13:04 PM CET
|
||
|
CREATE OR REPLACE VIEW M_InOut_Header_v(AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, AD_Language, M_InOut_ID, IsSOTrx, DocumentNo, DocStatus, C_DocType_ID, C_BPartner_ID, BPValue, BPTaxID, NAICS, DUNS, Org_Location_ID, TaxID, M_Warehouse_ID, Warehouse_Location_ID, DocumentType, DocumentTypeNote, C_Order_ID, MovementDate, MovementType, BPGreeting, Name, Name2, BPContactGreeting, Title, Phone, ContactName, C_Location_ID, Postal, ReferenceNo, Description, POReference, DateOrdered, Volume, Weight, M_Shipper_ID, DeliveryRule, DeliveryViaRule, PriorityRule, Logo_ID, AD_OrgTrx_ID, AD_User_ID, C_Activity_ID, C_BPartner_Location_ID, C_Campaign_ID, C_Charge_ID, ChargeAmt, C_Invoice_ID, C_Project_ID, CreateConfirm, CreateFrom, CreatePackage, DateAcct, DatePrinted, DateReceived, DocAction, DropShip_BPartner_ID, DropShip_Location_ID, DropShip_User_ID, FreightAmt, FreightCostRule, GenerateTo, IsApproved, IsDropShip, IsInDispute, m_inout_isintransit, IsPrinted, M_RMA_ID, NoPackages, PickDate, Posted, Processed, ProcessedOn, Processing, Ref_InOut_ID, Reversal_ID, M_InOut_SalesRep_ID, SendEMail, ShipDate, TrackingNo, User1_ID, User2_ID, c_bp_acqusitioncost, c_bp_actuallifetimevalue, c_bp_ad_language, C_BP_AD_OrgBP_ID, C_BP_AD_Org_ID, C_BP_BPartner_Parent_ID, C_BP_C_BP_Group_ID, C_BP_C_Dunning_ID, C_BP_C_Greeting_ID, C_BP_C_InvoiceSchedule_ID, C_BP_C_PaymentTerm_ID, c_bp_created, C_BP_CreatedBy, C_BP_C_TaxGroup_ID, c_bp_deliveryrule, c_bp_deliveryviarule, c_bp_description, c_bp_dunninggrace, c_bp_firstsale, c_bp_flatdiscount, c_bp_freightcostrule, c_bp_invoicerule, c_bp_isactive, c_bp_iscustomer, c_bp_isdiscountprinted, c_bp_isemployee, c_bp_ismanufacturer, c_bp_isonetime, c_bp_ispotaxexempt, c_bp_isprospect, c_bp_issalesrep, c_bp_issummary, c_bp_istaxexempt, c_bp_isvendor, C_BP_Logo_ID, C_BP_M_DiscountSchema_ID, C_BP_M_PriceList_ID, c_bp_numberemployees, c_bp_paymentrule, c_bp_paymentrulepo, C_BP_PO_DiscountSchema_ID, C_BP_PO_PaymentTerm_ID, C_BP_PO_PriceList_ID, c_bp_poreference, c_bp_potentiallifetimevalue, c_bp_rating, C_BP_SalesRep_ID, c_bp_salesvolume, c_bp_sendemail, c_bp_shareofcustomer, c_bp_shelflifeminpct, c_bp_so_creditlimit, c_bp_socreditstatus, c_bp_so_creditused, c_bp_so_description, c_bp_totalopenbalance, c_bp_updated, C_BP_UpdatedBy, c_bp_url, C_Greeting_AD_Org_ID, c_greeting_isactive, IsFirstNameOnly, c_greeting_name, C_BP_Location_AD_Org_ID, C_BP_Location_C_BPartner_ID, c_bp_location_created, C_BP_Location_CreatedBy, C_SalesRegion_ID, c_bp_location_fax, c_bp_location_isactive, IsBillTo, ISDN, IsPayFrom, IsRemitTo, IsShipTo, c_bp_location_name, c_bp_location_phone, c_bp_location_phone2, c_bp_location_updated, C_BP_Location_UpdatedBy, Address1, Address2, Address3, Address4, C_Location_AD_Org_ID, C_City_ID, C_Country_ID, City, c_location_created, C_Location_CreatedBy, C_Region_ID, c_location_isactive, RegionName, c_location_updated, C_Location_UpdatedBy, AD_User_AD_Org_ID, AD_User_AD_AD_OrgTrx_ID, ad_user_ad_birthday, AD_User_C_BPartner_ID, AD_User_C_BPartner_Location_ID, AD_User_C_Greeting_ID, ad_user_comments, ad_user_created, AD_User_CreatedBy, ad_user_description, ad_user_email, ad_user_fax, ad_user_isactive, ad_user_lastcontact, ad_user_lastresult, ad_user_phone2, AD_User_Supervisor_ID, ad_user_updated, AD_User_UpdatedBy, ad_user_value, C_User_Greeting_AD_Org_ID, c_user_greeting_isactive, c_user_greeting_isfnameonly, c_user_greeting_name, AD_OrgInfo_AD_Org_ID, AD_OrgType_ID, C_Calendar_ID, ad_orginfo_created, AD_OrgInfo_CreatedBy, DropShip_Warehouse_ID, ad_orginfo_duns, ad_orginfo_email, ad_orginfo_fax, ad_orginfo_isactive, AD_OrgInfo_M_Warehouse_ID, Parent_Org_ID, ad_orginfo_phone, ad_orginfo_phone2, ReceiptFooterMsg, Supervisor_ID, ad_orginfo_updated, AD_OrgInfo_UpdatedBy, M_Warehouse_AD_Org_ID, m_warehouse_description, m_warehouse__isactive, IsDisallowNegativeInv, m_warehouse_isintransit, M_WarehouseSource_ID, m_warehouse_name, ReplenishmentClass, Separator, m_warehouse_value) AS SELECT io.ad_client_id AS AD_Client_ID, io.ad_org_id AS AD_Org_ID, io.isactive AS IsActive, io.created AS
|
||
|
;
|
||
|
|
||
|
-- Feb 15, 2022, 8:14:56 PM CET
|
||
|
UPDATE AD_ViewColumn SET ColumnSQL='COALESCE(l.postal,'''') || COALESCE(l.postal_add,'''')',Updated=TO_TIMESTAMP('2022-02-15 20:14:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ViewColumn_ID=210815
|
||
|
;
|
||
|
|
||
|
-- Feb 15, 2022, 8:15:11 PM CET
|
||
|
CREATE OR REPLACE VIEW M_InOut_Header_vt(AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, AD_Language, M_InOut_ID, IsSOTrx, DocumentNo, DocStatus, C_DocType_ID, C_BPartner_ID, BPValue, BPTaxID, NAICS, DUNS, Org_Location_ID, TaxID, M_Warehouse_ID, Warehouse_Location_ID, DocumentType, DocumentTypeNote, C_Order_ID, MovementDate, MovementType, BPGreeting, Name, Name2, BPContactGreeting, Title, Phone, ContactName, C_Location_ID, Postal, ReferenceNo, Description, POReference, DateOrdered, Volume, Weight, M_Shipper_ID, DeliveryRule, DeliveryViaRule, PriorityRule, Logo_ID, AD_OrgTrx_ID, AD_User_ID, C_Activity_ID, C_BPartner_Location_ID, C_Campaign_ID, C_Charge_ID, ChargeAmt, C_Invoice_ID, C_Project_ID, CreateConfirm, CreateFrom, CreatePackage, DateAcct, DatePrinted, DateReceived, DocAction, DropShip_BPartner_ID, DropShip_Location_ID, DropShip_User_ID, FreightAmt, FreightCostRule, GenerateTo, IsApproved, IsDropShip, IsInDispute, m_inout_isintransit, IsPrinted, M_RMA_ID, NoPackages, PickDate, Posted, Processed, ProcessedOn, Processing, Ref_InOut_ID, Reversal_ID, M_InOut_SalesRep_ID, SendEMail, ShipDate, TrackingNo, User1_ID, User2_ID, c_bp_acqusitioncost, c_bp_actuallifetimevalue, c_bp_ad_language, C_BP_AD_OrgBP_ID, C_BP_AD_Org_ID, C_BP_BPartner_Parent_ID, C_BP_C_BP_Group_ID, C_BP_C_Dunning_ID, C_BP_C_Greeting_ID, C_BP_C_InvoiceSchedule_ID, C_BP_C_PaymentTerm_ID, c_bp_created, C_BP_CreatedBy, C_BP_C_TaxGroup_ID, c_bp_deliveryrule, c_bp_deliveryviarule, c_bp_description, c_bp_dunninggrace, c_bp_firstsale, c_bp_flatdiscount, c_bp_freightcostrule, c_bp_invoicerule, c_bp_isactive, c_bp_iscustomer, c_bp_isdiscountprinted, c_bp_isemployee, c_bp_ismanufacturer, c_bp_isonetime, c_bp_ispotaxexempt, c_bp_isprospect, c_bp_issalesrep, c_bp_issummary, c_bp_istaxexempt, c_bp_isvendor, C_BP_Logo_ID, C_BP_M_DiscountSchema_ID, C_BP_M_PriceList_ID, c_bp_numberemployees, c_bp_paymentrule, c_bp_paymentrulepo, C_BP_PO_DiscountSchema_ID, C_BP_PO_PaymentTerm_ID, C_BP_PO_PriceList_ID, c_bp_poreference, c_bp_potentiallifetimevalue, c_bp_rating, C_BP_SalesRep_ID, c_bp_salesvolume, c_bp_sendemail, c_bp_shareofcustomer, c_bp_shelflifeminpct, c_bp_so_creditlimit, c_bp_socreditstatus, c_bp_so_creditused, c_bp_so_description, c_bp_totalopenbalance, c_bp_updated, C_BP_UpdatedBy, c_bp_url, C_Greeting_AD_Org_ID, c_greeting_isactive, IsFirstNameOnly, c_greeting_name, C_BP_Location_AD_Org_ID, C_BP_Location_C_BPartner_ID, c_bp_location_created, C_BP_Location_CreatedBy, C_SalesRegion_ID, c_bp_location_fax, c_bp_location_isactive, IsBillTo, ISDN, IsPayFrom, IsRemitTo, IsShipTo, c_bp_location_name, c_bp_location_phone, c_bp_location_phone2, c_bp_location_updated, C_BP_Location_UpdatedBy, Address1, Address2, Address3, Address4, C_Location_AD_Org_ID, C_City_ID, C_Country_ID, City, c_location_created, C_Location_CreatedBy, C_Region_ID, c_location_isactive, RegionName, c_location_updated, C_Location_UpdatedBy, AD_User_AD_Org_ID, AD_User_AD_AD_OrgTrx_ID, ad_user_ad_birthday, AD_User_C_BPartner_ID, AD_User_C_BPartner_Location_ID, AD_User_C_Greeting_ID, ad_user_comments, ad_user_created, AD_User_CreatedBy, ad_user_description, ad_user_email, ad_user_fax, ad_user_isactive, ad_user_lastcontact, ad_user_lastresult, ad_user_phone2, AD_User_Supervisor_ID, ad_user_updated, AD_User_UpdatedBy, ad_user_value, C_User_Greeting_AD_Org_ID, c_user_greeting_isactive, c_user_greeting_isfnameonly, c_user_greeting_name, AD_OrgInfo_AD_Org_ID, AD_OrgType_ID, C_Calendar_ID, ad_orginfo_created, AD_OrgInfo_CreatedBy, DropShip_Warehouse_ID, ad_orginfo_duns, ad_orginfo_email, ad_orginfo_fax, ad_orginfo_isactive, AD_OrgInfo_M_Warehouse_ID, Parent_Org_ID, ad_orginfo_phone, ad_orginfo_phone2, ReceiptFooterMsg, Supervisor_ID, ad_orginfo_updated, AD_OrgInfo_UpdatedBy, M_Warehouse_AD_Org_ID, m_warehouse_description, m_warehouse__isactive, IsDisallowNegativeInv, m_warehouse_isintransit, M_WarehouseSource_ID, m_warehouse_name, ReplenishmentClass, Separator, m_warehouse_value) AS SELECT io.ad_client_id AS AD_Client_ID, io.ad_org_id AS AD_Org_ID, io.isactive AS IsActive, io.created AS
|
||
|
;
|
||
|
|
||
|
-- Feb 15, 2022, 10:06:47 PM CET
|
||
|
DROP VIEW RV_T_1099Extract
|
||
|
;
|
||
|
|
||
|
|
||
|
-- Feb 15, 2022, 10:08:55 PM CET
|
||
|
CREATE OR REPLACE VIEW RV_T_1099Extract(AD_PInstance_ID, AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, C_BPartner_ID, Value, Name, TaxID, Address, Address1, Address2, Address3, Address4, CityStateZip, City, Region, Zip, Country, Cut_Year, Cut_Date, AmtBucket01, AmtBucket02, AmtBucket03, AmtBucket04, AmtBucket05, AmtBucket06, AmtBucket07, AmtBucket08, AmtBucket09, AmtBucket10, AmtBucket11, AmtBucket12, AmtBucket13, AmtBucket14, AmtBucket15, AmtBucket16) AS SELECT t.ad_pinstance_id AS AD_PInstance_ID, t.ad_client_id AS AD_Client_ID, t.ad_org_id AS AD_Org_ID, t.isactive AS IsActive, t.created AS Created, t.createdby AS CreatedBy, t.updated AS Updated, t.updatedby AS UpdatedBy, t.c_bpartner_id AS C_BPartner_ID, t.value AS Value, t.name AS Name, t.taxid AS TaxID, (((((l.address1 || ' ') || l.address2) || ' ') || l.address3) || ' ') || l.address4 AS Address, l.address1 AS Address1, l.address2 AS Address2, l.address3 AS Address3, l.address4 AS Address4, (((l.city || ', ') || r.name) || ' ') ||COALESCE(l.postal,'') || COALESCE(l.postal_add,'') AS CityStateZip, l.city AS City, r.name AS Region, COALESCE(l.postal,'') || COALESCE(l.postal_add,'') AS Zip, ctry.name AS Country, t.cut_year AS Cut_Year, t.cut_date AS Cut_Date, COALESCE(t.amtbucket01, 0) AS AmtBucket01, COALESCE(t.amtbucket02, 0) AS AmtBucket02, COALESCE(t.amtbucket03, 0) AS AmtBucket03, COALESCE(t.amtbucket04, 0) AS AmtBucket04, COALESCE(t.amtbucket05, 0) AS AmtBucket05, COALESCE(t.amtbucket06, 0) AS AmtBucket06, COALESCE(t.amtbucket07, 0) AS AmtBucket07, COALESCE(t.amtbucket08, 0) AS AmtBucket08, COALESCE(t.amtbucket09, 0) AS AmtBucket09, COALESCE(t.amtbucket10, 0) AS AmtBucket10, COALESCE(t.amtbucket11, 0) AS AmtBucket11, COALESCE(t.amtbucket12, 0) AS AmtBucket12, COALESCE(t.amtbucket13, 0) AS AmtBucket13, COALESCE(t.amtbucket14, 0) AS AmtBucket14, COALESCE(t.amtbucket15, 0) AS AmtBucket15, COALESCE(t.amtbucket16, 0) AS AmtBucket16 FROM t_1099extract t LEFT JOIN c_location l ON t.c_location_id = l.c_location_id LEFT JOIN c_region r ON r.c_region_id = l.c_region_id LEFT JOIN c_country ctry ON ctry.c_country_id = l.c_country_id WHERE t.ad_pinstance_id = (( SELECT max(t_1099extract.ad_pinstance_id) AS max FROM t_1099extract))
|
||
|
;
|
||
|
|