     requisition_line_items.packstoship,
     requisition_line_items.packsize,
     requisition_line_items.fullsupply,
-         requisition_line_item_losses_adjustments.type AS adjustment_type,
-         requisition_line_item_losses_adjustments.quantity AS adjutment_qty,
-         losses_adjustments_types.displayorder AS adjustment_display_order,
-         losses_adjustments_types.additive AS adjustment_additive,
-         (fn_get_supplying_facility_name(requisitions.supervisorynodeid))::text AS supplying_facility_name,
+    requisition_line_item_losses_adjustments.type AS adjustment_type,
+    requisition_line_item_losses_adjustments.quantity AS adjutment_qty,
+    losses_adjustments_types.displayorder AS adjustment_display_order,
+    losses_adjustments_types.additive AS adjustment_additive,
+    (fn_get_supplying_facility_name(requisitions.supervisorynodeid))::text AS supplying_facility_name,
     requisition_line_items.id
-  FROM ((((((((((((requisition_line_items
-                    JOIN requisitions ON ((requisition_line_items.rnrid = requisitions.id)))
-                   JOIN products ON (((requisition_line_items.productcode)::text = (products.code)::text)))
-                  JOIN programs ON ((requisitions.programid = programs.id)))
-                 JOIN program_products ON (((products.id = program_products.productid) AND (program_products.programid = programs.id))))
-                JOIN processing_periods ON ((requisitions.periodid = processing_periods.id)))
-               JOIN product_categories ON ((program_products.productcategoryid = product_categories.id)))
-              JOIN processing_schedules ON ((processing_periods.scheduleid = processing_schedules.id)))
-             JOIN facilities ON ((requisitions.facilityid = facilities.id)))
-            JOIN facility_types ON ((facilities.typeid = facility_types.id)))
-           JOIN geographic_zones ON ((facilities.geographiczoneid = geographic_zones.id)))
-          JOIN requisition_line_item_losses_adjustments ON ((requisition_line_items.id = requisition_line_item_losses_adjustments.requisitionlineitemid)))
-    JOIN losses_adjustments_types ON (((requisition_line_item_losses_adjustments.type)::text = (losses_adjustments_types.name)::text)));
+   FROM ((((((((((((requisition_line_items
+     JOIN requisitions ON ((requisition_line_items.rnrid = requisitions.id)))
+     JOIN products ON (((requisition_line_items.productcode)::text = (products.code)::text)))
+     JOIN programs ON ((requisitions.programid = programs.id)))
+     JOIN program_products ON (((products.id = program_products.productid) AND (program_products.programid = programs.id))))
+     JOIN processing_periods ON ((requisitions.periodid = processing_periods.id)))
+     JOIN product_categories ON ((program_products.productcategoryid = product_categories.id)))
+     JOIN processing_schedules ON ((processing_periods.scheduleid = processing_schedules.id)))
+     JOIN facilities ON ((requisitions.facilityid = facilities.id)))
+     JOIN facility_types ON ((facilities.typeid = facility_types.id)))
+     JOIN geographic_zones ON ((facilities.geographiczoneid = geographic_zones.id)))
+     JOIN requisition_line_item_losses_adjustments ON ((requisition_line_items.id = requisition_line_item_losses_adjustments.requisitionlineitemid)))
+     JOIN losses_adjustments_types ON (((requisition_line_item_losses_adjustments.type)::text = (losses_adjustments_types.name)::text)));
 
 
 ALTER TABLE vw_requisition_adjustment OWNER TO postgres;

--

CREATE SEQUENCE requisition_group_members_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;


ALTER TABLE requisition_group_members_id_seq OWNER TO postgres;

--

CREATE SEQUENCE patient_quantification_line_items_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE patient_quantification_line_items_id_seq OWNER TO postgres;
