Skip to content

Commit

Permalink
Merge branch 'master' into feature-purchase-orders
Browse files Browse the repository at this point in the history
Conflicts:
	bower.json
	server/config/routes.js
	server/controllers/finance/purchases.js
	server/models/schema.sql
	server/test/api/purchase.js
  • Loading branch information
jniles committed Jun 24, 2016
2 parents 3d9c4c4 + 6e7a187 commit f5ee72d
Show file tree
Hide file tree
Showing 55 changed files with 736 additions and 295 deletions.
31 changes: 22 additions & 9 deletions client/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,15 @@
"OTHER_ACTIONS" : "Other Actions",
"PATIENTS" : "Patients",
"PATIENT_FOUND" : "Patient Found",
"PATIENT_NOT_FOUND" : "Patient Not Found",
"PREVIOUS" : "Previous",
"SAVE_SUCCESS" : "Save success",
"SEARCH" : "Search",
"UNAUTHORIZED" : "Unauthorized",
"UPDATE_SUCCESS" : "Updated successfully",
"VIEW_BEGINNING_BALACE" : "View Beginning Balance"
"PATIENT_NOT_FOUND" : "Patient Not Found",
"PATIENT_SUCC_TRANSFERRED" : "The patient's image was successfully transferred",
"PREVIOUS" : "Previous",
"SAVE_SUCCESS" : "Save success",
"SEARCH" : "Search",
"UNAUTHORIZED" : "Unauthorized",
"UPDATE_SUCCESS" : "Updated successfully",
"UPLOAD_PICTURE_FAILED" : "The selected file is not an picture",
"VIEW_BEGINNING_BALACE" : "View Beginning Balance"
},
"LABELS": {
"ABBREVIATION" : "Abréviation",
Expand Down Expand Up @@ -355,6 +357,7 @@
"EDIT" : "Edit",
"EMAIL" : "Email",
"EMPLOYER" : "Employer",
"END" : "End",
"END_DATE" : "End Date",
"ENTERPRISE" : "Enterprise",
"ENTERPRISE_ID" : "ID enterprise",
Expand Down Expand Up @@ -466,6 +469,7 @@
"SPOUSE" : "Spouse's Name",
"SPOUSE_EMPLOYER" : "Spouse's Employer",
"SPOUSE_PROFESSION" : "Spouse's Occupation",
"START" : "Start",
"STATUS" : "Status",
"STOCK" : "Stock",
"SUBSIDIES" : "Subsidies Applied",
Expand Down Expand Up @@ -503,7 +507,7 @@
"CREATION" : "Creation",
"EDITION" : "Edition"
},
"PLACE_HOLDERS": {
"PLACEHOLDERS": {
"ENTER_ACCOUNT" : "Enter account",
"ENTER_CODE" : "Enter code",
"ENTER_COUNTRY" : "Enter Country",
Expand Down Expand Up @@ -586,6 +590,7 @@
"UNIQUE" : "This field must be unique. This value is already taken."
},
"WARNNINGS": {
"BAD_FILE_TYPE" : "Bad file type",
"EMPTY_SELECTION" : "Empty Selection",
"NOT_AUTHORISED" : "The requested page is not authorised",
"NOT_FOUND" : "Not found",
Expand Down Expand Up @@ -691,6 +696,7 @@
},
"PATIENT_RECORDS": {
"TITLE" : "Patients",
"UPDATE_PICTURE" : "Update Patient Photo",
"UPLOAD_PICTURE" : "Upload Patient Photo",
"NOT_FOUND" : "Unable to find patient with that ID. Please check with your system administrator.",
"CHECK_IN" : {
Expand Down Expand Up @@ -934,22 +940,28 @@
"PATIENT" : "Patient",
"PATIENT_ID" : "ID Patient",
"PERCENT" : "Percentage",
"PERIOD" : "Period",
"PHONE" : "Telephone",
"POSITION" : "Position",
"PO_BOX" : "Poste Office Box",
"PRICE" : "Price",
"PRICE_LIST" : "Price List",
"PROFIT" : "Profit",
"PROFIT_CENTER" : "Profit Center",
"PROJECT" : "Project",
"PROVINCE" : "Province",
"RATE" : "Rate",
"RECEIPT" : "Receipt",
"RECIPIENT" : "Recipient",
"RECIPIENT_TYPE" : "Recipient Type",
"RECORD" : "Record",
"REF" : "Ref.",
"REFERENCE" : "Reference",
"REFERENCE_GROUP" : "Reference Group",
"REF_GROUP" : "Ref. Groupe",
"RESPONSIBLE" : "Responsible",
"RESULT" : "Result",
"RESULT_ACCOUNT_SCT" : "Result Account section",
"RECEIPT" : "Receipt",
"SECTOR" : "Sector",
"SERVICE" : "Service",
"SORTING": {
Expand All @@ -963,6 +975,7 @@
"TEXT" : "Text",
"TITLE" : "Title",
"TOTAL" : "Total",
"TRANSACTION" : "Transaction",
"TRANSACTION_ID" : "Transaction ID",
"TRANSACTION_PRICE" : "Transaction Price",
"TYPE" : "Type",
Expand Down
35 changes: 25 additions & 10 deletions client/src/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@
},
"INFOS": {
"BY" : "Par",
"CLEAR_FILTERS" : "Rafraîchir le filtre",
"CLOSE_FISCAL_YEAR" : "Clôturer l'année fiscale",
"CLOSED" : "Fermée",
"CREATED" : "Crée",
Expand All @@ -282,13 +283,15 @@
"OTHER_ACTIONS" : "Autres actions",
"PATIENTS" : "Patients",
"PATIENT_FOUND" : "Patient Trouvé",
"PATIENT_NOT_FOUND" : "Patient Non Trouvé",
"PREVIOUS" : "Précédent",
"SAVE_SUCCESS" : "Enregistrement avec succès",
"SEARCH" : "Recherche",
"UNAUTHORIZED" : "Non autorisée",
"UPDATE_SUCCESS" : "Mise à jour avec succès",
"VIEW_BEGINNING_BALACE" : "Aperçue de la balance d'ouverture"
"PATIENT_NOT_FOUND" : "Patient Non Trouvé",
"PATIENT_SUCC_TRANSFERRED" : "L'image du patient a été transféré avec succès",
"PREVIOUS" : "Précédent",
"SAVE_SUCCESS" : "Enregistrement avec succès",
"SEARCH" : "Recherche",
"UNAUTHORIZED" : "Non autorisée",
"UPDATE_SUCCESS" : "Mise à jour avec succès",
"UPLOAD_PICTURE_FAILED" : "Le fichier selectionné n'est pas une image",
"VIEW_BEGINNING_BALACE" : "Aperçue de la balance d'ouverture"
},
"LABELS": {
"ABBREVIATION" : "Abbreviation",
Expand Down Expand Up @@ -353,6 +356,7 @@
"EDIT" : "Editer",
"EMAIL" : "Email",
"EMPLOYER" : "Employeur",
"END" : "Fin",
"END_DATE" : "Date de fin",
"ENTERPRISE" : "Entreprise",
"ENTERPRISE_ID" : "ID entreprise",
Expand Down Expand Up @@ -460,6 +464,7 @@
"SPOUSE" : "Nom de l'époux(se)",
"SPOUSE_EMPLOYER" : "Employeur(époux(se))",
"SPOUSE_PROFESSION" : "Profession (époux(se))",
"START" : "Début",
"STATUS" : "Etat",
"STOCK" : "Stock",
"SUBSIDIES" : "Les subventions appliqués",
Expand Down Expand Up @@ -496,7 +501,7 @@
"CREATION" : "Creation",
"EDITION" : "Edition"
},
"PLACE_HOLDERS": {
"PLACEHOLDERS": {
"ENTER_ACCOUNT" : "Entrer le compte",
"ENTER_CODE" : "Entrer le code",
"ENTER_COUNTRY" : "Entrer le nom pays",
Expand Down Expand Up @@ -561,6 +566,7 @@
"DATE" : "Date mal saisie",
"DATE_MAX" : "Cette date est fixée trop loin dans le future.",
"DATE_MIN" : "Cette date est trop loin dans le passé.",
"DATE_RANGE" : "This date is outside the allowed range.",
"DATE_REQUIRED" : "Cette date est nécessaire.",
"EMAIL" : "Email mal saisie",
"EXCEPTION" : "Il y avait un problème de validation avec ce champ. S'il vous plaît vérifier votre connexion Internet.",
Expand All @@ -578,6 +584,7 @@
"UNIQUE" : "Ce champ doit être unique. Cette valeur a déjà été utilisée."
},
"WARNNINGS": {
"BAD_FILE_TYPE" : "Type de fichier incorrect",
"EMPTY_SELECTION" : "Sélection vide",
"NOT_AUTHORISED" : "La page demandée n'est pas autorisée",
"NOT_FOUND" : "Non trouvee",
Expand Down Expand Up @@ -698,8 +705,9 @@
"RECENT" : "Visites récentes",
"ITEM" : "Vérifiée",
"SUCCESS" : "Le patient a déjà été vérifié"
},
},
"TITLE" : "Patients",
"UPDATE_PICTURE" : "Mettre à jour la Photo",
"UPLOAD_PICTURE" : "Télécharger Photo Patient",
"NOT_FOUND" : "Impossible de trouver le patient ayant ce ID. Veuillez contacter votre administrateur systeme"
},
Expand Down Expand Up @@ -864,7 +872,7 @@
"MEMORY_USAGE" : "Usage de la mémoire",
"VERSION": "Version",
"EVENTS" : "Evement système"
},
},
"TABLE": {
"COLUMNS": {
"ABBREVIATION" : "Abbreviation",
Expand Down Expand Up @@ -926,21 +934,27 @@
"PATIENT" : "Patient",
"PATIENT_ID" : "Patient Id",
"PERCENT" : "Pourcentage",
"PERIOD" : "Période",
"PHONE" : "Telephone",
"POSITION" : "Position",
"PO_BOX" : "Boite postale",
"PRICE" : "Prix",
"PRICE_LIST" : "Liste de prix",
"PROFIT" : "Profit",
"PROFIT_CENTER" : "Centre de profit",
"PROJECT" : "Projet",
"PROVINCE" : "Province",
"QUANTITY" : "Quantité",
"RATE" : "Taux",
"RECEIPT" : "Reçu",
"RECIPIENT" : "Recepteur",
"RECIPIENT_TYPE" : "Type",
"RECORD" : "Enregistrement",
"REF" : "Réf.",
"REFERENCE" : "Référence",
"REFERENCE_GROUP" : "Groupe de référence",
"REF_GROUP" : "Groupe de Réf.",
"RESPONSIBLE" : "Responsable",
"RESULT" : "Resultat",
"RESULT_ACCOUNT_SCT" : "Section Compte Résultat",
"SECTOR" : "Secteur",
Expand All @@ -956,6 +970,7 @@
"TEXT" : "Text",
"TITLE" : "Titre",
"TOTAL" : "Total",
"TRANSACTION" : "Transaction",
"TRANSACTION_ID" : "ID de la transaction",
"TRANSACTION_PRICE" : "Coût de la Transaction",
"TYPE" : "Type",
Expand Down
4 changes: 2 additions & 2 deletions client/src/js/components/bhFindPatient.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ function FindPatientComponent(Patients, AppCache) {
vm.options = {
findById : {
'label' : 'FORM.LABELS.PATIENT_ID',
'placeholder' : 'FORM.PLACE_HOLDERS.SEARCH_PATIENT_ID'
'placeholder' : 'FORM.PLACEHOLDERS.SEARCH_PATIENT_ID'
},
findByName : {
'label' : 'FORM.LABELS.PATIENT_NAME',
'placeholder' : 'FORM.PLACE_HOLDERS.SEARCH_NAME'
'placeholder' : 'FORM.PLACEHOLDERS.SEARCH_NAME'
}
};

Expand Down
13 changes: 13 additions & 0 deletions client/src/js/services/InventoryService.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ function InventoryService($http, util) {
service.create = create;
service.update = update;
service.clean = clean;
service.report = report;

// FIXME this getInventoryItems function need to be deleted
service.getInventoryItems = read;
Expand All @@ -38,6 +39,18 @@ function InventoryService($http, util) {
.then(util.unwrapHttpResponse);
}

/** get inventory metadata report */
function report(filetype) {
var responseType = filetype === 'pdf' ? 'arraybuffer' : null;
var params = { renderer: filetype };

return $http.get('/inventory/reports/metadata', {
params: params,
responseType: responseType
})
.then(util.unwrapHttpResponse);
}

/** format data to data structure in the db */
function clean(session) {
return {
Expand Down
9 changes: 5 additions & 4 deletions client/src/js/services/ModalService.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ function ModalService(Modal) {
service.openDebtorInvoices = openDebtorInvoices;
service.openTransfer = openTransfer;
service.openUploadDocument = openUploadDocument;
service.openPrinterData = openPrinterData;
// modal for reporting
service.openReports = openReports;
// inventory group action : add or edit
service.openInventoryGroupActions = openInventoryGroupActions;

Expand Down Expand Up @@ -183,11 +184,11 @@ function ModalService(Modal) {
/**
* Page for printing in Modal
*/
function openPrinterData(request) {
function openReports(request) {

var params = angular.extend(modalParameters, {
templateUrl : 'partials/templates/modals/printData.modal.html',
controller : 'PrintDataModalController',
templateUrl : 'partials/templates/modals/reports.modal.html',
controller : 'ReportsModalController',
controllerAs : '$ctrl',
size : 'lg',
backdrop : 'static',
Expand Down
26 changes: 26 additions & 0 deletions client/src/js/services/journal/JournalService.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
angular.module('bhima.services')
.service('JournalService', JournalService);

// Dependencies injection
JournalService.$inject = ['$http', 'util'];

/**
* Journal Service
* This service is responsible of all process with the posting journal
*/
function JournalService($http, util) {
'use strict';

var service = this;

const baseUrl = '/journal/';

// expose the services method's
service.read = read;

/** Getting posting journal data */
function read() {
return $http.get(baseUrl)
.then(util.unwrapHttpResponse);
}
}
2 changes: 1 addition & 1 deletion client/src/js/services/journal/TransactionService.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function TransactionService($http, Store, uuid) {
var service = this;

// @todo update service to use latest posting jounral interface/ API
var source = '/journal_list';
var source = '/journal';

// model to contain transactions - storing this information in a store
// allows us to perform gets/puts based on a transactions UUID locally
Expand Down
Loading

0 comments on commit f5ee72d

Please sign in to comment.