![]() |
#11 |
Участник
|
ProjInvoice --> DataSource --> Query --> DataSource --> ProjInvoiceJour
X++: display AccountNum customerId() { SMAserviceOrderTable smaserviceordertableloc; SMAServiceOrderLine smaserviceorderlineloc; Name _patID; ProjInvoiceEmpl projinvoiceemplloc; ; select firstonly CustAccount, ServiceOrderId from smaserviceordertableloc exists join serviceOrderId from smaserviceorderlineloc where smaserviceordertableloc.serviceorderid == smaserviceorderlineloc.ServiceOrderId && smaserviceordertableloc.AgreementId == smaserviceorderlineloc.AgreementId exists join TransId from projInvoiceEmplloc where projinvoiceemplloc.TransId == smaserviceorderlineloc.ProjTransId exists join ProjinvoiceID from projInvoiceJour where projInvoiceEmplloc.ProjInvoiceId == projInvoiceJour.ProjInvoiceId; _patID = smaserviceordertableloc.CustAccount; return _patID; |
|