|
|
Strona 1 z 1
|
[ Posty: 4 ] |
|
Nr rachunku kontrahenta oraz nr kontrahenta
Autor |
Wiadomość |
WojtekM
Rejestracja: 2015-07-28, 10:28 Posty: 53
|
Nr rachunku kontrahenta oraz nr kontrahenta
Witam, chciałbym zrobić funkcję, która przyjmuje jako argument nr wyciągu bankowego a zwraca pozycję kontrahenta. Mam więc prośbę o informację w której tabeli Sumfonii ERP (FKF) znajduje się informacja o rachunkach bankowych, które są zapisane w zakładce kontrahenta, oraz jak nazywa kolumna w której są one zapisane oraz jak ta tabela jest powiązana z tabelą kontrahentów (jak połączyć jedną tabelę z drugą)?
Z góry dziękuję za pomoc.
|
2015-09-21, 07:11 |
|
|
Autor |
Wiadomość |
Mix-soft.pl
|
|
|
rafal
Ekspert
Rejestracja: 2007-11-16, 15:08 Posty: 4000 Pomógł: 448
|
Re: Nr rachunku kontrahenta oraz nr kontrahenta
(1)
SSCommon.[STBankingInfos] SSCommon.[STAccounts] A takimi zapytaniami Symfonia Handel ERP pobiera te dane przy otwarciu okna kontrahenta Kod: SELECT BankingInfos3.[Id] AS BankingInfos_Id,BankingInfos3.[Guid] AS BankingInfos_Guid,BankingInfos3.[Name] AS BankingInfos_Name,BankingInfos3.[MainAccount] AS BankingInfos_MainAccount,Contacts4.[Id] AS Contacts_Id,Contacts4.[Guid] AS Contacts_Guid,Contacts4.[Name] AS Contacts_Name,Contacts4.[MainPostOfficeAddress] AS Contacts_MainPostOfficeAddress,Contacts4.[MainTeleITContact] AS Contacts_MainTeleITContact,Contractors0.[Id],Contractors0.[Guid],Contractors0.[Shortcut],Contractors0.[Name],Contractors0.[NaturalPerson],Contractors0.[NIP],Contractors0.[PESEL],Contractors0.[REGON],Contractors0.[NIP_UE],Contractors0.[Note],Contractors0.[ContactGuid],Contractors0.[BankingInfoGuid],Contractors0.[LimitFlag],Contractors0.[LimitAmount],Contractors0.[LimitCurrency],Contractors0.[VIES],Contractors0.[Negotiation],Contractors0.[MainElement],Contractors0.[MainPerson],Elements1.[ElementId] AS Elements_ElementId,Elements1.[Guid] AS Elements_Guid,Elements1.[Title] AS Elements_Title,Elements1.[Active] AS Elements_Active,Elements1.[AccountNo] AS Elements_AccountNo,Elements1.[Description] AS Elements_Description,Elements1.[ElementKindId] AS Elements_ElementKindId,Elements1.[Shortcut] AS Elements_Shortcut,Elements1.[Position] AS Elements_Position,Elements1.[ObjVer] AS Elements_ObjVer,Elements7.[ElementId] AS Persons_Elements_ElementId,Elements7.[Guid] AS Persons_Elements_Guid,Elements7.[Title] AS Persons_Elements_Title,Elements7.[Active] AS Persons_Elements_Active,Elements7.[AccountNo] AS Persons_Elements_AccountNo,Elements7.[Description] AS Persons_Elements_Description,Elements7.[ElementKindId] AS Persons_Elements_ElementKindId,Elements7.[Shortcut] AS Persons_Elements_Shortcut,Elements7.[Position] AS Persons_Elements_Position,Elements7.[ObjVer] AS Persons_Elements_ObjVer,Persons2.[Id] AS Persons_Id,Persons2.[Firstname] AS Persons_Firstname,Persons2.[SecondName] AS Persons_SecondName,Persons2.[Surname] AS Persons_Surname,Persons2.[BirthDate] AS Persons_BirthDate,Persons2.[Guid] AS Persons_Guid,Persons2.[StringIdent] AS Persons_StringIdent,Persons2.[DualStringIdent1] AS Persons_DualStringIdent1,Persons2.[DualStringIdent2] AS Persons_DualStringIdent2,Persons2.[Note] AS Persons_Note,Persons2.[ContactGuid] AS Persons_ContactGuid,Persons2.[BankingInfoGuid] AS Persons_BankingInfoGuid,Persons2.[DataSourceName] AS Persons_DataSourceName,Persons2.[DataSourceAddress] AS Persons_DataSourceAddress,Persons2.[DataProcessingAgree] AS Persons_DataProcessingAgree,Persons2.[DataMarketingProcessingAgree] AS Persons_DataMarketingProcessingAgree,PostOfficeAddresses5.[Id] AS Contacts_PostOfficeAddresses_Id,PostOfficeAddresses5.[AddressName] AS Contacts_PostOfficeAddresses_AddressName,PostOfficeAddresses5.[Guid] AS Contacts_PostOfficeAddresses_Guid,PostOfficeAddresses5.[Street] AS Contacts_PostOfficeAddresses_Street,PostOfficeAddresses5.[Commune] AS Contacts_PostOfficeAddresses_Commune,PostOfficeAddresses5.[District] AS Contacts_PostOfficeAddresses_District,PostOfficeAddresses5.[Place] AS Contacts_PostOfficeAddresses_Place,PostOfficeAddresses5.[PostCode] AS Contacts_PostOfficeAddresses_PostCode,PostOfficeAddresses5.[PostOffice] AS Contacts_PostOfficeAddresses_PostOffice,PostOfficeAddresses5.[ApartmentNo] AS Contacts_PostOfficeAddresses_ApartmentNo,PostOfficeAddresses5.[HouseNo] AS Contacts_PostOfficeAddresses_HouseNo,PostOfficeAddresses5.[ContactGuid] AS Contacts_PostOfficeAddresses_ContactGuid,PostOfficeAddresses5.[Province] AS Contacts_PostOfficeAddresses_Province,PostOfficeAddresses5.[Country] AS Contacts_PostOfficeAddresses_Country,PostOfficeAddresses5.[CountryElementGuid] AS Contacts_PostOfficeAddresses_CountryElementGuid,PostOfficeAddresses5.[PostOfficeBox] AS Contacts_PostOfficeAddresses_PostOfficeBox,TeleItContacts6.[Id] AS Contacts_TeleItContacts_Id,TeleItContacts6.[Guid] AS Contacts_TeleItContacts_Guid,TeleItContacts6.[Name] AS Contacts_TeleItContacts_Name,TeleItContacts6.[ContactGuid] AS Contacts_TeleItContacts_ContactGuid,TeleItContacts6.[Telephone1] AS Contacts_TeleItContacts_Telephone1,TeleItContacts6.[Telephone2] AS Contacts_TeleItContacts_Telephone2,TeleItContacts6.[Telephone3] AS Contacts_TeleItContacts_Telephone3,TeleItContacts6.[Fax] AS Contacts_TeleItContacts_Fax,TeleItContacts6.[Fax2] AS Contacts_TeleItContacts_Fax2,TeleItContacts6.[Telex] AS Contacts_TeleItContacts_Telex,TeleItContacts6.[Email1] AS Contacts_TeleItContacts_Email1,TeleItContacts6.[Email2] AS Contacts_TeleItContacts_Email2,TeleItContacts6.[WWW] AS Contacts_TeleItContacts_WWW,TeleItContacts6.[Communicator1] AS Contacts_TeleItContacts_Communicator1,TeleItContacts6.[Communicator2] AS Contacts_TeleItContacts_Communicator2,TeleItContacts6.[Description] AS Contacts_TeleItContacts_Description FROM SSCommon.[STContractors] as Contractors0 INNER JOIN SSCommon.[STElements] as Elements1 ON (Elements1.[Guid]=Contractors0.[MainElement]) LEFT OUTER JOIN SSCommon.[STPersons] as Persons2 ON (Persons2.[Guid]=Contractors0.[MainPerson]) LEFT OUTER JOIN SSCommon.[STBankingInfos] as BankingInfos3 ON (BankingInfos3.[Guid]=Contractors0.[BankingInfoGuid]) LEFT OUTER JOIN SSCommon.[STContacts] as Contacts4 ON (Contacts4.[Guid]=Contractors0.[ContactGuid]) LEFT OUTER JOIN SSCommon.[STPostOfficeAddresses] as PostOfficeAddresses5 ON (PostOfficeAddresses5.[Guid]=Contacts4.[MainPostOfficeAddress]) LEFT OUTER JOIN SSCommon.[STTeleItContacts] as TeleItContacts6 ON (TeleItContacts6.[Guid]=Contacts4.[MainTeleITContact]) LEFT OUTER JOIN SSCommon.[STPersonElements] as PersonElements8 ON (PersonElements8.[PersonGuid]=Persons2.[Guid]) LEFT OUTER JOIN SSCommon.[STElements] as Elements7 ON (Elements7.[Guid]=PersonElements8.[ElementGuid]) WHERE Contractors0.[Id] = id_kontrahenta A następnie numer rachunku Kod: SELECT Accounts0.[Id],Accounts0.[Guid],Accounts0.[BankingInfosGuid],Accounts0.[AccountNo],Accounts0.[BankName],Accounts0.[AccountName],Accounts0.[ElementId],Accounts0.[MainElementGuid] FROM SSCommon.[STAccounts] as Accounts0 WHERE Accounts0.[BankingInfosGuid] = BankingInfos_Guid_z_poprzedniego zapytania
|
2015-09-21, 14:24 |
|
|
WojtekM
Rejestracja: 2015-07-28, 10:28 Posty: 53
|
Re: Nr rachunku kontrahenta oraz nr kontrahenta
@Rafal Dzięki wielkie!
|
2015-09-21, 16:29 |
|
|
WojtekM
Rejestracja: 2015-07-28, 10:28 Posty: 53
|
Re: Nr rachunku kontrahenta oraz nr kontrahenta
@Rafał, a mógłbym mieć jeszcze do Ciebie prośbę o jakiś przykład kodu SQL-a z pobraniem numeru pracownika po numerze rachunku?
Z góry dziękuję Ci za pomoc!
|
2015-09-22, 11:13 |
|
|
|
Strona 1 z 1
|
[ Posty: 4 ] |
|
Kto jest online |
Użytkownicy przeglądający to forum: Nie ma żadnego zarejestrowanego użytkownika i 14 gości |
|
Nie możesz tworzyć nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz dodawać załączników
|
|
|
|