Rushabh Mehta | 3966f1d | 2012-02-23 12:35:32 +0530 | [diff] [blame] | 1 | # ERPNext - web based ERP (http://erpnext.com) |
| 2 | # Copyright (C) 2012 Web Notes Technologies Pvt Ltd |
| 3 | # |
| 4 | # This program is free software: you can redistribute it and/or modify |
| 5 | # it under the terms of the GNU General Public License as published by |
| 6 | # the Free Software Foundation, either version 3 of the License, or |
| 7 | # (at your option) any later version. |
| 8 | # |
| 9 | # This program is distributed in the hope that it will be useful, |
| 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | # GNU General Public License for more details. |
| 13 | # |
| 14 | # You should have received a copy of the GNU General Public License |
| 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | |
Anand Doshi | 486f9df | 2012-07-19 13:40:31 +0530 | [diff] [blame] | 17 | from __future__ import unicode_literals |
Nabin Hait | fc26f64 | 2011-11-21 17:13:53 +0530 | [diff] [blame] | 18 | from webnotes.model.doc import Document |
| 19 | |
| 20 | # Stock Reconciliation |
| 21 | #--------------------------- |
| 22 | |
| 23 | sreco = Document( |
| 24 | fielddata = { |
| 25 | 'doctype': 'Stock Reconciliation', |
| 26 | 'name': 'sreco', |
| 27 | 'reconciliation_date': '2011-09-08', |
| 28 | 'reconciliation_time': '20:00', |
| 29 | } |
| 30 | ) |
| 31 | |
| 32 | # diff in both |
| 33 | csv_data1 = [ |
| 34 | ['Item', 'Warehouse', 'Quantity', 'Rate'], |
| 35 | ['it', 'wh1', 20, 150] |
| 36 | ] |
| 37 | |
| 38 | # diff in qty, no rate |
| 39 | csv_data2 = [ |
| 40 | ['Item', 'Warehouse', 'Quantity'], |
| 41 | ['it', 'wh1', 20] |
| 42 | ] |
| 43 | |
| 44 | # diff in rate, no qty |
| 45 | csv_data3 = [ |
| 46 | ['Item', 'Warehouse', 'Rate'], |
| 47 | ['it', 'wh1', 200] |
| 48 | ] |
| 49 | |
| 50 | # diff in rate, same qty |
| 51 | csv_data4 = [ |
| 52 | ['Item', 'Warehouse', 'Quantity', 'Rate'], |
| 53 | ['it', 'wh1', 5, 200] |
| 54 | ] |
| 55 | |
| 56 | # no diff |
| 57 | csv_data1 = [ |
| 58 | ['Item', 'Warehouse', 'Quantity', 'Rate'], |
| 59 | ['it', 'wh1', 5, 100] |
| 60 | ] |