Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Incident Reports » Incident Reports Reported for Version 2.02 » View Incident Report |
Serious |
Reported By: Hedley Muscroft Reported On: 2/14/2009 For: Version 2.02 Build 7 |
select inv.id, invoicenum, datetime, inv.discpercent, discamount, nettotal, taxtotal, total, printed, inv.per_id as recipient_per_id, rtrim(recipper.lastname || ', ' || coalesce(recipper.firstname,'') || ' ' || coalesce(recipper.title,'')) as _recipient, inv.clinic_id, clinic.name as _clinicname, inv.staff_id, staff.knownas as _staffmember, inv.room_id, room.name as _roomname, inv.apptype_id, apptype.name as _apptype, inv.patient_per_id, rtrim(patper.lastname || ', ' || coalesce(patper.firstname,'') || ' ' || coalesce(patper.title,'')) as _patient, patper.code, patper.insuranceref, (coalesce(clinic.prefix, '') || cast(inv.invoicenum as varchar(20))) as _invoiceref, coalesce(view_invamtalloc.amtalloc, 0) as amtpaid, case when (inv.total = 0) or (view_invamtalloc.amtalloc >= inv.total) then 'Paid In Full' when (view_invamtalloc.amtalloc > 0) and (view_invamtalloc.amtalloc < inv.total) then 'Part Paid' else 'Unpaid' end as _status from inv inner join per as recipper on (inv.per_id = recipper.id) inner join clinic on (inv.clinic_id = clinic.id) left join staff on (inv.staff_id = staff.id) left join room on (inv.room_id = room.id) left join apptype on (inv.apptype_id = apptype.id) left join per as patper on (inv.patient_per_id = patper.id) left join view_invamtalloc on (inv.id = view_invamtalloc.inv_id) View definition: create view view_invamtalloc AS select inv_id, per_id, sum(amount) as amtalloc from alloc where (inv_id is not null) group by inv_id, per_id;
This web page was last updated on Wednesday, March 20, 2024 at 07:22 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |